Some notes for people wanting to use animated water, and waves around objects.
Using the files “IansBoatWaves.a8s”, and “Animated toy yacht on sea - 192x128zoom.an8” which I attached to the “How about this version Ian?” post above. (These 2 files work, but the sea and sky will be black unless you copy the “sky-1286888_960_720.jpg” file from the zip file IanRoss posted.) Place these files in the Anim8orScripts directory.
1) You need a recent version of Anim8or. At least Version 1.01.1394+ dated 22/12/2020.
2) Open "Animated toy yacht on sea - 192x128zoom.an8" You should get a pop-up DOS window titled "Anim8or Debug Output"
3) Switch to Scene mode
4) Press '1' on the numeric keypad to look through the camera
5) Render movie
This animation makes use of the addBoat() function in “IansBoatWaves.a8s” to create the waves around the boat.
The boat hull has to be added to the wave script. It would be much nicer if this could be controlled from the .AN8 script. But I don't know of a way to do that.
I would recommend that for each animation you copy and re-name the original wave script, and reflect the new file name in both the "#plugin("object", "mesh", "IansBoatWaves");" in the .a8s file, and the "plugin { "IansBoatWaves" }" line in the .AN8 file, otherwise the code is likely to call the old script rather than the modified one.
The new script will add a second wave icon which is less than ideal, so it is best to store your modified scripts in a different directory, and only copy them to the "Anim8orScripts" directory when you are making the animation. And after the animation remove the modified version.
As the addBoat() function adds decaying waves, the first waves are quite large, so it may look better to pass a smaller length and width to addBoat() than the real boat, and use the boat hull to hide the most violent waves.
“Animated toy yacht on sea - 192x128zoom.an8” sets the number of frames that get animated with the "frames{600} " line.
The wave parameters used in the animation are set up in the .AN8 script with:
parameteric {
name { "IansBoatWaves01" }
plugin { "IansBoatWaves" }
base {
origin { (-48 -15 -5.5) }
orientation { (0 0 0 0) }
}
material { "material02" }
parameter { "X Tiles" int 192 }
parameter { "Y Tiles" int 128 }
parameter { "Scale" float 0.50000 "scale" "scale_x" }
parameter { "Seed" int 3454 }
parameter { "Wave origin count" int 23 }
parameter { "Max wave height" float 0.33000 }
parameter { "Mean wavelength" float 7 }
parameter { "Min wave distance" float 120 }
parameter { "Wave direction" float -65 }
parameter { "Time" float 92 }
}
Note the "plugin { "IansBoatWaves" }" where "IansBoatWaves" is the name given in the "#plugin("object", "mesh", "IansBoatWaves");" line of IansBoatWaves.a8s.
This differentiates this wave object from the original unmodified waves script.
The object name passed to “ name { "IansBoatWaves01" }” is generated form the plugin name, so adjust that too.
If the wave script didn't have the "#animated" line in it then it would just be calculated the once like the other un-animated objects in the scene.
The speed of the waves is controlled by the multiplier you put in the “IansBoatWaves.a8s” line:
$time = $time + time*6.0;