Jump to content

[1.5.1] Engine Lighting (1.5.1) Little Config Update (13 October)


tajampi

Recommended Posts

 was playing around with Engine Lighting and noted that the light from the engines will pass through intervening parts of the ship to strike other parts.

For example, I have a wide lower stage, a narrow middle and then it widens again. Light will shine on the widening area as if the lower wide area didn't exist.

Is it a limitation of the game engine that prevents parts of a craft from casting shadows on other parts of the same craft?

Link to comment
Share on other sites

12 hours ago, Drew Kerman said:

possibly. @MOARdV was able to refresh this mod not to light everything but don't know if it creates shadows

What I did was to configure the light as a spotlight so that it only casts light away from the vessel.  I don't think that's what you would want for engine lights.  The Unity Light object includes controls to turn on shadow casting for a light, but I have never experimented with those controls, so I don't know if KSP allows them to work.  If shadow casting does work, I imagine that it would get fairly expensive to generate shadows for a multi-engine stage like a Falcon-9 first stage.  But it'd be worth a try, perhaps.

Link to comment
Share on other sites

  • 4 weeks later...

As mentioned by @Gordon Dry on 2018 Nov 12 and @Moofrog on 2018 Nov 13, there is a typo and a few MM needed changes in EngineLighting version 1.5.1 in both manual and CKAN installs.

I've emailed these to the maintainer @tajampi, but until a new version is out, here's the needed changes.

File 'GameData/EngineLighting/engine-configs.cfg'

line 74
-@PART[microEngine|adialEngineMini]:FOR[EngineLight] {
+@PART[microEngine,radialEngineMini]:FOR[EngineLight] {

line 85
-@PART[liquidEngineMini]:smallRadialEngineFOR[EngineLight]
+@PART[liquidEngineMini,smallRadialEngine]:FOR[EngineLight]

line 357
-@PART[liquidEngine2-2|liquidEngine3|microEngine|radialEngineMini|nuclearEngine]:FOR[EngineLight]
+@PART[liquidEngine2-2,liquidEngine3,microEngine,radialEngineMini,nuclearEngine]:FOR[EngineLight]

line 415
-@PART[solidBooster|solidBooster1-1|solidBooster_sm|MassiveBooster]:FOR[EngineLight]
+@PART[solidBooster,solidBooster1-1,solidBooster_sm,MassiveBooster]:FOR[EngineLight]

An updated engine-configs.cfg incorporating those changes

Spoiler

// rapiers need a config because they're missed by the above check - it excludes them for breathing air
@PART[RAPIER]:FOR[EngineLight] {
	MODULE
	{
		name = EngineLightEffect

		%lightFadeCoefficient = 0.4

		%exhaustRed = 1
		%exhaustGreen = 0.88
		%exhaustBlue = 0.78

		// rapier emissive starts at <10% throttle - which is a bit weird
		%emissiveRed = 0.9
		%emissiveGreen = 0.3
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.1
		%emissiveLogGreen = 0.1
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.6
		%emissiveQuadBlue = 0.05

		%emissiveOffsetZ = 0.0
		%exhaustOffsetZ = 2.0
	}
}

@PART[*]:HAS[!MODULE[EngineLightEffect],@MODULE[ModuleEngines*]:HAS[!PROPELLANT[IntakeAir],!PROPELLANT[IntakeAtm],!PROPELLANT[FanIntakeAir]]]:FOR[EngineLight] {
	MODULE
	{
		name = EngineLightEffect

		%enableEmissiveLight = true // engines with no emissive will shut this off automatically
		%engineEmissiveMultiplier = 1.33 // scale emissive brightness
		%jitterMultiplier = 0.1 // controls main engine light flicker intensity
		%lightFadeCoefficient = 0.8 // control fade-out time for main engine light when killing throttle - increase for slower fade
		%lightPower = 1.0
		%lightRange = 9.0
		%multiplierOnIva = 0.5 // scale main engine brightness when in IVA

		// main engine light colour
		%exhaustRed = 1
		%exhaustGreen = 0.88
		%exhaustBlue = 0.68

		// engine nozzle-glow colour curves
		// the sum of each 3 values for a colour should stay <= 1
		// i.e. emissiveRed + emissiveLogRed + emissiveQuadRed = 
		// 0.2 + 0.8 + 0 = 1
		%emissiveRed = 0.6
		%emissiveGreen = 0.0
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.4
		%emissiveLogGreen = 0.1
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.5
		%emissiveQuadBlue = 0.05

		// manual offset of light
		%lightOffsetX = 0.0
		%lightOffsetY = 0.0
		%emissiveOffsetZ = 0.0
		%exhaustOffsetZ = 1.0
	}
}

// reduce light output from ant/spider
@PART[microEngine,radialEngineMini]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%lightFadeCoefficient = 0.4
		%lightRange = 3

		%exhaustOffsetZ = 0.3
	}
}

// reduce light from spark/twitch
@PART[liquidEngineMini,smallRadialEngine]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%lightFadeCoefficient = 0.4
		%lightRange = 7

		%exhaustOffsetZ = 0.6
	}
}

// the terrier has a strange emissive profile...
@PART[liquidEngine3]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 0.6
		%lightRange = 5
		
		%emissiveRed = 0.5
		%emissiveGreen = 0.0
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.5
		%emissiveLogGreen = 0.8
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.0
		%emissiveQuadBlue = 0.0

		// yup
		%emissiveOffsetZ = 1.4
		%exhaustOffsetZ = 1.2
	}
}

// thuds' emissive is too bright by default
@PART[radialLiquidEngine1-2]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 0.9
		%lightFadeCoefficient = 0.6
		%lightPower = 1.2
		%lightRange = 7

		%emissiveRed = 0.1
		%emissiveGreen = 0.0
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.2
		%emissiveLogGreen = 0.0
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.6
		%emissiveQuadGreen = 0.2
		%emissiveQuadBlue = 0.0

		%emissiveOffsetZ = 0.7
		%exhaustOffsetZ = 1.1
	}
}

// turn up the glow on the aerospike because the nozzle is so exposed
@PART[toroidalAerospike]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 1.8

		%emissiveRed = 0.6
		%emissiveGreen = 0.0
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.4
		%emissiveLogGreen = 0.0
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.2
		%emissiveQuadBlue = 0.0

		%emissiveOffsetZ = 0.4
		%exhaustOffsetZ = 1.8
	}
}

// swivel needs emissive moving a touch
@PART[liquidEngine]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%emissiveRed = 0.8
		%emissiveGreen = 0.2
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.2
		%emissiveLogGreen = 0.0
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.5
		%emissiveQuadBlue = 0.05

		%emissiveOffsetZ = 1.2
		%exhaustOffsetZ = 1.3
	}
}

// reliant has a bigger nozzle too, turn emissive up slightly
@PART[liquidEngine]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 1.5

		%emissiveRed = 0.8
		%emissiveGreen = 0.2
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.2
		%emissiveLogGreen = 0.0
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.5
		%emissiveQuadBlue = 0.05

		%emissiveOffsetZ = 1.3
		%exhaustOffsetZ = 2.0
	}
}

// the Vector is insanely bright - tweak it down(and make it a touch blue)
@PART[SSME]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 1
		%lightPower = 0.8
		%jitterMultiplier = 0.08

		%exhaustRed = 0.85
		%exhaustGreen = 0.85
		%exhaustBlue = 0.9

		%emissiveRed = 0.0
		%emissiveGreen = 0.0
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.1
		%emissiveLogGreen = 0.0
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.8
		%emissiveQuadGreen = 0.1
		%emissiveQuadBlue = 0.0

		%emissiveOffsetZ = 2.0
		%exhaustOffsetZ = 3.0
	}
}

// poodle simmers dull red
@PART[liquidEngine2-2]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 0.8

		%emissiveRed = 0.4
		%emissiveGreen = 0.0
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.1
		%emissiveLogGreen = 0.0
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.5
		%emissiveQuadGreen = 0.1
		%emissiveQuadBlue = 0.0

		%emissiveOffsetZ = 1.2
		%exhaustOffsetZ = 1.5
	}
}


// skipper glows white hot early!
@PART[engineLargeSkipper]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 1.8

		%emissiveRed = 0.7
		%emissiveGreen = 0.1
		%emissiveBlue = 0.1

		%emissiveLogRed = 0.2
		%emissiveLogGreen = 0.6
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.2
		%emissiveQuadBlue = 0.6

		%emissiveOffsetZ = 1.6
		%exhaustOffsetZ = 3.3
	}
}

// mainsail just needs slightly more emission
@PART[liquidEngine1-2]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 1.6

		%emissiveOffsetZ = 1.7
		%exhaustOffsetZ = 3.5
	}
}

// the rhino is a beast!
@PART[Size3AdvancedEngine]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 2
		%lightRange = 10
		
		%exhaustRed = 0.85
		%exhaustGreen = 0.85
		%exhaustBlue = 0.9

		%emissiveRed = 0.6
		%emissiveGreen = 0.0
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.4
		%emissiveLogGreen = 0.1
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.7
		%emissiveQuadBlue = 0.2

		%emissiveOffsetZ = 2.4
		%exhaustOffsetZ = 4.8
	}
}

// as is the mammoth!
@PART[Size3EngineCluster]:FOR[EngineLight] {
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 2
		%lightRange = 11
		
		%exhaustRed = 1
		%exhaustGreen = 0.95
		%exhaustBlue = 0.66

		%emissiveRed = 0.2
		%emissiveGreen = 0.0
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.8
		%emissiveLogGreen = 0.1
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.3
		%emissiveQuadBlue = 0.05

		%emissiveOffsetZ = 2.2
		%exhaustOffsetZ = 4.9
	}
}

// shift vacuum engines to a cold-bluish colour and reduce flicker
@PART[liquidEngine2-2,liquidEngine3,microEngine,radialEngineMini,nuclearEngine]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%jitterMultiplier = 0.04
		%lightFadeCoefficient = 0.5

		%exhaustRed = 0.85
		%exhaustGreen = 0.85
		%exhaustBlue = 0.9
	}
}

// twinboar needs huuuge offsets (like the solids)
@PART[Size2LFB]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%engineEmissiveMultiplier = 1.6
		%jitterMultiplier = 0.08

		%exhaustRed = 0.85
		%exhaustGreen = 0.85
		%exhaustBlue = 0.9

		%emissiveRed = 0.6
		%emissiveGreen = 0.1
		%emissiveBlue = 0.0

		%emissiveLogRed = 0.4
		%emissiveLogGreen = 0.8
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.1
		%emissiveQuadBlue = 0.05

		%emissiveOffsetZ = 6.2
		%exhaustOffsetZ = 6.9
	}
}

// puff is a little yellow
@PART[omsEngine]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%jitterMultiplier = 0.04

		%exhaustRed = 1
		%exhaustGreen = 0.95
		%exhaustBlue = 0.7

		%exhaustOffsetZ = 0.8
	}
}

// shift solids to more yellow and increase the flickering effect
@PART[solidBooster,solidBooster1-1,solidBooster_sm,MassiveBooster]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%lightPower = 1.2
		%lightRange = 11.0
		%jitterMultiplier = 0.16
		
		%exhaustRed = 0.9
		%exhaustGreen = 0.85
		%exhaustBlue = 0.43
	}
}

@PART[solidBooster_sm]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%exhaustOffsetZ = 3.0
	}
}

@PART[solidBooster]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%emissiveOffsetZ = 2.8
		%exhaustOffsetZ = 3.6
	}
}

@PART[solidBooster1-1]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%emissiveOffsetZ = 5.4
		%exhaustOffsetZ = 6.8
	}
}

@PART[MassiveBooster]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%emissiveOffsetZ = 10.0
		%exhaustOffsetZ = 12.0
	}
}

// boost output light (a lot!) from the NERV
@PART[nuclearEngine]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%lightPower = 2.4

		%exhaustOffsetZ = 2.1
	}
}

// boost light output of ions and shift it to a blue-green
@PART[*]:HAS[%MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]]]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%lightPower = 0 // ions use _only_ emissive light
		%engineEmissiveMultiplier = 2.5
		%jitterMultiplier = 0

		%exhaustRed = 0.47
		%exhaustGreen = 0.83
		%exhaustBlue = 0.94

		%emissiveRed = 0.47
		%emissiveGreen = 0.83
		%emissiveBlue = 0.94

		%emissiveLogRed = 0.0
		%emissiveLogGreen = 0.0
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.0
		%emissiveQuadBlue = 0.0

		%emissiveOffsetZ = 2.0
	}
}

@PART[ionEngine]:FOR[EngineLight]
{
	@MODULE[EngineLightEffect]
	{
		%lightPower = 0 // ions use _only_ emissive light
		%engineEmissiveMultiplier = 2.5
		%jitterMultiplier = 0
		%lightFadeCoefficient = 0.2
		%lightRange = 10

		%exhaustRed = 0.47
		%exhaustGreen = 0.83
		%exhaustBlue = 0.94

		%emissiveRed = 0.47
		%emissiveGreen = 0.83
		%emissiveBlue = 0.94

		%emissiveLogRed = 0.0
		%emissiveLogGreen = 0.0
		%emissiveLogBlue = 0.0

		%emissiveQuadRed = 0.0
		%emissiveQuadGreen = 0.0
		%emissiveQuadBlue = 0.0

		%emissiveOffsetZ = 2.0
	}
}

 

 

Edited by Jacke
Link to comment
Share on other sites

  • 1 month later...
On 2/3/2019 at 5:35 AM, Jacke said:

line 74
-@PART[microEngine|adialEngineMini]:FOR[EngineLight] {
+PART[microEngine,radialEngineMini]:FOR[EngineLight] {

line 357
-PART[liquidEngine2-2|liquidEngine3|microEngine|radialEngineMini|nuclearEngine]:FOR[EngineLight]
+PART[liquidEngine2-2,liquidEngine3,microEngine,radialEngineMini,nuclearEngine]:FOR[EngineLight]

 

Just to clarify: the line 74 patch shouldn't actually remove the "@", and line 357 also  has a "@" that should remain.

Link to comment
Share on other sites

On 2/3/2019 at 5:35 AM, Jacke said:

mentioned by @Gordon Dry on 2018 Nov 12 and @Moofrog on 2018 Nov 13, there is a typo and a few MM needed changes in EngineLighting version 1.5.1 in both manual and CKAN installs.

I've emailed these to the maintainer @tajampi, but until a new version is out, here's the needed changes

@tajampi hasn't  been around since November

Link to comment
Share on other sites

  • 3 weeks later...
On 5/19/2015 at 6:56 AM, Why485 said:

It's more that the lighting in the game isn't the same as in real life. I've been a shuttle night launch as well and it is so bright it's like watching a sunrise, but it doesn't actually light up the shuttle itself the same way the game lights the spacecraft with point lights. The shuttle is pretty evenly lit because all of the light on it is coming from reflections off the ground and diffused light from the exhaust.

STS-88_launch.jpg

I observe this photo, the shuttle is pretty evenly lit.

I propose an approximation to create the lighting effect from exhaust.

Another motivation is that current Engine Lighting mode is to add point light source per engine.

When the number of engines is high, the frame rate is low.

 

My proposed idea:

1 Add only one light source for all engines, instead of one point light source per engine

  This can prevent lag by adding too many light sources when there are many engines

2 This added light source should have a virtual position which can be attached below the center of thrust.

And this added light source has both ambient light source and point light source properties.

Entire scene, which includes ground and the rocket, is lit by the light source with decline according to distance square, like point light source.

However, the lit pixels disregard the cosine effect between incident direction and surface normal direction, like an ambient light source.

Edited by huangth
Link to comment
Share on other sites

  • 1 year later...

Is it possible to specify a light colour based on the mode an engine is in?

Also, is it a known issue that engines don't produce light when activated via RMB menu instead of staging?

 

(Asking here because this is the version of EL I'm using.)

Edited by Rocket Witch
Link to comment
Share on other sites

  • 1 year later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...