Hair cache doesnt persist, removed when file reopens (linked data)

(mafster) #1

I’ve got a scene with a linked character that has hair.

I’ve set it up so that the cache exports right next to the current file that the assets are linked into. When i press play with “no-sync” on, it caches out as expected and i can see the files in folder.

When i reopen the file the cache is erased! Is there a way to stop this behaviour? I’ve tried to cache via python with no luck. It says {“FINISHED”} after about a second, but there’s no cache. This is a problem as when we come to do network rendering the file will be opened in multiple different render nodes and of course the cache wont be there.

Another solution is to utilise alembic caches however im trying to avoid this scenario which would require more pipeline work like reattachign materials etc.

(yogyog) #2

Is the character animation in the scene that is linked, or in the scene your rendering? From now on I’ll be calling these char.blend and render.blend to make things easier.

If the character animation is in char.blend I would recommend baking the hair in the char.blend scene.

If the character animation is in render.blend I would recommend making the hair local to render.blend, (just the hair, not the whole character) and then baking it.

Always bake before rendering. It just makes everything more reliable.

Linking in Blender is NOT the strongest, but I expect it will be worked on, now that Blender is being used for feature animation.

(mafster) #3

The char animation is in the render.blend file comparing to your scenario.

Yeah I’ve tried localising but that’s not working. I would love to bake and that is what you woudl do in normal industry, but due to the fact that the hair is on the character and that is pulled in via a collection i have to cache via playing the animation… Localising still doesnt open up the hair properties for me like it would in 2.79 where you could just about access everything after localising. So the only way to attempt baking was through:

ptcache.bake_all() and throwing the context in as arguments but that also didnt work.

Static overides would be perfect right about now but that’s been scheduled for 2.9 now :frowning: which for

The linking system is ok for feature animation and has been used for it by small studios but yeah, static overides is reeeealy needed.

Another thought i just had which might work is deleting the linked asset, appending it and then reattaching the animation Action data. That way its fully localised via append rather than trying to localise a linked asset…might work?

The other option which definitely works in tests we’ve done and is what we would do in some feature film is bake it all out to alembic cache. In blender the hairs export out as curves then and i would have to use the taper/lofting controls on the curves to manage the look of the hair however…that’s not ideal…and is my last option.