View Full Version : GoalPP with gaussian falloff
03-25-2010, 09:35 PM
I have a 101 span linear nurbs curve soft body. I would like to give the goalPP weights a gaussian falloff between the two ends and the center - iow, a smooth gradient from the ends to the center.
Does anyone know of a good way to do this?
What I hoped to do was set the goalPP of each end to one, and the center particle to a goalPP weight of zero, then use the paint attributes tool to flood with smooth.
Unfortunately, things do not appear to work that way. When I try to edit the goalPP weights using the paint attributes tool, I get the warning 'Select an object that has paintable attributes – so I am either using the tool incorrectly or goalPP attributes are not paintable.
Are goalPP weights paintable?
03-25-2010, 10:56 PM
no I don't think the goalPP weights are paintable...but if you select your particles in component mode (right click the particles and select "particle")....then select the particles you want to change. Open the component editor and under the particle tab you can change the goalPP....but its something you'd have to do by hand.
you could also try to set the goalPP in an expression...put a locator at the center of the plane and in the expression get the locator position and the particles position...then figure out the difference between the two and take the mag of that. then apply the goalPP with a linstep(0,the max distance,mag(difference))....or something like that.....not sure if this helps
03-26-2010, 12:32 AM
Thank you rxgeez, Too bad goalPPs are not paintable. I went with your second option. I used a locator like you suggested but used setRange and poci nodes to get the values.
Here is what I did. It looks more complicatated than it was because I kept the process dynamic so I could see the effect of the curvature control curve on the soft body. Also because I used linear curves as soft bodies then converted them to cubic surfaces at the end - for performace.
Create a linear, single span curve.
Rebuild keeping original, to a linear 4 span curve.
Rebuild keeping original to cubic.
Rebuild keeping original to 101 spans.
Rebuild keeping original to linear, with 101 spans (to get rid of the tangent controls) – flatten out this curve and freeze transforms.
The CVs of the first curve controls the length
The CVs of the second curve controls curvature
The third curve is intermediate
The forth curve is used to derive goal values
The fifth curve will be the goal object for the soft body
Select the fifth curve and make it soft – duplicate, hide original – weight of 1
Connect the fourth curve to a pointOnCurveInfo node
Connect the poci node's position to the translates of a locator
Connect the locators translateY to a setRange node
Set the parameter of the poci node to zero and set the setRange node's old max value to the translateY of the locator
Set the parameter of the poci node to 50 (or whatever span lies at the center) and set the setRange node's old min value to the translateY of the locator
Create a nurbs circle with a normal parallel to the soft body curve – this avoids popping
Extrude the circle along the soft cubic curve – rebuid the surface to cubic
for($i=(`particle -ct copyOfrope_softParticle -q`)-1;$i>-1;--$i)
setAttr pointOnCurveInfo1.parameter $i;
float $goalValue=`getAttr setRange1.outValueY`;
particle -e -id ($i) -at goalPP -fv $goalValue copyOfrope_softParticle;
Edit: This was modified because I forgot to put the extrusion values and I had written linear when obviously I should have said cubic.
03-26-2010, 12:32 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-2014, Jelsoft Enterprises Ltd.