View Full Version : advanced particle goal help?
johnjoe 10-22-2008, 04:31 PM I'm wondering if there is a way to get particles (or nParticles) to cover geometry in a more controlled way. Rather than having to rely on vertex IDs, which is so random at times.
It would be so much nicer if it was possible to use an animated ramp texture as the goal area instead: like you can with particle emission.
I know this is a long shot but it's worth a try :shrug:
Thanks i advance
|
|
Aikiman
10-22-2008, 08:15 PM
Sounds possible with the colorAtPoint command. No sure of you setup but if you connect the particles to a closestPointOnSurface node then you can control the particles easier but it only works on planar surfaces and a floating particle grid above it.
johnjoe
10-23-2008, 09:14 AM
Sounds like a good starting point. Do you know if there's any examples of colorAtPoint scripts floating around the net?
Thanks for your advice Aikiman, really appreciate it. :beer:
Joe
Aikiman
10-24-2008, 01:46 AM
Here you go I wrote this...
float $pos[] = particleShape1.position;
setAttr closestPointOnSurface1.inPosition $pos[0] $pos[1] $pos[2];
float $u = `getAttr closestPointOnSurface1.parameterU`;
float $v = `getAttr closestPointOnSurface1.parameterV`;
float $goal[] = `colorAtPoint -u $u -v $v ramp1`;
particleShape1.goalPP=$goal[0]*0.8;
particleShape1.goalU=$u;
particleShape1.goalV=$v;
Basic setup as follows. Create a nurbs plane and a closestPointOnSurface node.
Write this in the command line...
connectAttr nurbsPlane1.worldSpace closestPointOnSurface1.inputSurface;
Draw a grid of particles above the plane and make a goal between the two, set the weight to 1. Create a goal U and V per particle attr. Now all you do is input ramp1 onto your plane and keyframe it, copy and paste the code as runtime and push play!
pollart
10-24-2008, 02:14 PM
hi Aikiman (http://forums.cgsociety.org/member.php?u=174420)
when i write on command line it is giving this error
// Error: The destination attribute 'closestPointOnSurface1.inputSurface' cannot be found.
am i missing any step?
i created a plain and typed on command line > connectAttr nurbsPlane1.worldSpace closestPointOnSurface1.inputSurface;
thanks in advance
Aikiman
10-24-2008, 09:26 PM
You need to create a cPOS node first by typing this in the command line...
createNode closestPointOnSurface;
now connect your nurbsPlane to the cPOS node
pollart
10-25-2008, 04:49 AM
thanks Aikiman (http://forums.cgsociety.org/member.php?u=174420)
i am a bit new to this particles but i am managed to do most of the work by taking help from you guys. thanks to you and every one who is here
well i am really confuse with these nodes in connection editor. where can i see all the nodes before i create them from mel? so that i can decide which one should i create.
i am interested to learn more of it. could you please suggest me the way how to learn about all the nodes? i dont mind to buy if there is any DVD out there? or online tutorials would be great.
any help would be appreciated
thanks dude
Aikiman
10-25-2008, 05:36 AM
Well the only node I mainly use that you "cant" see before you use it is the closestPointOnSurface node. Some other nodes are loaded when you load certain plugins, but the only ones you really need to worry about already exist in the Render Nodes in hypershade. If you want to learn about those ones, Digital Tutors has a DVD out on them.
pollart
10-25-2008, 06:19 AM
hi do you know the title of the DVD?
thanks
Aikiman
10-25-2008, 07:41 PM
hi do you know the title of the DVD?
thanks
Mastering Maya Render Nodes (http://www.digitaltutors.com/store/product.php?productid=91&cat=41&page=2)
cosku
10-26-2008, 06:26 PM
Hey Jeremy,
I didn't try applying what you describe yet, but from intuition, I feel like doing that will just turn on the goal-behavior for the parts the ramp goes to.
I think what johnjoe is asking is how to control goalU & goalV depending on where the animated ramp goes, which is tricky indeed.
Aikiman
10-26-2008, 08:07 PM
Hey Jeremy,
I didn't try applying what you describe yet, but from intuition, I feel like doing that will just turn on the goal-behavior for the parts the ramp goes to.
I think what johnjoe is asking is how to control goalU & goalV depending on where the animated ramp goes, which is tricky indeed.
Yes, my method is pretty basic I admit. Im not sure if johnjoe has had any success yet.
CGTalk Moderation
10-26-2008, 08:07 PM
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-2012, Jelsoft Enterprises Ltd.