class_docstr: Renders 3D regularly sampled points along rays.
class_docstr_tok: ["Renders","3D","regularly","sampled","points","along","rays","."]
docstr: Renders 3D regularly sampled points along rays.
  
  Args:
      rgbs: RGB values of points along rays :math:`(*, N, 3)`
      densities: Volume densities of points along rays :math:`(*, N)`
      points_3d: 3D points along rays :math:`(*, N, 3)`
  
  Returns:
      Rendered RGB values for each ray :math:`(*, 3)`
docstr_tok: ["Renders","3D","regularly","sampled","points","along","rays",".","Args",":","rgbs",":","RGB","values","of","points","along","rays",":","math",":","`","(","*",",","N",",","3",")","`","densities",":","Volume","densities","of","points","along","rays",":","math",":","`","(","*",",","N",")","`","points_3d",":","3D","points","along","rays",":","math",":","`","(","*",",","N",",","3",")","`","Returns",":","Rendered","RGB","values","for","each","ray",":","math",":","`","(","*",",","3",")","`"]
code: def forward(
      self, rgbs: Tensor, densities: Tensor, points_3d: Tensor
  ) -> Tensor:
      r"""Renders 3D regularly sampled points along rays.
  
      Args:
          rgbs: RGB values of points along rays :math:`(*, N, 3)`
          densities: Volume densities of points along rays :math:`(*, N)`
          points_3d: 3D points along rays :math:`(*, N, 3)`
  
      Returns:
          Rendered RGB values for each ray :math:`(*, 3)`
      """
      KORNIA_CHECK_SHAPE(rgbs, ["*", "N", "3"])
      KORNIA_CHECK_SHAPE(densities, ["*", "N"])
      KORNIA_CHECK_SHAPE(points_3d, ["*", "N", "3"])
  
      num_ray_points: int = points_3d.shape[-2]
  
      points_3d = points_3d.reshape(-1, num_ray_points, 3)  # (*, N, 3)
  
      delta_3d = points_3d[0, 1, :] - points_3d[0, 0, :]  # (*, 3)
      delta = torch.linalg.norm(delta_3d, dim=-1)
  
      alpha = 1 - torch.exp(-1.0 * densities * delta)  # (*, N)
  
      return self._render(alpha, rgbs)
  
file_path: kornia/kornia/nerf/volume_renderer.py
imports: import torch
  from kornia.core import Tensor
  from kornia.core.check import KORNIA_CHECK_SHAPE
  from kornia.nerf.samplers import calc_ray_t_vals
label_desc: Use image node_id 1 for calling the RegularRenderer obj's underlying member method code with example usage: obj.forward(rgbs, densities, points_3d) and returns: self