Nodes/Pixar's OpenUSD/Create USD Camera
ComfyUI Node

Create USD Camera

Put a real camera in your USD scene so renders have a viewpoint

By cjhosken·Created 3 months ago·Updated 2 months ago· 9
Create USD Camera
  • USD
  • USD
prim_path/Root/Cameras/MainCamera
focal_length50.0
focal_length_modecreate/set
horizontal_aperture20.95
horizontal_aperture_modecreate/set
vertical_aperture15.29
vertical_aperture_modecreate/set
near_clip0.10
near_clip_modecreate/set
far_clip10000
far_clip_modecreate/set

A USD stage doesn't have a viewpoint until you give it one. Create USD Camera stamps a proper UsdGeom.Camera prim into your stage - focal length, apertures, near/far clip - so that when the stage gets rendered or opened in a DCC, there's a camera that knows where to look and how to frame. If you've ever opened a USD stage and had to hunt for a viewport, this node is the fix: it makes the camera an explicit part of the file instead of an afterthought.

The defaults are sane film values: 50mm focal length, a standard 35mm-style aperture (20.955 × 15.29mm), near clip 0.1, far clip 10000. For most work you can leave them and just wire the stage through. You'll mostly touch the node when you're setting up a specific shot or matching a camera from another pipeline.

The input layout (the part that's actually interesting)

Each camera attribute comes with its own mode dropdown, and this is the node's real feature: create/set, block, or ignore per attribute. That trio shows up across this pack (lights use it too) and it's worth understanding once:

  • create/set - if the attribute doesn't exist, create it; then set the value. The default, and what you want 95% of the time.
  • block - stamp a blocking opinion on the attribute. This is a USD power move: it erases whatever value that attribute has from weaker layers (a reference, a sublayer) without writing a new value. Use it to neutralize an attribute inherited from somewhere else.
  • ignore - don't touch this attribute at all. Leave it exactly as upstream left it.

So you can, for example, block a focal length that a referenced asset set, or ignore everything except the clip range. That per-attribute control is why the node exists rather than just "set these five numbers."

Inputs: USD, prim_path (default /Root/Cameras/MainCamera; created if missing), and the five attribute pairs - focal_length, horizontal_aperture, vertical_aperture, near_clip, far_clip, each with its mode. Output: USD.

One subtlety from the source: near and far clip get combined into a single clippingRange float2 attribute, so the two clip modes share that one attribute - block either one and the whole clipping range gets blocked, not just that half.

Install & troubleshooting

Pack install: ComfyUI Manager → search "ComfyUI-OpenUSD", or

cd ComfyUI/custom_nodes
git clone https://github.com/cjhosken/ComfyUI-OpenUSD

then restart. Deps: usd-core==26.5, numpy==2.5.0, trimesh.

If your render "looks through nothing" or a DCC reports no camera, check that the camera prim actually exists at the path you expected - a typo creates a fresh prim at a new path rather than editing the one you meant. And remember the USD socket only connects to this pack's nodes; the camera is visible to anything that opens the saved stage, but in-graph it travels as this pack's type.

Category3d/usd/scene

Inputs (12)

NameTypeDefaultDescription
USDUSD
prim_pathSTRING/Root/Cameras/MainCamera
focal_lengthFLOAT50.0
focal_length_modeCOMBOcreate/set3 options: create/set, block, ignore
horizontal_apertureFLOAT20.95
horizontal_aperture_modeCOMBOcreate/set3 options: create/set, block, ignore
vertical_apertureFLOAT15.29
vertical_aperture_modeCOMBOcreate/set3 options: create/set, block, ignore
near_clipFLOAT0.10
near_clip_modeCOMBOcreate/set3 options: create/set, block, ignore
far_clipFLOAT10000
far_clip_modeCOMBOcreate/set3 options: create/set, block, ignore

Outputs (1)

NameTypeDescription
USDUSD