Textures are locked onto the ocean surface at the position and orientation desired by the user, and undulate with the ocean surface. The user has the option of placing the texture as if it is on the underside or the topside of the interface. For example, when the texture is placed on the underside of the ocean surface and the camera is above looking down, the texture appears to be floating just under the waves.
If textured oceans are not wanted, then the relavant portion of the ocean input file is
...
whitecaps no
texture no
sunbeams no
...
For textured oceans, the format is:
...
whitecaps no
texture yes
RenderWorld_data_file texture 2 2
surface_type ocean
nTextures 1
xyOrigin 0 0
Theta 0
dimensions 10 10
periodic 1
animate 0
new_picture 0
pictureFile k.rgb
priority 0
nBands 3
viewAbove yes
multiplyReflectance 0
alphaAbove 1
min_radiance_above 0 0 0
max_radiance_above 10 10 10
viewBelow no
endTexture
sunbeams no
...
The only option for the parameter
surface_type is ocean at present. nTextures is the number of textures to be placed on the surface. For each one xyOrigin is the center position of the texture relative to the ocean position, in physical units (meters). Theta is in degrees, and is the rotation angle of the texture relative to the ocean grid. dimensions are x,y lengths in meters. Textures are "stretched" when these proportions don't match the picture aspect ratio.
When
periodic 1 is chosen,
the texture is reproduced as an infinitely repeating tile,
whereas periodic 0
provides only a single copy of the texture.The
animate option allows the texture to be moved along the surface.
Animation is accomplished by setting its value to 1 and adding three new parameters
as follows,
animate 1
Vx 10.0
Vy 3.0
to 0.0
The
For each frame the texture is taken from a file that is constructed from the
pictureBase (k) and the four digit frame number XXXX as k.XXXX.rgb. Note that each of these
images must be the same size and that
The texure to be used is an rgb or rgba image which is named on the
Vx and Vy represent the velocities of the texture is meters/second and
to
is the value specified by xyOrigin.
new_picture parameter allows you to have the texture vary from frame to frame.
This is accomplished by setting new_picture to 1 and adding a line to specify the base name of
the file as follows, new_picture 1
pictureBase k
pictureFile must still be specified in order
for RenderWorld to initialize the mcodeory necessary to hold the texture. pictureFile
line.priority provides ranking of the textures to determine
which is rendered in front of the others. The highest priority texture map within
each pixel is imaged first.nBands is the number of color bands.
As with the other input files, this number is typically 3.viewAbove yes allows the
texture to be visible from above the surface, and is followed by an additional four parameters.
The alternative, viewAbove no, has no additional parameters, and
the texture map is not visible (transparent) from above. Similarly, the line viewBelow
determines whether the texture map is visible from beneath the ocean surface, and if the answer is
yes, then a set of four additional parameters follow.multiplyReflec
determines whether the texture map appears to be on the same or opposite side of
the water surface as the camera. Thus multiplyReflec 1
eans that the texture is on the opposite side, and multiplyReflec 0
means the texture is on the same side as the camera.alphaAbove
determines whether the alpha channel in an rgba texture
image should be used to attenuate the water light. The possible options
for alphaAbove are:alphaAbove 0
do not use the alpha channelalphaAbove 1
use the alpha channel to block the backgroundalphaAbove 2
use the alpha channel to block the background and condition the texture.minRadAbove,
and maxRadAbove provide the scaling of the sgi rgb images to radiance units.viewBelow is yes
an additional 5 lines must be included just as with the viewAbove case. RenderWorld_data_file texture 2 2
surface_type ocean
nTextures 1
xyOrigin 0 0
Theta 270
dimensions 25 25
periodic 0
animate 1
Vx 10.0
Vy 3.0
to 0.0
new_picture 1
pictureBase k
pictureFile k.0001.rgb
priority 3
nBands 3
viewAbove yes
multiplyReflectance 0
alphaAbove 1
min_radiance_above 0 0 0
max_radiance_above 15 15 15
viewBelow no
endTexture