2
$\begingroup$

I want to render a rigid body simulation with ~20k objects. Because of that, Cycles needs about 5 minutes / frame to build only the BVH data of those 20k objects (and I have a powerful machine). Is there any way to join the objects to one single object while maintaining its individual movements? I tried baking the simulation to keyframes, but when I join the objects, their individual transformations merge as well.

Btw, I only tested this with a smaller simulation, because baking 20k objects to keyframes takes like ages (hasn't even finished yet...) So maybe there is another way to avoid the long BVH building time? Thanks in advance for any help! :)

$\endgroup$
4
  • 2
    $\begingroup$ I doubt joining the objects would have much of an effect anyway.. What is the vertex count? $\endgroup$
    – gandalf3
    Commented Apr 8, 2015 at 19:37
  • $\begingroup$ It has a tremendous effect, I joined all objects to a single object (removes any of the bake information of course) and the BVH building time dropped to 3 seconds and the 3D View stopped being laggy as well. The objects have only 4 vertices. It's 181k vertices in total. $\endgroup$
    – HAL9000
    Commented Apr 8, 2015 at 19:46
  • $\begingroup$ Huh. Do all the objects have the same geometry? You might try linking them (Ctrl L > Object data) and see if that helps $\endgroup$
    – gandalf3
    Commented Apr 8, 2015 at 19:52
  • $\begingroup$ Of course I meant 8 vertices/object (they're dominos ;)). I tried linking the objects, it took about 7 minutes to link them, but it works, BVH building time is down to several seconds! Didn't know that trick, thank you very much, you saved me about 62 hours of unnecessary render time + a lot of electricty ;) $\endgroup$
    – HAL9000
    Commented Apr 8, 2015 at 20:07

1 Answer 1

1
$\begingroup$

If you link the objects with ⎈ CtrlL > Object data, one copy of the mesh data will be shared between all 20k objects (as opposed to 20k copies of the same data).

While not as efficient as whole-object instances (e.g. dupli objects), AFAIK this is about as close as you can get while still keeping the rigid body sim.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .