跳到主要内容

图像渲染

SplatTransform 可从指定视角生成无损 WebP。输出扩展名 .webp 时,GPU 光栅化代替数据写出,适合缩略图、预览、全景和动画帧。

需要 GPU,不支持 -g cpu。参见GPU 要求和服务器 Docker 配置。

相机配置​

默认位置 2,1,-2,观察原点,垂直 60 度,1280x720、不透明黑背景:

# Default 1280x720 render
splat-transform input.ply view.webp

# Custom camera and resolution
splat-transform input.ply view.webp \
--camera-pos 2,1,-2 --camera-target 0,0,0 \
--camera-fov 50 --resolution 1920x1080

# Transparent background
splat-transform input.ply view.webp --background 0,0,0,0

--camera-up 默认 0,1,0。--camera-near 默认 0.2,与参考 3DGS 光栅器一致,更近单元剔除。

360 度全景​

--projection equirect 从 camera-pos 捕获 360×180 度,camera-target 决定图像中心方向。需 2:1,默认 2048x1024,不能指定 camera-fov:

# 360° equirectangular panorama from camera position
splat-transform input.ply pano.webp \
--projection equirect --camera-pos 0,1,0 --camera-target 0,1,1

此投影不支持景深。

景深​

--f-stop 模拟光圈散焦,越小越模糊。焦平面默认到 camera-target 的距离,可用 focus-distance 改。

# Defocus blur (focus on camera-target, f/2.8 aperture)
splat-transform input.ply view.webp --f-stop 2.8

# Smoother aperture sampling for strongly defocused edges
splat-transform input.ply view.webp --f-stop 1 --dof-samples 64

# Defocus with explicit focus distance and a smaller world scale
splat-transform input.ply view.webp \
--f-stop 2.8 --focus-distance 3 --sensor-size 0.1

光圈需结合传感器尺寸。--sensor-size 是世界单位的垂直高度,默认 0.024,在一单位一米时代表 35mm 全画幅。单位分米时用 0.24,毫米时 24。

每张平均 --dof-samples 个光圈视图,默认 32。越多强散焦伪影越少,但通道更多。

运动模糊​

设置 camera-pos-end 启用,相机从起始 pos/target/up 移到快门结束姿态,在 motion-samples 个时刻平均。target-end 与 up-end 默认起始值。

# Camera motion blur (dolly from start to end pose over a 180° shutter, 16 instants averaged)
splat-transform input.ply view.webp \
--camera-pos 2,1,-2 --camera-pos-end 3,1,-2 \
--shutter 0.5 --motion-samples 16

--shutter 指围绕运动中点平均的比例,1 覆盖全部,默认 0.5 对应 180 度快门。开销随样本数增加,过少且间隔运动超过几像素时出现离散副本。

组合效果​

每个样本独立处理可见性,再在线性光中平均并编码。重建颜色按 sRGB,透明输出用预乘线性颜色。两效果同时开启时,每个快门时刻又取 dof-samples,开销相乘。

相机动画​

--camera-track 输出编号帧序列。可来自编辑器项目、含 animTracks 的 Viewer settings.json,或帧列表。.ssproj 是 ZIP,先解压传目录或 document.json。帧列表示例:

{
"frameRate": 30,
"frames": [
{ "position": [2, 1, -2], "target": [0, 0, 0], "fov": 60 },
{ "position": [2.1, 1, -1.9], "target": [0, 0, 0], "fov": 60, "up": [0, 1, 0] }
]
}

项目与查看器按各自播放方式求值,帧列表线性插值。frameRate 默认 30,缺 fov/up 时用命令行值。文件为 <name>.NNNN.webp,按轨迹帧索引编号。

# Render every frame of an extracted SuperSplat project's camera animation
# (writes view.0000.webp, view.0001.webp, ...)
splat-transform scene.ply view.webp --camera-track scene-project/

# Render frames 0-47 at 1920x1080, motion-blurred over half of each frame interval
splat-transform scene.ply view.webp --camera-track track.json \
--frames 0-47 --resolution 1920x1080 --shutter 0.5

轨迹替代 camera-pos/target,目标也是景深焦点。轨迹运动模糊只由 shutter 启用,默认关,设置后按帧间隔比例模糊。不可同时用 camera-pos-end。

另请参见​