stillleben.RenderPassResult class

Result of a RenderPass run.

Contents

CUDA support

All accessor methods defined in this class will return a PyTorch Tensor residing on the GPU which was used during rendering - as long as CUDA support is enabled (see init_cuda()).

Methods

def barycentric_coeffs(self, /) -> at::Tensor
Read barycentric coefficients map.
def cam_coordinates(self, /) -> at::Tensor
Read dense coordinate map.
def class_index(self, /) -> at::Tensor
Read class index map (see Mesh.class_index).
def coordDepth(self, /) -> at::Tensor
Read combined coordinate + depth map.
def coordinates(self, /) -> at::Tensor
Read object coordinates map.
def depth(self, /) -> at::Tensor
Read depth map.
def instance_index(self, /) -> at::Tensor
Read instance index map (see Object.instance_index).
def normals(self, /) -> at::Tensor
Read normal map.
def rgb(self, /) -> at::Tensor
Read RGBA tensor.
def vertex_indices(self, /) -> at::Tensor
Read vertex indices map.

Special methods

def __init__(self, /) -> None
Constructor.

Method documentation

def stillleben.RenderPassResult.barycentric_coeffs(self, /) -> at::Tensor

Read barycentric coefficients map.

Returns (H x W x 3) float tensor with barycentric coefficients.

def stillleben.RenderPassResult.cam_coordinates(self, /) -> at::Tensor

Read dense coordinate map.

Returns (H x W x 4) float tensor (x, y, z, 1)

Each pixel contains the coordinates of the 3D point in camera space as 4D homogenous coordinates.

If CUDA support is active, the tensor will reside on the GPU which was used during rendering.

def stillleben.RenderPassResult.class_index(self, /) -> at::Tensor

Read class index map (see Mesh.class_index).

Returns (H x W) short tensor with class values.

If CUDA support is active, the tensor will reside on the GPU which was used during rendering. The background index is 0.

def stillleben.RenderPassResult.coordDepth(self, /) -> at::Tensor

Read combined coordinate + depth map.

Returns (H x W x 4) float tensor with coordinate and depth values.

This is the concatenation of the coordinates and depth fields. Using this avoids a copy, since this is the packed format used in the shaders.

def stillleben.RenderPassResult.coordinates(self, /) -> at::Tensor

Read object coordinates map.

Returns (H x W x 3) float tensor with coordinates.

Each pixel specifies the XYZ coordinate of the point in the respective object coordinate system.

If CUDA support is active, the tensor will reside on the GPU which was used during rendering.

def stillleben.RenderPassResult.depth(self, /) -> at::Tensor

Read depth map.

Returns (H x W) float tensor with depth values.

Each pixel specifies Z depth in camera frame.

If CUDA support is active, the tensor will reside on the GPU which was used during rendering.

def stillleben.RenderPassResult.instance_index(self, /) -> at::Tensor

Read instance index map (see Object.instance_index).

Returns (H x W) short tensor with instance values.

If CUDA support is active, the tensor will reside on the GPU which was used during rendering. The background index is 0.

def stillleben.RenderPassResult.normals(self, /) -> at::Tensor

Read normal map.

Returns (H x W x 4) float tensor with normals.

Each pixel (XYZW) specifies the normal direction in the camera frame (XYZ) and, in the W component, the dot product with the camera direction.

If CUDA support is active, the tensor will reside on the GPU which was used during rendering.

def stillleben.RenderPassResult.rgb(self, /) -> at::Tensor

Read RGBA tensor.

Returns (H x W x 4) byte tensor with R,G,B,A values.

If CUDA support is active, the tensor will reside on the GPU which was used during rendering.

def stillleben.RenderPassResult.vertex_indices(self, /) -> at::Tensor

Read vertex indices map.

Returns (H x W x 4) float tensor with vertex indices.

If CUDA support is active, the tensor will reside on the GPU which was used during rendering.