-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace KD-Tree with Octree #16
Comments
Pyroevil wrote about octree here: blenderartists forum
The idea is not to rebuild Octree, but to update it. Construction takes a long time. |
I'm not good at C. I don't know how to do this in blender. |
Thanks for the resource, i rewrote the code in Octree I can see the collision detection and movement are better but the speed is exactly the same, it did not change at all maybe in 1 second in every minute not sure because many parameters are random so we can not say for sure. I noticed when I load just the cache blender will get slow on collision and that's strange, basically, blender will calculate particles no matter what we do and we always lose performance because of it. |
I do not know how to do it. I would like to rewrite molecular so that it becomes a separate program. Blender introduces many restrictions for the addon. And if this program works stably, then integrate it with blender in the form of a pyd library. But I have no experience in creating such programs. |
I need to rewrite the code with TBB in C++ because I have seen so many memory-related issue that they do not make any sense. sometimes one variable will change between 2 lines and this is mostly about multithreading writing one variable at the same time or we have a memory leak. |
one thing i need to mention is I replaced quick_sort with heap sort and merge sort so I can see if the problem is in recursive and it causes overflow. it acts better and more stable with big particle numbers bu again no speed gain. I'm almost sure that blender will not let us gain control of more than 1 or 2 cores. |
While reading the messages by Pyroevil on the forum, I noticed that he wanted to replace KD-Tree with Octree. Octree can be faster.
@OmidGhotbi do you know if Octree will be faster than KD-Tree? Will it be difficult to rewrite the code in Octree? Is it worth spending energy on this?
The text was updated successfully, but these errors were encountered: