Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   character joint expression help! (https://simplymaya.com/forum/showthread.php?t=1776)

wolv275 25-10-2002 09:27 PM

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
:banghead:

kbrown 25-10-2002 09:38 PM

The walk cycle tut on the VIP area show's how to do that...

wolv275 25-10-2002 09:50 PM

how much in dollars?
 
would be nice to join, but i cant afford it right now...

how much is 17 ponds anyway?

toph 11-11-2002 07:03 AM

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.

kbrown 11-11-2002 08:41 AM

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...

Roman 11-11-2002 08:43 AM

welcome to SM toph.. :p

toph 11-11-2002 08:57 AM

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. :banghead:
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.

kbrown 11-11-2002 09:04 AM

"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.

adldesigner 11-11-2002 09:06 AM

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.


All times are GMT. The time now is 07:37 PM.

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