SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / Need help troubleshooting expression.
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 06-01-2003, 09:40 PM   #1
NitroLiq
Moderator
 
NitroLiq's Avatar
 
Join Date: Nov 2002
Location: New York
Posts: 2,133
Thanks: 0
Thanked 10 Times in 9 Posts
Default Need help troubleshooting expression.

I'm playing around with different approaches to simulating seas and whatnot and have been perusing this tutorial. Everything is apparently setup correctly in my scene but I keep getting an error when using their expression. Here are the steps if you want to try and recreate it real quick:

1. Create a horizontal square cubic NURBS plane of width 100 units and divided into 50 spans in both u and v directions.

2. Make the plane a soft body (creation options: make soft). Rename this particle shape node (not the transform node) to seaparticle.

3. Open the attribute editor on seaparticle. Go to the section called Per Particle (Array) Attributes, RMB-press the position field, and choose Runtime Expression from the pop-up menu. Input the following expression:

Code:
vector $dummy1 = seaparticle.position0;
vector $dummy2 = <<$dummy1.x/6 + 59 - frame/20, 27 + frame/40, $dummy1.z/20 + 32>>;
seaparticle.position = <<$dummy1.x, 2.4 * noise($dummy2), $dummy1.z>>;
This should result in a stormy seas-styled billowing like KB's been working on. His method works great but I'm interested in seeing why I can't get the expression to work.

When I go to adjust Per Particle (Array) Attributes for seaparticle, all the fields are grayed out. Even still, I can RMB and open the expression editor in position but keep getting the following error when I create:

"Error: Attribute not found or variable missing '$': seaparticle.position0"

Anyone know what's happening here?
__________________
"Terminat Bora Diem, Terminal Auctor opus."
NitroLiq is offline   Reply With Quote
Old 06-01-2003, 11: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

This is just a wild guess (can't test atm) but you might need to add the position0 attribute to the seaparticle. Open up the attribute editor for seaparticle and under the per particle array section there is a add dynamic attributes or something like that. Anyway, hit the button that says General and from the particles tab choose position0 (or was it pos0)... Again this came from my very tired memory... I'm off to sleep now
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 06-01-2003, 11:45 PM   #3
NitroLiq
Moderator
 
NitroLiq's Avatar
 
Join Date: Nov 2002
Location: New York
Posts: 2,133
Thanks: 0
Thanked 10 Times in 9 Posts
Default

It's funny I had actually thought of that at the time but didn't try it. I just did the whole thing from scratch again and it worked fine. I wonder if It was misreading the expression before.
__________________
"Terminat Bora Diem, Terminal Auctor opus."
NitroLiq is offline   Reply With Quote
Old 08-01-2003, 10:05 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

Ignore my previous post. It's BS

Nitro: My guess is that you accidentally made a creation expression while it should have been a runtime expression... or something...
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 08-01-2003, 12:32 PM   #5
NitroLiq
Moderator
 
NitroLiq's Avatar
 
Join Date: Nov 2002
Location: New York
Posts: 2,133
Thanks: 0
Thanked 10 Times in 9 Posts
Default

KB: Nope, it was runtime. I doublechecked everything. Anyway, I went back and re-did everything with the same settings from worked fine. Last night, I was working on setting up a shader network for the wave texture as well as the seaspray particles but am going to have to re-do at some point....didn't turn out right. For now, though, I think I'm taking a break getting back into the "Maya Fundamentals" tutorials.
__________________
"Terminat Bora Diem, Terminal Auctor opus."
NitroLiq is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.