Change liquid inside of a mug. Used to reproduce examples in the 3DB paper.
Change the material of the liquid present in the mug object
This control assumes that the surface of the liquid has a manterial named “liquid” and that the object we want to modify is the target of this render.
The ratio of water will be 1 - ratio_milk - ratio_coffee
ratio_milk(float): The ratio of milk (default range:
ratio_coffee(float): The ratio of coffee (default range:
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¶
Change the material of the liquid
context (Dict[str, Any]) – The scene context
control_args (Dict[str, Any]) – The arguments for this control, should have keys
ratio_coffee(see the class docstring for information).
unapply(context: Dict[str, Any]) → None¶
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