blenderproc.python.modules.loader.HavenMaterialLoaderModule module¶
-
class
blenderproc.python.modules.loader.HavenMaterialLoaderModule.
HavenMaterialLoaderModule
(config)[source]¶ Bases:
blenderproc.python.modules.main.Module.Module
This modules loads all textures obtained from https://texturehaven.com, use the script (scripts/download_haven.py) to download all the textures to your pc.
All textures here support Physically based rendering (PBR), which makes the textures more realistic.
There is a preload option, in which you only load empty materials, without any loaded textures, these are than later filled, when an object really uses them. This saves on loading times:
{ "module": "loader.HavenMaterialLoader", "config": { "folder_path": "<args:0>", # this would be resources/haven/textures "preload": True } }
After you have used them maybe with an manipulators.EntityManipulator, you can load the ones you really assign to an object. By:
{ "module": "loader.HavenMaterialLoader", "config": { "folder_path": "<args:0>", "fill_used_empty_materials": True } }
Configuration:
Parameter Description Type folder_path The path to the downloaded haven. Default: resources/haven. string used_assets A list of all asset names, you want to use. The asset-name must not be typed in completely, only the beginning the name starts with. By default all assets will be loaded, specified by an empty list. Default: []. list add_custom_properties A dictionary of materials and the respective properties. Default: {}. dict preload If set true, only the material names are loaded and not the complete material. Default: False bool fill_used_empty_materials If set true, the preloaded materials, which are used are now loaded completely. Default: False bool