Umut Kocasari Claude Opus 4.8 commited on
Commit
dae4cfd
·
1 Parent(s): 35598db

Viewer: keep the full point cloud (no subsampling)

Browse files

Per feedback, don't shrink the viewer cloud — render all points so it looks dense
and filled instead of sparse. Drop the per-frame downsample cap (now only a 1M
safety ceiling, matching DA3) and the cube-splat experiment; keep the sRGB->linear
color fix. Verified: full-frame 504 run yields a 176k-point .glb (2.8MB) that
renders as points.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -255,13 +255,13 @@ def _srgb_to_linear(cols_u8):
255
  return np.clip(lin * 255.0, 0, 255).astype(np.uint8)
256
 
257
 
258
- def _points_to_glb(path, points, colors, max_points=60000):
259
  """Write a colored point cloud as a ``.glb`` — the format gradio's Model3D
260
- actually renders as points (a vertex-only ``.ply`` is treated as an empty
261
- solid mesh, so nothing shows). ``points`` must already be in glTF axes
262
- (X-right, Y-up, Z-back). Colors are (N,3/4) uint8 in sRGB.
263
-
264
- Kept small (``max_points``) so each frame loads quickly when scrubbing."""
265
  import trimesh
266
 
267
  pts = np.asarray(points, np.float32)
 
255
  return np.clip(lin * 255.0, 0, 255).astype(np.uint8)
256
 
257
 
258
+ def _points_to_glb(path, points, colors, max_points=1_000_000):
259
  """Write a colored point cloud as a ``.glb`` — the format gradio's Model3D
260
+ renders as points (a vertex-only ``.ply`` is treated as an empty solid mesh).
261
+ ``points`` must already be in glTF axes; sRGB colors are linearized for glTF's
262
+ linear color space. The full cloud is kept (``max_points`` is only an
263
+ extreme-size safety cap, matching DA3's default) so it renders dense, not
264
+ sparse."""
265
  import trimesh
266
 
267
  pts = np.asarray(points, np.float32)