Forum

Occultation - plane overlap with 3D model

Hi to everyone :)
I’m working in the 3D space with a 3d object (the tree) and a plane (a constant) and I’m doing a scanner of the tree, as you can see in the gif. The problem is that is not respected the depth perception! There is an interposition of the two elements, so in some points the plane has to be behind the tree! I’m not able to understand which node or which attribute I have to give to this two elements… maybe some particular blend?

albero

The tree is a mesh inside a constant
nodo%20albero

To explain better what I need, I have done this gif, in EX9, that do what I need automatically.

Sfera

Thanks a lot,
Martina

hi @Graffetta is the depth buffer of the renderer enabled?

Hi Martina!

To do the stripes following an axis in 3D space, here is a one-liner, cloned constant shader which is mapping texture not to the UV of the vertices, but to their XYZ. I guess it’s a mapping project.
Indeed, Tebjan’s advice to enable depth buffer might already solve your problem.

output.uv = mul(input.uv, tTex);

changed to

output.uv = mul(input.posObject, tTex);

https://id144.org/uploads/tree.zip
20