Hodo33 Posted October 12, 2018 Share Posted October 12, 2018 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 ? Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted October 13, 2018 Share Posted October 13, 2018 I think that it might be that it uses the file art/lights/corona.PNG , which is white . Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted October 13, 2018 Share Posted October 13, 2018 (edited) 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 discEDIT: Im an idiot, rayleigh affects the colour of the sky not the sun sorry but it is in scattersky hlsl file somewhere Edited October 13, 2018 by marauder2k9 Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted October 13, 2018 Share Posted October 13, 2018 if you play around with time of day you can see this happening Quote Link to comment Share on other sites More sharing options...
Hodo33 Posted October 13, 2018 Author Share Posted October 13, 2018 @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+pictures&client=firefox-b-1&tbm=isch&tbo=u&source=univ&sa=X&ved=2ahUKEwit0KXUmYTeAhUHx1kKHe_nDIgQsAR6BAgEEAE&biw=1268&bih=745Looking 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 ... Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted October 14, 2018 Share Posted October 14, 2018 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 = 50rayleighScttering = 0.2meiScattering = ??? - 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 . Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted October 14, 2018 Share Posted October 14, 2018 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 Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted October 16, 2018 Share Posted October 16, 2018 I think I get what youre saying now . Theres a little on sunColor in both the scatterSky.CPP and the timeOfDay.CPP maybe youll see something there . Seems that putting a corona at the point in time of day would do it , then you could reduce the size for the scattersky sun to 0 and just use the corona and lighting settings . I found that slightly dimly lit look quite appealing . Im having a little trouble in finding some useful range for the MIE Scattering value , I cant see any change in the lighting . heres another setting if you'd care to try it , its basically the same , with an orange light all the way across . new ScatterSky(testSSky) { skyBrightness = "0.6"; sunSize = "100000"; colorizeAmount = "80"; colorize = "0.388235 0.388235 0.968628 1"; rayleighScattering = "0.5"; sunScale = "0.996 0.996 0.988 1"; ambientScale = "0.302 0.302 0.298 0.184"; fogScale = "0.976471 0.984314 0.996078 1"; exposure = "999999"; zOffset = "0"; azimuth = "0"; elevation = "35"; moonAzimuth = "0"; moonElevation = "45"; castShadows = "1"; staticRefreshFreq = "8"; dynamicRefreshFreq = "8"; brightness = "1"; flareType = "NullLightFlare"; flareScale = "2"; nightColor = "0.0313726 0.0313726 0.0313726 1"; nightFogColor = "0 0 0 1"; moonEnabled = "1"; moonMat = "Moon_Glow_Mat"; moonScale = "0.02"; moonLightColor = "0 0 0 1"; useNightCubemap = "1"; nightCubemap = "NightCubemap"; attenuationRatio = "0 1 1"; shadowType = "PSSM"; texSize = "512"; overDarkFactor = "2000 1000 500 100"; shadowDistance = "100"; shadowSoftness = "0.15"; numSplits = "4"; logWeight = "0.91"; fadeStartDistance = "0"; lastSplitTerrainOnly = "1"; representedInLightmap = "1"; shadowDarkenColor = "0.301961 0.313726 0.207843 0"; includeLightmappedGeometryInShadow = "0"; position = "-11.431 6.11889 100.864"; Rotation = "1 0 0 0"; scale = "1 1 1"; canSave = "1"; canSaveDynamicFields = "1"; mieScattering = "0.0008";//----------this might be weird but Im not seeing much affect from changes to this setting }; Quote Link to comment Share on other sites More sharing options...
Hodo33 Posted October 26, 2018 Author Share Posted October 26, 2018 @Flun not sure the sunsize of 100000 is correct I use 0.15 since the stock size is way to big and exposure of 9999999 would way overdrive the clouds visual.Any devs care to chime in on this? There is a huge struct and calculation for what I feel is a unnatural look. If I could just make a yellow sun I can be happy for now. Thanks ..... Quote Link to comment Share on other sites More sharing options...
Duion Posted October 27, 2018 Share Posted October 27, 2018 How did you get to sunsize 100000?The correct size of the sun would be 1391980000. Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted October 27, 2018 Share Posted October 27, 2018 @Hodo33 , Its all possibly quite contrary yet i believe that the rayleigh scattering is responsible for dimming things considerably in this case .I think 999999 was as high as I could go .@DuionI just played around with this because I agree that an orangish star would look nice , so those numbers produced the largest and darkest scatterSky sun that i could manage without super lighting the sky.background . also I really do like the visual affect on the scene's lighting . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.