non changing topo, reexporting facesets

Hi there,

It seems that even for objects without chaning topo, the whole topology is reexported for every frame (instead of just the first).

The channels in question:

_channel_Normal_faces####.xmdata
_channel_MaterialID_facedata####.xmdata
_channel_SmoothingGroup_facedata####.xmdata
_channel_TextureCoord_faces####.xmdata
_channel_TextureCoord_verts####.xmdata
_faces####.xmdata

I’ve noticed this a while back, and according to my memories this might be a bug :slight_smile: at least i remember in max it used to not do that

cheers,
laszlo

Thank you for your report!

As you noticed, the old saveXMesh command does not re-use files between frames.

In the beta release, we added a new saveXMeshSequence command that can re-use topology and other files between frames:

Synopsis: saveXMeshSequence [flags] Flags: -cm -channelMap String -fr -frameRange Float Float -mm -materialIDMap String -p -path String -s -step Float -ws -worldSpace

For example:

saveXMeshSequence -p "c:/out/test_0001.xmesh" -fr 1 50 Saves the currently selected node to the sequence c:/out/test_0001.xmesh, frames 1 to 50.

We have a publishing system that lets multiple exports of different assets happen parallel (so that we dont have to reevaluate the scene for the frame range multiple times).

In this setup, we for example:

  • initialiaze all pointcache files, xmeshes, transform caches

  • loop through the framerange once, and sample each of the exported caches for that frame range

  • close the files, finish writing, or flush memory buffers to disk

With a “one command does it all” approach, this would not work :-\ Any chance we could have the same functionality with a ‘per sample’ cache command?

cheers,
laszlo

Yes, that is definitely possible. XMesh for 3ds Max doesn’t support your scenario either, so we’ll need to think about how to handle it.

Our max pipeline is a bit older than our maya one, so it does not yet do this optimized caching (sadly). So its less of a priority there

I feel we should allow a post-caching optimization pass that compares hashes of channels on consecutive frames and updates the XMesh XML files to make them point at previous frames if no changes are recorded. Then the extra files would be removed. We also need this for Deadline processing because if you run an animation range of 1000 frames on 100 machines, you will get every 10th frame unoptimized (as the separate task doesn’t know about the rest of the sequence, but can optimize within itself).

Obviously, this wouldn’t be as smart and as fast as the current method since there would be a lot of redundant saving going on in the first pass, but I still think it is good to have.