Archived

This topic is now archived and is closed to further replies.

kamrann

Strips vs Indices

Recommended Posts

kamrann    122
Hi I''ve got a mesh of a triangulated sphere, with an array of each vertex and an array of indexes into the vertex array for the triangles. I''m using DrawIndexedPrimitive at the moment. So, I''ve got all the vertex sharing I can have. What I want to know is, would using strips or fans be more efficient? Does D3D render these faster than triangle lists, or is their only advantage that they share vertices, in which case they wouldn''t improve on what i''m doing now? Also, at the moment I''m creating all my 3D objects myself, which meant writing the algorithm to triangulate a sphere - that was real hell It works, and even with low detail, with gourad shading it looks smooth on the face, but, if I want a sphere which is going to take up say, about a quarter of the screen, I have to use well over a thousand triangles to stop the silhouette from looking really jagged - is this normal? How are spheres usually rendered in games? Finally, if you have to triangulate some object, is it normally done once at the start, or every time its rendered? Thanks Cameron

Share this post


Link to post
Share on other sites
eng3d    91
I think strip is more fast that primitive only because it use a lees polygon in the cpu layer. But when work in the hardware-video layer, this must work with all triangle for separate.

In other point. Work with strip, is very pain, because you cannot convert some 3d-triangulate-struct to 3d-triangulate-and-strip-struct (without add duplicate vertice)

For a sphere, you can separate in many mesh (hemisphere). And you need some algorithm to indicate what mesh is need to draw and whats not.

For example:
_______
/...|...|.p1|.p2| <----- camera
|...|...|
|...|...|
\-------/
in this case, you draw p2 but not p1. Of course 2 mesh is a little. Try 8 or more mesh.




Edited by - eng3d on October 9, 2000 9:31:35 AM

Edited by - eng3d on October 9, 2000 9:32:22 AM

Edited by - eng3d on October 9, 2000 9:33:37 AM

Share this post


Link to post
Share on other sites
furby100    102
If you use a strip the cpu has to do all that work of reversing the winding order for backface culling in every other polygon, I think you should stick to indexed primitives, they''re just as fast as if you had a strip and more flexible.

------------------------------
#pragma twice


sharewaregames.20m.com

Share this post


Link to post
Share on other sites