Skip to main content
GameDev.net gamedev.net
🔒 Locked

Indexed primitive processing

Started by CamelFly Jun 13, 2002 at 1:21 PM 3 replies 650+ views
Original Post
CamelFly
CamelFly
If I make a primitive with too many vertices per index. I.e. same vertices with several index buffers for different LOD, will the extra vertices for use in higher details still be processed along with the used ones. I can see that I''m saving on the rasterization and clipping - but am I still doing transformations? Should I change my terrain engine around to using several vertexbuffers for different details or keep the one vertexbuffer-serveral indexbuffers metod that i have now?
[Insert cool signature here]
S1CA
S1CA
D3D will transform *ALL* of the vertices in the range you specify to the Draw*Primitive call.

D3D doesn''t do any lookup of vertices based on indices when it transforms - that''d actually be slower! It''d have to jump around memory (potentially bad cache performance), it wouldn''t be able to use SIMD (SSE, 3DNow!) instructions if a used vertex was next to an unused one etc etc...

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
CamelFly
CamelFly
But if I order the vertices so that the ones used in low detail setups are in the beginning of the list and specify the start and end of the vertex list, will only those I specify with DrawPrimitive get transformed?

So it will go faster then? :-)
[Insert cool signature here]
S1CA
S1CA
Yes!, then you can just vary the count to change how many get transformed.


In fact, combined with view independent progressive meshes, its part of the idea Jan Svarovsky presented at GDC 1999:
http://www.svarovsky.com/ExtremeD/

Charles Bloom has had some thoughts on related topics too (with some contributed thoughts by other GDAlgorithms regulars such as Tom Forsyth):
http://www.cbloom.com/3d/techdocs/vipm.txt
http://www.cbloom.com/3d/techdocs/vipm_topics.txt

I *think* its also an idea used in the D3DX implementation of progressive meshes.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
CamelFly
CamelFly
Great! engine has been changed to do exactly that now it should work sweetly
[Insert cool signature here]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.