ScatterSky Sun color

Scripting questions, discussions, etc
7 posts Page 1 of 1
Hodo33
Posts: 42
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Fri Oct 12, 2018 8:53 pm
I have played with most all the variables on a scattersky and I can't change the sun color. In game it is pure white and the sun is kind of yellow in reality. Any changes I make to sunscale or colorize etc just turns the whole scene yellow. In the code:
mSunColor.set( 0, 0, 0, 1.0f );
mSunScale = ColorF::WHITE;
wont just change the sun it colors the whole scene, clouds and all. Anyone got a cool trick ?
fLUnKnhaXYU
Posts: 39
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sat Oct 13, 2018 2:21 am
I think that it might be that it uses the file art/lights/corona.PNG , which is white .
marauder2k9
Posts: 194
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sat Oct 13, 2018 3:32 am
The properties under the scattersky have nothing to do with the sun at all, they are just there for how the lighting affects the scene. As far as i know the sun in torque is just a white disc with glow applied to it and the only way to change it is by changing the hlsl file for the scattersky, i think anyway the rayleigh colour is affected by the time of day to give that colour glow of yellow outside the main disc

EDIT: Im an idiot, rayleigh affects the colour of the sky not the sun sorry but it is in scattersky hlsl file somewhere
Last edited by marauder2k9 on Sat Oct 13, 2018 3:47 am, edited 2 times in total.
marauder2k9
Posts: 194
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sat Oct 13, 2018 3:39 am
if you play around with time of day you can see this happening
Image
Hodo33
Posts: 42
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Sat Oct 13, 2018 10:07 pm
@marauder that picture almost proves my point, go out and look at the sun at sunset and the sky around it. With all the variables in there I think it should be closer.
https://www.google.com/search?q=sunset+ ... 68&bih=745

Looking at the shaders/common/scattersky pixel and vertex doesn't show the color of the sun specifically.. I'll keep digging seems like it would be easy to just set 2 or 3 colors and lerp to the time of day but .... thanks for the reply


@ fLUnKnhaXYU I changed the corona graphic and material to blues and greens and no difference on the sun in scattersky ... thanks ...
fLUnKnhaXYU
Posts: 39
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sun Oct 14, 2018 2:28 am
I couldn't find anything on a corona color for the scattersky sun . All I can figure is that scatters the colors from a point which is the center of a sun . IDK , I couldnt see where it adds a sun object , just generates the sky coloring using the rayleigh setting .
you might try these settings
sunSize = 50
rayleighScttering = 0.2
meiScattering = ??? - I think this is more for objects in the sky (maybe something like 0.0045)
flareType = null - you can add you own flare , any color .

i used a medium blue color for colorize . you should get a sun area that is mostly the colorize color with a small amount of bright or scattered color . If it doesnt make sense Im probably just not expressing it well . Torque 3D documentation release 3.5.1 at readTheDocs page 82 Scatter Sky .
marauder2k9
Posts: 194
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sun Oct 14, 2018 11:04 am
As you can see from this changing the rayleigh changes the sun colour but it affects the entire scene lighting too, its very hard to get true colouring with this but you can get a sun with a yellow after glow with okay lighting

Image


Image
7 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest