Blender V5.3
draw::gsplat Namespace Reference

Namespaces

namespace  detail

Classes

struct  AxisTuple
struct  Gaussian
struct  Pipeline
struct  PointShape
struct  Resources
struct  ShapeResource
struct  SplatData
struct  SplatShape

Functions

SplatData eval_splat (Gaussian gs, ObjectMatrices obj, ViewMatrices view, const Resources &srt)
template<uint Degrees>
float3 eval_radiance (Gaussian gs, ObjectMatrices obj, ViewMatrices view, const Resources &srt)
template float3 eval_radiance< 1 > (Gaussian, ObjectMatrices, ViewMatrices, const Resources &)
template float3 eval_radiance< 4 > (Gaussian, ObjectMatrices, ViewMatrices, const Resources &)
void compute_entry (Resources &srt, const Pipeline &pipeline, const draw::View &views, const draw::Model &models, const uint3 global_id)
float3x3 get_rot_scale_mat (Quaternion rotation, float3 scale)
float3x3 get_covmat (Quaternion rotation, float3 scale)
float3 project_gaussian (ObjectMatrices object, ViewMatrices view, Gaussian gs)
AxisTuple covmat_to_axes (float3 covmat_2d_v)
float3 get_planar_normal (Quaternion rotation, float3 scale)
float evaluate_gaussian (float2 x_min_mu, float opacity)

Variables

PipelineCompute compute_ellipses (compute_entry, Pipeline{.do_ellipses=true,.do_radiance=false})
PipelineCompute compute_radiance (compute_entry, Pipeline{.do_ellipses=false,.do_radiance=true})
PipelineCompute compute_ellipses_radiance (compute_entry, Pipeline{.do_ellipses=true,.do_radiance=true})

Function Documentation

◆ compute_entry()

◆ covmat_to_axes()

AxisTuple draw::gsplat::covmat_to_axes ( float3 covmat_2d_v)

Given the packed 2D covariance matrix, decompose into scaled eigenvectors, which we can use to fit a billboard rectangle shape.

Definition at line 379 of file draw_gsplat_lib.bsl.hh.

References covmat_to_axes(), draw::gsplat::AxisTuple::from(), length(), max, min, normalize, sqrt, float2::x, float3::x, float2::y, float3::y, and float3::z.

Referenced by covmat_to_axes(), and eval_splat().

◆ eval_radiance()

◆ eval_radiance< 1 >()

◆ eval_radiance< 4 >()

◆ eval_splat()

◆ evaluate_gaussian()

float draw::gsplat::evaluate_gaussian ( float2 x_min_mu,
float opacity )

◆ get_covmat()

float3x3 draw::gsplat::get_covmat ( Quaternion rotation,
float3 scale )

Construct a 3x3 covariance matrix from a rotation+scaling representation.

Definition at line 290 of file draw_gsplat_lib.bsl.hh.

References get_covmat(), get_rot_scale_mat(), M, scale(), and transpose.

Referenced by get_covmat(), and project_gaussian().

◆ get_planar_normal()

float3 draw::gsplat::get_planar_normal ( Quaternion rotation,
float3 scale )

Construct a planar normal based on an ellipsoid's shortest axis.

Note
Follows the "Flattening the 3D Gaussian" section in [pgsr2025].

Definition at line 400 of file draw_gsplat_lib.bsl.hh.

References b, get_planar_normal(), norm(), quaternion_to_float3x3(), R, and scale().

Referenced by eval_splat(), and get_planar_normal().

◆ get_rot_scale_mat()

float3x3 draw::gsplat::get_rot_scale_mat ( Quaternion rotation,
float3 scale )

Construct a 3x3 matrix from a rotation+scaling representation.

Definition at line 280 of file draw_gsplat_lib.bsl.hh.

References from_scale(), get_rot_scale_mat(), quaternion_to_float3x3(), R, and scale().

Referenced by get_covmat(), and get_rot_scale_mat().

◆ project_gaussian()

float3 draw::gsplat::project_gaussian ( ObjectMatrices object,
ViewMatrices view,
Gaussian gs )

Compute 2D covariance matrix for a projected gaussian.

Note
Reproduces eq. 29 and eq. 31 in [ewas2002], with aspect/scaling tweaks from the code of [3dgs2023], and a slightly modified Jacobian for orthographic cameras.

Definition at line 328 of file draw_gsplat_lib.bsl.hh.

References clamp(), get_covmat(), ViewMatrices::is_perspective(), draw::gsplat::Gaussian::mean, project_gaussian(), draw::gsplat::Gaussian::rotation, draw::gsplat::Gaussian::scale, T, transform_point(), transpose, V, ViewMatrices::viewmat, W, ViewMatrices::winmat, float3::x, float3::y, and float3::z.

Referenced by eval_splat(), and project_gaussian().

Variable Documentation

◆ compute_ellipses

PipelineCompute draw::gsplat::compute_ellipses(compute_entry, Pipeline{.do_ellipses=true,.do_radiance=false}) ( compute_entry ,
Pipeline{.do_ellipses=true,.do_radiance=false}  )

◆ compute_ellipses_radiance

PipelineCompute draw::gsplat::compute_ellipses_radiance(compute_entry, Pipeline{.do_ellipses=true,.do_radiance=true}) ( compute_entry ,
Pipeline{.do_ellipses=true,.do_radiance=true}  )

◆ compute_radiance

PipelineCompute draw::gsplat::compute_radiance(compute_entry, Pipeline{.do_ellipses=false,.do_radiance=true}) ( compute_entry ,
Pipeline{.do_ellipses=false,.do_radiance=true}  )