This course contains a little bit of everything with modeling, UVing, texturing and dynamics in Maya, as well as compositing multilayered EXR's in Photoshop.
# 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

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

Technical Director
Join Date: Feb 2004
Posts: 2,988

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

### Topics

1

1

9

By e11productions Animation
0

0

3

### VFX News

On 2022-07-18 14:30:13

On 2022-07-18 14:17:59

On 2022-07-15 13:14:36

On 2022-05-13 13:52:25

On 2022-05-02 20:24:13

On 2022-04-13 16:02:13