blenderproc.python.modules.provider.sampler.Texture module

class blenderproc.python.modules.provider.sampler.Texture.Texture(config)[source]

Bases: blenderproc.python.modules.main.Provider.Provider

Uniformly samples a Texture for material manipulator.

Example 1: Sample a random texture without exclusions:

{
  "provider": "sampler.Texture",
}

Example 2: Sample a random texture within given textures:

{
  "provider": "sampler.Texture",
  "textures": ["VORONOI", "MARBLE", "MAGIC"]
}

Example 3: Add parameters for texture Voronoi (Voroni is currently the only texture supported for doing this):

{
  "provider": "sampler.Texture",
  "textures": ["VORONOI"],
  "noise_scale": 40,
  "noise_intensity": 1.1,
  "nabla": {
    "provider": "sampler.Value",
       "type": "float",
       "mode": "normal",
       "mean": 0.0,
       "std_dev": 0.05
  }
}

Configuration:

Parameter Description Type
textures A list of texture names. If not None the provider returns a uniform random sampled texture of one of those given texture names. Otherwise it returns a uniform random sampled texture of one of the available blender textures. Default: []. Available: [‘CLOUDS’, ‘DISTORTED_NOISE’,” ‘MAGIC’, ‘MARBLE’, ‘MUSGRAVE’, ‘NOISE’, ‘STUCCI’, ‘VORONOI’, ‘WOOD’] list
noise_scale Scaling for noise input. Default: 0.25. Only for VORONOI. float
noise_intensity Scales the intensity of the noise. Default: 1.0. Only for VORONOI. float
nabla Size of derivative offset used for calculating normal. Default: 0.03. Only for VORONOI. float
run()[source]

Samples a texture uniformly.

Returns:Texture. Type: bpy.types.Texture