Jump to content
  • Advertisement
Sign in to follow this  
winsrp

tree level of detail according to distance

This topic is 1896 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 all, 

 

I have a 3D terrain (around 16km*16m), and I'm laying out trees... but my trees are 3D, take a lots of vertices, and I cannot put that much such as in putting in a forest.

 

Now I could put crossed image trees (2 quads in a cross shape), for my medium distance trees, and a single billboard quad for the further away trees... but, the question is how to I make the program switch between my 3d trees, 2 quad trees and 1 billboard tree base on the distance to camera?

 

thanks

 

-Winsrp

Share this post


Link to post
Share on other sites
Advertisement

You should look into the LOD system(Level of detail).

 

Look at this example:

 

Tree 1: 13m away from camera -  Switch to high quality vertex/index buffers when rendering


Tree 2: 56m away from camera -  Switch to medium quality vertex/index buffers when rendering

Tree 3: 137m away from camera - Switch to low quality vertex/index buffers when rendering
 
So when rendering, you can choose the buffers based on the distance.
 
PS. This is just an example.

Share this post


Link to post
Share on other sites

hmmm... but should I check the distance of all the objects to know which buffer should I use? I mean, if I have 1.000.000 trees, i don't think checking them all should be a very good idea to see which buffer to use, or is it?

 

or should I check on the positions only and change refill the buffers with the objects according to distance?

Edited by winsrp

Share this post


Link to post
Share on other sites

Well, you could pack your trees into different chunks.

 

So instead of checking the distance to the trees, you check for the chunk.

Share this post


Link to post
Share on other sites
Would this be an area that could use some sort of a quad tree? Compare each quad to the current camera position and the quads themselves could assign the tree type to their children...

Share this post


Link to post
Share on other sites

well I already have a quad tree (not exactly working the way it should, but I have one), and was hopping to move to GeoClipmapping, but I seem to be lacking LOTS of knowledge about quadtrees and clipmapping.

 

I made the quadtree, and works wonderfull, stitching edges, fixing normals and all , but I have trouble updating it when the player moves.. updates are slow, sections flash all around, and that kind of stuff, still working on it.

Share this post


Link to post
Share on other sites

And after you are done with that, you will notice that it is still not enough, unless you have a very low tree density. For even more distant trees you could use billboards. Use the chunk you have for distance checking and pack all the billboards inside that chunk into a single vertex buffer and render it in one call.

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!