drtk.msi#

drtk.msi(ray_o, ray_d, texture, sub_step_count=2, min_inv_r=1.0, max_inv_r=0.0, stop_thresh=1e-07)[source]#

Renders a Multi-Sphere Image which is similar to the one described in “NeRF++: Analyzing and Improving Neural Radiance Fields” The implementation performs bilinear sampling in the spatial dimensions of each layer and cubic between the layers.

Parameters:
  • ray_o (th.Tensor) – Ray origins [N x 3]

  • ray_d (th.Tensor) – Ray directions [N x 3]

  • texture (th.Tensor) – The MSI texture [L x 4 x H x W], where L - number of layers. The first 3 channels are the color channels, and the fourth one is the sigma (transmittance) channel (negative log of alpha).

  • sub_step_count (int, optional) – Rate of the subsampling of the layers. Default is 2.

  • min_inv_r (float, optional) – Inverse of the minimum sphere radius. Default is 1 for unit radius.

  • max_inv_r (float, optional) – Inverse of the maximum sphere radius. Default is 0 for infinite radius.

  • stop_thresh (bool, optional) – The threshold for early ray termination when the accumulated transmittance goes beyond the specified value.

Returns:

Result of the sampled MSI. First three channels are the color channels, and the 4th one is sigma (transmittance). [N x 4]

Return type:

output (Tensor)