rtgs.gaussian¶
Gaussian struct in Taichi.
Module Contents¶
Classes¶
Gaussian struct in Taichi. |
Functions¶
Python scope Gaussian constructor to create a new Gaussian. |
Data¶
API¶
- rtgs.gaussian.BOUNDING_THRESHOLD = 3¶
- rtgs.gaussian.c_0 = 'sqrt(...)'¶
- rtgs.gaussian.c_1 = 'sqrt(...)'¶
- rtgs.gaussian.c_2 = 'sqrt(...)'¶
- rtgs.gaussian.c_3 = 'sqrt(...)'¶
- rtgs.gaussian.c_4 = 'sqrt(...)'¶
- rtgs.gaussian.c_5 = 'sqrt(...)'¶
- rtgs.gaussian.c_6 = 'sqrt(...)'¶
- class rtgs.gaussian.Gaussian¶
Gaussian struct in Taichi.
- Parameters:
position – gaussian center (mean).
rotation – gaussian rotation quaternion.
scale – gaussian scale.
- position: taichi.math.vec3 = None¶
- rotation: taichi.math.vec4 = None¶
- scale: taichi.math.vec3 = None¶
- color: taichi.math.vec3 = None¶
- opacity: taichi.f32 = None¶
- sh_10: taichi.math.vec3 = None¶
- sh_11: taichi.math.vec3 = None¶
- sh_12: taichi.math.vec3 = None¶
- sh_20: taichi.math.vec3 = None¶
- sh_21: taichi.math.vec3 = None¶
- sh_22: taichi.math.vec3 = None¶
- sh_23: taichi.math.vec3 = None¶
- sh_24: taichi.math.vec3 = None¶
- sh_30: taichi.math.vec3 = None¶
- sh_31: taichi.math.vec3 = None¶
- sh_32: taichi.math.vec3 = None¶
- sh_33: taichi.math.vec3 = None¶
- sh_34: taichi.math.vec3 = None¶
- sh_35: taichi.math.vec3 = None¶
- sh_36: taichi.math.vec3 = None¶
- init(position=ti.math.vec3(0, 0, 0), rotation=ti.math.vec4(0, 0, 0, 1), scale=ti.math.vec3(1, 1, 1), color=ti.math.vec3(1, 0, 1), opacity=1)¶
Taichi scope Gaussian initialization method.
- Parameters:
position (ti.math.vec3) – gaussian center (mean).
rotation (ti.math.vec4) – gaussian rotation quaternion.
scale (ti.math.vec3) – gaussian scale.
color (ti.math.vec3) – gaussian base color.
opacity (ti.f32) – gaussian opacity.
- cov()¶
Get the covariance matrix of the gaussian using the rotation quaternion and scale vector.
- Returns:
a 3x3 covariance matrix.
- Return type:
ti.math.mat3
- bounding_box()¶
Compute the axis-aligned bounding box (AABB) for the Gaussian considering rotation.
- Returns:
bounding box for the Gaussian.
- Return type:
- eval_sh(dir)¶
Evaluate spherical harmonics.
- Parameters:
dir (ti.math.vec3) – normalized view direction.
- Returns:
spherical harmonics radiance.
- Return type:
ti.math.vec3
- eval(pos, dir)¶
Evaluate gaussian color.
- Parameters:
pos (ti.math.vec3) – evaluate position.
dir (ti.math.vec3) – ray direction for SH color encoding.
- Returns:
gaussian color and alpha at pos from direction dir.
- Return type:
ti.math.vec4
- hit(ray)¶
Ray-Gaussian intersection test. The algorithm will only test the intersection for t between ray.start and ray.end.
- Parameters:
ray (Ray) – camera ray.
- Returns:
two ray Gaussian intersections in increasing order. If there’s no solution, the result will be both ti.math.inf.
- Return type:
ti.math.vec2
- rtgs.gaussian.new_gaussian(position: taichi.math.vec3 = ti.math.vec3(0, 0, 0), rotation: taichi.math.vec4 = ti.math.vec4(0, 0, 0, 1), scale: taichi.math.vec3 = ti.math.vec3(1, 1, 1), color: taichi.math.vec3 = ti.math.vec3(1, 0, 1), opacity: taichi.f32 = 1) rtgs.gaussian.Gaussian¶
Python scope Gaussian constructor to create a new Gaussian.
- Parameters:
position – gaussian center (mean).
rotation – gaussian rotation quaternion.
scale – gaussian scale.
color – gaussian base color.
opacity – gaussian opacity.
- Returns:
a Gaussian dataclass.