Apply Water Shaders to a Terrain
By default, GameCore does not automatically apply a water shader to the water surface in a terrain. However it is very simple to apply and modify the default water shader included with the engine.
Note: this technique also works for any surface in GameCore - it does not necessarily have to be used on specific terrain objects. If you have an area in a model that you wish to behave like water, simply follow these steps to import the prebuilt surface properties to your custom object.
Step 1 - Add a terrain to your world.
- Click 'Add' on the object panel.
- Select 'Default Templates'
- Select 'Terrain'
- Slick 'Basic Terrain'
This will add the terrain object to your world, and more importantly (for the purposes of this discussion), copy the default water shaders into your project so you can use them.
Step 1 - Import / Apply the Surface Properties
Now for the the fun part!
The included 'srf' file can be easily applied to the water on a terrain
(or any other material) by following these steps:
1) select the 'water' surface1 on the 'Object Surfaces' Panel
2) Click 'Import' and select the 'water.srf' file.
3) That's It!
Note: .srf files can be thought of as 'surface templates' that you can
reuse on multiple surfaces. To create one, simply select the surface on
the Object Surfaces panel and click 'export'.
1 If you want to apply the Water Shader to another model or object, simply select the surface in question as it appears in the Surface Editor.
