Jump to content

Creation attribute in pop ...


Recommended Posts

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?

Link to comment
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. :)

Link to comment
Share on other sites

  • 3 years later...

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

Link to comment
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.

Link to comment
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.

Link to comment
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! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...