Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 23-12-2013 , 03:33 PM
Subscriber
Join Date: Sep 2012
Posts: 4

Instanced grass problem

I've been working through the Realistic Outdoor Environments tutorial and had followed everything exactly. I worked through part 10 adding all the expressions correctly. It all worked on a flat plane, but as soon as I added some height to pPlane1 (pulling vertexes in Y) it crashes Maya. I've been trying for hours to figure out why, I've tried in 2014,2013, and 2012.

Here is my expression:
particleShape1.aimAxis = <<0,1,0>>;
float $randroty = rand(60);

vector $p = particleShape1.position;
vector $nrm = `nearestPointOnMesh -ip ($p.x) ($p.y) ($p.z) -normal -q pPlane1`;

particleShape1.aimDirection = $nrm;

float $rx = rad_to_deg( atan2( ($nrm.z), ($nrm.y) ) );
float $rz = rad_to_deg( asin( -($nrm.x ) ) );

particleShape1.rotationPP = <<$rx, $randroty, $rz >>;

particleShape1.randScale = rand(0.7,1);

nearestPointOnMesh is turned on.

Any Ideas why it works on flat plane but not on a plane with dimension?

Thanks

# 2 23-12-2013 , 07:28 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Expressions evaluate on every value or time change in the scene. What could be happening is that it's hanging when you move the plane.

Did you apply the expression, then move the plane; or apply it to an already modified plane? Doing the latter should work.


Imagination is more important than knowledge.
# 3 23-12-2013 , 08:15 PM
Subscriber
Join Date: Sep 2012
Posts: 4
Thanks NextDesign,
I deleted the expression, changed the geometry on my plane, put the expression back, and it worked with no crash.
Much appreciated.

# 4 23-12-2013 , 09:33 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Great, glad it worked out.


Imagination is more important than knowledge.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads