Archived

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

Scene Management

This topic is 5586 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

Well, its me again and I am planning to get on your nerves again (e.g. with my sprite engine ). I have thought of speeding up the rendering process again. At the moment my sprites are z-sorted then texture sorted (which can of course destroy my z-sorting efforts... ) then transformed by hand and stuffed into a dynamic vb which will render them according to their texture. There is of course the problem with alpha blending which I hoped to solve by z-sorting them. But, of course, the texture-sorting can destroy the z-order... Furthermore I want to have huge tile maps. So I thought of a solution which will implement a scene quadtree which will hold all the objects in my "world". Every frame the nodes are checked against a frustum and the data is extracted from the visible nodes and rendered according to renderstate and texture. 1. Is this a possible speed-up ? 2. How can I solve the z-sort vs texture-sort conflict? So would it be a good idea to represent everything in a single scene quadtree?

Share this post


Link to post
Share on other sites

About the Z sorting problem :

I suppose you render your sprites by providing only X/Y values. You could set an orthographic projection, render them providing Z values and enable depth testing to get rid of the Z sorting. Therefore, you only have to sort them by texture.

About the quadtree :

It depends on what you want to do with your engine. For an isometric game, you could easily split your world into "sectors" (imagine you put a 2D grid (ie. an array) on your terrain). This is easier than a quadtree approach and should work pretty well.

But again, you don''t say much about your engine, so I can only guess...

Share this post


Link to post
Share on other sites
Well, mainly the engine will display tile maps but also 3D terrain (of course not at the same time).
So there are mainly 2 cases:
1. Tile map with sprites and some 3D objects (for eye candy )
2. 3D terrain with some sprites and 3D objects

Share this post


Link to post
Share on other sites