Advanced Triplanar Material
Published 13th September 2023 by Henry
Triplanar material functions often overlook normal maps because they require correction in order to appear accurate.
This plugin includes clearly labelled, well-structured material functions which can be reused anywhere in your project for good-looking, accurate triplanar texturing.
Also includes demo materials with annotated material graph which explains how the functions are optimised for performance.
- Material functions x2 (AdvancedTriplanar, AdvancedTriplanarInit)
- Demo Materials demonstrating triplanar capabilities
- Grunge and normal textures
- RGBA triplanar output
- Normals triplanar output, corrected
- Switch for World or Local space triplanar
This function is used once within your material to calculate the triplanar mapping UVs, plane masks and a few other parameters. These can then be reused as many times as needed within your material in the other material function; AdvancedTriplanar
This function takes the parameters from AdvancedTriplanarInit and applies them to a specified texture. This function can be used multiple times with different textures, but taking the same parameters from the init function. This is particularly useful for PBR materials where you may need to apply triplanar mapping to BaseColor, Occlusion, Roughness, Metallic and Normal.
How to use Advanced Triplanar Material Function
- Create a new material
- Add the material function AdvancedTriplanarInit
- Set the parameters and create Named Reroute Nodes for each of the outputs. This will allow you to re-use the values for multiple triplanar textures in your material.
- Now add the material function AdvancedTriplanar as many times as needed, once for each texture you intent to use.
- Pass in the named reroute nodes we just created, and each of the texture objects you will need. In the below example we have a BaseColor and a Normal:
- Connect the outputs of the AdvancedTriplanar functions to their corresponding material nodes (BaseColor and Normal).
- Save the material and create a material instance of it.
- Open the material instance and add your textures in the corresponding slots.
- Set the other parameters to your liking.
- Your material instance settings should now look similar to this:
That’s it! You have successfully created your first Advanced Triplanar material. Enjoy it!
Master material: 1
Material instances: 3
Material functions: 2
Textures: 8 (all 2k resolution)
Supported Development Platforms: