Files
PozzettiAndrea-ComfyUI-Turn…/pyproject.toml
T
PozzettiAndrea 9137508fba Re-add GaussianMerge + Lito structure; rename to GaussianPack; trackball camera
The prior commit (6908dbe) was lost when the local repo was re-cloned
before its push could land. Redoing the full GaussianPack-side work
in one pass, plus two new asks from this session:

1. Display name: "Preview Gaussians Turntable" -> "Preview Gaussians".
2. Camera: OrbitControls -> TrackballControls. ParaView-style free
   rotation — no fixed up vector, no gimbal lock at the poles, can
   roll the camera. Replaces the "bound at azimuth and bottom" feel.

## Rename (mechanical sed pass)

  ComfyUI-GSViewer -> ComfyUI-GaussianPack
  GSViewer         -> GaussianPack         (log tags, extension name)
  gsviewer         -> gaussianpack         (route path, logger name)
  GSVIEWER         -> GAUSSIANPACK

Hit __init__.py, spz_route.py, pyproject.toml, comfyui_extension.json,
README.md, web/js/gaussian_preview.js.

## LiTo-style project structure

- comfy-test.toml       — test matrix; workflow-level testing
                           happens downstream in ComfyUI-LiTo.
- comfy-env-root.toml   — empty [node_reqs]; GaussianPack has no
                           downstream custom-node deps.
- comfy-env.toml        — numpy + plyfile + NanoGS via pypi-git.
- install.py            — two-liner mirroring LiTo's.
- requirements.txt      — DELETED, superseded by comfy-env.toml.

## GaussianMerge node

merge_gaussians.py: takes a 3DGS .ply + target_count, writes a slimmer
.ply via NanoGS pairwise merging (MPMM — same algorithm
@playcanvas/splat-transform's `--decimate` uses). Pure Python, CPU only;
the upstream paper notes a CUDA port as future work. ~10-30s for 1M ->
200K splats.

Lazy-imports nanogs.simplification + nanogs.utils.params inside the
merge method to keep import cost off ComfyUI startup. Caches via
mtime + (target_count, opacity_threshold, k) sidecar — re-running with
the same inputs is a no-op.

Pass-through if target >= input. ratio is clamped to NanoGS's required
open (0, 1) interval.

Node parameters:
  ply_path           STRING, forceInput
  target_count       INT, default 200_000
  output_filename    STRING, default "merged"
  opacity_threshold  FLOAT, default 0.1
  k                  INT, default 16

## Camera: TrackballControls

Vendored web/js/TrackballControls.js (three@0.169.0, ~18 KB) +
importmap entry alongside OrbitControls. The viewer now constructs
TrackballControls with rotateSpeed=3.5, zoomSpeed=1.2, panSpeed=0.8,
staticMoving=true (no inertia drift). ResizeObserver now calls
controls.handleResize() so mouse-to-NDC mapping stays correct after
canvas resize. .target / .update() / .enabled API surface is identical
between OrbitControls and TrackballControls — no callsite changes
needed in gaussian_preview.js.

OrbitControls.js stays vendored (still in importmap) for any future
node that wants the constrained "preserve up" behavior.

Workflow chain (LiTo apple):
  LoadImage -> LiToImageTo3D -> LiToExportPLY (~225 MB raw)
                                       |
                               GaussianMerge(target=200_000)
                                       |
                               PreviewGaussians (~50 MB)
2026-05-15 18:28:38 +02:00

17 lines
425 B
TOML

[project]
name = "ComfyUI-GaussianPack"
description = "Tiny Gaussian Splat turntable viewer node for ComfyUI."
version = "0.0.1"
license = {file = "LICENSE"}
[project.urls]
Repository = "https://github.com/PozzettiAndrea/ComfyUI-GaussianPack"
Documentation = "https://github.com/PozzettiAndrea/ComfyUI-GaussianPack"
[tool.comfy]
PublisherId = "pozzettiandrea"
DisplayName = "ComfyUI-GaussianPack"
Icon = ""
includes = []