blenderproc.python.constructor.RandomRoomConstructor module¶
-
blenderproc.python.constructor.RandomRoomConstructor.
_assign_materials_to_floor_wall_ceiling
(floor_obj, wall_obj, ceiling_obj, assign_material_to_ceiling, materials)[source]¶ Assigns materials to the floor, wall and ceiling. These are randomly selected from the CCMaterials. This means it is required that the CCMaterialLoader has been executed before, this module is run.
-
blenderproc.python.constructor.RandomRoomConstructor.
_construct_random_room
(used_floor_area, amount_of_extrusions, fac_from_square_room, corridor_width, wall_height, amount_of_floor_cuts, only_use_big_edges, create_ceiling)[source]¶ This function constructs the floor plan and builds up the wall. This can be more than just a rectangular shape.
If amount_of_extrusions is bigger than zero, the basic rectangular shape is extended, by first performing random cuts in this base rectangular shape along the axis. Then one of the edges is randomly selected and from there it is extruded outwards to get to the desired floor_area. This process is repeated amount_of_extrusions times. It might be that a room has less than the desired amount_of_extrusions if the random splitting reaches the floor_area beforehand.
Return type: Tuple
[MeshObject
,MeshObject
,MeshObject
]
-
blenderproc.python.constructor.RandomRoomConstructor.
_sample_new_object_poses_on_face
(current_obj, face_bb, bvh_cache_for_intersection, placed_objects, wall_obj)[source]¶ Sample new object poses on the current floor_obj.
Parameters: face_bb – Returns: True, if there is no collision
-
blenderproc.python.constructor.RandomRoomConstructor.
construct_random_room
(used_floor_area, interior_objects, materials, amount_of_extrusions=0, fac_from_square_room=0.3, corridor_width=0.9, wall_height=2.5, amount_of_floor_cuts=2, only_use_big_edges=True, create_ceiling=True, assign_material_to_ceiling=False, placement_tries_per_face=3, amount_of_objects_per_sq_meter=3.0)[source]¶