Jump to content
  • Advertisement


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


Managing Vertex Buffers / Loading Lvl Formats

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

Some questions on Vertex Buffers and Object Loading. If you have a level format consisting of several static object how will you load and manage the vertex and index buffers? If a level format consists of hierarchical, empty ''groups'' (ie. car) which are formed by objects (ie. tires) will you just load vertices, indexed primitives, normals into one big vertex & index buffer in order to apply spatial divisioning (octree, abtree, whatever)? Or do you create the octree while loading the level, storing the data in its leaves and only use the buffers on those small piece of geometry data? Please bare with me, now how do you actually ''synchronize'' the raw geometric data which is stored in an octree/vertex buffer/whatever with the ''game data'' (ie a door and its behavior, triggers for quests). I mean if you subdivide the whole scene into boxes with a treshold you could end up with only part of the actual geometry data forming the ''game object''. Do you have to propagate a separate, linked ''game object'' tree? Ok this doesn''t make any sense at all, but this is my current state of confusion

Share this post

Link to post
Share on other sites

What you do is each QuadTree represent a spacial tile so .

QuadTreeNode has pointer to WorldTile
WorldTile contains all objects with an x, y in that tile.

When rendering first iterate through the tree and render visable terrain ( WorldTile) , then iterate through and render all other objects (WorldTile.Objects[]) .

It is not cost effective to have very detailed culling code , just eliminate objects according to the terrain tile they are in.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!