3D animation question

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
Murloc992
Posts: 272
Joined: Mon Apr 13, 2009 2:45 pm
Location: Utena,Lithuania

3D animation question

Post by Murloc992 »

Hey guys I am in need of animating help. I wanna animate a simple slow 360 degree rotation of windmill 'blades', but I am constantly failing to make an animation, because it keeps slowing on keyframes of the rotation and in the transition from end to the beggining it actually stops.. :D Can you tell me how should I animate a smooth 360 spin?

Thanks in advance!

~Andrew.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

i usually make 4 keyframes.
1st the original
2nd 120 degrees rotated
3rd 240 degrees rotated
4th 360 degrees rotated

so if u put the keyframes in the same distance with others, itll be smooth.

also, set the transition mode to linear (not spine)
i dunno what program do u use, but i can tell you where to set it in blender and cfx :D
Image
Image
Murloc992
Posts: 272
Joined: Mon Apr 13, 2009 2:45 pm
Location: Utena,Lithuania

Post by Murloc992 »

B@z wrote:i usually make 4 keyframes.
1st the original
2nd 120 degrees rotated
3rd 240 degrees rotated
4th 360 degrees rotated

so if u put the keyframes in the same distance with others, itll be smooth.

also, set the transition mode to linear (not spine)
i dunno what program do u use, but i can tell you where to set it in blender and cfx :D
Ok tell me how to do it with armature bones in Blender :D
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

I never managed this without some kind of looping glitch (even if it worked perfectly in blender, there would be a glitch when exported to Irrlicht as .b3d). I ended up exporting as separate objects and using a rotation animator.
teto
Posts: 159
Joined: Thu Dec 03, 2009 9:37 pm
Location: /home
Contact:

Post by teto »

can't you duplicate the first frame and set the copy as the end frame ? This way the glitch should be eliminated ?
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

teto wrote:can't you duplicate the first frame and set the copy as the end frame ? This way the glitch should be eliminated ?
Yeah, this is exactly what B@z proposed:
1st the original (-> say 0 degrees)
2nd 120 degrees rotated
3rd 240 degrees rotated
4th 360 degrees rotated (360 == 0 degrees or our first frame)

Just wondering why are you using bones for this?
Would try to help, but I`ve no idea how to do a thing in Blender. I hate it! And it`s personal! :lol:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Also, to keep the motion uniform, you have to set the interpolation between keyframes to linear, if you have the posibility.

In MAX the default interpolation used is Spline, so, values increase fast, then have a slower pace, and when reaching the next keyframe, they accelerate again.

Also, perhaps you would want to animate that windmill within irrlicht, using an animator. That saves from the exporting process the animations, and quite probably, the bones, with the advantage of having the meshes stored statically in hardware.

Currently i am not aware if the exported meshes that have animation but don't have skin are exported actually without bones, or even if irrlicht can handle keyframed animations that aren't stored neither in skinned meshes nor in MD2/MD3 models.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

For a windmill-like animation (in my case the rotor of a helicopter and a plane) I use the Irrlicht animator (see IrrOdeCar demo). Works fine for this simple thing, but I guess that it's mainly because I don't use such a good 3D editor (Wings3D ... but this is not the reason why my models suck ... that's because I'm a lousy 3D modeller ;) ).
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Murloc992
Posts: 272
Joined: Mon Apr 13, 2009 2:45 pm
Location: Utena,Lithuania

Post by Murloc992 »

Thanks for advices guys, I think I'll better stick with animator for this :)
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

hey
in blender: press space, add->armature. then go to edit mode, press e (that makes a new bone), you should put that second joint to the center of the windmill. now go to object mode, select the windmill, and after that the armature ( the order is important), and press ctrl+P, armature, name groups.
now select the windmill, go to edit mode, look for the link and materials, select there the Bone.001 vertex group. now select all of the vertices what u want to move, and press assign.
Now at the top of the blender (if u have default view), there is a list box selected SR:2 - Model. Change to 1 - Animation. there, u select the armature, switch to pose mode, select the second joint.
now press I, LocRotScale. Thats your first frame. now go to 3rd frame, rotate the join by 120, press I, rot, go to 5th frame, rotate the joint by 120 again, etc etc.
And thats all :3
btw, u can do it without joint, if the planes of the windmill is in a different object than the main body. then just select the object, and do the animation part as i explained before.

i hope it was understandable
Image
Image
Murloc992
Posts: 272
Joined: Mon Apr 13, 2009 2:45 pm
Location: Utena,Lithuania

Post by Murloc992 »

B@z wrote:hey
in blender: press space, add->armature. then go to edit mode, press e (that makes a new bone), you should put that second joint to the center of the windmill. now go to object mode, select the windmill, and after that the armature ( the order is important), and press ctrl+P, armature, name groups.
now select the windmill, go to edit mode, look for the link and materials, select there the Bone.001 vertex group. now select all of the vertices what u want to move, and press assign.
Now at the top of the blender (if u have default view), there is a list box selected SR:2 - Model. Change to 1 - Animation. there, u select the armature, switch to pose mode, select the second joint.
now press I, LocRotScale. Thats your first frame. now go to 3rd frame, rotate the join by 120, press I, rot, go to 5th frame, rotate the joint by 120 again, etc etc.
And thats all :3
btw, u can do it without joint, if the planes of the windmill is in a different object than the main body. then just select the object, and do the animation part as i explained before.

i hope it was understandable
Dude, I know how to animate in blender using armatures :D That interpolation is buggy, so I think I am going to make own map/entity editor first :) Still thanks for those who will find this usefull :D
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

But armature means using the skinned meshes in irrlicht, and skin means software processing, using animators and hierarchies in Irrlicht places all the animation efforts in the hardware, which is much more efficient.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

Murloc992 wrote:Ok tell me how to do it with armature bones in Blender :D
because u wrote this, i thought u cant animate with blender XD sry my miss.

so for interpolation, go to Action Editor, select all the bones, and keyframes, look for Key menu, interpolation, linear, and done :3

Mel: yea, so u have to use animators every time when u want to rotate something. why not, make animators, when ur character rotates his sword around his hand in 720 degrees, and hits, use animator when a bird going around a building etc... yea good idea. i rather do animation things in animator program.
and so, i guess the windmill isnt a static object, even if it doesnt have animations, its still skinned mesh. so, using irrlicht animator will even worse the performance. (now it has software processing + irrlicht animator)
I say, make animations in animator program, and only use irrlicht animators, when u need to move the whole node, not just a part of it.
Image
Image
Post Reply