I need to introduce the Bullet Physics engine into C4D to build the Physics system of MMD, AND I need to update objects just like the dynamics system of C4D.
Is there any information that was sent out before the calculation of dynamics?
Is there a more efficient update method?
Well, our dynamic engine is based on the bullet engine. Be sure that it's not working before implementing your own solution.
If you want something to be executed at the world level, you need a SceneHookData for sure. That SceneHookData .Execute will be called whenever the scene needs to be updated. That SceneHookData can check all the object of your document and update them.
You will probably need to store some data at world level, this can also be done in a NodeData stored inside a SceneHookData.
Running the Bullet Engine in multiple threads can be tricky, especially if you want object to interact.
the task looks huge, but not impossible.
MMD you are talking about the MikuMIkuDance you already worked on, not material deformation method?
I'm not sure what mean with "introducing the Bullet Physics Engine". This is the engine we are using inside Cinema4D. Are you trying to create your own implementation of the Bullet Engine?
I guess, you want to implement body physics. I don't know if they are based on bone deformation or soft bodies.
We need more information like:
Could you please add more information?
@m_magalhaes Thank you for your reply, I'm sorry I didn't make it clear.
I wanted to create my own implementation of Bullet Engine. Because the dynamic systems of MMD and Cinema4D are different, the transformation is complicated.
I need to do is:
@m_magalhaes Thank you for your advice.
Is the dynamics engine in Cinema4D called in a thread?
How does it update the location of the object?
Can you provide a general reference for my project?
the scenehook is called from the CoreThread, that's why you must be sure that your sceneHook is 100% safe and not blocking/crashing.
I can't talk about our internal implementation. But, to save some time, you could disable the dynamics on the project settings, and keep using our tags to retrieve the data, parameters to drive the simulation.