InTerra ~ Shaders for Terrain & its Objects
InTerra ~ Shaders for Terrain and advanced visual integration of Objects into Terrain.
Essential features for Terrain, including currently the most advanced Object-Terrain blending. Everything was carefully designed for quick and easy workflow and all you need to do to use the InTerra features is to select the InTerra shader for your Terrain or Object Material.
The main features:
- Integration of Objects into Terrain
- Tessellation (HDRP Only)
- Parallax Occlusion Mapping
- Hiding Texture Repetition
- Triplanar Mapping
- Heightmap Blending
- Automatic Steep Slopes Texturing
- Color Tint Texture
- Base Map Support
You can see the detailed list of the shaders features in Technical details.
❗ URP and HDRP shaders are available only from version 2021.2.0f1.
There are the Standard and the Diffuse shaders for the Built-in render pipeline and Lit shaders for URP and HDRP.
Shaders are supported for PC(Windows) and Linux.
❗ If you are using URP or HDRP it is needed for the Shader Variant Limit to be set at least 1538. It is recommended to set the Shader Variant Limit before the import, or there may be need to reimport the Object into Terrain Integration shader after changing the value.
Built-in shaders can take about 15 to 20 minutes to import, while the URP and HDRP shaders are imported within a minute and it is recommended to deselect the Built-in folder before import if you are importing into HDRP or URP project.
Note: The 3D model Rock_06 (from Book Of The Dead: Environment) and the Snow texture (from Terrain Tools Sample Asset Pack) used in the demo scene of this asset belongs to Unity and according to my knowledge can be freely used only within the Unity projects.
Technical details
Object into Terrain Integration shader:
• Choice of Terrain Layers - for the performance reasons, you can choose to integrate only into one or two selected layers or the whole Terrain shader pass - the less Layers the better performance.
• Easily adjustable Object-Terrain intersection for textures and mesh normals.
• Object-Terrain textures transition based on heightmaps.
• Options for steep slopes texturing - Secondary intersection that allows you to set the intersection for steep slopes separately, you can also apply the Triplanar Mapping to it or the Distortion as an alternative for triplanar with basically zero performance impact.
Note that the steep slopes texturing depend on correctly calculated Object mesh normals !
• Parallax occlusion mapping
• Detail Maps
• Emission
• Tessellation (HDRP Only)
• Multiple Terrains possibility - One Object Material can receive data only from one Terrain which is determined by the average position of all Objects using the Material and for multiple Terrains you will need a copy of Material for each Terrain, there is a tool for creating and managing these copies, but currently just as Beta.
Terrain shader (Basically just like Unity Terrain shaders but with additional features):
• Hiding textures repetition (by covering the texture in the distance by its scaled up version)
• Triplanar mapping for steep slopes texturing (for the first four layers in Built-in or eight in HDRP) with possibility for only first Layer to be triplanar to improve performance and there is also possibility to apply that one Layer to all steep slopes automatically (and possibility to move any Layer to first position)
• Parallax occlusion mapping
• Tessellation (HDRP Only)
• The choice for using only two Terrain Layers for improving performance (if you can create diversity with the objects it is sometimes enough... :) )
• Heightmap Blending (for the first four Layers in Built-in and URP or eight in HDRP)
• Color tint for Terrain Layers
• Color tint Terrain Texture
• Additional Normal Terrain Texture
• Usage of mask maps - Ambient Occlusion, Metallic map, the possibility to easily join Mask map and Normal map for improving performance (then the Mask map will contain Normal map, Heightmap and AO map
The Asset also includes two easy Mask map creators - One for the Mask with channels as in description of Terrain Layer Mask (R:Metallic, G:AO, B:Height, A:Smoothness) and one for Mask map that includes the Normal map as described above.
Limitations:
• Non-Uniform scaling of Objects is not supported (some seams might appear when use)
• Seams for integrated Objects might appear just because of the way the shadows are calculated in Unity, in which case an increase of shadow bias might help. Baked/mixed lighting can make seams visible too, but I'm trying to find some workaround. The seams can also appear because of Ambient Occlusion, for example the default setting of URP SSAO highlights the intersection a little.
• Parallax occlusion mapping will not be applied on front and side triplanar mapping because the shader would be too performance heavy.
• Triplanar features will be applied on Terrain Base map only if you do not have more than one pass (four Layer in Built-in and URP, eight in HDRP) and you are using "First Layer Only" - otherwise the calculation would be too heavy and the Base map would become pointless.
Supported Unity versions:
2019.3.0 or higher for Built-in
2021.2.0 or higher for Built-in, URP and HDRP