what is standard procedures for making user-type queyable by octree?

Oct 14, 2011 at 6:06 PM
Hi, yufeih
I am implementing a basic Marching Cube algorithm to extract 0 isosurface
from an implicit surface representation. The implicit surface is a weighted-sum
of about 3000-10000 basis functions. These functions need to be organized into
a space partitioning structure to allow fast query for evaluating implicit surface value.
I saw build62422 of Nine has OctreeSceneManager. Maybe I can utilize this class
to achieve my goal. In the meantime, it seems my basis function type needs to
implement a few interfaces, e.g. ISpatialQueryable. Since I am new to C#, I need
some pointer on the standard procedure to allow instances of my type queried by
octree. Are there any examples which show how to queyr user-defined type?
BTW, how is the performance of OctreeSceneManager’s query operations? The query
to be performed in my program can be frequent.
Thanks!
Yajie.
Coordinator
Oct 15, 2011 at 4:09 AM
There are 3 fields in ISpatialQueryable, a bounding box, a bounding box changed event and an arbitrary object to store which tree node the object is attached to.
There is a test case in Nine.Test.OctreeObjectManagerTest.cs that has a example implementation of spatial queryable.
The concept behind ISpatialQueryable is that each object to be queried must have a axis aligned bounding box, and that object needs to notify the change of that bounding box, so raise the BoundingBoxChanged event whenever the object has changed its size or position.

On the performance side, you could run the test to see if it'll satisfy your needs, usually it depends on the size and distribution of your objects and queries. Other then that, I haven't done any comparsion with other implementations yet. The only hint I can give you is to create the OctreeSceneManager with an appropriate inital bounds, since it cannot adopt the internal structure based on the size of the contained objects.

I'm not so familiar with Marching Cube algorithms, it seems to be creating a mesh using a weighted sum of geometry functions. I'm not sure if this is going to fit your scenario, but I'll be excited to see your results.
Oct 15, 2011 at 6:15 AM
Yufeih,
Thanks for your explanation! I’ll look into that test and let you know if
I have more thoughts or questions.
Also, I’ll post some results when I finish implementing the algorithm.
Yajie.
From: [email removed]
Sent: Saturday, October 15, 2011 11:09 AM
To: [email removed]
Subject: Re: what is standard procedures for making user-type queyable by octree? [nine:275931]

From: yufeih

There are 3 fields in ISpatialQueryable, a bounding box, a bounding box changed event and an arbitrary object to store which tree node the object is attached to.
There is a test case in Nine.Test.OctreeObjectManagerTest.cs that has a example implementation of spatial queryable.
The concept behind ISpatialQueryable is that each object to be queried must have a axis aligned bounding box, and that object needs to notify the change of that bounding box, so raise the BoundingBoxChanged event whenever the object has changed its size or position.

On the performance side, you could run the test to see if it'll satisfy your needs, usually it depends on the size and distribution of your objects and queries. Other then that, I haven't done any comparsion with other implementations yet. The only hint I can give you is to create the OctreeSceneManager with an appropriate inital bounds, since it cannot adopt the internal structure based on the size of the contained objects.

I'm not so familiar with Marching Cube algorithms, it seems to be creating a mesh using a weighted sum of geometry functions. I'm not sure if this is going to fit your scenario, but I'll be excited to see your results.
Oct 15, 2011 at 6:59 AM
Is there any way I can perform a test of query performance
on WindowsPhone? Cuz I’m implementing Marching Cube on
the phone.
Thanks!
From: [email removed]
Sent: Saturday, October 15, 2011 11:09 AM
To: [email removed]
Subject: Re: what is standard procedures for making user-type queyable by octree? [nine:275931]

From: yufeih

There are 3 fields in ISpatialQueryable, a bounding box, a bounding box changed event and an arbitrary object to store which tree node the object is attached to.
There is a test case in Nine.Test.OctreeObjectManagerTest.cs that has a example implementation of spatial queryable.
The concept behind ISpatialQueryable is that each object to be queried must have a axis aligned bounding box, and that object needs to notify the change of that bounding box, so raise the BoundingBoxChanged event whenever the object has changed its size or position.

On the performance side, you could run the test to see if it'll satisfy your needs, usually it depends on the size and distribution of your objects and queries. Other then that, I haven't done any comparsion with other implementations yet. The only hint I can give you is to create the OctreeSceneManager with an appropriate inital bounds, since it cannot adopt the internal structure based on the size of the contained objects.

I'm not so familiar with Marching Cube algorithms, it seems to be creating a mesh using a weighted sum of geometry functions. I'm not sure if this is going to fit your scenario, but I'll be excited to see your results.
Coordinator
Oct 15, 2011 at 7:45 AM
You'll first need a real phone, then write your own test to see the performance. I don't have much data on the performance side.