Control where the bottom bounding box of an object lies on the z axis. An example config file using this control can be found here:

class threedb.controls.blender.pin_to_ground.PinToGroundControl(root_folder: str)

Bases: threedb.controls.base_control.PreProcessControl

Control that moves an object vertically to touch the ground Useful when you want a slightly more realistic rendering (i.e. avoid flying objects)

Continuous Dimensions:

  • z_ground: the z-coordinate that the bottom of the object’s bounding

    moves to (default range: [0, 1])


This control come after the PositionControl and OrientationControl controls. In these patterns, you first move the object to a location of interest, then drag it to the ground under that location.

Example images

Varying z_ground across its range.

__init__(root_folder: str)

Construct a BaseControl


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

Pins the object to the ground

  • context (Dict[str, Any]) – The scene context object

  • control_args (Dict[str, Any]) – The parameters for this control; should have key z_ground mapping to any real number, see class docstring for documentation.


Undo the modification on a scene


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.


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


alias of threedb.controls.blender.pin_to_ground.PinToGroundControl