View Full Version : randomize goal positions
04-29-2008, 02:10 PM
I'm attracting some particles to a nurbs object using goals. At the moment the particles are sticking to the cv's. I want the particles to stick randomly over the surface of the object. (which is deforming and animating if this makes any difference).
I know about the pp goal position attributes, but I have no experience of scripting at all. Could someone help me by posting what exactly I should be putting in which creation expression?
I can't do the old 'using the object as an emitter and then reversing the scene' trick, because the particles are going to fly in, form the object, then fly out again.
Hope someone can help.
04-29-2008, 05:27 PM
All you need is to add goalU, goalV, parentU and parentV to your particles and then in creation write this:
goalU = parentU;
goalV = parentV;
if you use a surface emitter, make sure you have need parentUV ticked on.
(BTW, like your handle: "Me thumbs have gone all weird!")
04-29-2008, 06:00 PM
Nice one, thanks for that.
"Here hare here"
04-30-2008, 12:09 PM
hey guys,i tried what u said to do,but the particles stayed on one vetice of a nurbs sphere,can someone tell specifically what to do?
i added the goal U V and the parent .. and put the script,but am i missing an attribute for the goal pp? thx
05-01-2008, 03:08 PM
Are you sure you actually made your geo a goal?
05-02-2008, 08:05 AM
yes , i made it a goal, and then i put the script in goal U ,and it took it for the 3 other attr ( goal V,parent U V) .but when i play the animation i get all the particles going to the lowest vertice of the sphere, and not be randomized over the surface.
do u think that i should do smth first with the nurbs sphere,or is there a correct way to add the script , i would really appreciate if u can tell me exactly what to do,i m working at a TV station and i use goals a lot,but i never thought i could randomize it over the surface like Max pFlow,i know Maya can surely do it but i need to know the right steps. Thanks a lot
05-02-2008, 11:11 AM
Have a look at this (Maya 2008) file
05-02-2008, 12:41 PM
thnx man,i get it now. but it was way out from what i was thinking,
u made it using the surface itself as an emitter,got it now. thanks a lot man
05-02-2008, 12:43 PM
hey do u know some tutorials where i could learn the basics of PP expressions ?
05-02-2008, 04:43 PM
goalU = rand(1);
goalV = rand(1);
If your surface's min/max range is not 0 and 1, then you should rebuid the surface or use:
goalU = rand(min range, max range);
goalV = rand(min range, max range);
Hope this helps.
05-02-2008, 05:43 PM
Phil Wittmer has a basic expressions tutorial that goes through this exact exercise.
05-03-2008, 08:25 AM
yes that is it,
Goal u =rand(0,1);
Goal V =rand(0,1);
that will make the particles all over the surface,thanks a lot man.
and for the tutorials its a nice one,but im gonna go for the full learning of expressions,
i got a PDF files an e-book called: http://www.docstoc.com/docs/412350/Maya-Tutorial---Expressions
thank u all
05-03-2008, 08:25 AM
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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.