Nodes/BrainDead Nodes/BD Orient Mesh
ComfyUI Node

BD Orient Mesh

Your generated mesh is sideways — BD Orient Mesh is the one-click fix

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Orient Mesh
  • mesh
  • mesh
  • status
rotate_x0
rotate_y0
rotate_z0
about_centroidtrue

Every image-to-3D model has opinions about which way is up, and they're rarely the same opinion your game engine has. Pixal3D hands you a character lying down facing the sky; TRELLIS2 ships Z-up and forward in its own convention; Unreal and Unity want Y-up with the model standing and looking down +Y. That mismatch is why half the "why is my 3D asset sideways" threads exist. BD Orient Mesh is the boring, non-destructive solution: feed it a finished mesh, tell it how many degrees to rotate, and get the same mesh standing the way your engine expects.

The key word is finished. This node is meant to run at the very end of the BrainDead mesh pipeline, after texturing and vertex-color baking, because it preserves everything that took time to compute. Rotating only moves vertices and normals - your UVs, the baked PBR material, and the COLOR_0 vertex colors all ride along untouched. That's more useful than it sounds: most naive mesh rotation helpers either drop UVs or bake the transform wrong, and you only notice after you've re-exported and the texture is smeared.

How it works

You give it a TRIMESH (the mesh type the BrainDead nodes pass around - same one TRELLIS2 and Hunyuan3D-2 use), plus rotate_x, rotate_y, rotate_z degrees, applied in that order. There's one toggle worth knowing: about_centroid (default on) rotates around the mesh's own center of mass, which keeps the object in place. Turn it off and it rotates around the world origin - useful only when you're deliberately repositioning in world space, which is rare.

The practical settings are dead simple:

  • rotate_x = 180 - the documented Pixal3D → Unreal fix. Stands the character upright, facing forward.
  • rotate_y / rotate_z - for the other axes, when a model comes in tilted or back-facing.

Where it sits in the workflow

A typical BrainDead image-to-3D graph looks like: BD Pixal3D Preprocess → BD Pixal3D Image to 3D → BD CuMesh Simplify → BD OVoxel Bake → BD Orient Mesh → export. The orient node sits right before the exporter, so you only ever fix orientation once, on the final mesh. Outputs are the rotated mesh plus a status string (usually diagnostics - wire it to a text preview if you want to confirm the rotation applied).

Install

BD Orient Mesh ships inside the ComfyUI-BrainDead pack. Easiest path is ComfyUI Manager: search for "BrainDead" and install. Manual, for the terminal people:

cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt

Restart ComfyUI, and the nodes appear under the 🧠BrainDead category. Note this pack is built on ComfyUI's newer V3 API (comfy_api.latest), so it wants a reasonably current ComfyUI - if the nodes don't show up, update ComfyUI before troubleshooting anything else. It also needs trimesh, which modern ComfyUI installs anyway.

Common issues

The usual failure is forgetting that this only fixes orientation, not topology. A Pixal3D mesh rotated upright is still triangle soup underneath - the honest 3D-generation caveat applies here as much as anywhere: generated meshes are fine for static props and renders, but if the asset has to deform or rig, you're still doing a retopo pass. The other classic mistake is rotating at the wrong point in the graph: do it before the bake and you're rotating UVs or sampling against a differently-oriented voxel grid, and you'll chase seams for an hour. Orient at the end, once, and move on.

Category🧠BrainDead/Mesh

Inputs (5)

NameTypeDefaultDescription
meshTRIMESH
rotate_xFLOAT0-360–360Degrees about X. Pixal3D→Unreal: 180.
rotate_yFLOAT0-360–360Degrees about Y.
rotate_zFLOAT0-360–360Degrees about Z.
about_centroidoptBOOLEANtrueRotate about the mesh centroid (True) or the world origin (False).

Outputs (2)

NameTypeDescription
meshTRIMESH
statusSTRING