NyxSceneExporter#
- class gs_nyx_plugin.nyx_scene_exporter.NyxSceneExporter[source]#
Bases:
objectTranslate a Genesis scene into a Nyx
SceneAssetJSON description.Walks the built Genesis scene once to populate a
gs_nyx.nyx_py_sdk.SceneAssetwith one instance per renderable sub-geometry, the cameras, lights, environment maps and light fields that the renderer should use, then serializes the result withexport_to_file(). The Nyx renderer reads the written JSON during its scene load step.Instances are emitted in solver order (rigid → FEM → PBD → MPM-visual → MPM-recon) so the deformable index space matches the layout
NyxPyRendereruses when streaming per-frame vertex data and callingset_deform_entity_active_triangles.Conversion handles#
Z-up (Genesis) → Y-up (Nyx) for static transforms and scales.
WXYZ → XYZW quaternion handedness.
Rigid entities are split into one Nyx instance per vgeom; dynamic-mesh entities (FEM / PBD / MPM) emit a single
DynamicMeshinstance with worst-case vertex / triangle budgets pre-allocated.
The
_entity_uuid_pairslist it builds is the canonical mapping used elsewhere in the plugin to translate Nyx UUIDs back to Genesis entities (seeNyxPyRenderer.pick_pixel()).Constructors
NyxSceneExporter(scene, export_folder, cameras, lights, asset_root_path, env_maps, light_fields)Build the Nyx ``SceneAsset`` from a Genesis scene.
Methods
Serialize the built
SceneAssetto JSON on disk.