- Home /
Cutting "holes" using projector/shader?
I was wondering if anybody could point to a good tutorial and/or documentation about using projectors/shaders to achieve a see-through hole/transparency of a poly/mesh (specifically, of a certain Layer, so that it would only "cut through" some objects, not others)
I've seen mention that this can be done, and have seen some code, but haven't seen a complete guide for how to do it (shaders are one area of Unity I have not always been great at wrapping my mind around)... any recommendations?
My specific scenario is this: I have "tunnels" that intersect through walls of basic meshes (box-like buildings), thus the "wall" of that building still appears in the middle of the hollow pipe/tunnel; I'd like to be able to project a "hole" through the middle of the tunnel/tube so that any intersecting polygons are simply invisible (in other words, to make invisible a circle of the tube/pipe diameter, perpendicular/normal to the angle of the pipe.) Seems like this is possible, but not sure exactly how to do it...
[my only other option would be to go into 3DS and create the entire level in there, and actually cut out the holes of the meshes. But it seems like a better workflow to do it using prefab segments/components -- including child lights and props, etc. -- directly in Unity]
Your answer