• Advertisement
Sign in to follow this  

Octree Creation

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

Hey people, I have a question about Octrees. I want to implement one for an outdoor rendering project I am working. I get the theory behind how it works and why you use them but what I am missing is the actual “How to create” one. Specifically, what happens if you have an object (say a building) that belongs to two or more leaf nodes? Do you spilt it up into separate lists of vertices and then render them (This sounds like it could be a nightmare) or do you add it two multiple leaf nodes and then when rendering, keep tract of which objects have been rendered, or do you have some external tool that takes a scene that you have defined, and then cut everything up into nice cubes that can be used by and octree??? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
If it can be split, I'd split it. If it's small enough, I'd just ignore one of the two boxes it's inside (consider only the box that contains its center).

Otherwise, if it's big and unsplittable, I'd put in the smallest box that can contain it. This is actually one of the reasons why ABTs and KD-trees are superior to octrees when you have arbitrary large-sized geometry.

Share this post


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

  • Advertisement