Download

How to make an xray (sort of) Material? (not disable depth pass)

I currently have a floor mesh that I need to be able to see through down some stairs, no need for these to be walkable just visually represented. My current solution idea is some sort of Xray material that lets me see through the floor mesh, I currently tried a stair mess with an extended top step to the entire length of the stair (so think just a box basically) with a seperate material for this extended part and used the disable depth pass, but this creates some odd issues. I’m doing it this way since the stairs are of various sizes and placement’s within a procedual room. anyone have any ideas how I can create this sort of Xray material where its only see through at a selected part, i’ve attached a photo of my current setup of how the mesh’s are together. as you can see my idea was to have that large rectangle basically allow you to see through everything its colliding with to give the effect that the floor is cut out there.

f24d5285234fc2d642ed6e4a8d85328ad98f737d.jpeg

Hi,
I think using the Custom depth buffer could be helpful in your case. There is an example of something similar to what I think you would like to achieve here:
http://www.tomlooman.com/the-many-uses-of-custom-depth-in-unreal-4/
I am terribly new to UE myself but stumbled upon this during my research, so you probably have to ask any questions over there…

Cheers,
J

I’m not sure that would work since its basically visible though the entire mesh, nothing can block it other than that stencil, but since my floor is of a dynamic shape of any size i can’t just add a set image for that