It turns out that Anim8or is full of surprises. Did you know that object scripts run asynchronously to the rest of the program, and that scripts continue to run even if you change from object mode to scene mode? Neither did I, until recently.

I have been playing with writing scripts to simulate fluids and was watching the evolving fluid simulation in object mode. I was trying to figure out how I could possibly render the simulation. The possibilities were:

1) Calculate all the frames as separate objects and manually (or by outside program) insert them into a scene, like you have to do to insert video into an animation. The problem was that it was an enormous number of objects (24 per second), each with thousands of points. The file would take forever to load and be gigantic! I never tried that method.

2) Instead of calculating the fluid dynamics on a mesh, use lots of copies of a very small objects in way similar to the way that Terranim8or does particle effects with fire. That requires an outside program to create an Anim8or file that would be very large with thousands of keyed elements per frame. I haven't tried that method either.

3) Calculate a single frame at a time on the object and render that in object mode. I tried to put the render() command into a script, but it crashes Anim8or every time. (I need to report that bug). That would be a very manually laborious process.

4) Calculate a single frame at a time on the object and render that in scene mode. Well, that would be as bad as (3) above, but I happened to change into scene mode while a script was running...Behold! the object changed in scene mode as the script continued. By timing how long Anim8or took to render a frame, and by putting a delay loop in the script so that the next frame is not calculated until the previous frame is rendered, and by post-processing to remove duplicate frames, I was able to produce a fluid simulation that was completely done in Anim8or!

The interesting part is that since this functionality already exists in Anim8or, only a tiny change in the program is required for Steve to make this functionality formal.

I would like to request that an "object script" controller be added with access to the scene variables of time and frame. If this were done, the full range of physics would be possible in Anim8or!

----

I have attached the ripple script and the project used to generate the above animation. This test script requires a plane of 100 by 100 points, with the points numbered sequentially. I will be posting a more complete version that will work with generic meshes soon. It will be able to do non-planes (spheres, arbitrary solids, even cloth).

Theoretically, you could accomplish the same thing as this demo by using a script to precalculate a few dozen morph targets. You would have to run the script one morph target at a time and end up with a huge an8 file that would take forever to load.

Yes, it is far from perfect and a bit of a pain to get timed out. To be broadly useful, object scripts would have to have access to the frame or time variable from scene mode or scene controller scripting would have to be enhanced to support the object scripting abilities to manipulate meshes.

The script and project included above is just a demonstration of the capabilities and to point out the "quirk" of Anim8or of running scripts asynchronously to the rest of the program.

The script above requires a mesh named "s1" of 100 by 100 points. The points have to be numbered in order of the mesh from 0 to 9999. The points with Y-coordinates not equal to zero have "excitation", will move up and down, and gradually dampen to zero. This script only moves the points up-and-down and expects the points to be equal distances away from each other (like a perfect plane)

I've attached a project that has a "blank" water field. You can try the different kind of rippling, like from the corner, a wave that covers a whole edge, starting the "excitation" above or below the plane, etc.

To render your animation, you have to start the script in object mode, switch quickly to the scene mode and start the render. The "delay" variable in the script is to allow time for Anim8or to render the frame before the script calculates the next frame. It takes some experimentation to hone in on a proper delay value for the scene and your computer. While hunting the proper delay value, set the number of frames variable to just a few frames because you will have to wait for the script to finish to adjust it.

Awesome!!! Some of you're really upgrading anim8or. I only can spend a little amount of time for anim8or, but I want to upgrade it too. Looks like I have to learn first. And again.......GREAT ANIMATION!