Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

My triangle strip based lines are disappearing intermittently when I rotate my camera around the X axis.

I was advised that this is due to aliasing issues and that "At a certain angle when its edge is facing the camera your strip will disappear." So, I was told to give the strip some thickness.

Can someone tell me the best way to do this? Would it be to draw two strips directly on top of each other? This doesn't seem to solve the problem but perhaps I am doing it wrong.

Thanks for any help you can provide!

share|improve this question

1 Answer 1

Triangles are planar, meaning they do not have thickness. What you seem to be describing is a graphics technique called back-face culling, which basically allows the winding pattern for a triangle to define its normal, and that normal pointing into or out of the view frustum is able to determine whether it is drawn or not. XNA allows you to customize this.

You may be able to get them to draw using that, but you don't likely want to use that for your game. You should be thinking in 3D, start by drawing a cube, which will give you depth in your drawing.

share|improve this answer
    
Ah, sorry, I should have mentioned that it isn't a back-face culling problem. Yeah, I am probably going with a very short rectangle. I was just hoping their was an easier way. –  erob Jun 6 '13 at 6:55
    
XNA has the ability to render entire models, quads and strips. –  Bob_Gneu Jun 7 '13 at 17:57
    
Bob_Gneu, sorry not sure what you are getting at here? I am currently drawing a quad, which is disappearing intermittently. –  erob Jun 7 '13 at 18:13
    
Get me a link to your code (e.g. BitBucket, GitHub or FTP) and ill look into it. As things stand I don't think anyone is going to be able to help clarify this issue. The point i was making above is simply that the polys you draw are planar, meaning they have no depth. The second post was to show that you can simply render the whole model you are generating without having to worry about polys, faces or anything. –  Bob_Gneu Jun 8 '13 at 5:55
    
So after refactoring to use very short (height) cubes for depth, the problem still persists. However, I think I have found the culprit. I am having to convert Lat/Long to cartesian coordinates inorder to find my start and end line points. The resulting XYZ values are very large (x values in the 2 million range). The lines disappear when I apply a rotation after the conversion but not before. So... I need to scale down the coordinates while maintaining angle and distance between them. Any thoughts on how to do that? –  erob Jun 12 '13 at 20:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.