[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] [ Search: ]

4.10.18 Watermesh Mesh Object

Written by Pavel Krajcevski, Krajcevski@gmail.com.

A watermesh is a simple mesh representing a grid. In its simplest form it can be used to render a square. It requires a specific shader to make it look like water. A watermesh is generally preferred since it is very simple to define the bounds and furthermore it supports ocean creation with very basic LOD calculations.

Basic Structure

The following SCF class names are used (for csLoadPlugin):

Objects in this plugin implement the following SCF interfaces, which you can retrieve with scfQueryInterface:

Factory State Interface

Use the ‘iWaterFactoryState’ SCF interface to access settings for a watermesh factory. The definition of this interface can be found in ‘CS/include/imesh/watermesh.h’ and that is also the include file you need to include in your applications to use this plugin. Using this interface you can access the material, dimensions, murkiness, and whether or not you want an ocean for your watermesh factory.

Factory Loader

Here is a list of all the tags supported by a watermesh factory and their meaning:

Object State Interface

‘iWaterMeshState’ (residing in ‘CS/include/imesh/watermesh.h’) is the SCF interface that you can use to manipulate settings for a watermesh object. By using this interface you can access the material for a watermesh object.

Object Loader

Here is a list of all the tags supported by a watermesh object and their meaning:

Water Shaders

Currently, most of the work into rendering realistic water is determined by the shaders associated with the mesh. For this there is a predefined shader in ‘CS/data/shader/water/water.xml’. Also, the shader currently supports the use of multisampling a normal map to create a rippling effect on the water. This requires a normal map defined in tangent space, some of which can be found in ‘CS/data/water/’


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html 1.76.