Nodes/Pixar's OpenUSD/Set USD Prim Display Color
ComfyUI Node

Set USD Prim Display Color

Tint a mesh without touching a material graph

By cjhosken·Created 3 months ago·Updated 2 months ago· 9
Set USD Prim Display Color
  • USD
  • display_color
  • USD
prim_path/Root/Mesh
apply_to_childrenfalse

Set USD Prim Display Color is the pack's "just make it red" button. It writes the displayColor and displayOpacity attributes onto mesh prims - the built-in color channel that every USD viewer, Hydra renderer, and DCC shows without needing a single material node. If you've ever loaded a 3D asset into a viewer and seen it in a flat gray, you've seen a mesh that doesn't have display color. This node is how you give it one.

Why you'd reach for it

Building a full USD material network (via Apply USD Material or hand-authoring UsdShade in a script) is overkill when what you actually want is a placeholder tint while you assemble a scene, or a quick way to distinguish one mesh from another in the viewport, or a simple vertex color a renderer can use as a base. Display color is USD's "no materials needed" path, and this is the node that sets it from a color picker instead of a line of .usda. It's also the fastest way to sanity-check that your prim paths are right - nothing validates a path like watching the right mesh change color.

How it works

It takes the hex color from the display_color widget (that's #RRGGBBAA, eight hex digits - the last two are alpha), converts it to the Gf.Vec3f USD expects, finds the prims matching prim_path, and sets displayColor plus displayOpacity on each. The detail that matters: it only touches prims that are actual UsdGeom.Mesh instances. Point it at an Xform or a PointInstancer and it silently skips them - no error, just no visible result. If you flip apply_to_children on, it walks the whole subtree (Usd.PrimRange) and applies the color to every descendant mesh, which is handy for a prefab-style root whose child meshes all share a tint.

The inputs that matter

  • prim_path - which prim. Default /Root/Mesh.
  • display_color - the color widget. #ffffffff is white and fully opaque. Remember the alpha: #ff0000ff is solid red, #ff000080 is half-transparent red.
  • apply_to_children (optional) - off by default; turn it on to color every descendant mesh.

The output is the same USD stage with the color authored, ready to feed the viewer, SaveUSD, or more edits.

Install

Standard for this pack - ComfyUI Manager, search "ComfyUI-OpenUSD":

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

Restart, and let usd-core==26.5 (the big USD Python bindings) plus numpy, trimesh, and pygltflib finish installing. No model downloads anywhere.

Troubleshooting

  • The color doesn't change - either the prim isn't a mesh (the node only touches UsdGeom.Mesh prims) or you're looking at a mesh that has a bound material, which overrides display color in a proper render. Display color is a fallback, not a conqueror.
  • Alpha does nothing in some viewers - display opacity is respected by Hydra and most DCCs, but a few lightweight viewers ignore it. That's the viewer, not the node.
  • It colored the whole subtree when you only wanted one mesh - apply_to_children was on. Defaults are off for a reason.

Same pack-level caveat as its siblings: this is v0.1.1, brand new, no community track record yet. The behavior above is straight from the source, but when it's this young, budget for the occasional rough edge and check the repo before blaming yourself.

Category3d/usd/prim

Inputs (4)

NameTypeDefaultDescription
USDUSD
prim_pathSTRING/Root/Mesh
display_colorCOLOR#ffffffff
apply_to_childrenoptBOOLEANfalse

Outputs (1)

NameTypeDescription
USDUSD