blenderproc.python.loader.RockEssentialsRockLoader module

Loading the rock essential dataset: https://blendermarket.com/products/the-rock-essentials

class blenderproc.python.loader.RockEssentialsRockLoader.RockEssentialsRockLoader[source]

Bases: object

Loads rocks/cliffs from a specified .blend Rocks Essentials file.

static load_rocks(path, subsec_num, objects=None, sample_objects=False, amount=None)[source]

Loads rocks from the given blend file.

Parameters:
  • path (str) – Path to a .blend file containing desired rock/cliff objects in //Object// section.

  • subsec_num (int) – Number of a corresponding cell (batch) in rocks list in configuration. Used for name generation.

  • objects (Optional[List[str]]) – List of rock-/cliff-object names to be loaded. If not specified then amount property is used for consequential loading.

  • sample_objects (bool) – Toggles the uniform sampling of objects to load. Takes into account objects and amount parameters. Requires ‘amount’ param to be defined.

  • amount (Optional[int]) – Amount of rock-/cliff-object to load. If not specified, the amount will be set to the amount of suitable objects in the current section of a blend file. Must be bigger than 0.

Return type:

List[MeshObject]

Returns:

List of loaded objects.

static set_rocks_properties(objects, physics=False, render_levels=3, high_detail_mode=False, scale=None, reflection_amount=None, reflection_roughness=None, hsv=None)[source]

Sets rocks properties in accordance to the given parameters.

Parameters:
  • objects (List[MeshObject]) – List of loaded rock mesh objects.

  • physics (bool) – Custom property for physics/rigidbody state.

  • render_levels (int) – Number of subdivisions to perform when rendering.

  • high_detail_mode (bool) – Flag for enabling HDM when possible.

  • scale (Union[list, ndarray, Vector, None]) – Scale of a rock as a 3d-vector with each value as a scaling factor per according dimension.

  • reflection_amount (Optional[float]) – Reflection texture value. Default: rock-specific. Range: [0,1]

  • reflection_roughness (Optional[float]) – Roughness texture value. Default: rock-specific. Range: [0,1]

  • hsv (Optional[List[float]]) – Hue-Saturation-Value parameters of the HSV node. (3 values). Range: H: [0, 1], S: [0, 2], V: [0, 2]. Default: rock-specific.