diffrp.scene.lights#

class diffrp.scene.lights.DirectionalLight(intensity: Tensor | float, color: Tensor, direction: Tensor)#

Bases: Light

Directional light data structure; Not supported yet.

__init__(intensity: Tensor | float, color: Tensor, direction: Tensor) None#
direction: Tensor#
class diffrp.scene.lights.ImageEnvironmentLight(intensity: Tensor | float, color: Tensor, image: Tensor, render_skybox: bool = True)#

Bases: Light

Environment light based on lat-long format images.

Parameters:
  • intensity (float) – Linear multiplier of light intensity.

  • color (torch.Tensor) – Shape (3,). Linear RGB tint of light.

  • image (torch.Tensor) – (H, 2H, 3) RGB linear values of lighting environment.

  • render_skybox (bool) – Whether to show this environment in PBR as the background.

__init__(intensity: Tensor | float, color: Tensor, image: Tensor, render_skybox: bool = True) None#
image: Tensor#
image_rh()#
render_skybox: bool = True#
class diffrp.scene.lights.Light(intensity: Tensor | float, color: Tensor)#

Bases: object

Base class for Lights.

Parameters:
  • intensity (float) – Linear multiplier of light intensity.

  • color (torch.Tensor) – Shape (3,). Linear RGB tint of light.

__init__(intensity: Tensor | float, color: Tensor) None#
color: Tensor#
intensity: Tensor | float#
class diffrp.scene.lights.PointLight(intensity: Tensor | float, color: Tensor, position: Tensor)#

Bases: Light

Point light data structure; Not supported yet.

__init__(intensity: Tensor | float, color: Tensor, position: Tensor) None#
position: Tensor#