Quote:
Originally Posted by Desga
Ok man but in SH3 what are the files that concern and allow you to see the sea in the game and how the waves are produced?
|
In SH3 the most things to represent the ocean surface is done by hardcoded stuff within *.dll and *.act files (act files works similar to dll's).
Simplified the following is made in the source code:
1. an array of vertices are created to get a ocean mesh, there is no external 3D object for the ocean
2. An algorithm such as Gerstner Waves is used with parameters like wind speed, wind direction, wave height, ... for the calculation of the actual hight/position of each vertex of the ocean model.
3. The actual position of a vertex is given as input into the ocean vertex-shader (in Sh3 the shaders are also hardcoded) and the vertex-shader moves each vertex to generate visual waves.
4. now the ocean pixel-shader take the output of the vertex-shader as his own input and set the colors and reflection of the ocean
for more detail:
http://www.gamedev.net/reference/art...rticle2138.asp