Exporting Simulations with replaced meshes

Hi Guys,

couple of questions if I may. Is it necessary to keep the polygon meshes that you use to change the shape of the markers? And if so, do these export correctly with the rest of the simulation as they don’t seem to?



Hi @gang, welcome to the forums. :partying_face:

Yes. Without a connected mesh, the Marker has no knowledge of any mesh.

It is technically possible to store this mesh inside of the attribute, such that it can be disconnected and remember its data, and that’s probably a good idea! I’ll investigate this for the next release, if not the one after.

Sadly no. This was a deliberate decision to avoid bloating the size of the exported file, as a single mesh alone could easily explode the size of that file. That said, it could be an option and is something I’ve been meaning to address. It would be really convenient not having to lug around the original meshes with the exported file, it’s been an issue for us too from time to time when distributing the exported files to users.

The good news is this is very possible, and I will investigate this for the next release also. To cope with file size, what I think will happen is that Ragdoll will store the resulting convex hull - that triangulated mesh used for collisions - rather than the original (potentially dense) mesh. It would mean instant load and small file size, at the expense of not being able to restore the original mesh from the exported file. Like if you wanted to make more edits, or adjust the convex hull parameters.

Does that would like a reasonable compromise?

This actually sounds like a better solution not only for exporting but also perhaps the replace Mesh function as well? For me, being able to delete the originial mesh from the scene if desired leaving just the convex hull would be better perhaps.

You might be right. One thing Replace Mesh can do is maintain the history to the mesh, so you could tweak it after it’s been replaced. But, for cases where you don’t need that it would make sense to simply “install” the mesh into the Marker and disassociate it entirely from the mesh.

1 Like

What if the convex hulls were exported as an OBJ in a directory with a manifest json file that stored parenting data. It could be used to import them, attach (parent constrain, parent, skin, etc.) as the first step to importing physics. This way you wouldn’t have to carry point data for each mesh in a new format.

Ziva json files store the point data in json files internally as world position and local position lists (similar to OBJ format) and they rebuild the geometry in the background if it doesn’t exist in the scene. perhaps you could do something similar.

Thanks for the suggestion! This has crossed my mind, but I’d really like these files to be easily stored, used and sharable and splitting things up is a slippery road. There’s already an image format embedded into the format at the moment, for the thumbnail, and soon we’ll be able to export the input animation and output simulation too, such that everything is reproducible from this one file. Could easily end up with tens of files for a single character.

The most promising route and most likely contender is a zipped json format to get the best of both single-file, human-readability and small filesize. Then it barely matters what goes in there. The vast majority of Ragdoll data is very small, as opposed to Ziva and the Maya scene format which has to deal with millions of points and lots of metadata per point.

The latest release implements this. :partying_face:

The points are now stored within the .rag file. It’ll store the final convex points, as opposed to the original mesh. Meaning it is as minimal as it gets. As an example, the Manikin character went from 500 kb to 1500 kb, and it’s got convex hulls for nearly every marker.

Amazing! Thank you Marcus! I’ll speak to our software guys to make sure we have the latest version and give this a go!

1 Like