Sign in to follow this  
ManixReaper

Octree Creation

Recommended Posts

ManixReaper    619
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
ToohrVyk    1595
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this