Corona UVW Randomizer Shader



Textured objects often show obvious repetitions, which instantly give away that the scene is computer-generated.



You can use the UVW Randomizer to quickly randomize textures on multiple objects or object parts, making the image appear more natural. 



The Corona UVW Randomizer shader allows you to apply random offset / rotation / scale to textures and procedural maps assigned to different objects or even to a single object. The way it works is similar to Corona Multi Shader

For example, you can randomize a wood texture applied to a set of elements so that each has a different look in your final render.


Starting with Corona Renderer 6, the UVW Randomizer shader can also generate the effect of randomized tiling, which prevents the artificial texture repetitions often found in computer-generated images, which is an easy way to make images even more realistic. 


Note: the effect of the UVW Randomizer shader will not be visible in the material's viewport preview.




How to use it?


To enable UVW randomization, simply plug any texture (it could be it a bitmap or a procedural map) into the UVWRandomizer's texture input and then connect its output into any material channel. Then adjust the transformations and other options to the desired values (see below for more information).

You can use the UVW Randomizer with any material property, including grayscale bump maps, RGB normal maps, and displacement.


Corona UVW Randomizer has several modes of operation:



  • Primitive - UVW mapping will be randomized per each mesh primitive (triangle)




Material name - different UVW mapping will be applied to each material where the UVW Randomizer shader is assigned:
Note: in this example, different materials are applied to different objects: 




Objects - UVW mapping will be randomized per each object. You can even use it with cloner objects: 




Material tag index - UVW mapping will be randomized based on the object's material tag position. A selection set should be assigned to each material tag:




Material ID - UVW mapping will be randomized based on the Material's ID:

Note: in this example, different material with a unique ID has been applied to different parts of the object; however, this randomization mode could be applied to different objects instead.




Object Buffer ID - UVW mapping will be randomized based on the object's Buffer ID:
Note: in this example, each cube object has a different Buffer ID assigned using the Corona Compositing Tag.




Mesh Element - UVW mapping will be randomized per each mesh element:
Note: in this example, each cube is a separate mesh element: 





UVW Randomizer parameters.



In the following table, you can find a description of each UVW Randomizer shader parameter:


ParameterDescription
LevelIt defines the intensity of the entire shader parameters.
ColorSet a color to use as a source.
TextureSet either a bitmap texture or a procedural shader to use it as a source.
Mix modeIt defines how the texture will combine with the color parameter.
Mix valueIt defines the texture's percentage that will be mixed with the color parameter. It works like opacity for the shader's texture.
ModeSet the mode for the UVW randomization.
SeedIn some modes, this value will let you change the resulting randomization.
U From (Offset)This parameter sets the initial position in the U coordinate for the shader's texture.
U To (Offset)This parameter sets the maximum end position that the shader's texture can use for the U coordinate. The shader can randomly use any value between the U From and U To parameters.
U Step (Offset)This parameter will let you decide the offset's increment in the U coordinate for each texture variation. It works like the Quantize Move Step Cinema4D's tool.
V From (Offset)This parameter sets the initial position in the V coordinate for the shader's texture.
V To (Offset)This parameter sets the maximum end position that the shader's texture can use for the V coordinate. The shader can randomly use any value between the V From and V To parameters.
V Step (Offset)This parameter will let you decide the offset's increment in the V coordinate for each texture variation. It works like the Quantize Move Step Cinema4D's tool.
W From (Rotation)This parameter sets the initial rotation in the W coordinate for the shader's texture.
W To (Rotation)This parameter sets the maximum end rotation that the shader's texture can use for the W coordinate. The shader can randomly use any value between the W From and W To parameters.
W Step (Rotation)This parameter will let you decide the offset's increment in the W coordinate for each texture variation. It works like the Quantize Rotate Step Cinema4D's tool.
U From (Scale)This parameter sets the initial scale in the U coordinate for the shader's texture.
U To (Scale)This parameter sets the maximum end scale that the shader's texture can use for the U coordinate. The shader can randomly use any value between the U From and U To parameters.
U Step (Scale)This parameter will let you decide the offset's increment in the U coordinate for each texture variation. It works like the Quantize Scale Step Cinema4D's tool.
V From (Scale)This parameter sets the initial scale in the U coordinate for the shader's texture.
V To (Scale)This parameter sets the maximum end scale that the shader's texture can use for the V coordinate. The shader can randomly use any value between the V From and V To parameters.
V Step (Scale)This parameter will let you decide the offset's increment in the V coordinate for each texture variation. It works like the Quantize Scale Step Cinema4D's tool.
V scale same as UThis checkbox, when is checked, it will let you use a uniform scale factor for the randomization (same value for U and V coordinates). If this checkbox is not active, it will allow you to set different scale values for each axis.
Randomize each tileThis parameter will tile the texture on each surface it is applied to, and will be randomized using the offset, rotation, and scale values.
Number of tilesSet the number of tiles to be randomized when the Randomize each tile checkbox is enabled.
High quality blendingThis option is enabled by default and results in a better quality of the random tile blending at some performance cost. The specific performance impact depends on the material's complexity. In case of visible rendering slowdown, it is advised to disable this option.
BlendingThe Blending parameter controls how the individual tiles of the randomized texture are blended with each other. Higher blending will further blend the tiles together and will make the texture appear slightly more blurry and uniform. Lower blending will reduce the areas where the tiles are blended together and will make the texture sharper. Usually, the best value has to be determined by trial and error.





Additional examples


  • Using the UVW Randomizer with Triplanar mapping


In this example, there is no randomization at all.



This is the result of combining the use of UVW Randomization and Triplanar shaders.