Export to Karma
The exporter writes the composed stage to a folder of USD files that any USD application can open, and sets it up so Karma renders it the way Lunaris shows it.
Exporting
Click Export USD in the viewport toolbar. The Save dialog starts on the next free version folder, usd/export/TD_Lunaris_v###/scene.usda; pick another place if you like. If a Sun & Sky operator has Animate Time of Day on, the button exports the timeline range, every 10th frame (see below). The status bar shows where the files went.
From the Textport (Alt+T) you have more control:
import lunaris.usd_export as X
X.export('usd/export/my_shot_v001/scene.usda')
A relative path is inside the project folder. The export always rebuilds the stage first, so it matches what you see.
To export only some lights, for example to compare one light against Karma:
X.export('usd/export/sun_only_v001/scene.usda', lights=['/World/sunsky/sun'])
Exporting time of day
With a Sun & Sky operator animating the time of day, export a range of frames:
X.export_animation('usd/export/sunset_v001/scene.usda', range(1, 601, 10))
This writes the sun's position, brightness and colour as time samples, plus one sky image per exported frame. Every 10th frame is usually smooth enough for a slow sun; use a step of 1 for every frame.
What's in the folder
| File | Contents |
|---|---|
scene.usda | The file to open. It stacks the layers below in the right order and adds the viewport camera (/LunarisExport/cam) and render settings. |
layers/ | Every layer of the live stage, saved as a file: your edits, each operator's layer, and the assembly layer. |
tex/ | Copies of the generated textures, such as the baked sky. |
- Files inside the project are referenced with relative paths, so the export folder can move with the project. Files outside the project keep their absolute paths.
- The scene is written in metres, Y up.
- Solo and mute from the Lights tab are not exported.
Rendering in Karma
Open scene.usda in Solaris (a Sublayer or Reference LOP), or render it directly with husk:
husk -c /LunarisExport/cam -f 1 -n 1 -o render.exr scene.usda
The export already contains the two Karma settings physical light levels need: dome lights show as the background, and Karma's colour limit is raised so bright sunlight isn't clipped. Without them, Karma shows a black sky and a far too dark image.