MaxVertexNum in ATI 9700 PRO????
I''m rendering a huge number vertex terrain. I use the render function: DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, NumOfVertex, 0, NumOfTri). I found that NumOfVertex can''t excess 65535 in my ATI 9700 PRO videoCard. But i can do this in my NVIDIA GEFORCE3 OR GEFORCE4.
Here is the data of my ati 9700 pro.
MaxPrimitiveCount: 65,535
MaxVertexIndex: 16,777,215.
Also i use the D3DFMT_INDEX32 in index Buffer. I think this maybe is a limitation of the videocard??? It''s very curious that the NumOfVertex can''t excess 65535. Thus the number of trigle can''t excess 65535/3(around). But the MaxPrimitiveCount is 65535, i''m very very curious. Anyone else met this ???? give me a explanation.
I''ve worked with this problem developing commercial terrain rendering software for civil engineering purposes.
For something like a terrain renderer, you shouldn''t need to be drawing ALL the primitives at the same time as you probably won''t be able to see it all at once. If you partition your terrain, you can iterate through each partition and check each against the viewing frustum. Each partition should have a max size of 65535 primitives. This way, you will get much better performance (due to partitioning and frustum culling) and will never exceed 65535 primitives in one DrawIndexedPrimitive call.
Google for quad-trees (My choice for terrain partitioning). I believe there is an article or two here at the gamedev.net resource archive.
For something like a terrain renderer, you shouldn''t need to be drawing ALL the primitives at the same time as you probably won''t be able to see it all at once. If you partition your terrain, you can iterate through each partition and check each against the viewing frustum. Each partition should have a max size of 65535 primitives. This way, you will get much better performance (due to partitioning and frustum culling) and will never exceed 65535 primitives in one DrawIndexedPrimitive call.
Google for quad-trees (My choice for terrain partitioning). I believe there is an article or two here at the gamedev.net resource archive.
Thank you TheBigJ.
I think i didn''t describe it clearly. Now i state it again.
1) NumOfVertex can''t excess 65535 in my ATI 9700 PRO videoCard, not the Num of primitive. In fact, the Num of primitive can''t excess 22000(about 65535/3 ).
2) I have used LOD and frustum. For some reason, i must display 30,000 primitives at once. I think 30,000 primitive in my ATI 9700 PRO videoCard isn''t a rigorous demand.
3)Certainly i can render the terrain twice, eg, 15,000 an once, but this isn''t the point of my post.
I think i didn''t describe it clearly. Now i state it again.
1) NumOfVertex can''t excess 65535 in my ATI 9700 PRO videoCard, not the Num of primitive. In fact, the Num of primitive can''t excess 22000(about 65535/3 ).
2) I have used LOD and frustum. For some reason, i must display 30,000 primitives at once. I think 30,000 primitive in my ATI 9700 PRO videoCard isn''t a rigorous demand.
3)Certainly i can render the terrain twice, eg, 15,000 an once, but this isn''t the point of my post.
i have a 9700 PRO here and i can create huge VBs, easily in excess of 65535 vertices. the one thing i can''t do is render the maximum number of primitives as specified in the caps. what i have to do is treat this number as a maximum number of vertices per render. so, for a triangle list for instance, i divide the caps returned value by 3 to get my max tris per drawprimitive call. i then cycle through the vb as many times as necessary to get the entire vb rendered. i also have to put a "stall" in the loop, otherwise only the first set of vertices gets rendered. currently i reset the stream source to NULL and then set it back to the VB.
From above i know this is a ati 9700 Pro limitation, a very bad limitation: this vidioCard can only draw 22000 primitive at once,not 65535.
Woo, ati, why do you have this badly limitation!!!!!
thanks everyone above again!
Woo, ati, why do you have this badly limitation!!!!!
thanks everyone above again!
just more fyi. i found this interesting tidbit in the dx8 and dx9 docs for the MaxPrimitiveCount dev cap:
<i>Maximum number of primitives, or vertices for each DrawPrimitive call. Note that when Direct3D is working with a DirectX 6.0 or DirectX 7.0 driver, this field is set to 0xFFFF. <b>This means that not only the number of primitives but also the number of vertices is limited by this value.</b></i>
<i>Maximum number of primitives, or vertices for each DrawPrimitive call. Note that when Direct3D is working with a DirectX 6.0 or DirectX 7.0 driver, this field is set to 0xFFFF. <b>This means that not only the number of primitives but also the number of vertices is limited by this value.</b></i>
You should just try to never draw that much primitives at the same time. Once u come to culling, hidden surface removal etc, u will find out that a good design will probably require less primitives per Drawprimitive Call. But the number of calls can be infinite (in theory). So it''s not that big of a limitation.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement