|
|
On 3/3/2016 1:28 PM, Bald Eagle wrote:
> That's an amazing animation!
> I'd love to understand how you coordinate and time so many objects over so long
> a time period!
Like any problem, the best thing is to reduce it to many smaller
problems. One of my animation secrets is that everything runs from
0.0 to 1.0. Then I can scale and move that. So I have a lot of this:
#switch (myclock) // runs from 0 to length of scene, in seconds
#range(GoIntoPantryStart, GoIntoPantryEnd)
#local _i=AniSegment(GoIntoPantryStart, GoIntoPantryEnd);
#local _f=Curve0(_i);
#local _v=MoveV(KidAtPantryOpenDoorVec, KidInPantryFirstVec, _f);
#declare Camera=_v;
#break
...
so _i becomes 0 -> 1
_f is an acceleration/deceleration curve which looks like this
http://www.buckosoft.com/~dick/pov/curves/
I think a lot of animations miss this step. -- I learned this way back
when I had to program stepping motors, you can't just be "on", you have
to ramp up to speed.
MoveV just returns a point between the two vectors offset by _f.
> You've even got collision detection and physics with the train plowing through
> the bouncing balls.
That stuff I offloaded to java. My first collision detection efforts
were in povray, and, being an interpreted language, took hours to parse
a thousand colliding spheres. (That's 1000 * 1000 collision tests)
My animation controller requests this special file before running povray
which defines the positions of each sphere.
http://tinyurl.com/gpadehe
This has evolved further; the end of the mushroom was emitting a 10MB
file, so I reduced that to emit povray macros
http://tinyurl.com/jqov9lb
which maxes out at 2MB and parses much faster.
Java sends
_mc(0.04,0,4,<80.10, 34.46, 87.9>,-0.04,-90.0,0.0,0.01,69.8)
which povray interprets as
#macro _mc(_iy, _ir, _tex, _texv, _try, _rx, _pry, _prz, _ry)
cylinder { 0, y*_iy, _ir
texture { mushroomTextures[_tex] translate _texv }
translate y*_try
rotate x*_rx
translate <0, _pry, _prz>
rotate y*_ry
}
#end
For development, the java can also spit out a series of files, one per
frame, like "_mush924.inc" and then I can use them in povwin like such:
#if (MushroomDevel)
#include concat("C:/pov/test/ttko/MushroomGen/_mush",
str(frame_number,0,0), ".inc")
#else
#declare vinc = concat(KitchenDir, "MushroomGen/_mush",
str(frame_number,0,0), ".inc")
#include vinc
#end
(javadoc... http://www.buckosoft.com/javadoc/TteoacService/ )
> Super work :)
Thank you!
>
>
--
dik
Post a reply to this message
|
|