hi.
I want to make a material that can mask out a specific area.it makes the surface of the area disappear so people can see things underneath the surface.
I want to build something under the ground(both landscape or static mesh). For example a nuclear launch from underneath the ground.
but the ground surface is on the way,and I don’t know how to hide that surface.
I guess it should be a common request.because there are so many buildings that could be beneath the ground.but I just don’t know how to do it.
appreciate any reply.
It doesn’t have to be a best practice,as long as it can do the trick,it’s valuable to me.thank you.
bomb,
i would like to see what’s inside the underground box.
You cannot.
You’d have to modify the landscape? material to achieve something like that.
And again, you cannot do so with 0 knowledge of things/innerworkings.
A viable way to do it would be to output the mesh you wish to have interact into a RT.
You then use the RT in the landscape material (or whatver other material) to mask out the specific area.
This would only work around the player - and you would need to have the RT only render the mesh if it intersects the ground object (mesh or landscape) - which is not an easy task in itself.
You could try using distance to nearest surface, but it would probably bug out and provide more inaccurate results than anytbing else.
Also note:
If using landscape, removing visibility via opacity does not remove collision.
And removing collision can only be done in editor, not at runtime.
Its also only avaliable on a per vertex basis (so 1 vert evey meter in default settings).
1 Like