Page 1 of 1
Export 360 degree looping animation
Posted: Sat Jun 11, 2005 6:56 pm
by semicolon
I was going to export 360 degree looping animation just like windmill and propeller. The animation looks really wrong when exported. I don't know how to export it correctly of that kind of animation. Otherwise if there is no other way to export 360 degree looping animation, would there be any suggesting manual way to do outside of 3DSMAX like adjusting the .skeleton.xml.
Thanks for the suggestion
Semicolon
Posted: Sat Jun 11, 2005 9:09 pm
by sinbad
Set keyframes at distances less than 180 degrees apart. So you need 3 keyframes in a complete revolution.
Posted: Sun Jun 12, 2005 5:24 am
by semicolon
Thanks a lot Sinbad.
It's almost there. I can now complete the whole revolution. However, at the middle of the cycle, it rotates backward a little bit before it spins back to the complete cycle. Hmm... couldn't really figure out why this happen. I could give you the sample .skeleton file if you need to inspect.
Semicolon
Posted: Sun Jun 12, 2005 9:41 am
by ahmedali
Try key framing at every 120 degs instread of 180. Maybe the "choose shortest path" option has anything to do with it??
If shortest path is On then dont add 2 key_frames at same location.
Posted: Sun Jun 12, 2005 10:51 am
by semicolon
Thanks a lot for the comments ahmedali
I have tried the key trick as you commented but it doesn't seem to change. By the way, where is the "choose shortest path" option?
Semicolon
Posted: Sun Jun 12, 2005 5:40 pm
by ahmedali
By default rotation is done using shortest-path algorithm. It is possible to change this behaviour using setUseShortestRotationPath() method.
Its in animation track, see docs
Does this animation seam occur at end/starting of the animation loop.
You can also mail me skeleton file. better send mesh too.
at: elkali at gmail dot com
Posted: Sun Jun 12, 2005 7:24 pm
by semicolon
I've sent the e-mail with the file to you. It was rejected. I am not sure whether or not this is gonna be in your mail box. However if you don't receive my e-mail, please let me know asap.
thanks a lot for your help.
Semicolon
Posted: Mon Jun 13, 2005 10:36 am
by ahmedali
I have sent you the new xml skeleton file. compile and use it. Sorry I deleted the key frames on Center, but they were empty anyway,
I havent yet investigated the actual cause.
But I think the main problem was being caused by having X-axis pf Box2 negative and positive at different keyframes.
Also I think there is bug in ogre OR in the mesh viewer the "chose closest path" is not affecting.
0 90 180 0
and
0 90 180 360
For example these key frames should give the same results, when "chose closest path" is On. by default it should On but in mesh viewer its seems not working. So its either mesh viewer or ogre!
Posted: Mon Jun 13, 2005 10:38 am
by ahmedali
btw which 3d app / exporter are you using ?
Posted: Mon Jun 13, 2005 11:07 am
by DWORD
ahmedali wrote:0 90 180 0
and
0 90 180 360
For example these key frames should give the same results, when "chose closest path" is On. by default it should On but in mesh viewer its seems not working. So its either mesh viewer or ogre!
I don't think there's a bug. It's impossible to choose the shortest path from
180 to 0
and
180 to 360
as both are valid.
Posted: Mon Jun 13, 2005 1:33 pm
by sinbad
Correct, it's not a bug. You're better to use:
0 120 240 360
Then there's no ambiguity.
Posted: Mon Jun 13, 2005 3:26 pm
by Poseidon
I had the same problem some time ago: I wanted to rotate the barrel of a minigun while the mounting stays firm.
The following posting helped me a lot :
http://www.ogre3d.org/phpBB2/viewtopic. ... ht=minigun
In the end I created two independent meshes (one for the barrel, one for the mounting) and rotated the barrel a bit on every frame.
It works out pretty nice, as you can see in this game [ur]
http://vortex-game.sourcefoge.org[/url]
The advantage is, that you can rotate the barrel at different speeds or even stop it completely. The penalty is, you have to code a bit..
You are rotating using skeleton animation? I didn't know this is also possible, but great
greetz,
poseidon
Posted: Mon Jun 13, 2005 4:32 pm
by semicolon
Hello,
I thank you everyone for all of the suggestions. Especially, Ahmedali. He helped me fixed the animation and this is 99% perfect as the animation rotate in complete cycle. I have compared the .skeleton files of the before and after the fixes. The rotation information was really wrong. I just figured out some method to animate the cycle. I will create the 5 keyframes from 3DSMAX and copy the keyframes information to replace them. By the way I don't know whether or not this would work. Just wanted some experts to confirm it.
Really thank you for all of the help.
Semicolon
P.S. I am using 3DSMAX as primary 3D tools. Any more suggestions are more than welcome.
Posted: Mon Jun 13, 2005 5:37 pm
by ahmedali
That was a stupid mistake
then this should give the same results
0 90 180 270 0
and
0 90 180 270 360
right ?