Caching preview

Is it possible to get a preview in the viewport whilst you cache? I cache a lot and find it would be useful.

If by preview you mean for the viewport to update as you cache, then yes, this should be the default behaviour.

There is an option to freeze the viewport while you cache, which can be 50% faster or more, called Fast and Loose. Could you have accidentally ticked this setting?

I realised you said “cache” and not “record”, are you referring to the Edit → Cache button?

If so, then yes setting the Cache attribute on the solver to Static and hitting play is the exact same thing that happens when you click that menu item, and would give viewport updates as it happens.

Thanks for getting back to me Marcus, sorry for the late reply…
So you can see in your preview, whilst you’re caching, the viewport isnt previewing whilst you cache.
So for caching longer scenes, it would be useful to see the simulation, whilst it caches.
Like watching a a playblast whilst it creating the playblast.

I’m guessing this confilct directly with the caching process, I dunno?

In my second video, you can see an example of this. Which is to simply play your scene, and caching will happen while you play. Then you’d be getting that preview.

It would be totally doable to incorporate this option into the Cache menu option as well, it just hasn’t crossed my mind since I figured playing the scene would have been the most intuitive. Let me know if this changes anything for you, or I’ll add this option.

Ah yea, sorry… So it is a thing. It just doesnt work for me? Am I missing something here?

Yes, you can either:

  • Use the Ragdoll → Edit → Cache menu item
  • Or you can play the Maya timeline like normal with Cache = Static

In this case, you set Cache = Static and then also run Edit → Cache. That isn’t necessary. I can see how it can be confusing, so I’ll have a think about how to avoid this.

1 Like

Great, I get it now.

So play timeline whilst in Cache = Static will cache and show at the same time. (what I want)
But using Ragdoll → Edit → Cache menu item (caches in the BG only)

Is there a way to keep static on as default? saves me a click :wink:


setAttr “rSolverShape.cache” 1;


To re-cache, you’ll need to disable it, let it evaluate at least once and then re-enable it. So try this.

setAttr "rSolverShape.cache" 0;
currentTime 0;
currentTime 1;
setAttr "rSolverShape.cache" 1;
currentTime 0;
currentTime 1;

1 Like