FORUMS: list search recent posts

goalPP weighting script/expression

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
andrew strautz
goalPP weighting script/expression
on Jun 29, 2008 at 8:07:37 am

I have a tail set up with a dynamic spline and I'm trying to add a little more animation support to it by adjusting the weight of the goalPP attributes of the particles fallowing the goal spline however I am not sure how to script for particles at all.

pretty much I want to take attribute from cube1 (for an example) like PPweight and connect it via expressions/mel to the goalPP weight of particles [order] 4&5 (for respective sliders) but I haven't found a line of code i can completely dissect to figure it out on my own...

i saw another post on here for particle scripts and I'm hoping that one of those wizards can help me out with this problem =P the only reason i can give as much information as i have is by reading the documentation however i may have passed over something that would explain this a little better, if you know its spesificaly in the docs let me know ^^;

thanks in advance!


Return to posts index

andrew strautz
Re: goalPP weighting script/expression
on Jun 30, 2008 at 1:03:49 am

I actualy figured it out on my own after beating my head against it for almost a week.

to isolate the a particle its not a matter of simple connections as you would in comon object expressions where A=B in the case of working with particles you need an extra step.

1) define the particle
2) assign the particle

to use this method you need to select the particle shape node and select a channel (dosent matter which one) and open the expression editor to create a runtime expression (runtime before dynamics)

so i used the fallowing script:

if (particle1Shape.particleId == #){
particle1Shape.goalPP = pCube1.goalPPweight;

where the "#" is your particle
particle1Shape is your emitter/particle shape node/object
and pCube1 is your control object with the attribute you want to connect the goal weight to.

I hope that this helps someone in the future, or maybe it will still be here when i need to reference it in the future. cheers to all!

Return to posts index

Alvaro Castaneda
Re: goalPP weighting script/expression
on Jun 30, 2008 at 3:10:09 pm

Hi Andrew
NIce job man, glad to know you solved it.

I usually do those kind of things like tails, cables, etc, with the hair system, you should try it, you can adjust the stiffness, drag, etc, also add collision constraints and is very, very, very fast to calculate.

varomix - pixelEater

Return to posts index

andrew strautz
Re: goalPP weighting script/expression
on Jun 30, 2008 at 10:53:10 pm

well the thing is that I'm rigging something that I plan on releasing to the public so I'm taking into account the lowest common denominator, IE complete doesn't use hair, so in substitution straight dynamics will have to do that and in theory this will be the only dynamic object in the scene initial so it should solve quickly on its own anyway.I know how to do the same thing with hair though I'd rather not have a follicle in the scene since hair creates 2-3 additional and mostly redundant nodes (granted on a rig it should be hidden or deleted but its just overhead and setup steps)

also going a little out of my safety zone by using expression on this one so I'm hoping things will turn out all right ^^;

Return to posts index

Deepak Mistry
Re: goalPP weighting script/expression
on Mar 16, 2009 at 1:45:35 pm

hello sir

please give at least one jgp image for this for understand

thanking you,

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved