Second cache for cloth simulation reacts with a cache step set to 10 instead of 1.
Closed, ResolvedPublic

Description

ubuntu 11.04 64bits rev41945

I tried to answer to the question of french forum blenderclan :
"How to change influence of pinning vertex group in order to change extremity pinnig the cloth ?"

The only set up found for that is complicated.
You can see it on this video or in atttached trick.blend made by ed gautier.
http://www.youtube.com/v/vMVz2iafWt8&loop=1&autoplay=1

It uses 3 cloth objects, 4 emptys, hooks and child of constraints.
I tried to find a workaround without empties, their hooks and constraints and simply with the 3 cloth simulations on the same object.

Here is the bug.
In attached cloth_multicache.blend, bake first cache.
For second cache, change pinning vertex group to second and bake this cloth simulation.

As you can see on the timeline; there is only 1 cache step, each 10 frames, for second cache instead of 1 cache step by frame for first cache.
I tried to change cache step in datablocks view of outliner but it indicates 1.

My purpose was to run first simulation, twice.
First time, to apply cloth as a shape key at frame 125.
Second time to do cloth simulation fo frrames 1 to 125. (in reality, I use external cache only avaiable in datablock view)
So, at frame 126, I can set shape key to a value=1 and run second cache simulation.

Unfortunately, active cache to render is not animateable.

I know Jahka will change cache system to use caches in NLA, in several months.
Cache step bug is a real bug.
Animation of active cache is more a feature request.
Sorry to ask if it could be solved.
But from user point of view, there are just these two steps to fix to have an easy workflow.


Details

Type
Bug

I did not manage to attach trick.blend.
It is, here.
http://www.pasteall.org/blend/9777

Janne, can you please look into this problem? Thanks.

Fix for the step issue is in svn, at least when creating new point caches this should be correct now. Existing caches can be fixed by going into the outliner > datablocks, then objects > .. > modifiers > .. > point cache > point cache list.

Regarding animation of the active cache, you could try something like this in the python console, after which you can edit the curve in the graph editor:
ob = bpy.data.objects["Grid"]
ob.keyframe_insert("modifiers[\"Cloth\"].point_cache.point_caches.active_index")

Seems to work in my test:
http://www.pasteall.org/blend/9936

Brecht Van Lommel (brecht) closed this task as "Resolved".Nov 24 2011, 10:15 PM

Thanks, Brecht !

It works perfectly.