Mesh Sequence Cache Modifier How do you use it?

I have searched on this site to see if anyone may have dealt with this modifier or know of a good tutorial on this. The standard Blender docs on this are a little vague and the only thing close I can find on the net is on the Mesh Cache modifier. Any hints?

1 Like

Import an alembic file and investiate how it is employed.

1 Like

I created an alembic file and added to the modifier and still could not figure out the purpose or use of this modifier.

You will need to import the file. The importer sets up all that stuff. Alembic importer does that by setting up some relationships including the mesh cache modifier.

You wont get anywhere by just adding the alembic file to the modifier.

1 Like

Thanks , well that makes perfect sense. Dont know why I didnt think of it. So I imported the alembic file and then selected it in the path for the modifier. So far, so good but still dont see the purpose of this modifier. The Blender docs are really vague on the use of this modifier.

Without it, you cant playback an Alembic mesh cache. That is for animation data.

Thanks again. I really do appreciate your help here. For some reason I am stumped by this modifier. So I have imported the alembic file and it appears in my viewport. I have not added the Mesh Sequence Cache modifier but I can press alt+a and play the file and render the alembic imported file. What am I missing here?

This is what the Blender site says about the modifier:
“Despite its name, this modifier supports meshes and curves. It also handles file sequences, as well as meshes and curves with varying number of vertices/control points.”

Not much explanation at all of what it is used for.

@hollallen

Here is a summary for the Alembic importer and exporter code as it was being developed and also some discussion of the bugs and TODOs(This, of course is from 2016):

https://developer.blender.org/D2060

Also, here is the dedicated thread for the importer and exporter:

Maybe you’ll find something useful - maybe not. I actually am trying to figure out how to activate and use the “Cache File” mode in the Dope Sheet editor. I can’t even get the darn thing show anything at all.

I hope you find something useful. I am going to be investigating also if I get some time tomorrow.

EDIT: After a quick search on google, it seems that animations can be exported, and therefore, imported as well, using Alembic in two different ways . I’m guessing one way would be an Alembic sequence that would actually be a bunch of instances of variations of a mesh object and the other way would be just a single instance that uses keyframes for it’s animation.

Thanks John,

I am looking into these now. It seems a lot are having trouble with this modifier but I am starting to make sense of it. Some have seen that when you import and Alembic sequence the modifier automatically appears in its place but for me it did not happen. Then trying to make sense out of its settings has been a challenge but I am getting there.

I developed the feature so maybe I can answer some questions.

The goal of the modifier was to import into Blender animations of meshes, curves, and particles from other software using the Alembic file format. Nothing prevents exporting a Blender file to alembic, and rereading it in Blender.

I guess that if you don’t know what Alembic is, you would have trouble understanding the modifier and its properties (and yes documentation is lacking…).

Alembic works using a hierarchical tree where transformations are root and branch nodes, and geometry data are leaf nodes. Think of it as transformation matrices being objects in Blender, and meshes being children of the transformation object.

Each node has a path (like “/Cube/CubeData/”), so when adding a Mesh Sequence Cache modifier to an object, you also have to tell the path of the object to read from in the archive. Alembic can store all of the data throughout an animation in a single file, as opposed to having one file per frame like other formats, so you can choose in the modifier the time at which to read the data (say if you want to read data from frame 50 but Blender is at frame 60).

Since Alembic stores a hierarchy of transformations, we also have a Transform Cache Constraint that works in conjunction with the Mesh Sequence Cache Modifier.

There is also an old patch that lets you read curve modifiers based on custom properties in a cache file, so you could import keyframes from an Alembic archive.

The Alembic importer reads an Alembic archive and creates automatically objects, modifiers, and constraints based on the data in the said archive.

I did not work much in this area. Mostly due to lack of time, but also because the main developer in this area of the code base was not really active. I don’t remember much but I think the “Cache File” mode in the Dope Sheet editor should show you the key frames on the various Cache Files, but instead those key frames appear in the general Dope Sheet Summary. I was not familiar with data-blocks in Blender when I added the feature, so I just copied what other data-blocks were doing, maybe this was useless, and no one caught it during code review.

The modifier is only added if the object has animated data (like a character animation changing the positions of the vertices). If the animation is only on the transformation (like scaling or moving the object), then a transform cache constraint is added.

2 Likes

@KWD

Thanks for the answer buddy…

Do think your patch would be a good resource for learning the Blender codebase ?

Also, you wouldn’t happen to know if there is a branch with separate(unsquashed) commits for your Alembic commit # 61050f75b13 would you ? It would be easier to learn your code through development stages as opposed to one big commit.

@KWD
WOW thank you thank you KWD for explaining this. Just what I was looking for. This should be with the Blender docs. Now I understand the reason for the controls in the modifier.

Thanks again

The patch is quite big and touches a lot of areas (modifiers, constraints, meshes, NURBS, etc…) so I am not sure if it is the best way to learn the code base. Then some areas may have changed with Blender 2.8. Maybe try looking at smaller, more focused, and more recent patches in the patch tracker.

The alembic branch was deleted after the merge in master, and I don’t know if anyone has a copy of it. Also note that the code in the patch is not the same exactly as the code currently in master as there were a bunch of code fixes and little rewrites to better handle some edge cases.

If you want to do some code archeology, I have quite a few unfinished branches where I tried to improve the Alembic integration. The branches can be found on my github account and start with the prefix “abc_”.

1 Like

I will say that this is a wonderful start. I know more about this modifier now than I ever did. Most of the info on this modifier on the web is incomplete or at least lacks sufficient information to know its use. This goes a long ways and hope anyone else searching the net runs across this forum thread.

Feels a bit weird that modifier is in that list than or am i crazy?

Hello KWD,

the importer and modifier work perfectly, so… thank you, much needed feature

i’m working on a project and i’ve received from my client a series of .abc files, with character and cloth animation exported from Clo3D

the file imports fine, i trim the animation lenght, then export a new .abc file for use inside of a VR simulation in Unreal 4.24

everything smooth, except Unreal Geometry Cache, is quite slow, very slow, 5x rendering time slow when the animation is onscreen… (probably because it’s a Beta feature)

finally my question: there are parts of the body that are not visible, same for the inside of clothes, so i’d like to delete a few thousand faces that uselessly add weight to the model

if i delete a few faces in Edit Mode, the faces are back as soon as i go back to Object, i think this is happening because the data in the cache are saved on a per frame base and don’t care if i delete something from the static mesh

surely the system is meant to work like this and it makes sense, but is there a way to delete faces from the cache?

thank you for your time (and the feature)

I’ve been messing around with the object and i discovered this: if i create a Vertex Group in the animated mesh and add a Mask Modifier after the Mesh Sequence Cache, the Group vertices hide correctly, i hope the exporter takes this into account…

Hi papalagi,

Due to the way modifiers work, editing a mesh in object mode will have no effects on the final evaluated mesh data as modifiers will overwrite it; this is where an “Edit Mesh” modifier could be handy (and long desired by the community). However, as you have discovered, you can still add modifiers after the Mesh Sequence Cache one to further modify the object, and yes, the exporter should take all modifiers into account when exporting the data, unless you specify otherwise in the export settings.

Hi KWD. Thank you for your tremendous explanation in this thread.

Your last comment relates to something that I am trying to do in Blender. I am doing some cloth simulation where I’m trying to save the cloth mesh in some Blender script (via Python), and then load it back in a different Python script with the same modifiers applied. I posted a question on Blender StackExchange recently with my attempt at doing this with exporting and importing into .obj files, but this is not working because it does not preserve modifiers:

From your response, do you think the Mesh (Sequence) Cache Modifier could resolve my issue?