Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 26-08-2004, 11:52 AM   #1
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default jitter

Does anyone know of a good way to add some random jitter to a poly object. I'm not talking about the whole object, but rather the vertices. I tried making it a softbody, and adding some turbulence, but that only seems to make the verts move (albeit randomly) consitantly in a direction. I just want each vert to move a little bit each frame, never diverting too far from it's original position so that the basic shape is always still visible.

Anyone know what I'm talking about here or am I making no sense whatsoever?

Thanks.
Dann is offline   Reply With Quote
Old 26-08-2004, 01:13 PM   #2
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Did you animate the phase attributes of your turbulence field?

here's one way:
turbulenceField1.phaseX = time;
turbulenceField1.phaseY = time;
turbulenceField1.phaseZ = time;
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 26-08-2004, 01:30 PM   #3
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default

yeah, I tried that (and just tried again to be sure). Each particle (vert) of my soft body keeps traveling. It doesn't jitter. However, I've put together some nifty code that does the trick. I'm not the best scripter so pardon if it's overly complex, but it works. Drop it on a soft body as a Runtime expression and watch it wiggle. Edit the $variance and $magnitutde to fit the scale of your model.

float $variance = 0.01;
float $magnitutde = 0.003;

vector $pos = position;
float $posfloat[];
$posfloat[0] = $pos.x;
$posfloat[1] = $pos.y;
$posfloat[2] = $pos.z;

float $startPosX[];
float $startPosY[];
float $startPosZ[];
int $ID = particleId;
if (frame == 2)
{
$startPosX[$ID] = $pos.x;
$startPosY[$ID] = $pos.y;
$startPosZ[$ID] = $pos.z;
}

$posfloat[0] += rand( ($magnitutde*-01) , ($magnitutde*01));
$posfloat[1] += rand( ($magnitutde*-10) , ($magnitutde*10));
$posfloat[2] += rand( ($magnitutde*-30) , ($magnitutde*30));

if ( ($pos.x - $startPosX[$ID]) > $variance || ($startPosX[$ID] - $pos.x) > $variance )
{$posfloat[0] = $startPosX[$ID];}
if ( ($pos.y - $startPosY[$ID]) > $variance || ($startPosY[$ID] - $pos.y) > $variance )
{$posfloat[1] = $startPosY[$ID];}
if ( ($pos.z - $startPosZ[$ID]) > $variance || ($startPosZ[$ID] - $pos.z) > $variance )
{$posfloat[2] = $startPosZ[$ID];}


position = <<$posfloat[0],$posfloat[1],$posfloat[2]>>;
Dann is offline   Reply With Quote
Old 26-08-2004, 02:06 PM   #4
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Well, if you do the softie with a goal (weight < 1), you should get jitter with a turbulence field. Worked for me at least (or i'm thinking of a different effect)...
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 26-08-2004, 02:45 PM   #5
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default

See, there's the simple solution I was looking for.

Thanks.
Dann is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.