Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Running into some octree problem

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

When I finished reworking on my Octree module,

I found one problem.

When I was specifying the origin of the root at 0, 0, 0

and half size of length/2, height/2, width/2

and with a depth of 6

 

The world is divided into 2,

One is above the ground,

One is under the ground which I don't think I have a use.

 

So How do I get rid of the lower part of the root octree?

 

Do I just hard code it, or I can adjust the parameter so that I can start up

from the 0, height/2, 0 instead of 0, 0, 0?

 

Is this the correct way of doing it?

 

Thanks

Jack

 

Share this post


Link to post
Share on other sites
Advertisement
So How do I get rid of the lower part of the root octree?

 

Just put the origin at a higher value (y=world.size.y/2).

Edited by _Silence_

Share this post


Link to post
Share on other sites

Or ignore the problem. The empty nodes at the bottom probably don't take up a whole lot of space. Deal with it when you run into any problems with it (likely never).

Share this post


Link to post
Share on other sites

Empty nodes in the tree are to be expected, don't subdivide the structure for empty nodes and it shouldn't be an issue.

 

If your levels are that predictable though you might be using a more complicated structure than you actually need though.

Edited by DrEvil

Share this post


Link to post
Share on other sites

I am looking back in my previous work in trees of voxels now.

They get flood-filled in shorter time.

The voxels are made of squares.

So now I want to group/merge part of it.

 

I am planning to prune a seed somewhere on the map, and start expanding out

 

Because the octree (loose tree) counterparts is so slow in cost precomputations.

 

I am looking into ways to use back voxel tree now

Does anyone know how to merge a tree of voxels in any better ways?

 

Thanks Mr. Spiro,

The Voxel approach does decrease the number of layers from 44 -> 15

 

Thanks

Jack

Edited by lucky6969b

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!