Octrees: Storing many many items in c4d
-
On 17/04/2015 at 06:57, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16orumo
Platform: Windows ;
Language(s) : C++ ;---------
More and more we see that our plugins need to store a lot of data (objects, polygons, particles, etc.).The question now is "how to store all that data efficiently (meaning fast)".
We are looking at storage trees (like Octrees), the c4d treeview and even OpenVDB, but we are still not sure what is best.
Of course best depends on what you want to do. Store a lot of voxels, polygons or particle?I would like to hear your experiences and discuss ways to store a lot of information in c4d.
Hope to get a lot of feedback and discussion.
-Pim
PS Because I think this topic is not language specific I also posted it in the Python forum.
-
On 17/04/2015 at 07:02, xxxxxxxx wrote:
Hello Pim,
since you question is indeed not language specific we move it to the "General Discussion" forum. Please avoid multiple threads on the same topic. Thanks.
Best wishes,
Sebastian -
On 20/04/2015 at 06:38, xxxxxxxx wrote:
Hello,
Martin already started some discussion on octrees in another thread so maybe he can share some opinions. See "rays intersections octree".
best wishes,
Sebastian -
On 20/04/2015 at 23:37, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Hello,
Martin already started some discussion on octrees in another thread so maybe he can share some opinions. See "rays intersections octree".
best wishes,
SebastianThank you and yes I know, but there was little response.
So I thought let's re-start and make it a more general discussion.-Pim
-
On 27/04/2015 at 11:46, xxxxxxxx wrote:
Hello Sebastian, Hello Pim
actually I´m far away from giving professional advices on the storage questions regarding c4d.
There are too much open questions for me!
What´s about a customized Basecontainer in the document or a Hyperfile? Are these good places to store the octree data?
If I write an object plugin will I be able to store those data in the object´s cache (self.cache = ..)?
If someone has some good advices or warnings on that, I would be thankful!@ Pim
I´ve sent you a book a few months ago: Real Time Collision Detection( Christer Ericson).
In Chapter 7 there is an introduction to morton order(z curve) to organize an octree for storage and access.
For decoding/encoding morton there are several strategies.
As far as I know comparing for-loop, magic bits and lookup table the last one named seems to be the fastest.And in Chapter 13 there are a few strategies of caching.
Did you read it so far and if so, what are your findings ?
I´m interested in your opinion of those strategies!Best wishes
Martin