Just want to demonstrate a new feature I’ve been adding to our toolset here at RetroEpic:Ambient Probes (demo)! Ambient Probes (demo2)
Similar to the techniques employed by Valve in the Source Engine, Ambient Probes record surrounding colour data into a cube map, which in turn gets used on custom shaders (or any shader that can use cube maps).
Yeah, I’m looking into that now. I have noticed, however, that even Source snaps between APs, but since it’s in the middle of action you don’t really notice it
Werewraith: doing the lerp is actually quite easy, doing it so that it’s fast and efficient is a different matter I’ve got a working solution for ambient now, but the reflection map is a slightly more complex matter.
Pinkhair: Yup, it can also be updated during run-time.
once it has a smoother shifting it will surely be some very interesting work to use.
if it got offline baking in the editor it could even be used with non pro (and especially a large number of probes) and work similar to what Unity Pro will likely get over the 3.x lifecycle with the light clouds from Beast.
I’ve got the ambient colour shifting smoothly, but the reflection is proving to be a bit problematic, since the ambient is not only 6 colours for the different cube faces, which can be interpolated at low cost. But interpolating 6 16x16 cube map textures has a higher processing cost, that alternative is that the reflective shader can have 2 cube maps that the shader then interpolates.
A lot of what I’m doing here would be mad a lot simpler if you could pass colour arrays to shaders. (HINT HINT Unity folks!)
what prevents you doing the interpolation on a pixel shader passing a single float along, the interpolation factor from 0 - 1 depending on which to use?
dreamora, that’s the plan at this point Two cube maps and an interpolating float. I already have a float in the component that handles the ambient colour interpolation. I’ll hopefully have a result this weekend.
hehe and if you ever run out of ideas, I have a few more to offer that I used back in DX7 days. back then only with a single probe per object though but none the less offering additional things one could add
Pretty cool, now you should localize the reflections so the image doesn’t appear fully static when the object moves.
nvidia has a nice and simple implementation here , complete with shader code, if you scroll down a bit.
The relevant portion starts on page 103.
Cool, I was thinking of doing something like this to handle bounced light on dynamic objects in lightmapped scenes, but never though to use cube mapping. I will have to try something like this.