This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Displacement Sample

This material graph sample demonstrates how to implement displacement mapping in your materials.

The Sample Texture node samples data from the tangent-space normal map taken from the normal Texture 2D node (enabling you to select a texture asset via the Parameters panel in UnigineEditor) in accordance with the default UV, normal vector components are passed to the Material node.

Albedo data for the material is specified directly via a Float node (casting to float3 is performed automatically).

Data of a single-channel heightmap taken from the Texture 2D node and sampled by the Sample Texture node is passed via the x port adapter to the Add node which applies the displacement offset according the Offset Slider parameter node (enabling you to adjust a float value via the Parameters panel in UnigineEditor). The output is then multiplied (the Multiply node) by the displacement height value provided by the second Slider node and passed to the Tessellation Vertex Offset Tangent Space port of the material node via the 0,0,x port adapter (meaning that the value shall control displacement along the Z axis only, keeping X and Y as they are).

Tessellation Factor for the material is specified using a Slider parameter node enabling you to adjust the value in the Parameters panel.

The result
Last update: 2024-12-13
Build: ()