Nodes/BrainDead Nodes/BD Pixal3D Preprocess
ComfyUI Node

BD Pixal3D Preprocess

The quiet node that makes image-to-3D not look like garbage — BD Pixal3D Preprocess

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Pixal3D Preprocess
  • image
  • mask
  • pixal3d_input
  • preprocessed_image
backgroundblack
fov_modeauto_moge
manual_fov0.20
mesh_scale1.0
extend_pixel0

Image-to-3D models are extremely picky about their input. They expect the subject isolated, composed on the right background, and - the part everyone forgets - a camera. A model trained to reconstruct from a photo needs to know the field of view the image was shot at, or it guesses wrong and the geometry comes out distorted. BD Pixal3D Preprocess handles all of that before the generator ever sees the image: it applies your mask, crops to the subject, composites it onto a background, and estimates the camera FOV. Output is a PIXAL3D_INPUT bundle that wires straight into BD Pixal3D Image to 3D.

The FOV estimation is the interesting bit. In auto_moge mode (default), it uses MoGe-2, a monocular geometry model, to estimate the camera from depth cues in the image - no manual numbers needed. If MoGe distorts (some images are just hard), flip to manual and set manual_fov directly in radians; the README suggests trying ~0.2 rad as a starting point. mesh_scale (default 1) feeds the camera-distance calculation, and extend_pixel (default 0, can go ±64) expands or shrinks the FOV pixel range - you'll mostly leave these alone.

The inputs

  • image - your source image (required).
  • background - compositing background color, black by default. That's deliberate: the README is explicit that Pixal3D was trained with black, so don't "help" by switching to white unless you have a reason.
  • fov_mode - auto_moge or manual.
  • manual_fov - radians, used only in manual mode.
  • mask (optional) - the object mask. Omitted = the full image rectangle is used, which is only right when the subject fills the frame. Wire a real mask for anything with a background.

The second output, preprocessed_image, is the 512×512 preview of exactly what Pixal3D will see. Look at it. It's the fastest way to catch "why is my 3D garbage" before spending five minutes generating - if the preview shows the subject cropped wrong, masked badly, or composited on the wrong background, fix that first.

Install & the dependency reality

This node is the reason the pack's requirements.txt isn't trivial. MoGe-2 comes in via git installs: moge (from github.com/microsoft/MoGe), plus pinned utils3d and pipeline builds - the README notes the PyPI utils3d is incomplete and MoGe needs the pinned .pt submodule. natten (neighborhood attention) backs Pixal3D's NAF upsampler. ComfyUI Manager installs all of this on pack install; manually:

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

Then restart ComfyUI - and make sure it's a current version, since the whole pack runs on the newer V3 API.

The honest take

This node is doing unglamorous but load-bearing work, and skipping it (or wiring an empty mask input) is how you get a distorted character instead of a clean one. The "crop to subject, black background, estimate camera" combo is exactly the shape of input TRELLIS-lineage models were trained on, so it's worth doing right even though it's invisible in the final result. Where people trip: leaving the mask unwired on a cluttered image, and assuming auto_moge is infallible - if the geometry comes out wrong, the README's fallback (manual FOV ~0.2 rad) is a thirty-second test that usually pinpoints whether the problem is the camera estimate or the generation itself.

Category🧠BrainDead/Pixal3D

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
backgroundCOMBOblackCompositing background color. Pixal3D was trained with black.
fov_modeCOMBOauto_mogeCamera FOV estimation method
manual_fovFLOAT0.200.05–2Camera FOV in radians. Only used when fov_mode=manual.
mesh_scaleFLOAT1.00.1–5Mesh scale factor for camera distance calculation.
extend_pixelINT0-64–64Expand/shrink the FOV pixel range. 0 is standard.
maskoptMASKObject mask. If omitted, uses full image rectangle.

Outputs (2)

NameTypeDescription
pixal3d_inputPIXAL3D_INPUT
preprocessed_imageIMAGE