UE4 Render customDepth Pass

无标题项目
无标题项目001
How do you make it transparent so you can see the magma inside!
002
003
I gave the object a material like this


I want to achieve the effect
004
You can see the flow effect in a pit like this
I can’t see the flow effect! Can you tell me some ways?

2 Likes

I made this video a while back.

I don’t really think you need to use stencils.

the magma and the sides of the crack shouldn’t be writing to custom depth or have a stencils on.

you may have to play around with the sort order of the magma if it’s translucent.

3 Likes

I have used this method, but it will encounter the translucent disorder you mentioned, and the ground will also appear transparent, I wonder if there is another method to achieve this effect
But thank you very much!!

you could push the verts down. like how snow deformation is done.

So you want to see the walls of the canal through the lava? Or do you want layers of currents moving in the lava? Not sure if I quite understand…

Incidentally, it’s usually better to use functions which smooth 0 to 1 edges between things – those ifs can cause hard edges and artifacts in some cases. You can accomplish the same thing with clever use of smoothstep functions.

See the laminar flow in the lava