• Create Account

Banner advertising on our site currently available from just \$5!

### #Actual3TATUK2

Posted 25 October 2013 - 12:04 PM

waterlimon, that's a good idea.. basing the octree depth on geometry complexity/size(density).... there are a couple faults with my implementation which definitely could be optimized, for example I think it needs at the least one recursive subdivision, and has a small maximum of about 6... and also takes up a huge amount of exponential memory (a depth of 6 takes like 500MB)

kauna, i'm using GL occlusion queries...

This is my octree struct:

typedef struct HxrOctree
{
bool base;
float left, right, bottom, top, back, front;
struct HxrOctree* leaves[8];
HxrTrianglePlaneList trianglePlanes;
} HxrOctree;

One quick thing I just noticed as that left/right/bottom/top/back/front are unnecessary.. I could just use a centerpoint and an extent value.. also possibly change HxrOctree*[8] to HxrOctree**

Actually, on second thought... the HxrOctree** would take the same memory cause I would still have to malloc those 8... and also using a centerpoint would exchange smaller memory size for slower performance, so maybe not worth it.

### #13TATUK2

Posted 25 October 2013 - 12:02 PM

waterlimon, that's a good idea.. basing the octree depth on geometry complexity/size(density).... there are a couple faults with my implementation which definitely could be optimized, for example I think it needs at the least one recursive subdivision, and has a small maximum of about 6... and also takes up a huge amount of exponential memory (a depth of 6 takes like 500MB)

kauna, i'm using GL occlusion queries...

This is my octree struct:

typedef struct HxrOctree
{
bool base;
float left, right, bottom, top, back, front;
struct HxrOctree* leaves[8];
HxrTrianglePlaneList trianglePlanes;
} HxrOctree;

One quick thing I just noticed as that left/right/bottom/top/back/front are unnecessary.. I could just use a centerpoint and an extent value.. also possibly change HxrOctree*[8] to HxrOctree**

PARTNERS