vrdBumpTexture¶
-
class
vrdBumpTexture
¶
(Inherits vrdTexture
)
This class is used for all bump texture and bump structure properties.
To load an image for a bump texture, use:
image = vrImageService.loadImage(filename, vrImageTypes.LoadType.Bump)
# Set as bump texture for a material
plastic = vrMaterialService.findMaterial("Plastic")
plastic.getBumpTexture().setImage(image)
plastic.getBumpTexture().setUseTexture(True)
Summary¶
- Functions:
- getBumpAffectsSpecular() → bool
- getBumpIntensity() → float
- getBumpType() → vrdBumpTexture.BumpType
- getFlipU() → bool
- getFlipV() → bool
- getGlossyWeight() → float
- getNormalmapEncodesHeight() → bool
- getParallaxIntensity() → float
- getStructureSize() → float
- getUseStructure() → bool
- setBumpAffectsSpecular(s)
- setBumpIntensity(intensity)
- setBumpType(type)
- setFlipU(s)
- setFlipV(s)
- setGlossyWeight(value)
- setNormalmapEncodesHeight(normalmapEncodesHeight)
- setParallaxIntensity(intensity)
- setStructureSize(size)
- setUseStructure(useStructure)
- supportsGlossyWeight() → bool
- supportsTexture() → bool
Functions¶
-
vrdBumpTexture.
getBumpAffectsSpecular
()¶ Gets the enable state of bump affects specular reflections.
Returns: Current enable state of bump affects specular reflections Return type: bool
-
vrdBumpTexture.
getBumpIntensity
()¶ Gets the prominence of the bumps.
Returns: Current intensity value. Return type: float
-
vrdBumpTexture.
getBumpType
()¶ Gets the parallax mapping method.
Returns: Current type Return type: vrdBumpTexture.BumpType
-
vrdBumpTexture.
getFlipU
()¶ Gets flip U tangent direction state.
Returns: Current flip U tangent direction state Return type: bool
-
vrdBumpTexture.
getFlipV
()¶ Gets flip V tangent direction state.
Returns: Current flip V tangent direction state Return type: bool
-
vrdBumpTexture.
getGlossyWeight
()¶ Gets how much the structure affects the glossy color.
Returns: The current glossy weight Return type: float
-
vrdBumpTexture.
getNormalmapEncodesHeight
()¶ Returns: The current state. See vrdBumpTexture.setNormalmapEncodesHeight(normalmapEncodesHeight) for an explanation of this flag. Return type: bool
-
vrdBumpTexture.
getParallaxIntensity
()¶ Gets the amount of parallax shift of the bump image texture.
Returns: Current parallax intensity Return type: float
-
vrdBumpTexture.
getStructureSize
()¶ Gets structure size of the 3D noise.
Returns: Current structure size Return type: float
-
vrdBumpTexture.
getUseStructure
()¶ Query if procedural surface structure is enabled.
Returns: Current state Return type: bool
-
vrdBumpTexture.
setBumpAffectsSpecular
(s)¶ Enable bump affects specular reflections.
Parameters: s (bool) – New enable state of bump affects specular reflections
-
vrdBumpTexture.
setBumpIntensity
(intensity)¶ Controls how high the bumps display on a surface. Higher values make the surface appear bumpier. Negative values will invert the bump effect.
Parameters: intensity (float) – New intensity value
-
vrdBumpTexture.
setBumpType
(type)¶ Sets the parallax mapping method.
Parameters: type (vrdBumpTexture.BumpType) – New type
-
vrdBumpTexture.
setFlipU
(s)¶ Flips U tangent direction of the normal or bump map.
Parameters: s (bool) – Flips U tangent direction state
-
vrdBumpTexture.
setFlipV
(s)¶ Flips V tangent direction of the normal or bump map.
Parameters: s (bool) – Flips V tangent direction state
-
vrdBumpTexture.
setGlossyWeight
(value)¶ Controls how much the structure affects the glossy color. Call vrdBumpTexture.supportsGlossyWeight() to query if this material supports the glossy weight setting.
Parameters: value (float) – The new weight
-
vrdBumpTexture.
setNormalmapEncodesHeight
(normalmapEncodesHeight)¶ Sets whether the normal map already contains the normals of the displaced surface when using a displacement texture at the same time. This option is currently only available for measured materials of type vrdSVBRDFMaterial.
Parameters: normalmapEncodesHeight (bool) – True to indicate the normal map includes displaced surface normals.
-
vrdBumpTexture.
setParallaxIntensity
(intensity)¶ Sets the amount of parallax shift of the bump image texture.
Parameters: intensity (float) – New parallax intensity
-
vrdBumpTexture.
setStructureSize
(size)¶ Sets structure size of the 3D noise when the procedural bump structure is activated.
Parameters: size (float) – Structure size
-
vrdBumpTexture.
setUseStructure
(useStructure)¶ If enabled a procedural 3D noise is used to perturb the normal to simulate an uneven surface structure.
Parameters: useStructure (bool) – New state to simulate an uneven surface structure
-
vrdBumpTexture.
supportsGlossyWeight
()¶ Returns: True, if glossy weight is supported Return type: bool
-
vrdBumpTexture.
supportsTexture
()¶ Returns: False, if only structured bump mapping is supported Return type: bool