Ocean Shader How do you create a tiling looping texture from it

Here is a more detailed recipe for looping an ocean: LOOP_FRAMES = number for frames after which animation repeats.

1 Create an ocean or ocean shader. Set the numFrequencies and waveHeight both to zero so that the ocean is totally flat and more optimal to render.

2 Map the oceanShader waveHeightOffset with an ocean texture..asProjection = ON and newTexturePlacement OFF. On the projection set the rotateX to 90.

3 Map the colorOffset of this texture with another ocean texture.. asProjection = OFF and newTexturePlacement = OFF

4 Animate the time values of the two ocean textures such that the start of one is the same as the end of the other.

In the time field on oceanTexture1 type:

= frame/30 (the time parameter generally expects seconds, not frames)

In the time field on oceanTexture2 type:

= (frame-LOOP_FRAMES)/30

5 Keyframe the waveHeight on the two textures to do a cross dissolve:

oceanTexturel frame 1 = desired height, frame LOOP_FRAMES = 0

oceanTexture2 frame 1 = 0, frame LOOP_FRAMES = desired height

The ocean animation should now loop across the number of frames specified by LOOP_FRAMES above. For it to work the two ocean textures must have identical values (apart from the wave height and time). With this method you cannot preview the displacement of the ocean using the heightfield node (convert displacement to poly will work). Also buoys and boats will not animate with wave height (texturing on the ocean shader is currently not taken into account for these effects).

0 0

Post a comment

  • Receive news updates via email from this site