A typical unlit scene - the starting point for all rendering
Alas I am not prepared to delay the project further by implementing a whole HDR system as it would require a lot of texture and shader updating, and adding texture referencing in my shaders is the last thing I want to do after making such good strides in performance. The solution was to achieve everything I wanted but without using the above techniques. As at 2:30PM I have achieved these goals, and am ahead of schedule by a day :)
The solution to the tone mapper was what I am calling my auto-magical exposure feature, which is very similar to adaptive bloom and acts on the post process shader to ensure a scene compensates for being over bright. Added some code to use the time delta from the engine and it now adjusts at the same speed as the human iris which creates a nice subtle effect. Look at the sky and your eyes adjust, look at something dark and the eyes adjust again, look back at the sky quickly and notice how the eyes adjust over 1-2 seconds. Very cool!
The second solution was to dump reading the skybox (even a small 1x1 per side version of it), and simply pre-scan the colour of the sky and the colour of the floor, and load those directly into the shader as a constant. I then use a spherical harmonics trick to work out the contributions based on the surface normal presto, the ambience now has the visual effect of receiving bounced light. It's not sophisticated, but it's completely free and super fast!
Notice how the ambience is taken from the sky and terrain colour
When combined with the remaining pixel shader it blends with the scene
Lee
ReplyDeleteThe graphics in the merged scene are a massive improvement so really good job on this. When combined with the pre baked shadows I think the overall visuals in Reloaded are going to be a huge step up in the next beta.
I'm still a little worried about the lighting getting blown out on skyboxes and some surfaces but will wait to see how the tone mapping and improved adaptive bloom work out there.
Great work. You have really improved a lot of things over the last few weeks.
I'm sceptical still. The floor is still fluorescent green. Do you have the norm and specs working in the scene?
ReplyDeleteI will await the release but not sure what to expect
See the shot in Tuesday's blog :)
DeleteOk :).
DeleteWhat about none sun lighting? Ie indoor?
DeleteAnd what about a real sun position?
ReplyDeleteI was ever-so-slightly disappointed not to be getting full HDR (because I was fully aware it was necessary for tone mapping and assumed you were too), but I'm sure the adaptive bloom will be a good compromise and... FINALLY. The bounced lighting from the ground and the PARTICULARLY the skybox is AMAZING. This is what I've been saying for ages and ages, that the lighting in the scene MUST match the sky or it won't look realistic. Very happy with this addition!!
ReplyDelete