Jump to content

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


tajampi

Recommended Posts

On 9/3/2016 at 9:12 PM, Whovian41110 said:

How do I remove the lighting effects from a mod's engines?  (The Endurance mod btw)

//This should work (Change the part name to the actual name of the Endurance engine)
@PART[NAME_OF_THE_PART]
{
	!MODULE[tjs_EngineLight]{}
}
On 11/3/2016 at 0:13 AM, Valkyria90 said:

Love this mod :)

I think sometimes the lighting can get too intense though, especially on my shuttle with its big control surfaces and wings. Is there any way to reduce the brightness 20-30% overall?

You can change it in the settings, here is how:

@PART[*]:HAS[@MODULE[ModuleEngines*]]:FOR[EngineLight] {
	MODULE
	{
		name = tjs_EngineLight
		isDebug = true
		lightPower = 1.0 //Change to 0.6 or so for overall light reduction
		lightRange = 40.0 //This should be fine as is
		maxLightPower = 23.0 //If you are willing to keep light as is, but limit it, change this
		lightRed = 1      
		lightGreen = 0.88   //Tweaking these colors to darker tones also helps a lot
		lightBlue = 0.68    //for the next release colors will be darker!
		jitterMultiplier = 10.5
		multiplierOnIva = 0.5
	}
}

 

EDIT: Wow at syntax highlighting, love the new forum software ;)

EDIT2: Uh oh, not working after an edit?

EDIT3: Sorry for late reply, btw, i trusted forum notifications and they don't seem to actually work :P

 

 

Edited by tajampi
Link to comment
Share on other sites

  • 3 weeks later...
6 minutes ago, stuff said:

is this going to be updated for 1.1

Are you kidding me? 1.1 ISN'T EVEN OUT YET! STOP ASKING FOR MODDERS TO BEND TO YOUR WHIMS AND FANCIES!

Link to comment
Share on other sites

4 minutes ago, Andem said:

Are you kidding me? 1.1 ISN'T EVEN OUT YET! STOP ASKING FOR MODDERS TO BEND TO YOUR WHIMS AND FANCIES!

i just asked a simple question, I mean think about this did I demand anything NOPE. A question is just that a question. yes 1.1 is out as a prerelease. this give modders time to release things before the actual release. again the main point i was making was asking a question. I did not demand that the modder release an update. 

Link to comment
Share on other sites

38 minutes ago, stuff said:

i just asked a simple question, I mean think about this did I demand anything NOPE. A question is just that a question. yes 1.1 is out as a prerelease. this give modders time to release things before the actual release. again the main point i was making was asking a question. I did not demand that the modder release an update. 

 

You'r right. I'm sorry, I'm just getting so frustrated by the bog of "When's the 1.1 update coming" posts. I shouldn't ave lashed out at you, it was stupid.

Link to comment
Share on other sites

Just now, Andem said:

 

You'r right. I'm sorry, I'm just getting so frustrated by the bog of "When's the 1.1 update coming" posts. I shouldn't ave lashed out at you, it was stupid.

forget about it, I understand your frustrations as well, I have seen this many times myself.

Link to comment
Share on other sites

Sadly I don't have KSP in Steam so I can't update to 1.1 until it's out in the KSP Store...

 

On 9/4/2016 at 2:27 AM, Whovian41110 said:

Is there a way to make a MM patch to "cap" the brightness of an engine cluster (and if so could someone do it? I suck at MM)?  My shuttle is getting ridiculously lit up.

Is the cluster a single part? If so it's easy, if it's composed of multiple parts is a bit more hard but possible :)

 

After a long KSP break I finally got back and investigated Real Fuel engines a little. It should be easy to implement them in the rewrite, so RSS will finally have lights!

Also, worked a little bit on global illumination, using a very simple method (Place a cube of lights around the vessel, make them bright depending on engines closer to them than to the other lights) which more or less works! No idea if I should wait untill 1.1 to rewrite or do it now, as 1.1 may break things... 

 

 

Link to comment
Share on other sites

20 minutes ago, tajampi said:

Sadly I don't have KSP in Steam so I can't update to 1.1 until it's out in the KSP Store...

 

Is the cluster a single part? If so it's easy, if it's composed of multiple parts is a bit more hard but possible :)

 

After a long KSP break I finally got back and investigated Real Fuel engines a little. It should be easy to implement them in the rewrite, so RSS will finally have lights!

Also, worked a little bit on global illumination, using a very simple method (Place a cube of lights around the vessel, make them bright depending on engines closer to them than to the other lights) which more or less works! No idea if I should wait untill 1.1 to rewrite or do it now, as 1.1 may break things... 

 

 

I would love a version that works with RF for 1.0.5 as it may be some time before many of the realism mods are updated. I fully understand if you want to save your time/work for just one update for 1.1. I wanted to at least chime in to praise the mod, but I have missed it a lot since switching to RealFuels.

Link to comment
Share on other sites

16 hours ago, tajampi said:

Sadly I don't have KSP in Steam so I can't update to 1.1 until it's out in the KSP Store...

 

Is the cluster a single part? If so it's easy, if it's composed of multiple parts is a bit more hard but possible :)

 

After a long KSP break I finally got back and investigated Real Fuel engines a little. It should be easy to implement them in the rewrite, so RSS will finally have lights!

Also, worked a little bit on global illumination, using a very simple method (Place a cube of lights around the vessel, make them bright depending on engines closer to them than to the other lights) which more or less works! No idea if I should wait untill 1.1 to rewrite or do it now, as 1.1 may break things... 

 

 

It's a group of multiple Vector engines.  A couple other designs I've had had a "ring" of SRBs and thus the launch pad looks ridiculously lit up when they all ignite.

Link to comment
Share on other sites

Yep, there are huge problems with multiple lights making everything white, for now I recommend making the light more orange in the config (either globally or only for some real poweful engines). If you want I will post some custom darker values :)

 

Some plans:

 

Also, I believe getting rid completely of the point light at the nozzle of engines could help make it look better, afterall, it's not the nozzle which emits light, but the burning exhaust gases. Look at this image:

 

Spoiler

arlomidgett-sts-131-discovery-1920.jpg

The vessel itself is almost unlit by the engines, but the light reflecting off the landscape and exhaust smoke gives everything a orange tone. There are surprisingly little images of engines (specially SRBs) burning in space, so sadly i have no reference of how it looks, i will  work with RealPlume in mind, stock flames look really bad :P

 

So, I loaded unity, placed a model and started moving lights around, here is the best that I can do without pre-baking things, or using millions of lights:

NOTE: Spaceship not included! Sun is pointing at the top of the vessel, not the best viewing angle ;)

Spoiler

qD4yBel.png

As you can see the light surrounds the vessel nicely, it does not look like there is a lamp in the engine :)

 The thing is every engine now has two lights! But it can be optimized, an algorithm could find lights which are in very similar coordinates, basically, lights which are side-to-side, and join them into one placed at the mid-point, here is how the spaceship looks optimized.

 

Spoiler

uw1TEWR.png

 

(The light is also moved away from the engines, so it does not break symmetry)

 

As you rise in the atmosphere the lights would get slowly more separated (search for some images of the Saturn V in the upper atmosphere, or RSS launch videos, everything becomes a ball of fire), and then when you reach they will join again at the default, ground separation, and slowly lose light power.

 

Hope I can make it into the mod soon, but modding KSP is really troubly with all the resets involved. :)

 

Link to comment
Share on other sites

2 hours ago, tajampi said:

Yep, there are huge problems with multiple lights making everything white, for now I recommend making the light more orange in the config (either globally or only for some real poweful engines). If you want I will post some custom darker values :)

 

Some plans:

 

Also, I believe getting rid completely of the point light at the nozzle of engines could help make it look better, afterall, it's not the nozzle which emits light, but the burning exhaust gases. Look at this image:

 

  Hide contents

arlomidgett-sts-131-discovery-1920.jpg

The vessel itself is almost unlit by the engines, but the light reflecting off the landscape and exhaust smoke gives everything a orange tone. There are surprisingly little images of engines (specially SRBs) burning in space, so sadly i have no reference of how it looks, i will  work with RealPlume in mind, stock flames look really bad :P

 

So, I loaded unity, placed a model and started moving lights around, here is the best that I can do without pre-baking things, or using millions of lights:

NOTE: Spaceship not included! Sun is pointing at the top of the vessel, not the best viewing angle ;)

  Hide contents

qD4yBel.png

As you can see the light surrounds the vessel nicely, it does not look like there is a lamp in the engine :)

 The thing is every engine now has two lights! But it can be optimized, an algorithm could find lights which are in very similar coordinates, basically, lights which are side-to-side, and join them into one placed at the mid-point, here is how the spaceship looks optimized.

 

  Hide contents

uw1TEWR.png

 

(The light is also moved away from the engines, so it does not break symmetry)

 

As you rise in the atmosphere the lights would get slowly more separated (search for some images of the Saturn V in the upper atmosphere, or RSS launch videos, everything becomes a ball of fire), and then when you reach they will join again at the default, ground separation, and slowly lose light power.

 

Hope I can make it into the mod soon, but modding KSP is really troubly with all the resets involved. :)

 

Holy **** how can I get them configs

Link to comment
Share on other sites

2 hours ago, tajampi said:

Yep, there are huge problems with multiple lights making everything white, for now I recommend making the light more orange in the config (either globally or only for some real poweful engines). If you want I will post some custom darker values :)

 

Some plans:

 

Also, I believe getting rid completely of the point light at the nozzle of engines could help make it look better, afterall, it's not the nozzle which emits light, but the burning exhaust gases. Look at this image:

 

  Reveal hidden contents

arlomidgett-sts-131-discovery-1920.jpg

The vessel itself is almost unlit by the engines, but the light reflecting off the landscape and exhaust smoke gives everything a orange tone. There are surprisingly little images of engines (specially SRBs) burning in space, so sadly i have no reference of how it looks, i will  work with RealPlume in mind, stock flames look really bad :P

 

So, I loaded unity, placed a model and started moving lights around, here is the best that I can do without pre-baking things, or using millions of lights:

NOTE: Spaceship not included! Sun is pointing at the top of the vessel, not the best viewing angle ;)

  Reveal hidden contents

qD4yBel.png

As you can see the light surrounds the vessel nicely, it does not look like there is a lamp in the engine :)

 The thing is every engine now has two lights! But it can be optimized, an algorithm could find lights which are in very similar coordinates, basically, lights which are side-to-side, and join them into one placed at the mid-point, here is how the spaceship looks optimized.

 

  Reveal hidden contents

uw1TEWR.png

 

(The light is also moved away from the engines, so it does not break symmetry)

 

As you rise in the atmosphere the lights would get slowly more separated (search for some images of the Saturn V in the upper atmosphere, or RSS launch videos, everything becomes a ball of fire), and then when you reach they will join again at the default, ground separation, and slowly lose light power.

 

Hope I can make it into the mod soon, but modding KSP is really troubly with all the resets involved. :)

 

This would have to be tested a lot and probably won't be usable for weaker GPUs or cause a lot of flicker if pixel light count is low. Kerbal uses forward rendering which means that each light gets its own rendering pass.

Link to comment
Share on other sites

On 4/11/2016 at 3:32 PM, SpaceTiger said:

This would have to be tested a lot and probably won't be usable for weaker GPUs or cause a lot of flicker if pixel light count is low. Kerbal uses forward rendering which means that each light gets its own rendering pass.

Well crap... that's my GPU

Link to comment
Share on other sites

On 4/10/2016 at 8:12 PM, tajampi said:

Sadly I don't have KSP in Steam so I can't update to 1.1 until it's out in the KSP Store...

Made a recompile with updated references to the 1.1 pre-release dll's, fixed the obsolete methods of accessing light component and changed it to .net 4.0 to get rid of a error on boot.

Here's a link for anyone interested, included source for anyone who want's to be on the safe side.

https://www.dropbox.com/s/h7b0vgzhif1w8gv/EngineLight.7z?dl=1 Built as debug DLL, will leave link valid, but use the one below.

(Dropbox) EngineLighting_1.1Pre_CommunityBuild.7z Built as release DLL

Thanks Taja for a great mod.

Edited by HandHunter
Link to comment
Share on other sites

14 hours ago, HandHunter said:

and changed it to .net 4.0 to get rid of a error on boot.

This isn't a good idea, the version of Mono used by Unity is not (fully) compatible with .NET 4.0.  Was the error you got with .NET 3.5 and if so, what was it?

Link to comment
Share on other sites

42 minutes ago, Padishar said:

This isn't a good idea, the version of Mono used by Unity is not (fully) compatible with .NET 4.0.  Was the error you got with .NET 3.5 and if so, what was it?

Thought Unity was using 4.5 as that was what the source of the project was on, I lowered it to 4.0 from 4.5.

Anyhow it's working without any problems at all. It's as easy as to recompile with 3.5 again, no other changes needed if it worries you.

Link to comment
Share on other sites

Yep Unity still uses .NET 3.5

 

Also, will oficially recompile it (that build works perfectly though). I wish i had some shader writing knowledge as most lighting stuff could be done simply with a gradient shader :P (No, really, most of the time your engines are pointing down, if there is any exception a light will be used, but changing all shaders for all parts looks troubly)

 

Will test 1.1 a little, recompile, and later on add some stuff! :)

 

Also, the configs are located in the mod directory.

Link to comment
Share on other sites

Started rewriting the thing, just noticed I have not changed the code since 10 months ago... :sealed:

 

Also, i found out how to add individual flares to engines, which may (optionally) make your rocket look much more JJ.Abrams.

Not sure if a Unity light with 0 range actually does any lighting or just simply allows flares and the like :wink:

 

EDIT: Nvm, unity already has a lens flare component

 

Will post progress soon

Edited by tajampi
Link to comment
Share on other sites

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...