@playcanvas/splat-transform 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,15 +7,16 @@
7
7
  [![Reddit](https://img.shields.io/badge/Reddit-FF4500?style=flat&logo=reddit&logoColor=white&color=black)](https://www.reddit.com/r/PlayCanvas)
8
8
  [![X](https://img.shields.io/badge/X-000000?style=flat&logo=x&logoColor=white&color=black)](https://x.com/intent/follow?screen_name=playcanvas)
9
9
 
10
- | [User Guide](https://developer.playcanvas.com/user-manual/gaussian-splatting/editing/splat-transform/) | [Blog](https://blog.playcanvas.com/) | [Forum](https://forum.playcanvas.com/) | [Discord](https://discord.gg/RSaMRzg) |
10
+ | [User Guide](https://developer.playcanvas.com/user-manual/gaussian-splatting/editing/splat-transform/) | [Blog](https://blog.playcanvas.com/) | [Forum](https://forum.playcanvas.com/) |
11
11
 
12
12
  SplatTransform is an open source CLI tool for converting and editing Gaussian splats. It can:
13
13
 
14
- 📥 Read PLY, Compressed PLY, SPLAT, KSPLAT, SPZ, SOG (bundled .sog or unbundled meta.json) formats
15
- 📤 Write PLY, Compressed PLY, CSV, SOG (bundled or unbundled) and HTML viewer formats
14
+ 📥 Read PLY, Compressed PLY, SOG, SPLAT, KSPLAT and SPZ formats
15
+ 📤 Write PLY, Compressed PLY, SOG, CSV and HTML viewer formats
16
16
  🔗 Merge multiple splats
17
17
  🔄 Apply transformations to input splats
18
- 🎛️ Filter out Gaussians or spherical harmonic bands
18
+ 🎛️ Filter out Gaussians or spherical harmonic bands
19
+ ⚙️ Procedurally generate splats using JavaScript generators
19
20
 
20
21
  ## Installation
21
22
 
@@ -48,36 +49,39 @@ splat-transform [GLOBAL] input [ACTIONS] ... output [ACTIONS]
48
49
  | `.spz` | ✅ | ❌ | Compressed splat format (Niantic format) |
49
50
  | `.mjs` | ✅ | ❌ | Generate a scene using an mjs script (Beta) |
50
51
  | `.csv` | ❌ | ✅ | Comma-separated values spreadsheet |
51
- | `.html` | ❌ | ✅ | Standalone HTML viewer app |
52
+ | `.html` | ❌ | ✅ | Standalone HTML viewer app (embeds SOG format) |
53
+
52
54
  ## Actions
53
55
 
54
56
  Actions can be repeated and applied in any order:
55
57
 
56
- ```bash
57
- -t, --translate <x,y,z> Translate splats by (x, y, z).
58
- -r, --rotate <x,y,z> Rotate splats by Euler angles (x, y, z), in degrees.
59
- -s, --scale <factor> Uniformly scale splats by factor.
60
- -N, --filter-nan Remove Gaussians with NaN or Inf values.
61
- -V, --filter-value <name,cmp,value> Keep splats where <name> <cmp> <value>
62
- cmp ∈ {lt,lte,gt,gte,eq,neq}
63
- -H, --filter-harmonics <0|1|2|3> Remove spherical harmonic bands > n.
64
- -B, --filter-box <mx,my,mz,Mx,My,Mz> Remove Gaussians outside box (min, max corners).
65
- -S, --filter-sphere <x,y,z,radius> Remove Gaussians outside sphere (center, radius).
66
- -p, --params <key=val,...> Pass parameters to .mjs generator script.
58
+ ```none
59
+ -t, --translate <x,y,z> Translate splats by (x, y, z)
60
+ -r, --rotate <x,y,z> Rotate splats by Euler angles (x, y, z) in degrees
61
+ -s, --scale <factor> Uniformly scale splats by factor
62
+ -H, --filter-harmonics <0|1|2|3> Remove spherical harmonic bands > n
63
+ -N, --filter-nan Remove Gaussians with NaN or Inf values
64
+ -B, --filter-box <x,y,z,X,Y,Z> Remove Gaussians outside box (min, max corners)
65
+ -S, --filter-sphere <x,y,z,radius> Remove Gaussians outside sphere (center, radius)
66
+ -V, --filter-value <name,cmp,value> Keep splats where <name> <cmp> <value>
67
+ cmp ∈ {lt,lte,gt,gte,eq,neq}
68
+ -p, --params <key=val,...> Pass parameters to .mjs generator script
67
69
  ```
68
70
 
69
71
  ## Global Options
70
72
 
71
- ```bash
72
- -h, --help Show this help and exit.
73
- -v, --version Show version and exit.
74
- -w, --overwrite Overwrite output file if it exists.
75
- -c, --cpu Use CPU for spherical harmonic compression.
76
- -i, --iterations <n> Iterations for SOG SH compression (more = better). Default: 10.
77
- -C, --camera-pos <x,y,z> HTML viewer camera position. Default: (2, 2, -2).
78
- -T, --camera-target <x,y,z> HTML viewer target position. Default: (0, 0, 0).
73
+ ```none
74
+ -h, --help Show this help and exit
75
+ -v, --version Show version and exit
76
+ -w, --overwrite Overwrite output file if it exists
77
+ -c, --cpu Use CPU for SOG spherical harmonic compression
78
+ -i, --iterations <n> Iterations for SOG SH compression (more=better). Default: 10
79
+ -E, --viewer-settings <settings.json> HTML viewer settings JSON file
79
80
  ```
80
81
 
82
+ > [!NOTE]
83
+ > See the [SuperSplat Viewer Settings Schema](https://github.com/playcanvas/supersplat-viewer?tab=readme-ov-file#settings-schema) for details on how to pass data to the `-E` option.
84
+
81
85
  ## Examples
82
86
 
83
87
  ### Basic Operations
@@ -111,8 +115,11 @@ splat-transform scene.sog restored.ply
111
115
  # Convert from SOG (unbundled folder) back to PLY
112
116
  splat-transform output/meta.json restored.ply
113
117
 
114
- # Convert to HTML viewer with target and camera location
115
- splat-transform -C 0,0,0 -T 0,0,10 input.ply output.html
118
+ # Convert to standalone HTML viewer
119
+ splat-transform input.ply output.html
120
+
121
+ # Convert to HTML viewer with custom settings
122
+ splat-transform -E settings.json input.ply output.html
116
123
  ```
117
124
 
118
125
  ### Transformations