Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Problem with overlapping objects and transparency

Discussion in 'Shaders' started by fraeri, Dec 23, 2018.

  1. fraeri

    fraeri

    Joined:
    Nov 8, 2018
    Posts:
    64
    Hi all,
    after searching the internet for hours and trying dozens of things I need to ask this on:

    I have a GameObject (OBJ Import) and want to make it transparent with a slider (0-100% Alpha). As Shader, I used Standard and Fade or Transparent. At first, I had a weird transparent effect, which seems to be caused by the hollow mesh. You can see the backside wall from the inside, which was also transparent. Even with Alpha 1. See Picture:

    So the search began. Different shader settings etc. no change. Finally, there seems to be a Solution: Custom Render Queue. Setting it to something crazy like "99999" and the weird effect was gone. So now the problem is the object has little spheres on it and they don't like the transparency of the big gameobject.

    From the view of the camera: When the gameobject is behind the sphere it is simply not shown and there should be a lot of them. Only spheres that have nothing behind will be visible. Setting the render queue to 0 or -1 or 999 doesn't matter. Setting the big parts alpha so something below 1 the spheres are visible, but only if the part is behind the object, not in front.

    Why the transparency-stuff: some of the spheres are inside the big gameobject and the user needs to see them.

    I guess i'm totally on the wrong way and hope someone can help me!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    LouisHong likes this.