threedb.controls.blender.pointlight

EXPERIMENTAL CONTROL. DO NOT USE.

class threedb.controls.blender.pointlight.PointLightControl(root_folder: str)

Bases: threedb.controls.base_control.PreProcessControl

This control adds a point light in the scene.

Continuous Parameters:

  • H, S, V: The color of the light (default range: [0, 1] for each)

  • intensity: The intensity of the light. Value depends on the environment. (default range: [1000, 10000])

  • distance: The distance away from the object of interest

  • dir_x: relative (x, y, z)-coordinate of the point light w.r.t the object of interest. (default ranges: [-1, 1], [-1, 1], [0, 1] respectively for x, y, z).

Note

1. You can add multiple point lights by using this control multiple times

2. The vector (dir_x, dir_y, dir_z) is used along which direction w.r.t the is the point light placed, but the actual distance along that direction is decided by the distance parameter.

__init__(root_folder: str)

Construct a BaseControl

Parameters

root_folder – The folder containing all the data for this 3DB experiment. All paths are lative to his folder

apply(context: Dict[str, Any], control_args: Dict[str, Any])None

Modify the target give a combination of the inputs the control needs

Parameters
  • context (Dict[str, Any]) – A dictionary representation of the current scene.

  • control_args (Dict[str, Any]) – a dict containing an entry for each of the discrete and continuous parameters declared by the Control

  • the scene in-place (Modifies) –

  • return value. (no) –

unapply(context: Dict[str, Any])None

Undo the modification on a scene

Note

Most of the time, recreating a scene is very expensive, therefore, controls are asked to implement a reverse operation to undo their changes. Controls that need to store state in order to undo their actions should add data to the target object they received.

Parameters

context (Dict[str, Any]) – The description of the scene to render

threedb.controls.blender.pointlight.Control

alias of threedb.controls.blender.pointlight.PointLightControl