UVRandomMapping2D is a special kind of texture mapping 2D intended to randomize the UV mapping across multiple objects or the "islands" (by using the IslandAOVShape) of the same object.
This is normal mapping+normal tiling:
This is normal mapping+random tiling:
And this is random mapping+random tiling:
The syntax is:
Code: Select all
scene.textures.imgtex.mapping.type = uvrandommapping2d
# Type of seed: "object_id", "triangle_aov" or "object_id_offset"
scene.textures.imgtex.mapping.seed.type = object_id
# If seed type is "triangle_aov", the index of the AOV to use
scene.textures.imgtex.mapping.triangleaov.index = 0
# The offset to add to object ID when seed type is "object_id_offset"
scene.textures.imgtex.mapping.objectidoffset.value = 0
# Rotation Min/Max range
scene.textures.imgtex.mapping.rotation = 0 360
# U Scale Min/Max range and V Scale Min/Max range
scene.textures.imgtex.mapping.uvscale = 2 2 2 2
# If to use the same scale for U and V or decouple them
scene.textures.imgtex.mapping.uvscale.uniform = 1
# U Delta Min/Max range and V Delta Min/Max range
scene.textures.imgtex.mapping.uvdelta = 0 0.2 0 0.2
LocalRandomMapping3D
LocalRandomMapping3D can be used to achieve the same result with procedural textures:
Code: Select all
scene.textures.140689401127944Color.type = checkerboard3d
scene.textures.140689401127944Color.texture1 = 0.7 0.0 0.0
scene.textures.140689401127944Color.texture2 = 0.7 0.7 0.7
##
# localrandommapping3d
##
scene.textures.140689401127944Color.mapping.type = "localrandommapping3d"
scene.textures.140689401127944Color.mapping.transformation = 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 1
# Type of seed: "object_id", "triangle_aov" or "object_id_offset"
scene.textures.140689401127944Color.mapping.seed.type = object_id
# If seed type is "triangle_aov", the index of the AOV to use
#scene.textures.140689401127944Color.mapping.triangleaov.index = 0
# Rotation Min/Max range
scene.textures.140689401127944Color.mapping.xrotation = 0 360
scene.textures.140689401127944Color.mapping.yrotation = 0 360
scene.textures.140689401127944Color.mapping.zrotation = 0 360
# Translate Min/Max range
scene.textures.140689401127944Color.mapping.xtranslate = 0 0
scene.textures.140689401127944Color.mapping.ytranslate = 0 0
scene.textures.140689401127944Color.mapping.ztranslate = 0 0
# Scale Min/Max range
scene.textures.140689401127944Color.mapping.xscale = 1 1
#scene.textures.140689401127944Color.mapping.yscale = 0.7 1.3
#scene.textures.140689401127944Color.mapping.zscale = 0.7 1.3
# If to use the same scale for X, Y and Z or decouple them
scene.textures.140689401127944Color.mapping.xyzscale.uniform = 1
and this using localrandommapping3d: