CGTalk > Techniques > Character Rigging
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 09-24-2013, 04:12 AM   #1
New Member
Join Date: Sep 2013
Posts: 7
Question about custom attribute in rig

hi, i add a custom attribute in my controller, and my question is how can i make it to do automatic animation like, the one in metal fly rig, when i change the value of the fly controller to 1-10 his fly automatically move. how can i do something like that. thanks
Old 09-24-2013, 05:02 PM   #2
shinyprem's Avatar
Prem Anand Earnest Dhass
Team Lead Rigging
Technicolor India
Bangalore, India
Join Date: Sep 2006
Posts: 601
Send a message via Yahoo to shinyprem
Do u mean the flap of a wing connected to an attribute?
you can do by connecting the attribute to a multiply/divide node input 1x and the time (u will get it when you open DAG nodes) to input 2x. Finally connect the output x to the Rotation axis of the fly's wing. Result play the time line you can see it. The attribute value will have the control on the speed of the wing flap.
Download vehicleRigGenerator @
Old 09-30-2013, 05:38 PM   #3
giuliotonini's Avatar
Giulio Tonini
2D 3D Generalist / Supervisor
Xchanges vfx
Milano, Italy
Join Date: Sep 2013
Posts: 9
Hi ffpc123,

for me the easiest way to achieve that kind of control is to use Maya "sine" function.
To do this you have to do 2 things, add some custom Attributes and set an expression on the wing rotation. Try it on some cubes first, so create 3 cubes, one at the center and name it "body" and one on each side of the "body" cube and name them wing_right and wing_left.

Now add custom attributes to your "body" cube: amplitude, frequency, offset and rotOffset. Then open the expression editor (Window-->Animation Editors-->expression editor) and write this simple expression.

$amplitude = body.amplitude; $frequency = body.frequency; $offset = body.offset; $rotationOffset = body.rotOffset; wing_right.rotateZ = (sin((time*$frequency)+$offset)*$amplitude)+$rotat ionOffset; wing_left.rotateZ = -1*(sin((time*$frequency)+$offset)*$amplitude)+($ro tationOffset*-1);

the first part is only to collect the values of custom parameters added on the body and to make easier to write the expression for the two wings.

the second part is the expression that drives wings rotations. Aplitude is used to set how much the wings flaps, frequency sets how fast, offset is to offset the flap in time and rotationOffset is used to make them flap higher or lower.

note that on left wing i multiply the expression by "-1" and be sure that objects and attributes names in the expression and in the scene are the same.

on the link below you can find an example file, hope you can find it of some help.


Old 09-30-2013, 05:38 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,479
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 05:54 AM.

Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.