Atlas Export Nuke Script
The recovered camera as a live Nuke projection script — actually verified in Nuke
- solve
- output_profile
- project
- raw_meta
- script_path
- nk_path
AtlasExportNuke is the flagship export of the whole pack: it writes a Nuke Python projection script and a native .nk scene that rebuild the camera-projection graph - Read → Project3D2 → Card, Camera2 feeding both the projection and the render camera - so your solved photograph becomes a live camera projection in Nuke. This is the step that turns "a solved camera inside ComfyUI" into "a dolly move on the plate, rendered in comp," which is the entire promise of atlas-camera.
What separates this from yet another script-generating export node is that the author actually verified it: the code was built and rendered in real Nuke (16.1v3), and the module docstring catalogs what that caught - Card3D has no xsize/ysize, ScanlineRender has no format knob, and the actual obj/cam input indices on the real nodes are 1/2, not 0/1. That's the difference between "here's a script we think is right" and "here's a script that renders."
How it works
You feed it the solve and an output_dir. It writes two files: a .py for Nuke's Script Editor (exec(open(...).read()); build_projection()), and a .nk that opens directly via File > Open or drag-and-drop. Both describe the identical graph.
Two optional inputs extend it meaningfully:
relief_mesh_obj_path- wire theobj_pathoutput fromAtlasExportReliefMeshhere and the script imports the real derived relief mesh via ReadGeo2 and live-projects onto it, instead of the default flat 40×40 m ground card. This is how you get actual derived geometry in Nuke.raw_meta- when the plate was undistorted on import (fromAtlasLoadRAW), this lets the export write aredistort_stmap.exrbeside the script that puts the render back onto the original distorted plate.write_redistort_stmap(default on) controls it; the map is float32 because half-float resolves UV to ~0.0005 - 2.5 px of error on a 5K plate - and expect ~200 MB at full resolution.
An optional output_profile adds OCIO-style colourspace annotations to the Read nodes. Outputs are script_path and nk_path.
Install and gotchas
Part of the pack - ComfyUI Manager → search atlas-camera, or git clone https://github.com/mikejamesvfx/atlas-camera.git into custom_nodes, restart. The exporter is dependency-free pure Python; Nuke itself is obviously on you. No GPU needed to generate the script.
Gotchas: output_dir is relative to ComfyUI's working directory, but the generated script resolves the mesh path to absolute so it stays portable when the artist opens it from wherever Nuke is running - don't fight that, it's the fix, not the bug. If the plate was shot with a distorted lens and you skipped the RAW/undistort path, there's no raw_meta to write the redistort map, and the export is one-way: everything downstream is rectilinear and nothing returns to camera space. And one caveat worth knowing: for the relief-mesh case, ReadGeo2 imports OBJ/FBX natively but does not auto-apply the OBJ/MTL's own texture - the live Project3D2 projection still needs to be wired into its image input, same as a Card. Know that and the first render won't surprise you.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| solve | ATLAS_SOLVE | — | |
| output_dir | STRING | atlas_exports | — |
| relief_mesh_obj_pathopt | STRING | Optional obj_path output from AtlasExportReliefMesh. When set, the real derived relief mesh is imported (ReadGeo2) and live-projected onto instead of the default flat 40x40m ground card — wire AtlasExportReliefMesh's obj_path here to see real derived geometry in Nuke. | |
| output_profileopt | ATLAS_OUTPUT_PROFILE | Optional OCIO-style output/profile metadata for Read/colorspace annotations. | |
| projectopt | ATLAS_PROJECT | Optional delivery project from AtlasProject — routes this export into the project tree's nuke/ lane and supersedes output_dir. | |
| raw_metaopt | ATLAS_RAW_META | Optional AtlasLoadRAW result. When the plate was UNDISTORTED on import, this lets the export write the redistort ST map that puts the render back onto the original distorted plate. Without it the export is one-way: everything downstream is rectilinear and nothing can return to camera space. | |
| write_redistort_stmapopt | BOOLEAN | true | Write redistort_stmap.exr beside the script when raw_meta shows the plate was undistorted. Float32 by necessity — half float resolves UV to ~0.0005, which is 2.5 px of error on a 5K plate. Expect ~200 MB at full resolution. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| script_path | STRING | — |
| nk_path | STRING | — |