Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Insect Wings animation (https://simplymaya.com/forum/showthread.php?t=29950)

MikeUK3 20-05-2008 07:17 PM

Insect Wings animation
 
I've created a cartoon Bee in Maya 8.5 but I need to animate the wings independently from the Bees movements and at a rapid rate (say 5 times per second). How would I do it? The timeline is in seconds, can I change that to work in milliseconds for example? I'm taking it keyframing is the best way to do it?

Any advice please?
Thanks
Mike

AikoWorld 20-05-2008 09:11 PM

To get a secondary animation on the wings you can do this with lots of different methods.

The one i would use is.

an expression.
l_wing01.rotateZ = sin (time * 10) * 40;


L_wing01 is the wing object
.rotateZ is the direction of the wing flapping

sin is returning the sine of an angle specified in radians

*10 is the amount of times per second

*40 is the degree the wing will flap inbetween.

have fun.

MikeUK3 21-05-2008 01:50 AM

Thanks
 
I'm relatively new to Maya so haven't delved into MEL yet. I did manage to do it though. Here is what I did:

I set the wings in their starting position and set a keyframe. Next I positioned each wing to their emd point (left wing 50 and right wing 130) and set a second keyframe. Finally I returned the wings to their original position and created a 3rd keyframe.

With the Bee selected, open the graph editor (Window > Animation Editors > Graph Editor), go to Curves > Post Infinity> Cycle. The to move the Bee around while it's wings are flapping, I just grouped the Bee parts (wings, body, head) and keyframed as usual. To slow the wings down just space the keyframes out on the timeline.

Might not be the best way but it's done the job. Hope this helps someone else looking for the same thing at some point.

Thanks for your help
Mike

mirek03 22-05-2008 04:23 AM

jumped the gun there Akio..:)

no doubt the above Akio would have a better and more succinct way of putting this.., he might help with the timing because im going to 'wing it' so to speak.

you have your low poly mesh of the bee, yes?

you have a very basic skeleton and have smooth bound it (skinned it with the root joint,, being the first joint between the wing skeleton.., yes?

shift select the joints from one side until the last joint, at the wing tip.., stop there, then continue to the other wing side and do the same.., now when you rotate.., the wings should do their thing.

as for timing.., you do the math.., if your ntsc.., im not.., but at 30 frames a second you could probably keyframe.., god..,as fast as you want.., say, first key frame with wings up at frame 1.., middle mouse button to frame 5 and set a key.., the wings are still in the up position.., middle mouse to frame 5.., put the wings into a down position and set the key.., then cycle with infinity.., post

thats a start.., you might need to check the keying because you will probably not get a nice loop with those settings.., im running out the door.., best i can do atm

Mirek :)

MikeUK3 22-05-2008 10:21 AM

Erm, yes I've created a poly mesh bee but there is no need for a skeleton for my purpose as it's not a human-type bee as such. They are simple semi-transparent wings that just need to flap up and down, they don't need to be complicated like the flapping pattern of a bird. I just changed the pivot point so that they rotate around the body slightly and then key framed. I'm creating a short (3 min animation with it so I'l post it on youtube when it's done and add a link.

Thnaks for your help
Mike

mirek03 22-05-2008 10:29 AM

sorry mate, didnt read the mail properly.., sounds like your on top of it.., when you said flapping., i thought.., 'flapping'.., when you said never done MEL.., i didnt think you understood what had been instructed.., now, after reading again.., all sounds great.., im keeping that expression given to you by that very generous lad.., Akio.., generous with the good oil (good information).

im wondering which channel or the expression is fed into.., im not getting the full picture in my mind.., where did you use the expression.., in the channel box?? which connection??

MikeUK3 22-05-2008 11:05 AM

Thanks a lot :) I need to ask another question but I'll out it in another thread..

Thanks again
Mike

mirek03 22-05-2008 11:12 AM

i put that expression on rotate z.., in the channel box.., put 100 for the amount of flapping.., and.., man.., thats impressive.., works well, very well

AikoWorld 22-05-2008 11:25 AM

good you could use it mirek.

jup the expression just needed to be added in the attributes chanel of the appropriate rotation for example X.

In the Attribute channel,

Right click the Rotation X
Go down to Editors
Expressions

and type in the expression.

Just change the l_wing01 to the correct object name.

Expressions are allot of fun.

mirek03 22-05-2008 11:34 AM

yo dude.., yea i did that.., works a treat.., nice to be able to edit expressions too eh.., ive noticed you know your way around them LOL, :)

cheers dude and many many thanks :)

AikoWorld 22-05-2008 12:01 PM

No probs, i need to know these things its my job :D

I try to help out on these things where i can on SM.

mirek03 22-05-2008 12:22 PM

of course i know.., hence.., many many thanks, you have already helped me many many times.., believe me

ive been wanting to thank you in some way for ages :beer:

AikoWorld 22-05-2008 01:20 PM

Cool! well thats the fun part learning every day :D
I love learning new stuff.

mirek03 22-05-2008 01:49 PM

yea, i believe the arts a magic,

great to give someone a little magic eh !?"

great to learn to learn, gets one through the tough times.., what does the Tao say..?? mistakes and difficulties are a blessing because it feels so good when you learn learn from them.., when you solve them..,

something like that..,

i can speak a little japanese.., nice sentiment.., your alias.., with all respect.., it suites you from what i've seen

very coool :) sincere it would seem :)

great for me to have this chance to say hi..,

i gotta get up at 4.30 am to catch a flight to sydney.., so im a crashing dude.., its night here :) ive got a girl to meet in the morning.., :) (bliss)

your doing great work for us lowly poor students and those not in the 'inner circle' mate.., appreciated.., you should know that!!!!! :)

night :)

AikoWorld 22-05-2008 02:07 PM

Hey have fun in Sydney, and lots of great times with your girl.

Ah lol poor students, they don`t exist. Everybody is a student, i`m one, even George Lucas is still a student. As we all learn every day. Other wise life would be boring :D.

Thanks for the kind words, much appreciated.

i gotha go back to work in a couple minutes, creating a tree simulation, whoeee :)

Cy`s have a great weekend.


All times are GMT. The time now is 08:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018