Rigid Body Performance (Collison Mesh)

Hey,

I animated some eggs and I’m asking myself if there is an easier way to achieve my result:

This is what I’ve done:
The simulation was very slow. So I decided to run the simulation over a low poly version of the egg. Then I couldn’t finde an easy way to replace the low_poly with the high_poly one and I wrote the following script:

For each low-poly egg the script copies the high-poly egg and sets a Copy Transforms constraint. So to every low-poly version I linked a high-poly one.

import bpy

eggs_coll = bpy.data.collections["eggs_low"]
eggs_high_coll = bpy.data.collections["eggs_high"]
master_egg = bpy.data.objects["egg_high"]

for i in range(len(eggs_coll.objects)):
    current_egg = eggs_coll.objects[i]
    
    copy = master_egg.copy()
    copy.data = master_egg.data.copy()
    
    constraint = master_egg.constraints['Copy Transforms']
    constraint.target = current_egg
    
    eggs_high_coll.objects.link(copy)

This is what came out:

The simulation runs smoothly!

Egg-animation (low-poly):
animation_low

Egg-animation (high-poly):
animation_high

The interaction with other objects also works super fast now:
animation_suzanne

There must be an easier way or am I wrong? Looking forward to read your advices! :wink:

3 Likes

That’s a great simulation! I’d love to see that rendered out. I Usually just run the simulation on the low poly and have either a multiresolution or subsurf modifier that i enable after baking the simulation. Not sure if that’s the answer you’re looking for though. :stuck_out_tongue: