tree level of detail according to distance

Started by
6 comments, last by DwarvesH 10 years, 8 months ago

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

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.

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

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?

Well, you could pack your trees into different chunks.

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

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

I'll give it a try, and see what comes out. tx

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...

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.

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.

This topic is closed to new replies.

Advertisement