Search Unity

Intersecting Transparency Possible?

Discussion in 'General Graphics' started by andycambo, Mar 21, 2018.

  1. andycambo

    andycambo

    Joined:
    Jan 24, 2016
    Posts:
    1
    I'm just starting to think about level design in my game and before I start heading down a possible dead end I thought I'd ask here first.

    Basically, I have one large plane (blue in the image) which objects will be placed on however in some place I'd like to place an object through the plane to create a gap - in this example I have a red ring shape which I'd like the center to be transparent (or cut out).

    I was wondering if there is a 'simple' way of doing this rather than building the plane around the ring to create the gap in the middle.

    Thanks.
     

    Attached Files:

  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    One solution could be to use Stencil Buffers : https://docs.unity3d.com/Manual/SL-Stencil.html
    But you will need more objects than only the ones you have, and to write your own shaders for the effect.
    Easiest would be to juste model the hole in the object...