Lightplane Splatter
Renderer module API
The Lightplane Splatter operator is implemented via following interfaces:
PyTorch modules:
LightplaneSplatter
andLigthplaneMLPSplatter
Functional interface:
lightplane_splatter
andlightplane_mlp_splatter
Visit Lightplane Splatter API reference for detailed documentation.
Ray-marched splatting
Lightplane Splatter marches along input rays and pushes the encoding
of the ray into an output grid-list output_grid
. The splatter has two forms:
LightplaneSplatter: For each point along the ray, splats the ray feature to the output grid-list bilinearly or trilinearly.
LightplaneMLPSplatter: For each point along the ray, MLPSplatter first samples the point feature from the corresponding prior input grid
input_grid
, adds the sampled feature to theencoding
of the ray, passes the latter through an MLP, and splats the MLP output to the grid-listoutput_grid
.
The forward passes of both components are described next.
LightplaneSplatter
ray encoding -> splat -> output_grid
Sample
N=num_samples
equispaced 3D pointspt_3d_i
between thenear
andfar
ray-lengths:pt_3d_1, ..., pt_3d_N = origin + t * direction, t = linspace(near, far, num_samples)
Splat the ray
encoding
feature to the output grid-listoutput_grid_unnormalized
, and splat a unit scalar to the grid-listsplat_weight
accumulating the total amount of splat-votes into the output grid.Calculate the final normalized output grid
output_grid
by dividingoutput_grid_unnormalized
withsplat_weight
.
LightplaneMLPSplatter
input_grid -> f_i -> f_i + ray encoding -> mlp -> sf_i -> splat -> output_grid
Sample
N=num_samples
equispaced 3D pointspt_3d_i
between thenear
andfar
ray-lengths:pt_3d_1, ..., pt_3d_N = origin + t * direction, t = linspace(near, far, num_samples)
Sample a grid-list
input_grid
for eachpt_3d_i
yielding a sampled featuref_i
.Add
f_i
to rayencoding
and pass through MLP yielding splatted featuresf_i
Splat
f_i
to the output grid-listoutput_grid_unnormalized
, and splat a unit scalar to the grid-listsplat_weight
accumulating the total amount of splat-votes into the output grid.Calculate the final normalized output grid
output_grid
by dividingoutput_grid_unnormalized
withsplat_weight
.
Splatter configuration
Similar to Renderer, Splatter supports modeling background via coordinate contraction and sampling distant ray-points in disparity space. Please refer to the Renderer documentation for the description of:
Note
The disparity-space sampling is enabled by setting num_samples_inf
in LightplaneSplatter
or in LightplaneMLPSplatter
to an integer value > 0.
Coordinate contraction is enabled by setting contract_coords=True
in LightplaneSplatter
or in LightplaneMLPSplatter
.