rebeccap
29-11-2010 05:49:56
I have modified Hydrax so I can control the sea from an external program over the network. I am actually using Hydrax as part of the visualisation engine for a high speed ship simulator.
It all works fine, ie I can modify the height of the sea, except I am getting some strange artifacts at the lower edge of the sea. The way I am modifying the height of the sea is by superimposing my controlled height map (which describes the shape of the sea at a point in time) with very small ripples (Perlin noise of low strength). I do this in the ProjectedGrid module in all the lines where mNoise->getValue is called. Here's an example:
mWaves is the class I've written to manage my "controlled waves".
Here's some pics of the artifacts. N.B. atm I am only controlling a small "field" of the sea, and at the moment the whole field is a constant height, so I am effectively just raising a portion of the sea. The problem is these blue "cutaways" I am getting at the bottom of the screen. I am not concerned with the discontinuities at the edge of the field which are a slightly lighter blue. I will smoothly interpolate my controlled sea with the non-controlled sea and the controlled field will be much larger, so this will not be a problem.
Any suggestions on how to get rid of these would be greatly appreciated!
It all works fine, ie I can modify the height of the sea, except I am getting some strange artifacts at the lower edge of the sea. The way I am modifying the height of the sea is by superimposing my controlled height map (which describes the shape of the sea at a point in time) with very small ripples (Perlin noise of low strength). I do this in the ProjectedGrid module in all the lines where mNoise->getValue is called. Here's an example:
Vertices[i].y = -mBasePlane.d + mNoise->getValue(RenderingCameraPos.x + Vertices[i].x, RenderingCameraPos.z + Vertices[i].z)*mOptions.Strength + mWaves->getWaveHeight(RenderingCameraPos.x + Vertices[i].x, RenderingCameraPos.z + Vertices[i].z);
mWaves is the class I've written to manage my "controlled waves".
Here's some pics of the artifacts. N.B. atm I am only controlling a small "field" of the sea, and at the moment the whole field is a constant height, so I am effectively just raising a portion of the sea. The problem is these blue "cutaways" I am getting at the bottom of the screen. I am not concerned with the discontinuities at the edge of the field which are a slightly lighter blue. I will smoothly interpolate my controlled sea with the non-controlled sea and the controlled field will be much larger, so this will not be a problem.
Any suggestions on how to get rid of these would be greatly appreciated!