@playcanvas/splat-transform 0.10.2 → 0.11.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
@@ -11,8 +11,8 @@
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 formats
15
- 📤 Write PLY, Compressed PLY, CSV, SOG and HTML viewer formats
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
16
16
  🔗 Merge multiple splats
17
17
  🔄 Apply transformations to input splats
18
18
  🎛️ Filter out Gaussians or spherical harmonic bands
@@ -25,18 +25,10 @@ Install or update to the latest version:
25
25
  npm install -g @playcanvas/splat-transform
26
26
  ```
27
27
 
28
- > [!IMPORTANT]
29
- > **Windows Users:** You must have the debug version of the Microsoft Visual C++ runtime installed. This is because splat-transform currently depends on [Dawn](https://dawn.googlesource.com/dawn) which is built against the debug VC runtime. We have logged an [issue](https://issues.chromium.org/issues/443906265) against the Dawn project.
30
- >
31
- > In the meantime, to work around this problem, you need to install the debug VC runtime as follows:
32
- >
33
- > 1. Install [Visual Studio 2022 Community](https://visualstudio.microsoft.com/vs/community/)
34
- > 2. In the installer, select "Desktop development with C++"
35
-
36
28
  ## Usage
37
29
 
38
30
  ```bash
39
- splat-transform [GLOBAL] <input.{ply|compressed.ply|splat|ksplat}> [ACTIONS] ... <output.{ply|compressed.ply|sog|meta.json|csv|html}> [ACTIONS]
31
+ splat-transform [GLOBAL] <input.{ply|compressed.ply|splat|ksplat|spz|sog|meta.json|mjs}> [ACTIONS] ... <output.{ply|compressed.ply|sog|meta.json|csv|html}> [ACTIONS]
40
32
  ```
41
33
 
42
34
  **Key points:**
@@ -48,13 +40,13 @@ splat-transform [GLOBAL] <input.{ply|compressed.ply|splat|ksplat}> [ACTIONS] .
48
40
  | Format | Input | Output | Description |
49
41
  | ------ | ----- | ------ | ----------- |
50
42
  | `.ply` | ✅ | ✅ | Standard PLY format |
43
+ | `.sog` | ✅ | ✅ | Bundled super-compressed format (recommended) |
44
+ | `meta.json` | ✅ | ✅ | Unbundled super-compressed format (accompanied by `.webp` textures) |
51
45
  | `.compressed.ply` | ✅ | ✅ | Compressed PLY format (auto-detected and decompressed on read) |
52
46
  | `.ksplat` | ✅ | ❌ | Compressed splat format (mkkellogg format) |
53
47
  | `.splat` | ✅ | ❌ | Compressed splat format (antimatter15 format) |
54
48
  | `.spz` | ✅ | ❌ | Compressed splat format (Niantic format) |
55
49
  | `.mjs` | ✅ | ❌ | Generate a scene using an mjs script (Beta) |
56
- | `.sog` | ❌ | ✅ | Bundled super-compressed format (recommended) |
57
- | `meta.json` | ❌ | ✅ | Unbundled super-compressed format (also outputs `.webp` images) |
58
50
  | `.csv` | ❌ | ✅ | Comma-separated values spreadsheet |
59
51
  | `.html` | ❌ | ✅ | Standalone HTML viewer app |
60
52
  ## Actions
@@ -62,26 +54,28 @@ splat-transform [GLOBAL] <input.{ply|compressed.ply|splat|ksplat}> [ACTIONS] .
62
54
  Actions can be repeated and applied in any order:
63
55
 
64
56
  ```bash
65
- -t, --translate x,y,z Translate splats by (x, y, z)
66
- -r, --rotate x,y,z Rotate splats by Euler angles (deg)
67
- -s, --scale x Uniformly scale splats by factor x
68
- -n, --filterNaN Remove any Gaussian containing NaN/Inf
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 x Uniformly scale splats by factor x.
60
+ -n, --filterNaN Remove any Gaussian containing any NaN or Inf values.
69
61
  -c, --filterByValue name,cmp,value Keep splats where <name> <cmp> <value>
70
62
  cmp ∈ {lt,lte,gt,gte,eq,neq}
71
- -b, --filterBands {0|1|2|3} Strip spherical-harmonic bands > N
72
- -P, --params name=value[,name=value...] Pass parameters to .mjs generator script
63
+ -b, --filterBands n {0|1|2|3} Strip spherical-harmonic bands > n.
64
+ -x, --filterBox mx,my,mz,Mx,My,Mz Remove gaussians outside the bounding box given its min (mx, my, mz) and max (Mx, My, Mz).
65
+ -o, --filterSphere x,y,z,radius Remove gaussians outside the bounding sphere centered at (x, y, z) with size radius.
66
+ -P, --params name=value[,name=value...] Pass parameters to .mjs generator script.
73
67
  ```
74
68
 
75
69
  ## Global Options
76
70
 
77
71
  ```bash
78
- -w, --overwrite Overwrite output file if it already exists
79
- -h, --help Show help and exit
80
- -v, --version Show version and exit
72
+ -h, --help Show help and exit.
73
+ -v, --version Show version and exit.
74
+ -w, --overwrite Overwrite output file if it already exists.
81
75
  -g, --no-gpu Disable gpu when compressing spherical harmonics.
82
- -i, --iterations <number> Specify the number of iterations when compressing spherical harmonics. More iterations generally lead to better results. Default is 10.
83
- -p, --cameraPos Specify the viewer starting position. Default is 2,2,-2.
84
- -e, --cameraTarget Specify the viewer starting target. Default is 0,0,0.
76
+ -i, --iterations n Specify the number of iterations n when compressing spherical harmonics. More iterations generally lead to better results. Default is 10.
77
+ -p, --cameraPos x,y,z Specify the viewer starting position. Default is (2, 2, -2).
78
+ -e, --cameraTarget x,y,z Specify the viewer starting target. Default is (0, 0, 0).
85
79
  ```
86
80
 
87
81
  ## Examples
@@ -111,6 +105,12 @@ splat-transform input.ply output.sog
111
105
  # Convert to SOG unbundled format
112
106
  splat-transform input.ply output/meta.json
113
107
 
108
+ # Convert from SOG (bundled) back to PLY
109
+ splat-transform scene.sog restored.ply
110
+
111
+ # Convert from SOG (unbundled folder) back to PLY
112
+ splat-transform output/meta.json restored.ply
113
+
114
114
  # Convert to HTML viewer with target and camera location
115
115
  splat-transform -a 0,0,0 -e 0,0,10 input.ply output.html
116
116
  ```