NyxSceneExporter#

class gs_nyx_plugin.nyx_scene_exporter.NyxSceneExporter[source]#

Bases: object

Translate a Genesis scene into a Nyx SceneAsset JSON description.

Walks the built Genesis scene once to populate a gs_nyx.nyx_py_sdk.SceneAsset with one instance per renderable sub-geometry, the cameras, lights, environment maps and light fields that the renderer should use, then serializes the result with export_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 NyxPyRenderer uses when streaming per-frame vertex data and calling set_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 DynamicMesh instance with worst-case vertex / triangle budgets pre-allocated.

The _entity_uuid_pairs list it builds is the canonical mapping used elsewhere in the plugin to translate Nyx UUIDs back to Genesis entities (see NyxPyRenderer.pick_pixel()).

Constructors

Methods

destroy

export_to_file

Serialize the built SceneAsset to JSON on disk.