Scenario background smooth fading - Custom Depth?

Hi,

Any ideas on how can I fade out the scenario smoothly and leave only some selected Meshes fully rendered, as we can see in the transition scenes from PepsiMan? PSX Longplay [115] Pepsiman - YouTube

Notice that the scenario does not instantaneously turns to black, and the PepsiMan stays fully rendered as before.

I’m trying to find a way to reach this by using Custom Depth, but the PP Material has only the emissive property, so my Mesh turns completely white.

Here’s my work so far:

https://drive.google.com/open?id=0B3...mRsVUM0cGFnYVE

https://drive.google.com/open?id=0B3...054NmhraElnU00

For me, this setup worked like the way you described;

Just plug the lerp result into the emissive. If you want to animate it, multiply the bitmask output with some scalar parameter. In this particular example, everything with the customdepth stencil set to 1 will be visible, whereas the rest is black.

If you get bleeding from materials of surrounding objects, just set the custom depth stencil buffer of those to some value you aren’t using (it will cause them to be included in the depth buffer calculation).

edit: in case this isn’t what you want, I advise you to update those links you provided. They give not found errors for me when clicking them.

Awesome! That was the solution I was looking for.

I just had to exchange the pins A and B in the Lerp node to reach my goal.

Here’s my final result:

I really appreciate your help, cridia. I was struggling with that for days till now.