Vertices - The are a bigger hog!

Started by
6 comments, last by MetalWorX 23 years, 10 months ago
i have been trying to achieve a 50 fps frame rate in my 3d engine but all is against me! i first thought it was just the number of faces the object had which was slowing it down.Now as i see it it is the number of vertices.The vertices is duplicated in order to match the right texture coords.this happens as a single vertex is shared by 2 or more faces which have different texture coords.Hence the vertices are duplicated(i mean to same verts). Thus the number of transforms per frame exceed to about 17000 which is killing all my CPU time. How do i resolve this? I am not using any HSRs.
Raptor
Advertisement
You need to create your textures so that they are shared by more triangles. Or you can wait until DX8 comes because it will support reuse of vertices with different texture coords.

- WitchLord

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Oh great, I can''t wait to get DX8 now then, its the one thing thats really pissed me off with DX7.

----------------
Freeride Designs
----------------
----------------
Black Edge Games
----------------
You don''t need to wait for DX8, you can use a second set of Texture Coordinates for your Vertices. This will increase the Memory consumption, but that would only be 136 kByte more for your 17000 Vertices.
Then when setting the Texture, you can set the appropriate Coordiante Set.
This of course only works without Hardware TnL, cause you need to transform the data first, and then render them twice, first with one Texture Set, then with the Other (of course only the Polys that are needed).

The other Way, making it more efficient is to Design your Textures in a way so that they are easily stripped over your Objects.

Lars
--------> http://www.larswolter.de <---------
every time changing the vertex texture coords and rendering the associated polys would be more time consuming i guess.wouldnt it?

if i have to go about writing my own file format how do i go about related to this problem?

thnx
Raptor
You might try using things like triangle strips and triangle fans to reduce the number of redundant vertices.

A few general optimization tips:

- Make sure you have backface culling on
- Reduce state changes
- Reduce the amount of texture changes you make. This seems to be one of the most expensive state changes you can make.
- D3D''s lighting can be pretty slow, only use it where neccasary.





----------------------------------------
Whenever I see an old lady slip and fall on a wet sidewalk, my first instinct is to laugh. But then I think, what if I was an ant and she fell on me? Then it wouldn't seem quite so funny.
Another incredibly expensive state change is one that''s done behind the scenes whenever you use a different vertex format (FVF).
Mainly the vertex transformations per frame are slowing it down.The only way around it is texture mapping the object in a more precise manner or writing ur own file format.
i am creating a 3d real time strategy game where i need to render around a minimum of 30 objects per frame.what should be the polygon limit for a desired frame rate of 60 fps with no AI and sound implemented yet?

right now i have units of 300 to 500 triangles with around 500 to 600 verts.

The number of tris hardly make a difference as it is handled by the 3d card whereas the vertex transformation are killing my CPU time which are the main cause for slowing it down.

the num of verts have bloated mainly due to different texture coords for the same vertex.
Raptor

This topic is closed to new replies.

Advertisement