Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
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 20-06-2004, 07:46 AM   #1
Gun-Kata
Registered User
 
Gun-Kata's Avatar
 
Join Date: Jan 2004
Location: Los Angeles
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default Position Attribute in Expression Question (from Learning Maya Dynamics 5)

float $nz = 3* noise (nurbsPlane1ParticleShape.position*.1 + time);
nurbsPlane1ParticleShape.position = nurbsPlane1ParticleShape.position0 + <<0,$nz, 0>>;


Hi, that expression is used to control the y value of each particle in a grid of particles that has been parented to a nurbs plane. The result looks kind of like cloth blowing in the wind. What I don't understand is how the part that is in red can possibly be used to assign each particle its own y coordinate. Isn't position a vector attribute? How then can it yield a scalar value for $nz? And furthermore, how is it that it yields a different y value for each particle in the field?


Last edited by Gun-Kata : 20-06-2004 at 07:49 AM.
Gun-Kata is offline   Reply With Quote
Old 20-06-2004, 02:12 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

The answer lies in the second line. The scalar value is used in a vector <<0, $nz, 0>>. Why does it yield to a different y value? Well, because the vector is added to the initial position of a given particle.
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 20-06-2004, 07:14 PM   #3
Gun-Kata
Registered User
 
Gun-Kata's Avatar
 
Join Date: Jan 2004
Location: Los Angeles
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks! What I still don't understand though is how an equation that uses a vector quantity with three distinct numerical components (nurbsPlane1ParticleShape.position) can yield a single decimal numerical value (float $nz).

If, for example, nurbsPlane1ParticleShape.position is equal to <<2,3,4>> and that value is then inserted into the equation, then shouldn't the equation also yield a vector quantity?



ps. Nice Quake III model btw.
Gun-Kata is offline   Reply With Quote
Old 21-06-2004, 02:57 AM   #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

Ah... Now I see what you mean. It is because of automatic type conversion. In this case the .position vector is automatically converted to a float by calculating a magnitude (length) of it.

These two will yield to the same result:

float $nz = <<1, 2, 3>>;
float $nz = mag(<<1, 2, 3>>);
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 21-06-2004, 03:35 AM   #5
Gun-Kata
Registered User
 
Gun-Kata's Avatar
 
Join Date: Jan 2004
Location: Los Angeles
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Originally posted by kbrown
Ah... Now I see what you mean. It is because of automatic type conversion. In this case the .position vector is automatically converted to a float by calculating a magnitude (length) of it.

These two will yield to the same result:

float $nz = <<1, 2, 3>>;
float $nz = mag(<<1, 2, 3>>);
Now I get it. Thanks!
Gun-Kata is offline   Reply With Quote
Old 21-06-2004, 08:06 AM   #6
mind_raper
Registered User
 
Join Date: Nov 2002
Location: Pakistan
Posts: 57
Thanks: 0
Thanked 3 Times in 3 Posts
Default

kool explaination
Kbrown...

......
__________________
Learn the Rules|Then|
Burn the Rules Book
mind_raper is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maya Hair/Polygon Error ingram_no.7 Members Lounge 13 10-12-2010 11:27 AM
LayoutTools for Maya 2011 is here... ctbram Members Lounge 1 06-12-2010 11:32 PM
Open a Lightwave file in Maya 2011 radiant777 Maya Basics & Newbie Lounge 2 04-12-2010 03:45 AM

Thread Tools





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-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.