Search Unity

Single Sided Mesh

Discussion in 'Editor & General Support' started by bkazour, Mar 12, 2012.

  1. bkazour

    bkazour

    Joined:
    Dec 7, 2011
    Posts:
    98
    Hello,
    I am new to Unity and modeling in General.
    I have a weird issue that is troubling me for a couple of days.
    I have imported a mesh into Maya from 3dsMax. The mesh is double sided in Maya as any normal Mesh would be.
    I have exported the Maya file into .FBX and imported it into Unity. Everything is working Perfectly from the texture point of view.
    However, the Mesh seems single Sided. From one perspective it is showing, from the other it appears as there is no object placed.
    This is happening at runtime and inside the Editor.
    Has anyone faced a similar issue before, or can anyone point me in the right direction in order to solve it?

    Regards,
    BK.
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,724
    That is normal.

    You can either use a double sided shader (one that has Cull Off), or, as Eric5h5 is going to say, just double your geometry. (copy paste then flip the polygons).
     
  3. bkazour

    bkazour

    Joined:
    Dec 7, 2011
    Posts:
    98
    OK thanks for the Reply.
    I am actually using the Bump Diffuse Shader and the Parallax Difuse shaders. Is there any other shader that has the same effect, and a Cull Off?

    One other question, Does doubling the geometry causes any serious load on the game ? or a slight additional load ?

    Thank you.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,724
    Well doubling the Geometry adds... double the Geometry! Try it. It really depends on where the bottleneck of the game is.

    To add Cull Off, just download the shader sources and edit them so they are with Cull Off instead. But I think doubling the geometry may be better.
     
  5. larvantholos

    larvantholos

    Joined:
    Oct 29, 2009
    Posts:
    668
    Technicly your mesh is 1 sided. Its facing whatever direction the normal is. In your 3d app, you normally have back face culling off by default, as its generally useful to see the back of those faces. In your game engine, or in your 3d app if you turn it on as an optimization, back face culling helps optimize how the mesh is drawn on the screen. So, you didn't import a 2 sided mesh, you just imported a 1 sided open faced mesh, and if you want it to have 2 sides, you need to duplicate and flip it (or duplicate it and invert the normals)
     
  6. bkazour

    bkazour

    Joined:
    Dec 7, 2011
    Posts:
    98
    OK
    I will try it.

    Thanks.
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    If you use a double-sided shader with Cull Off, the lighting will be wrong on the other side.

    --Eric
     
  8. bkazour

    bkazour

    Joined:
    Dec 7, 2011
    Posts:
    98
    ok no problem
    I will duplicate and invert the mesh...it seems the ideal solution
     
  9. bkazour

    bkazour

    Joined:
    Dec 7, 2011
    Posts:
    98
    I have just generate a cloth Gameobject in from Within Unity.
    And it is appearing as single sided.
    Is this normal or i am doing something wrong ?
    Assume i have to create curtains for a house, they should be visible from inside and from outside. It is not logical to duplicate and reverse a cloth object ?
    any hint ?