TOD editing

Ruud

RACER Developer
Apr 2, 2009
592
59
One thing I need to do before the curves can get really ok is to make some kind of 'pick color' mode where you click on the screen and get the luminance of that pixel (in HDR!). That way we can check whether the atmosphere luminance is ok-ish. Although the sun intensity works quite independently on the atmosphere, and the objects on Earth have their diffuse/ambient coloring.

Hm.
 

gtpdzbiz

100RPM
Apr 3, 2009
129
0
Hmmm, that's the reason I suggested doing a CPU atomsphere simulation at a given direction...but since the click and see is more user friendly, I would love to see it work in action.
 

Mr Whippy

3000RPM
Apr 13, 2009
3,004
479
Just a side note, if anyone wants I can generate large HDR's of skies with specific conditions from the Maxwell renderer software here, using any time, lat, long, turbidity, aerosol info etc.

They are plain HDR with pure atmosphere info, but no clouds etc... just for reference if anyone wants one or some to just look at as a guide etc :)

Cheers

Dave
 

Mr Whippy

3000RPM
Apr 13, 2009
3,004
479
Hmmmm, right now to do an overcast sky does this make sense?

It looks ok.

diffuse 0 0 0 (rgb)

sun intensity 0 (to remove shadow casting and 'spot' from the sky)

clouds 10


Then just have the daytime cloud map have a solid alpha channel, so a solid sky full of clouds is rendered.


Looks quite nice here with the right values.


Dave
 

Alex Forbin

500RPM
Apr 3, 2009
727
125
Hmmmm, right now to do an overcast sky does this make sense?

It looks ok.

diffuse 0 0 0 (rgb)

sun intensity 0 (to remove shadow casting and 'spot' from the sky)

clouds 10


Then just have the daytime cloud map have a solid alpha channel, so a solid sky full of clouds is rendered.


Looks quite nice here with the right values.


Dave
There should be a bit of diffuse even on an overcast day, specular would be down a lot and ambient would be higher due to the increased atmospheric back-scattering.
Diffuse at night would be practically nil and would show as less saturation.

Alex Forbin
 

Mr Whippy

3000RPM
Apr 13, 2009
3,004
479
There should be a bit of diffuse even on an overcast day, specular would be down a lot and ambient would be higher due to the increased atmospheric back-scattering.
Diffuse at night would be practically nil and would show as less saturation.

Alex Forbin
Problem is there is no shadow softening, and the sun spot still burns through the cloud texture, so it can look more wrong :)
Diffuse is a bad term really because in Racer it pretty much means the 'sun' while in reality it's quite different as the sun light can be softened by the atmosphere (mie/ray), and then more so by fog and clouds and so on, while still being a directional light, just a bigger softer one :D

I guess this is where the system falls down because the 'diffuse' is fixed to a point source in Racer. If we could add a term for the sun spot size and intensity independently of the sky intensity level, then tie shadow softness to the sun spot size, we could do these intermediate states quite well :)

There will be an ideal way, I've just not thought of the best way yet. I'm sure Ruud is :D


I've often wondered how long it would be until we could do materials like BRDF models, and rather than use point source of light, just create the scene using the generated HDR maps (be they static for larger softer materials on the tracks, to updated often sharper ones for car paints etc)

This is viewport based in 3ds Max, and fast... I guess it will be more what we do in future which will be nicer still!

http://www.laurenscorijn.com/viewportshader


Dave
 

Ruud

RACER Developer
Apr 2, 2009
592
59
I've done a pick-color by now in Ctrl-2; the sky seems fairly radiant with your clear-sky curves. Also I noticed the ambient RGB didn't go higher than around 9 klux? I've upped them a bit. I've fixed the auto exposure with downsampling (it's not using log-average yet (?), which a lot of games seem to do). So auto-exposure now works, but then it's a matter of balancing the sky output vs the ground output.
I might have to add an independent sun intensity and sky intensity to balance sky vs sun.

Hm.
 

Mr Whippy

3000RPM
Apr 13, 2009
3,004
479
I've done a pick-color by now in Ctrl-2; the sky seems fairly radiant with your clear-sky curves. Also I noticed the ambient RGB didn't go higher than around 9 klux? I've upped them a bit. I've fixed the auto exposure with downsampling (it's not using log-average yet (?), which a lot of games seem to do). So auto-exposure now works, but then it's a matter of balancing the sky output vs the ground output.
I might have to add an independent sun intensity and sky intensity to balance sky vs sun.

Hm.
Sky radiance appears to be stronger with a partial overcast state by a fair margin (almost double!), than it does with a clear sky. This is what the IES sky in 3DS Max is giving me. IES seems to be a well respected standard, especially since architects use this system to check radiance and lighting within buildings they design... hmmmm.

Also, remember these sun settings and sky settings are for the lat/long given at the date given. I'm not sure if that will make a difference to what is expected.


Hmm, just checked in 3DS Max IES sky and it most certainly gets brighter with a partial cloud setting, and then dips heavily once overcast!


Sun intensity and sky intensity would seem to be linked by a factor, to the diffuse and ambient intensities we set, or vice versa. I guess there is some link between the two, which would make maintaining the curves a bit easier!? :)

Dave
 

Mr Whippy

3000RPM
Apr 13, 2009
3,004
479
That is pretty interesting, when you look at how Ruud has implemented normal influence on ambient lighting.

I mentioned a while back that ultimately, tying that into a sky value that determined overcast state would be good.

Ie, on the sunny clear day, cloud = 0, and the ambient falloff with normal angle could probably be quite steep, and as we move towards cloud = 1 (full overcast), then the normal influence could drop right off too.


The main problem right now is Racer can't do anything clever like that, but I'm sure it easily could once the trends and methodology are decided upon.
If clouds could be done dynamically and procedurally for the most part, and we simply define the cloud level from 0...1 then we could have other values move around to adjust for this.
Ie, curves for intensity could scale up and down by percentage amounts, the shadows could slowly soften and then turn off completely when we reach almost full cloud cover etc... it would be really very very cool :D


So much potential for Racer with these new HDR values and so on. I think the biggest problem will be getting a nice cloud system that can be dynamic and procedural enough (even if it's just basic clouds at first), to fill out the sky with cloud realistically as the slider goes up :D

Dave
 

gtpdzbiz

100RPM
Apr 3, 2009
129
0
I think normal influence is good, but not sophisticated to simulate Global Illumination(Sky light) though. Another solution is to use mipmapped cubemap for reflective material(usually car paint) to do some image based lighting. The mechanism is quite simple, just generate a chain of mipmap of the environment map, then use the smallest one(1x1x1) as an ambient color lookup.
 

Mr Whippy

3000RPM
Apr 13, 2009
3,004
479
Yep, the envmap, now drawn with fairly nice realistic (hopefully) HDR values, gives us a nice little HDRi to reference for light info.

It could easily be used as you say, to determine some values for specular colour to use, ambient colour and perhaps simple weighting (ie, vertical to horizon gradient to apply to the normals), and so on.

I was thinking it would be cool to use a blurred or small mip-map of the envmap for reflections on ground materials. Ie, tarmac is ultimately reflective, and at sunset it has a bright orange reflection on some parts when looking into the sun, yet when looking the other way, there is a clear strong bluey reflection from the same smoother materials on the road. A small mip-map (say 24x24 version of the envmap) would fake this effect really nicely.


So much potential to do clever stuff. I think the key right now will be getting nice realistic values and linking as much together to get a really nice dynamic sky system that we can just input fairly simple values and get really nice results. Then we can start scavenging things like the envmap for IBL (something I've wanted to see for ages with a small mip-mapped version of the envmap)

Probably stuff for beyond v0.9 though, but will be all the easier to do once v0.9 is settled!

Dave
 

gtpdzbiz

100RPM
Apr 3, 2009
129
0
Blurred envmap can be used on things such as brushed metal or matte car paint, as long as it's for car objects since the cubemap camera is following the car. For ground reflection, it would probably need another render pass in a camera which position wrt view angle and ground position, otherwise there will be some incorrect moving scenery objects on the ground. It's almost the same as those mirror reflection effect in some games.
 

Mr Whippy

3000RPM
Apr 13, 2009
3,004
479
Blurred envmap can be used on things such as brushed metal or matte car paint, as long as it's for car objects since the cubemap camera is following the car. For ground reflection, it would probably need another render pass in a camera which position wrt view angle and ground position, otherwise there will be some incorrect moving scenery objects on the ground. It's almost the same as those mirror reflection effect in some games.
Ah yes, good point.

It could be generated at world coords 0,0,0 and just use the sky dome as it's reference (top half) perhaps...

Hmmm

Dave