Height Data
The MF_HeightmapData
feature in Oceanology is used to integrate heightmap data into your landscape material, allowing OceanologyManager
to properly acquire landscape height data for numerous water effects. This integration is essential for achieving realistic and dynamic interactions between landscapes and water features, such as waves and shorelines.
Overview of Height Data Setup
Adding Runtime Virtual Texture Output to Your Landscape Material
-
Enable Virtual Textures
- Make sure you have Virtual Textures enabled in your project settings, as this is crucial for many Oceanology effects.
-
Locate the HeightData Folder
- Navigate to the HeightData folder in the Oceanology plugin to find the example material function named
MF_HeightmapData
.
- Navigate to the HeightData folder in the Oceanology plugin to find the example material function named
-
Copy the Setup
- Copy the setup shown in the example, which uses a Runtime Virtual Texture Output node. This node is responsible for outputting height information of your landscape.
Integrating the Material Function
-
Add the Material Function
- In your landscape material, add the
MF_HeightmapData
material function as shown in the example.
- In your landscape material, add the
-
Connect the Absolute World Position
- Connect the Absolute World Position node to the Runtime Virtual Texture Output to provide accurate world height data.
-
Select WorldHeight as Output
- Ensure that WorldHeight is selected as an output parameter in the Runtime Virtual Texture Output node.
Important Considerations
-
Virtual Texture Activation: Enabling Virtual Texture is mandatory for
OceanologyManager
to work effectively and for several advanced water effects to function, such as shore waves and flow interaction. -
Heightmap Integration: The
MF_HeightmapData
material function is a foundational component that helps in sharing landscape height data withOceanologyManager
, ensuring seamless integration between landscape and water systems.
Summary
By following these instructions, you will allow Oceanology to fully utilize heightmap data from your landscape, enabling realistic water interactions and enhancing the visual fidelity of your scene. Properly integrating heightmap data ensures that your water effects, such as waves and shorelines, react naturally to changes in the landscape.