Nodes/camera-comfyUI/RotateSplats
ComfyUI Node

RotateSplats

Moving a Gaussian cloud through space with a 4x4 matrix

By Alexankharin·Created about a year ago·Updated about a month ago· 36
RotateSplats
  • splats
  • transform_matrix
  • rotated_splats
deviceauto

Splat clouds don't render in a vacuum - they live in a world coordinate frame, and to do anything interesting you usually need to move them around in it. RotateSplats applies a 4×4 transform to a GSPLAT cloud, repositioning and reorienting every Gaussian in one shot. Despite the name it's not rotation-only; a full rigid transform (rotation + translation) goes through the same node.

This is the node that makes multi-view splat assembly work. FisheyeToGaussian predicts splats from several pinhole angles, then rotates each prediction into a common world frame before merging them - that rotation step is RotateSplats. Same idea when you take a single-image splat cloud from ImageToSplat and want to place it in a larger scene, or when you need to align a cloud to a trajectory's coordinate system before rendering. If you've got a MAT_4X4 from TransformToMatrix and a splat cloud, this is how they meet.

How it works

It takes the splats GSPLAT and a transform_matrix MAT_4X4, and applies the transform to the cloud's positions and to each Gaussian's rotation quaternion. That second part is the subtle bit - rotating just the positions leaves every splat pointing in the old direction and the render looks subtly wrong. RotateSplats fixes the orientation too, so the whole cloud moves like a rigid object rather than a pile of stickers. The optional device selector (auto/cpu/cuda) moves the cloud onto the target device first if needed.

The output is a single rotated_splats GSPLAT ready to flow into MergeSplats, RenderSplat, SavePlySplat, or a trajectory enricher.

A word about matrices

The transform convention matters: this pack's MAT_4X4 type is shared across the camera, trajectory, and splat nodes, and they're consistently world-to-camera (or world-frame transforms) throughout. If your cloud ends up mirrored or floating in the wrong spot, suspect the matrix, not the node - TrajectoryInvert and TransformToMatrix are the usual suspects for getting a matrix that doesn't match the scene's frame.

Installing it

RotateSplats ships in camera-comfyUI; install the pack once for all its nodes. ComfyUI Manager → Custom Nodes Manager → camera-comfyUI → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Alexankharin/camera-comfyUI.git
cd camera-comfyUI && python install.py

RotateSplats itself needs no optional deps, though producing splats to rotate usually needs gsplat/SHARP.

Common issues

  • Cloud renders sideways or mirrored - matrix convention mismatch. Double-check whether your pose is world-to-camera or camera-to-world.
  • Splats look "flat" after rotating - if you built the cloud manually with wrong per-Gaussian rotations, the quaternion fix won't rescue it; rebuild or accept it.

Give every cloud a proper place to stand.

CategoryCamera/GSplat

Inputs (3)

NameTypeDefaultDescription
splatsGSPLAT
transform_matrixMAT_4X4
deviceoptCOMBOauto3 options: auto, cpu, cuda

Outputs (1)

NameTypeDescription
rotated_splatsGSPLAT