SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Maya Questions / Programming / character joint expression help!

Programming MEL Scripts, Expressions & Programming Related Topics

Join the conversation. Reply to post
 
Thread Tools
25-10-2002, 09:27 PM   #1
wolv275
Registered User
 
Join Date: Sep 2002
Location: so cal
Posts: 8
character joint expression help!
sup sup fellous and thanx in advanced to all that reply and take the time to read this.

im animating a character, i grouped the pelvis joint to create a control, then i created an expression with the following code.

float $x = pelvis_control.tx;
float $y = pelvis_control.ty;
float $z = pelvis_control.tz;
float $a = pelvis_control.ry;
$x = (rfoot.tx + lfoot.tx)/2;
$y = (rfoot.ty + lfoot.ty)/2;
$z = (rfoot.tz + lfoot.tz)/2;
$a = (rfoot.ry+ lfoot.ry)/2;

all i wanted was for the pelvis to move half way between the left foot and right foot when moving the foot nodes. The expression was accepted, but it does nothing in my animation when i move the left or right foot, any suggestions?

ps: i know a little c++ but never tried code in maya.

thankx again
gino
  Reply with quote
25-10-2002, 09:38 PM   #2
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
The walk cycle tut on the VIP area show's how to do that...
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
  Reply with quote
25-10-2002, 09:50 PM   #3
wolv275
Registered User
 
Join Date: Sep 2002
Location: so cal
Posts: 8
how much in dollars?
would be nice to join, but i cant afford it right now...

how much is 17 ponds anyway?
  Reply with quote
11-11-2002, 07:03 AM   #4
toph
Registered User
 
toph's Avatar
 
Join Date: Nov 2002
Location: Canada
Posts: 2
Just a quick suggestion:
an easier way to do this would be to create a locator,
and point and orient constrain it between the 2 feet. then just use the expression:

pelvis_control.tx=center_locator.tx;
// I don't think you want the ty controlled by the locator, but if you need to:
pelvis_control.ty=(center_locator.ty + <offset>);
// then you can use the adjust node to adjust the up/down movement of the pelvis.
pelvis_control.tz=center_locator.tz;
pelvis_control.ry=center_locator.ry;

It might be a good idea to create a second control object for the pelvis that can be used as an adjustment node for the hips. The hierarchy should look like:
Pelvis_control > Adjust_Pelvis_control > Pelvis

Just a suggestion...take it or leave it.
Good luck.
c.
__________________

...yep.
  Reply with quote
11-11-2002, 08:41 AM   #5
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Nice, have to try that later.
I started thinking what weird walking style this would create:

pelvis_control.ry=center_locator.ry * 1.25;

a bit of exaggeration to the rotation
dunno...have to play with this...
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
  Reply with quote
11-11-2002, 08:43 AM   #6
Roman
Supreme Being
 
Roman's Avatar
 
Join Date: May 2002
Location: Athens, Greece
Posts: 1,123
welcome to SM toph.. :p
  Reply with quote
11-11-2002, 08:57 AM   #7
toph
Registered User
 
toph's Avatar
 
Join Date: Nov 2002
Location: Canada
Posts: 2
Roman: thanks!

kbrown: You can get into all kinds of funky animation modifications with expressions. Last year I started doing some experimental Mel scripting junk with swapping nodes (through a UI) that modify my character's rig's animations to give it a different "behaviour"...unfortunately, I didn't have time to continue with the R&D for this, or polish it much...in fact, I only got as far as getting it to "work", but it was definately fun.
But another suggestion would be to not even bother using the "auto hip-centering" setup at all. I've found through past experience that (unless you add a switch into your rig to turn it on/off) it can be more hindering and annoying than helpful and useful, but I generally don't like automating things too much.
c.
__________________

...yep.
  Reply with quote
11-11-2002, 09:04 AM   #8
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
"I generally don't like automating things too much."

Yup, that's true. Too much automation and it'll eventually lead to robotic looking movement.
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
  Reply with quote
11-11-2002, 09:06 AM   #9
adldesigner
Registered User
 
adldesigner's Avatar
 
Join Date: Sep 2002
Location: CCS, Venezuela
Posts: 3,363
Quote:
Originally posted by kbrown
"I generally don't like automating things too much."

Yup, that's true. Too much automation and it'll eventually lead to robotic looking movement.
That, and the fact that it can get quite easily in the way.
__________________
adldesigner
Caracas, Venezuela
Hell .. not gone perse, but with a certainly lower post count per day.

  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding joint, stopping previous joint from enlarging Tiaka Maya Basics & Newbie Lounge 0 24-05-2008 09:28 PM
same animations on duplicate models Tammy Maya Basics & Newbie Lounge 1 07-05-2007 11:52 AM
Rig Problem with Rigid Bind mac762 Animation 3 24-06-2006 06:17 AM
rigging majal Maya Basics & Newbie Lounge 3 09-02-2005 09:07 PM
Character riggs pivot point follow Character? christobal Animation 2 21-11-2003 06:43 PM