XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

blender export, plane only visible from one side

Last post 03/11/2009 10:28 PM by Gigs01. 3 replies.
  • 03/11/2009 7:19 PM

    blender export, plane only visible from one side

    Hi,

    I have exported plane from blender with autodesk fbx modified for xna exporter, or directx exporter I can only see one side of plane in xna.
    Why is this happening, Is this because of exporter or xna?
  • 03/11/2009 8:29 PM In reply to

    Re: blender export, plane only visible from one side

    Answer
    Reply Quote
    Triangles in 3D are generally single-sided -- the side that the normal points out to is visible; the other is not. This is because of backface culling, which is generally a desirable thing -- the lighting of a triangle with the normals facing the "wrong" way would be wrong. (There's a concept called two-sided lighting, but it hasn't traditionally been hardware accelerated, although you can do that these days)
    If you want a thin object that's visible in both directions, you will have to duplicate the plane, "flip normals" on the duplicate, and weld the vertices together. Then export it. I don't know if Blender treats all triangles as two-sided (that would be bad!) or if it can properly visualize single-sided triangles. If it can, you should turn that on.
    Finally, if you want to draw two-sided, you can turn off back-face culling. You do this with the RenderState.CullFace mode, setting it to None. Again, note the warning: the "back" side of a triangle will not be properly lit, because the normal points in the wrong way.

    Jon Watte, Direct3D MVP
    Tweets, occasionally
    kW X-port 3ds Max .X exporter
    kW Animation source code
  • 03/11/2009 9:21 PM In reply to

    Re: blender export, plane only visible from one side

    Answer
    Reply Quote
    A while ago I put together a small article that will help you there. http://www.virtualrealm.com.au/blogs/blender-3d-turning-on-the-normals/
    With the normals on you will be able to see what direction your normals are pointing.
  • 03/11/2009 10:28 PM In reply to

    Re: blender export, plane only visible from one side

    Now its much clearer, thanks both for answer
Page 1 of 1 (4 items) Previous Next