meshfx // USD PIVOT

How to fix the pivot point of a USD file

You fix a USD pivot by checking the prim's transform operations, because USD writes a pivot as a pair of xformOp:translate:pivot operations around the rotation and scale. Apply the pivot into the prim origin in your 3D editor and export again, so every importer turns the model around the same point.

pyrofx effects work today, and new accounts start with $5 of usage.

MODULE // meshfx AVAILABLE

meshfx measures faults, checks repairs and makes LODs for a triangle budget. meshfx runs on the hosted API: try it in the Playground.

  • Pivot: xformOp:translate:pivot and its inverse
  • Order: translate, pivot, rotate, scale, inverse pivot
  • Export with the pivot on the prim origin

01 // WHY

How USD stores a pivot

A USD prim lists its transform steps in xformOpOrder. The common layout is xformOp:translate, then xformOp:translate:pivot, then rotate and scale, then !invert!xformOp:translate:pivot, which moves the model to the pivot, turns and scales it there, and moves it back.

An importer that flattens that list into one matrix keeps the model in the right place, but the engine object's origin ends up at the prim origin, away from the pivot, so later rotations in the engine swing around the wrong point.

02 // HOW TO

Apply the pivot into the prim origin

  1. Open the file as .usda text, or inspect the prim's transform in your 3D editor, and find xformOpOrder on the prim to fix.
  2. If it lists xformOp:translate:pivot, note its value; that offset is the pivot.
  3. In your 3D editor, set the object's origin to the pivot point and apply the transform, so the pivot pair is gone or zero.
  4. Export the USD and check that xformOpOrder now holds only translate, rotate and scale.
  5. Rotate the model in your engine to check. For an engine without a USD importer, convert to GLB, which keeps the origin as a node transform.

FBX and USD input are not supported by meshfx. Export glTF, GLB, OBJ, STL or surface PLY first, then inspect the measured output. Hosted meshfx runs are available in the Playground.

04 // FAQ

USD pivot questions

All questions →

README.FIX_PIVOT_POINT_USD
Why does my USD model rotate around the wrong point after import?

Its pivot lives in the xformOp:translate:pivot pair and the importer flattened it into one transform. Apply the pivot into the prim origin before export.

Should I convert USD to FBX or GLB to keep the pivot?

Apply the pivot into the prim origin in your 3D editor first. Then either FBX or GLB keeps it as the object origin.

How do I apply rotation and scale before exporting USD?

Apply them in your 3D editor so the prim's xformOpOrder holds a plain translate, rotate and scale. A clean stack reads the same everywhere.

How do I get a USD model into Godot with the right pivot?

Set the origin in a 3D editor and convert the model to GLB, since Godot has no built in USD importer.

Explore meshfx outputs

Inspect compiled meshfx outputs and their reports. Hosted meshfx runs are available in the Playground.

All effects, guides and explainers →