render_scene module#

Render scenes with Blender.

render_scene.candidate_objects_with_rotations(obj: Mapping[str, Any]) List[Mapping[str, Any]][source]#

Generate candidate objects with rotations.

Parameters:

obj – Object to generate candidates for.

Returns:

List of object configurations with rotations.

render_scene.generate_camera_configs(max_configs: int) List[Dict[str, Any]][source]#

Generate a list of camera configurations.

Parameters:

args – Parsed arguments.

Returns:

A list of dictionaries with camera configurations.

render_scene.main(args: Namespace) None[source]#

Render scenes based on the provided arguments and configurations.

Parameters:

args – Command-line arguments for rendering scenes.

render_scene.parse_args(argv: str | None = None) Namespace[source]#

Parse command-line arguments.

Parameters:

argv – Argument string to parse.

Returns:

Parsed arguments.

render_scene.render_random_scenes(args: Namespace, obj_names: List[str], properties: Mapping[str, Any], camera_configs: List[Dict[str, Any]], config: Dict[str, Any], max_images: int, prefix: str) None[source]#

Renders a variety of random scenes given objects and saving the scenes to files.

Parameters:
  • args – Parsed arguments.

  • obj_names – List of object names to be used in the scenes.

  • properties – Dictionary mapping object names to their properties.

  • camera_configs – List of camera configurations to render.

  • config – Config file for the scenes.

  • img_template – Template string for image file paths.

  • scene_template – Template string for scene file paths.

Returns:

None