CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-19-2013, 11:10 PM   #1
JimenaBarrera
New Member
portfolio
Jimena Jimena
Mexico city, MX
 
Join Date: Mar 2013
Posts: 3
OCEAN spray on waves and collision

Hi!

I want to make spray when a high wave collides with an object. I found this page with a step by step tutorial:

http://www.trisen.info/maya-foam-emission-en/

but in step 7, when I add the code:

int $i = emission_controlShape.particleId;
float $rt = `getAttr «locator2.Max_rate»`;
float $rndrate= rand(-$rt,$rt);
$Porog = `getAttr «locator2.treshhold»`; float $V = `getAttr -time (frame+0.5) intersectionCurve1_1rebuiltCurveShape1.cv[$i].yValue`-`getAttr -time (frame) intersectionCurve1_1rebuiltCurveShape1.cv[$i].yValue`;
if (abs($V) > $Porog )

setAttr intersectionCurve1_1rebuiltCurveShape1.emitter1Rat ePP[$i] $rndrate;
else
setAttr intersectionCurve1_1rebuiltCurveShape1.emitter1Rat ePP[$i] 0;




I get the error that the attribute $Porog doesn't exist. Do you know how can I fix this?

help please
 
Old 03-21-2013, 01:50 PM   #2
Kobes
Veteran
portfolio
Jacob Santamaria
Melbourne, Australia
 
Join Date: Aug 2010
Posts: 70
Code:
int $i = emission_controlShape.particleId; float $rt = `getAttr «locator2.Max_rate»`; float $rndrate= rand(-$rt,$rt); $Porog = `getAttr «locator2.treshhold»`; float $V = `getAttr -time (frame+0.5) intersectionCurve1_1rebuiltCurveShape1.cv[$i].yValue`-`getAttr -time (frame) intersectionCurve1_1rebuiltCurveShape1.cv[$i].yValue`; if (abs($V) > $Porog ) setAttr intersectionCurve1_1rebuiltCurveShape1.emitter1Rat ePP[$i] $rndrate; else setAttr intersectionCurve1_1rebuiltCurveShape1.emitter1Rat ePP[$i] 0;


On line 2 and 4 of the expression where it has the double arrows on either side of locator2.Max_rate and locator2.treshhold is what's causing issues I think. Change those double arrows to quotes instead("locator2.Max_rate").

Hope this helps.
Cheers Jake
 
Old 03-22-2013, 04:43 PM   #3
JimenaBarrera
New Member
portfolio
Jimena Jimena
Mexico city, MX
 
Join Date: Mar 2013
Posts: 3
Hi Jake! thank you very much for you reply! but actually, what is giving me trouble is the $Porog variable. In the command line it appears the error that is a variable that doesn`t exists.

I also found the same effect here
https://vimeo.com/8036704

where project files can be downloaded, but when i open them, any particle is emitted :(
I don't know what the problem is, any help will be very much appreciated
 
Old 03-22-2013, 04:43 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:47 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.