View Full Version : Bullet dynamics re-calculating on render

03-22-2012, 02:13 AM
I have been playing a bit with bullet and sub-d objects and I noticed the dynamics re-calculate when rendering.

What I mean is that when you first setup bullet dynamics you must wait for the calculations. I would think that this is enough, the objects are now in place where they will render but no, when you hit render it calculates again.

I wanted to test my theory so I set up dynamics using sphere as the shape in adjustments. It calculated fast and the render took 3 seconds. So then I made one change and that was to change shape to mesh, well it took quite awhile to calculate and then when I rendered the frame took well over 1 minute to calculate.

So it went from 3 seconds to over a minute just changing the shape to mesh.

Now if you set subpatch levels up higher this effect is greatly exaggerated. The example above was with a subpatch level of 2, if I set it to 4 the render times were around 40 seconds with the shape set to sphere and somewhere past 10 minutes set to mesh (I force quite Layout so it never fully rendered).

I am wondering if there is a way to freeze the objects and turn bullet off once the initial calculations are done so as to save rendering times. Now I shoot stills so I only need a single frame frozen.

Basically I do very hi-rez renders, with Sub-D set high and antialiasing set high. The reason I want to use bullet dynamics is to place many objects in piles naturally and not have objects intersecting each other which "mesh" does pretty well.

Any way to freeze a frame once calculated?

03-22-2012, 03:57 AM
When you save the scene, Bullet should also save a cachefile. However, I think when it comes to subD-objects, that, if you change your display subd level, bullet needs to be recalculated because there are more verts in the mesh. If you keep your display subd level at 0, and only change render subd level, does this force Bullet to recalc even if you have a cachefile for it?

03-22-2012, 05:10 AM
cagemans right... change of subD level (even at rendertime) is a change in the geometry, so bullet recalcs to take note of that.

2 ways around it... either run bullet with ur subD level set to the same as will be used to render, or MDD bake the meshes and ditch dynamics before rendering (my preferred method).

03-22-2012, 05:52 AM
but those two methods are the same, aren┤t they, Craig? I mean, you cannot save the MDD on a different subpatch level than the final one (unless you FX_metalink stuff or similar)

03-22-2012, 05:56 AM
you cant save at a different subD LEVEL per sÚ... but u can save the cage (subD 0) to MDD, and then set subdivision level higher after the fact. You could ofc, as you point out also save MDD at one level and MD meta to the object at another level... which works quite well, certainly much better than when metalinking 2 objects of similar shape but different geometries (different subD levels ofc being, essentially, the same geometry).