# AINormals

> Analyze runs MoGe-2 (MIT) per frame: N layer = normals in camera space (X right, Y up, +Z to camera), or world space when a camera is connected to cam.

Analyze runs MoGe-2 (MIT) per frame: N layer = normals in camera space (X right, Y up, +Z to camera), or world space when a camera is connected to cam. Optional depth layer (per frame, not temporally smoothed). The model is picked for you (the smaller, faster MoGe-2 ViT-B by default; the larger ViT-L when you choose it). The lens comes from Known FOV, a connected camera, the plate's metadata, or an estimate.

| Node | AINormals |
|---|---|
| Menu | AI › AINormals |
| **Names in each format** | |
| .oink comp (JSON) | `"type": "OC_N_ainormals"` |
| .nk script | none: written as an Oink node |
| Python | `nuke.createNode("OC_N_ainormals")` |
| Assistant (MCP) | `create_node(type="AINormals")` |
| Tab search | `ainormals`, or its initials `ain` |

![AINormals properties](/shots/nodes/ainormals@2x.webp)

## Inputs and outputs

| Port | Name | Type |
|---|---|---|
| input 0 | Image | image |
| input 1 | cam | scene |
| output 0 | Image | image |

## Knobs

Panel tab **Ainormals**, in panel order.

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `output_depth` | depth layer | bool | `false` |  |  | Also output MoGe-2's per-frame depth (1/Z) |
| `encode` | input | menu | `srgb` | srgb (scene linear), none (display) |  |  |
| `analysis_width` | analysis size | float | `1036` | 256 to 2048 (integer) |  | Long side of the frames sent to the model (px) |
| `fov_mode` | field of view | menu | `estimate` | estimate, known |  |  |
| `known_fov` | known FOV | float | `50` | 1 to 179 |  |  |
| `haperture` | horiz aperture | float | `24.576` | 0.1 to 100 |  | Film back width (mm) for the focal readout / Create Camera |
| `spatial_sigma` | upsample spatial | float | `1` | 0.1 to 4 |  | Joint bilateral spatial sigma (model pixels) |
| `range_sigma` | upsample edge | float | `0.08` | 0.005 to 2 |  | Joint bilateral range sigma (plate colour, lower = sharper edges) |
| `keep_other_frames` | keep other frames | bool | `false` |  |  | Analyze keeps results of frames outside the new range |
| `keep_loaded` | keep model loaded | bool | `false` |  |  | Leave the models in VRAM after Analyze (faster re-runs) |

### Other knobs (Python, .nk and the assistant; not on the panel)

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `gl_color` | Viewer Controls Color | float ×3 | `0, 0, 0` | 0 to 1 |  |  |
| `postage_stamp_frame` | Static Frame | int | `1` | -2147483648 to 2147483647 |  |  |
| `lifetimeStart` | Lifetime Start | int | `0` | -2147483648 to 2147483647 |  |  |
| `lifetimeEnd` | Lifetime End | int | `100` | -2147483648 to 2147483647 |  |  |
| `useLifetime` | Use Lifetime | boolean | `false` |  |  |  |
| `cached` | Cached | boolean | `false` |  |  |  |
| `bookmark` | Bookmark | boolean | `false` |  |  |  |
| `dope_sheet` | Dope Sheet | boolean | `false` |  |  |  |
| `clone_group` | Clone Group | string |  |  |  |  |
| `link_source` | Link Source | string |  |  |  |  |
| `link_overrides` | Link Overrides | string |  |  |  |  |
| `split_views` | Split Views | string |  |  |  |  |
| `moge_model` | Model | enum | `AUTO` | AUTO, VITL, VITB |  | Geometry model (metric depth, field of view, normals); licence tier: optional / bundled |
| `results_data` | Results | string | `{}` |  |  |  |
| `fov_x` | FOV X (deg) | float | `0` | -3.4028234663852886e+38 to 3.4028234663852886e+38 |  |  |
| `fov_y` | FOV Y (deg) | float | `0` | -3.4028234663852886e+38 to 3.4028234663852886e+38 |  |  |
| `focal` | Focal (mm) | float | `0` | -3.4028234663852886e+38 to 3.4028234663852886e+38 |  |  |
| `analysed_first` | Analysed First | int | `0` | -2147483648 to 2147483647 |  |  |
| `analysed_last` | Analysed Last | int | `-1` | -2147483648 to 2147483647 |  |  |


---
Sources: opencomp_core/nodes/ai/aidepth.py, opencomp_electron/src/components/properties/knobSchema.ts, opencomp_core/nodes/help/ainormals.md
