Spaces:
Paused
Paused
Umut Kocasari Claude Opus 4.8 commited on
Commit ·
dae4cfd
1
Parent(s): 35598db
Viewer: keep the full point cloud (no subsampling)
Browse filesPer 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>
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=
|
| 259 |
"""Write a colored point cloud as a ``.glb`` — the format gradio's Model3D
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 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)
|