Jump to content
Sign in to follow this  
wildparky

Creation attribute in pop ...

Recommended Posts

In the Attributes-tab of your split-POP you only need to set the drop-down-box to "set initial velocity"? You then have to set the Variance to zero and enter your expression in the Velocity fields.

Share this post


Link to post
Share on other sites

err... well, the velocities get affected by what you have going on in the rest of your particle system. If you don't want the velocities to change, don't apply any drag, force or anything after the split.

Share this post


Link to post
Share on other sites

maya particle expression is divided two type,

one is a creation expression, the other is a runtime expression.

i think that commonly '$VX,$VY,$VZ' is a runtime variable in houdini .

my splited particle's color is chaged by a changed velocity each frame .

----> $CR=dot(vector3($VX,$VY,$VZ), vector3(2,2,0))

i want someting like this

----> $CR=dot( a rest velocity(when it is birth), vector3(2,2,0))

then, $CR can have a constant value all the time .

isn't it possible by expression?

Share this post


Link to post
Share on other sites

Add Group POP:

Group Name: InitVelGrp

Rule (enable): $AGE == 0

--------------------------------------------

Add Attribute POP:

Source Group: InitVelGrp

Name: initvel

Type: vector

Value: $VX $VY $VZ

--------------------------------------------

Add Drag POP, open geometry spreadsheet, run simulation

and compare "V" and "initvel" attributes. :)

Share this post


Link to post
Share on other sites

I am trying a similar setup to use an attribute POP to create a variable to scale a geometry copied on a copy SOP.

at POP network:

group POP :

$AGE==0

attribute POP

source group = group

name = yscale

value = rand($ID )

on Details View, it shows me the yscale value correctly but I can't use this attribute at copy SOP.

thx for any help

cheers

Share this post


Link to post
Share on other sites

This is best done with the float pscale attribute. The Copy SOP will use this to scale your copies if present on your right hand template input points.

You can add pscale with a Point SOP or in POPs use the Property POP's Misc folder.

Share this post


Link to post
Share on other sites

Hello Old School!

thx, it worked perfectly!

just wondering why I can't use an attribute pop to pass information to copy sop instead?

kind regards

Share this post


Link to post
Share on other sites
Add Group POP:

Group Name: InitVelGrp

Rule (enable): $AGE == 0

--------------------------------------------

Add Attribute POP:

Source Group: InitVelGrp

Name: initvel

Type: vector

Value: $VX $VY $VZ

--------------------------------------------

Add Drag POP, open geometry spreadsheet, run simulation

and compare "V" and "initvel" attributes. :)

Even simpler, just add a name into the 'birth group' field of the split POP (or source POP), leaving 'preserve group' unchecked. I have 'bgroup' (for birth-group) in by default on all my source POPs, as that lets me easily tweak values at birth time.

Share this post


Link to post
Share on other sites
just wondering why I can't use an attribute pop to pass information to copy sop instead?

This is one part of the Copy SOP that is quite black box. Because the Copy SOP has to deal with the template attributes internally, it is difficult to support custom local variables.

You can use the point() expression to index in to the the right input template geometry but that get's slow.

Many times I just transfer the attributes from the template to the copied geometry then use a whole host of SOPs that use those transferred attributes to do stuff. Faster than using point() expressions.

leaving 'preserve group' unchecked.

I never make persistent groups from any source, location or split POPs. I leave that for a subsequent Group POP using the group from "source" option. Birth groups are great for initialzing stuff before the particles hit the first time step.

I have 'bgroup' (for birth-group) in by default on all my source POPs, as that lets me easily tweak values at birth time.

I usually use random group names like "just_born" "just_split". 'bgroup' is as good as any and is shorter. Good enough for me! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×