Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / Sunlight controls and light rays

Author
Message
Avenging Eagle
16
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 2nd Mar 2014 14:20
I have been searching for literally hours to try and find some information on how to crack controls for the 'baked' sunlight effect FPSC can now apply globally to a level's lightmaps. In the setup and buildgame.ini files, we see these parameters:


Setting the sun's colour is fine but I'm having a real hard time understanding the co-ordinates system for this sun effect. I have a skybox in which the sun is setting and I want to mimic that light using this sun effect but I'm not making any progress. Here's what I've tried to far:

...which gives you sun directly overhead.


...which gives you sun coming at a 45-degree angle from the right side of the map.


...which gives you sun coming at a 45-degree angle from the bottom (South, if you will) end of the map.

But when I try stuff like this (to get the light coming from South-East):

...the .ini files overwrite back to their original values. What am I doing wrong here? Can we please get a definitive guide to this feature and how to use it?

Also, as a sidenote, I see FPSC now has lightrays...sort of. Except they default from the North end of the map. I understand you can use Pg Up and Pg Down to manipulate the position in test game but how do you then lock that position so it doesn't revert back to its default North next time around? Also, can you change the height of the point-of-origin of the light rays effect? Again, with the sun in my skybox being low in the sky, I want to mimic this with the light rays too.

AE
ncmako
9
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 3rd Mar 2014 03:44
Hi Avenging Eagle
You said "baked sunlight effect" and then I went on to read
"you can use Pg Up and Pg Down to manipulate the position". I get a feeling your using two different methods here?

Is this what your looking for. A sunrise from the "south-east".
"baked sunlight effect"


The Pg up & Pg down are used with the Lightray "scatter.fx" effect
and postprocess set to 3.
If your wanting the "baked sunlight" set postprocess=0.

The x & z coordinates give it a "south-east" position.
The colors you will have to play with. Also, you might have to
clean your "lightmapping" files between tests?
Let me know if it works for you
best

You know you're a bad gamer when you're able to run out of infinite lives.
ncmako
9
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 3rd Mar 2014 18:59
Avenging Eagle
Had a chance this morning to play with this. The "Lightray" does reset to it default setting when testing for some reason?
But it can be adjusted with a script during test. With postprocess=3 use a triggerzone to adjust the "Lightray" angle.

This was from DarkGoblin LRMod. Tested and works. Irayset=120
I take means 120deg.(about south-east). With that said one
should be able to readjust as needed? Might even work in "setup.ini", maybe But it does work.
best

You know you're a bad gamer when you're able to run out of infinite lives.
Avenging Eagle
16
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 4th Mar 2014 00:12
Thanks ncmako, works a treat. To clarify for anyone else looking for an answer...

lightmapsunx, lightmapsuny & lightmapsunz parameters MUST be set to integers (whole numbers). You CAN'T use decimals.

For the lightrays effect to be adjusted, the setup.ini needs to have postprocess=3, OR use a triggerzone with setposteffect=

lrayset= changes the direction the lightrays originate from but NOT the angle at which they come in from (which is a shame, because I really want to change that too!).

Also, you will also notice the lightrays shader has some peculiar side effects when you're not looking at the originating point. See picture:


I'm wondering if it's possible to use an fpi condition to fade the effects of the light rays out once you turn away from them. There is a condition called PLRNOTFACING but it needs to be applied to an entity and the sun that the lightrays effect relies on doesn't seem to be an entity as such, least not an editable one.

Also, when it comes to building games with multiple skyboxes, I'm not sure how to tell FPSC to bake the sunlight from different directions per-level. So let's say level 1 is the sunset scenario we've been talking about, but level 2 is midday the next day. You don't have individual setup.ini files per level do you? Hmmmm.

AE
ncmako
9
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 6th Mar 2014 20:25
Avenging Eagle
Quote: "possible to use an fpi condition to fade the effects of the light rays out once you turn away from them"

Not that I'm aware of. Even if one could using "PLRNOTFACING" it's basically ON or OFF for the whole scene. You can fade the "rays"
some in the "scatter.fx" (float AlphaAngle=x using a smaller integer).

Quote: "I'm not sure how to tell FPSC to bake the sunlight from different directions per-level"

Very easy to do. Take a look at this thread...http://forum.thegamecreators.com/?m=forum_view&t=167674&b=21
Read it carefully, I do it all the time and works like a charm.
Start with two simple levels, bake your light from one direction, then from another, combine your levels. Done. Once you do it
you'll find it very easy.
best luck

You know you're a bad gamer when you're able to run out of infinite lives.

Login to post a reply

Server time is: 2021-12-02 09:05:20
Your offset time is: 2021-12-02 09:05:20