Custom Feature: Ambient Probes

Hi everyone,

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).

CnC welcome!

Interesting, if you can fix the transition between Ambient Probes this tool will be awesome

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 :wink:

Very nice, and yes, I noticed the snapping in Source too.
If it’s possible, a better transition between probes would do wonders… a lerp perhaps?

It does look very nice. So is the probe data created at runtime?

Werewraith: doing the lerp is actually quite easy, doing it so that it’s fast and efficient is a different matter :wink: 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.

I’m guessing it would need pro to use?

Pinkhair: Yup, pro only.

very nice work and interesting work :slight_smile:

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.

Thanks, dreamora :slight_smile:

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 :slight_smile: 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.

cool :slight_smile:

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 :wink:

I’ve added transitioning between Ambient Probes! For both diffuse and reflective surfaces!

View it Here

Let me know what you guys think.

That looks good but unfortunately I don’t have the money for the pro version ):

The second one looks pretty good, good job.

AcidArrow, you might be able to use it (partially) in Unity Free. You can define user-created maps.

This is untested, but I don’t see why it shouldn’t work.

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. :slight_smile:
The relevant portion starts on page 103.

Wow, second demo looks nice…

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.