Sign in to follow this  

structuring geometry

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My name is Perry Butler and I'm new to these boards. I hope this will make a good first post. Currently in my map editor I am looping through a procedure that, for each brush, for each face in that brush, set the texture then set the vertex buffer then drawprimitive the face. This is about as slow as it gets and I have learned a lot up to this point. So it's time to take it to the next level and I've been brainstorming a new way: Sector. A sector is a region of the world that could be thought of as a grid cell. This is the way I will do space partitioning (I figure a sector can be expanded to a tree leaf when I learn more about trees and recursion). A sector will have one vertex buffer for all the vertices that lie within it. A sector will also have an index buffer for every texture that is used in it. Face. Has a list of vertices and a texture ID. When a call to edit a face has been made, it's sector will be recomputed and stored. The sector for this face will have it's vertex buffer remade and it's index buffer that this face belongs to remade. Brush. The brush is merely used as a convenience for moving groups of faces, applying texture coordinates to groups of faces etc. Should a vertex buffer be made during preprocess time for each sector, or should I make a vertex buffer on the fly containing all visible sectors vertices? There are tradeoffs in performance here that I'm uncertain about. I'm looking for any additional advice or tips about this. Find out more about me and my project at http://members.gamedev.net/iosys

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The general guideline seems to be to get the graphics card to do as little as possible, minimising state changes. So changing texture is pretty expensive. It could well be better to draw everything with the same texture at once (draw in order of texture). This can create fill rate problems. One way this is solved is to draw everything opaque and visible from front to back just to the z-buffer. Then turn z-buffer writes off and draw your scene in texture order. This has the disadvantage of potentially doubling the load on whatever does your transformation. I think nVidia have a paper on this kind of thing somewhere.

It's not the one I was thinking of but try: nVidia GPU programming guide

Share this post


Link to post
Share on other sites
That was a very useful PDF. I didn't see anything about what you mentioned, but it indirectly answered a few questions that have been lingering. I was sad to find out that NVPerfHUD won't work on my ATI card and ATI offers nothing similar to it.

Share this post


Link to post
Share on other sites

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this