Search Unity

Transparent Diffuse Issue

Discussion in 'Editor & General Support' started by wlima3d, Sep 30, 2014.

  1. wlima3d

    wlima3d

    Joined:
    Aug 27, 2014
    Posts:
    15
    Hey there!

    I have this 3D model that has some transparencies to get the cloth looking as below:



    Alright, beautiful. This renders just fine on C4D and 3DS. No problems.

    Moving on to Unity...

    This body part was set to "Transparent/Diffuse" as usual, but here's an issue:



    If I set it to Diffuse, this issue will disappear, but the cloth won't work as expected:



    Any idea how I can fix this?

    Thanks!
     
  2. wlima3d

    wlima3d

    Joined:
    Aug 27, 2014
    Posts:
    15
    I have to bump this, still couldn't find a solution. :/

    Thanks.
     
  3. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Did you consider to use a cutout shader instead of a transparent one?
    The issue you are seeing is not common to realtime 3d applications. The triangles from the mesh are drawn one after another. If the triangle from the backside is rendered after one from the front, it will drawn over it and leads to that effect. Applications like C4D sort the triangles in each frame to avoid that, but this is not suitable for realtime applications.
    There are some ways to avoid it. E.g. by placing an opaque object in between. Another option is to split the mesh up into parts. One for the front, one for the left, one for the right and one for the back.
     
    wlima3d likes this.
  4. wlima3d

    wlima3d

    Joined:
    Aug 27, 2014
    Posts:
    15
    Thanks a million! The cutout works fine. :)