1 Replies - 1007 Views - Last Post: 07 September 2012 - 02:30 PM

#1 caconway  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 06-September 12

Glitchy Triangles on rendered model

Posted 06 September 2012 - 02:58 PM

I have played around with XNA off and on for a while but not really in 3d. Recently for an idea I want to try I need to be able to load and render STL model files. I have the import code working as far as I know but when i go to render it just using BasicEffect in XNA 4 it renders but as you rotate it around it looks rather strange almost as if you can somewhat see through it as well as some of the triangles appear to glitch around. currently Im directly importing the stl file into a vertex list and just rendering it as is with BasicEffect. I don't know where to look whether it is with the importer or with how it's being rendered. The upper blue box is what I'm talking about with seeing through the model, and lower is an example of the wierd triangles, The second image is the same file in a different program. So I don't think it's the model

Any help would be greatly appreciated.

And yes that is a simple model of Vaders head.

Attached image(s)

  • Attached Image
  • Attached Image

Is This A Good Question/Topic? 0
  • +

Replies To: Glitchy Triangles on rendered model

#2 BBeck  Icon User is offline

  • Here to help.
  • member icon

Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: Glitchy Triangles on rendered model

Posted 07 September 2012 - 02:30 PM

Are you drawing any sprites to the screen or do call the SpriteBatch Apply method at any point (even if you're not drawing anything with it).

Does it look right in other programs when you load it?

Does this code fix it?

    GraphicsDevice.BlendState = BlendState.Opaque;
    GraphicsDevice.DepthStencilState = DepthStencilState.Default;

This post has been edited by BBeck: 07 September 2012 - 02:32 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1