@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 +33 -26
- package/dist/index.mjs +2056 -662
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -7,15 +7,16 @@
|
|
|
7
7
|
[](https://www.reddit.com/r/PlayCanvas)
|
|
8
8
|
[](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/) |
|
|
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
|
|
15
|
-
📤 Write PLY, Compressed PLY,
|
|
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
|
-
```
|
|
57
|
-
-t, --translate <x,y,z>
|
|
58
|
-
-r, --rotate <x,y,z>
|
|
59
|
-
-s, --scale <factor>
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
-p, --params <key=val,...>
|
|
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
|
-
```
|
|
72
|
-
-h, --help
|
|
73
|
-
-v, --version
|
|
74
|
-
-w, --overwrite
|
|
75
|
-
-c, --cpu
|
|
76
|
-
-i, --iterations <n>
|
|
77
|
-
-
|
|
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
|
|
115
|
-
splat-transform
|
|
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
|