Anim8or Community
General Category => General Anim8or Forum => Topic started by: davdud101 on April 09, 2012, 03:30:26 pm
-
Wazzap, my friends. Hope you all had a great Easter, first off.
So I have this 3d bullet shell I made in Anim8or, and I'm wondering, is there some kinda... script, or math I can use to just pretty much let this thing roll, pitch, and yaw freely and at random?
(Just nod too random, you know with some order)
Hopefully you get my drift.... If not, here's a demonstration of what I'm trying to achieve (this one used for lack of a better find);
That, except more of an extreme spin, kinda just flipping around for perhaps 30 seconds. Any ideas?
-
I wonder if Anim8or supports animation looping? Then you could just keyframe some simple rotations on the three axis. I've started to do this on some of my models when I need them to move or rotate on a single axis. I haven't mess with the keyframer in Anim8or yet, but in Truespace you just open the scene editor, expand the time line panel, record a keyframe and move or rotate the object manually several times recording intermittent keyframes until you have a full rotational cycle. Does any one know if Anim8or works in a similar fastion? Thanks, Leroy.
-
Im pretty sure you can, however in that video, the rotation is not random.
It's just each axis of rotation (yaw, pitch and roll, or x,y,z) is being increased steadily at once.
IE
x is added some
y is added some
z is added some
Next frame
x is added some
y is added some
z is added some
So on
-
Well, you guys, that video wasn't a very great example, I'll try to find a better one.
@Leroy That does work, great suggestion, but I was looking for something less uniform, more entirely randomly chosen.
@CD That may work, I'll have to give I a try...
-
A spinning bullet wouldn't be random, unless you are accounting for wind turbulence. The best way would to script rotation in all three axes, as previously mentioned, and if the rotation rate in each axis was different the effect would be reasonably random, or at least not reveal too much of a pattern.
-
Here's a (very) quick test, rotating in two axes: longitudinal, as if the bullet was fired from a weapon with rifling in the barrel, and; tumbling end over end.
Note that the longitudinal rotation is not easy to see in this video, a better camera position and taking the time to carefully set the rotation speed would improve this. Rotating in the third axis as well as the first two results in an unnatural oscillating wobble, I believe the 2-axis spin is a more realistic representation of a flying bullet. This uses the basic rotation script applied to the bullet's orientation controller:
float $speed;
$speed=6.3;
$orientation = (sin($speed*time),0,0,cos($speed*time));
The bullet element assigns a target object as its parent, and this parent object is further rotated using the same script, modified as below:
float $speed;
$speed=5;
$orientation = (0,0,sin($speed*time),cos($speed*time));
Note that the $speed variable adjusts the speed of rotation, and the position of the 'sin' calculation (either the first, second or third parameter of the $orientation function) selects the axis of rotation.