Hello everyone,
I am just starting to integrate ragdoll IO with out pipeline and I am having difficulty with importing/exporting via the api.
So it seems the majority of options exist for importing/loading/reinterpreting. Whereas on export you can only choose the the filename. I did find it confusing that I cannot explicitly provide a list of rRagdoll nodes to export. But then I saw that a majority of nodes have an
.export
attribute. So I have been disabling that attribute on non desired nodes and then using
from ragdoll import api; api.export_physics()
That portion seems to be working alright.
But when I try to import/reinterpret/load the physics file, the character will rebuild but the ground plane will not be found or recreated.
Forgive my inability to provide an example, I work at a vfx studio and as such I am more air-gapped than George Clooney in Gravity.
But I can recreate the issue by using the UI
- Load up the ragdoll browser (Same ui for looking at your license) & select the rhino
- Reset settings on the export physics and export (desktop is fine)
- Delete all physics in the scene
- Reset and import physics from your desktop
- The rhino will recreate itself as desired, but I am getting inconsistent results with the groundplane stopping. So the rhino will just fall.
I am exporting the desired/target solver nodes (including the solver)from the scene. Perhaps I should export all the nodes and try to selectively load instead of doing so on export?
Here are the import/load options I have been interacting with to try and fix the issue.
opts = {
"roots": [],
# preserve the attrs on the solver in the scene, or use the ones from the file
"preserveAttributes": load_options["preserveAttributes"],
# create transforms missing from the scene, like the collision objects, ground etc
"createMissingTransforms": load_options["createMissingTransforms"],
# search and replace names
"searchAndReplace": ["", ""],
# namespace to put all the nodes under, there is no concept of target ns, yet
"namespace": ragdoll_ns,
# match by name or hierarchy, only two options
"matchBy": ragdoll.constants.MatchByName,
# unsure the following have an effect
# "retarget": True,
# "importNamespaceCustom": 1
}
# override with the scene solver, if one exists
existingSolver = str(next(iter(cmdx.ls(type="rdSolver")), "")) or None
if existingSolver:
opts["overrideSolver"] = existingSolver
I have also tried api.reinterpret_physics and dump.Louder(opts) and I cannot seem to get the ground plane to recreate. Also I noticed the “rdEnvironment” node does not have a “export” attribute. Perhaps it is treated differently?
I will try to export all options and then selectively load to see if I can get desired setup.
So if anyone can see what I am doing wrong and perhaps provide an api I/O example that would be great. I have been trying to get this to work for hours now.
Also, a question/note about the idea of “target namespaces”. We plan to use ragdoll how it is often demoed; getting and applying its final performance onto a target rig. So is there scope to provide namespaceA for ragdoll nodes and namespaceB(target namespace) the rig?
We can probably continue on just fine with one namespace for both, but it would ideal if such was supported.
Thank you for any help you can share.