Table Of Contents
|
|
| Scene by Saul Espinosa Textures from PolyHaven.com |
Scene by Saul Espinosa Ground texture from AmbientCG.com |
The UV Context Projection is a powerful utility node that applies the same mapping across all the textures connected to a material. Most materials are built using a set of textures that only look good when they perfectly match up with each other. The UV Context Projection node makes it easy to adjust all textures and keep them in sync. This also includes procedural textures that use UVs like the Redshift Tiles shader.
| Adjusting a material using UV Context |
| Textures from PolyHaven.com |
All the textures can use an object's UV set or be switched to a number of other UV projections like Tri-Planar, Spherical, or Flat.
| Changing the Projection type using UV Context |
| Textures from PolyHaven.com |
The UV Context Projection node requires constant inputs. For example, you cannot drive the UV Context Projection node's Transform Offset with a Maxon Noise or Jitter node the way you can on a Texture Sampler.
Using a UV Context Projection node is as simple as connecting the OutContext to a node with a "UV Context" port.
There are two ways for a texture to receive texture mapping information, from either a direct connection or a downstream connection.
Direct connections: When a UV Context node is connected directly to a texture's UV Context port. This takes precedence over any downstream connection, serving as a local override.
Downstream connections: When an upstream texture automatically inherits mapping information from a UV Context node connected downstream in the shading graph.
Thanks to downstream connections you don't need to manually sync each texture that should have the same mapping. That's because upstream textures are designed to automatically inherit UV Context information connected downstream in the shading graph. In the examples below, note how changing where the Context Projection node is connected affects which nodes are considered upstream. In the second example, there is no UV Context Projection node downstream from the displacement texture so it is no longer affected.
|
|
| Downstream connections UV Context Projection connected to the Material Output node All textures connected to the Material and Displacement shaders are upstream |
Downstream connections UV Context Projection connected to the Material shader node Only the textures connected to the Material shader are upstream |
Alternatively, a UV Context node can be connected directly to a texture which overrides any downstream connections.
Use downstream connections whenever possible to keep a shader graph simple, using direct connections only where necessary. However, it's possible to use direct connections on every texture and get the same result, it just requires more manual setup.
|
| Direct and Downstream connections UV Context Projection A connected to the Material Output node UV Context Projection B connected directly to three textures, overriding the downstream connection |
Textures that support a direct UV Context connection:
Nodes with a UV Context Port that enable downstream connections to all connected textures:
The simplest UV Context setup is one where it affects all textures in a material, including the displacement textures. This is accomplished by connecting one Context Projection node to the Material Output so it affects all upstream textures.
|
| UV Context Projection connected to Material Output |
Alternatively you could have a UV Context Projection node for only the Material textures or only the Displacement textures.
|
|
| UV Context Projection connected to Material | UV Context Projection connected to Displacement |
Direct connections are useful when you have some textures that need to stay in sync but are different from the rest of the material. That's as easy as connecting a UV Context Projection node directly to the texture's own UV Context Port - a directly connected texture always takes precedence over any downstream inheritance.
|
|
| UV Context Projection connected directly to two textures | Mixing direct and downstream connections |
When blending multiple materials, consider using a single UV Context Projection node for each material. In the example below, Context A is used for Material 1 and Context B is used for Material 2. Since displacement textures don't connect to the material directly you can connect the Context nodes directly to the textures to keep them in sync with their material.
|
| Using different UV Context nodes for different materials |
The ports of a UV Context Projection node only allow a constant input, meaning nodes like a texture and jitter cannot drive its parameters. However the UV adjustment options on individual nodes still work in combination with a UV Context connection. This allows you to connect a jitter node to the Offset and Rotate of a texture node to add randomization to your material and still control overall texture placement using the UV Context Projection node.
The example graph below uses a jitter node to add variety to the base color and roughness of the marble texture on each object and still use a UV Context Projection node to control those textures using a downstream connection.
|
| Adding jitter randomization | Controlling overall rotation with UV Context Projection |
The UV Context Projection node can be used to place a texture in a scene with precision. In this example a graffiti material with the word "Cool" is placed on a brick wall material. There are two UV Context Projection nodes in use, one is used for the Brick material while the other is used for the cool material. The brick material requires displacement so it uses a UV Context node in Tri-planar mode connected downstream in the shader graph, this way the brick material and the brick's displacement textures inherit the UV mapping.
The cool material uses a UV Context node in the Flat projection mode using the "world" projection space. Then the Transform Space is set to "Object" and an object is selected using the "Object Picker." This allows the object to be referenced in world space which makes placing the projection of the graffiti texture very easy in the scene.
|
With everything in sync, the graffiti can be moved around the scene and it appears as if projected onto the brick surface at the same spot as the object driving the transform source. In the examples below, the floating gizmo object is used as the picked object to define its transform coordinates in world space.
| Moving the graffiti | Scaling the graffiti |
Controls how the textures are projected onto the surface from the following options:
Passthrough is the default projection method, it passes along the UVs it receives from the DCC to Redshift.
Uses an object's UV coordinates with the ability to specify a specific UV set using the "UV Channel" field below. By default, when the path is left blank, the result is the same as "Passthrough"
|
|
| UV Channel UV Texture Reference |
UV Channel PBR Material |
Uses a tri-planar projection for the textures. The textures are projected from the X, Y, and Z axes and blended across the object based on the angle of the surface. This is great for quickly applying a nice projection across a complex surface and the blending can be adjusted and distorted using specialized controls.
|
|
| Tri-Planar UV Texture Reference |
Tri-Planar PBR Material |
Similar to a Tri-planar projection but without the blending and distortion options.
|
|
| Cubic UV Texture Reference |
Cubic PBR Material |
Textures are projected onto the object using a spherical shape.
Textures are projected onto the object using a cylindrical shape.
|
|
| Cylindrical UV Texture Reference |
Cylindrical PBR Material |
Textures are projected onto the object using the shape of a plane, making it great for flat objects and decals. However, this results in stretching on parts of the surface that are not perpendicular with the projection plane.
|
|
| Flat UV Texture Reference |
Flat PBR Material |
Spatial does not currently work, will be fixed in an update.
Similar to Flat projection, but now the textures are not simply projected straight, but at an angle (to the left and upwards for frontal views).
A unique style of projection that pins the textures at the top of the sphere (north pole) and the rest is pulled down over the sphere and pinches at the bottom (south pole). The advantage with shrinkwrap is that, compared to the spherical projection, there is only a seam on the bottom rather than the top and bottom.
|
|
| Shrinkwrap UV Texture Reference |
Shrinkwrap PBR Material |
Only available when using "UV Channel" projection.
Enter the name of a specific UV channel to control how the texture is applied. By default, when left blank, Redshift uses the default UV data provided by the DCC.
Sets the projection space from the following options:
The examples below show how a rotated cube appears with the different projection spaces. The object space options look the same and stick to the object, while the world space option does not.
|
|
|
| Projection Space: World Undeformed object |
Object | Reference Object |
However, when the object is deformed with a twist Reference Object is the only option where the textures deform with it.
|
|
|
| Projection Space: World Deformed object |
Object | Reference Object |
Controls where the projection gets its transform coordinates:
Only available when the Transform Source is set to Object.
Controls which object is referenced for the projection's transform coordinates.
A picked object's transform scale acts as a multiplier on the projection size, so make sure the scale of the object is 1,1,1 if you want the size to remain physically accurate.
In the examples below, a flat projection is used to project a "Cool" texture on the brick wall and the floating gizmo is used as the object picker to define its transform coordinates in World space.
| Moving a projection with an object | Rotating a projection with an object | Scaling a projection with an object |
Not available with World space projection because the size is already calculated irrespective of the object's scale.
When enabled, the scale of the object the material is applied to is not factored into the projection's size. This is helpful when accurate sizing of the texture is most important, allowing you to rescale the object without affecting the texture size. Note, the textures swim when the object is scaled in order to retain the physical size.
When disabled, the scale of the object the material is applied to is multiplied with the projection size. This keeps the texture from swimming but the texture is stretched when the object is scaled, meaning the physically accurate sizing is lost when at a scale other than 1,1,1.
| Physical Size: Enabled | Disabled |
When enabled, the projection is uniformly sized, with all three axes using the Size X value. When disabled, the size can be set per axis.
| Uniform Size: Enabled | Disabled |
Sets the size of the projection along the X axis.
The cube in the examples below is 10 x 10 x 10 units.
| Size X: 1 - 10 |
Sets the size of the projection along the Y axis.
| Size Y: 1 - 10 |
Not available with Flat projection
Sets the size of the projection along the Z axis.
| Size Z: 1 - 10 |
Controls the position of the projection.
| Animating the projection Position |
Controls the rotation of the projection.
| Animating the projection Rotation |
Rotates the projected texture on each axis. This is distinct from the Coordinate rotation which rotates the entire projection.
| Animating the Tri-planar Axis Rotate |
Controls how much the tri-planar projection can overlap and blend in areas that transition from one axis to another. A high value results in a soft transition while a value of 0 results in a hard border between axes.
The Axis Blend effect does not work with Displacement. You can use it with a material that has displacement but the displacement renders as if the Axis Blend is set to 0.
| Axis Blend: 0 - 1 Blend Noise: 0 |
0 - 1 5 |
Axis Blend must be greater than 0 for this to have an effect.
Controls the power curve of the axis blend transition. Higher values tighten the blend while lower values soften it. A value of 1 results in a linear blend.
| Blend Curve: 1 - 10 |
Distorts the tri-planar axis border with a noise. Adding noise can provide a more organic texture mapping than the rigid tri-planar projection by default. Higher values add more distortion to the border while a value of 0 disables the effect.
| Blend Noise: 0 - 10 |
Controls the scale of the tri-planar border noise. Higher values result in a noise with larger shapes while lower values result in a noise with smaller shapes.
| Noise Scale: 1 - 20 |
When enabled, the texture is uniformly tiled using the Tiles U value, making it easy to adjust basic tiling patterns. When disabled, the tiling can be set per axis.
| Uniform Tiles: Enabled | Disabled |
Controls how many times the texture is tiled in the U axis (horizontal).
Tiling via the UV Context Projection allows for much more efficient baking when used with Texture Displacement's "Smart Bake" feature. For more information, please see the Tessellation and Displacement page.
| Tiles U: 0 - 3 Uniform Tiles: Disabled |
Controls how many times the texture is tiled in the V axis (vertical).
| Tiles V: 0 - 3 Uniform Tiles: Disabled |
Moves the texture.
| Animating the offset | Animating the offset with a PBR material |
Rotates the texture. Note, the Pivot affects the center point of that rotation.
| Animating the UV Transform Rotate |
Moves the texture's pivot point which affects how a texture is rotated. Note, changing the number of tiles affects the visual center point of the pivot. By default the pivot is centered in the middle of a single tile at 0.5, 0.5. If the texture is tiled twice and you still wanted the pivot point visually centered then you'd want to set it to 1,1, placing it at the center of the four tiles. A value of 0,0 places the pivot point at the bottom left of the UV space.
In the first example the pivot point is centered, note how the pivot is half of the number of tiles in order to fall in the center.
| Pivot: 0.5, 0.5 Tiles: 1 x 1 |
1, 1 2 x 2 |
Here the first example has the pivot point anchored in the bottom left in UV space with a value of 0, 0. While the second value has it anchored in the upper right, with a value of 1, 1.
| Pivot: 0, 0 Tiles: 1 x 1 |
1, 1 1 x 1 |
Controls how the texture is tiled along the U axis (horizontal) with the following options:
|
|
|
| Wrap U: Repeat | Mirror | Clip |
Controls how the texture is tiled along the V axis (vertical) with the following options:
|
|
|
| Wrap V: Repeat | Mirror | Clip |
When enabled, the texture is flipped along the U axis (horizontal).
|
|
| Flip U: Disabled | Enabled |
When enabled, the texture is flipped along the V axis (vertical).
|
|
| Flip V: Disabled | Enabled |