We have made quite a few changes to the shaders and materials in UE4 for ATLAS. Some of the interesting new Material Nodes and useful Material Functions are documented here.
Base Space Transform¶
In ATLAS, “Base Space” is the moving physics reference frame for the current object. You can read what this means for particles here in the Base Space guide, but for materials you can use the Transform Vector and Transform Position nodes to take advantage of it. As an example, consider any World Space effects that you may want to use, such as tri-planar texturing or World Space-derived UVs. Effects such as these will break down if an object is moving on a platform like a ship or saddle, but Base Space allows these effects to be achieved in the transform space of the moving platform, instead.
This node creates a unique integer for every object being rendered. It is useful for creating random variation on non-instanced meshes, similar to the per-instance random node:
RefPose to World Vector Transform¶
We created a TransformVector source space for “RefPose” which means you can transform from skeletal mesh bindpose/refpose into world space. The transform would include the scaling, though, so you may want to transform an offset direction vector and then apply any additional world space scale after normalizing the output. Note that this node only works in the vertex shader, so if you want to use it in the pixel shader you must pass it via Custom UVs.
Basic use case for RefPose to World that includes scaling:
This version applies your world space scale after rotation and normalization:
Description: Creates sines pattern in world space.
- Creating a soft pattern for fake lights (Ex: Window Light)
- WPO for character wavy bits (Ex: Desert Kaiju wings)
Description: Creates a unique value for each point in world space.
- Create random values for every point in the world
- Provide random values as a replacement for Object ID in instances where meshes are combined