• Advertisement
Sign in to follow this  

Render question.

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

Hi there, I have finished my terrain for my game and now Im into adding some "objects" into the world, like trees and rocks. I have try to load alot tree models(3ds) random on a spot in my terrain but it gets to slow if I render alot of them.. so what is the best way to render alot of objects? and still get a quite nice fps. maybe some sort of quad tree or something, dont know exacly.. anyway if anyone of you have a example( source or good tutorial ) on how to do this feel free to post. thanks.

Share this post


Link to post
Share on other sites
Advertisement
If you have created a terrain engine then I assume that you have some sort of scene-graph implemented (quadtree, octree, etc). In which case you can simply see which cells your objects are in and render them with the terrain if visible.

If you are brute-forcing your terrain (i.e. drawing it all every frame) then you will need to look into scene graphs. Scene graphs are systems that manage static and dynamic objects in the world. They can be build upon quadtrees, octrees, bsp trees (not ideal for terrain) or any other system you can think up.

Some useful links:

Google: scene graph tutorial
Google: octree tutorial
Google: quadtree tutorial

There were some good tutorials on GameTutorials.com, but I'm not sure if they're still free after the introduction of prices. I just tried those 3 google searches and they turned up more pages than I could ever hope to look at.

Another simple technique is frustum culling, where you see if the bounding box of the object is in the field of view. If not, the object isn't drawn. "frustum culling tutorials" will turn up some nice results.

Share this post


Link to post
Share on other sites
if you haven't already, you could look into vertex buffer objects (openGL), or whatever the D3D equivalent is.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement