pop custom attributes

   2710   5   0
User Avatar
Member
27 posts
Joined: Sept. 2009
Offline
Hi,

I'm simulating a smoke stack, and I have particles shooting upwards. When they reach a certain height I put them in a group via bounding box. I then assign a custom attribute “top_counter” in an effort to ramp up to the wind force that I'm applying to particles just outside of the smoke stack.

I know how to add an attribute, but I'm not sure how to update that attribute once it has been created. Can I update it with the same create attribute node, or do I need another node. I'm thinking it's some sort of channel function, that I don't know about but I'm just guessing at this point.

thanks,

James
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
You can update the attribute with another attribcreate.
.
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi James
See attached for a demo scene of attribute manipulation using a VOP SOP. Using a VOPSOP is the way to go as you can manipulate multiple attributes within a data stream.

Open the details view and note how I create a point attribute based on the point normal . Select the VOPSOP and PIN the details view open > dive inside the VOPSOP with the details view pinned you can now see any updates you make within the VOPSOP update automatically.
I have imported myattr and then I am doing a simple multiplication, then output the attribute. Jump up one level > adjust the slider and increase the multiplier note the values change for your attribute in the details view change.

Hope this helps

Rob

Attachments:
rse_attributeManipulation.hip (73.1 KB)

Gone fishing
User Avatar
Member
27 posts
Joined: Sept. 2009
Offline
Hi,

That example was cool in showing how to do this with a vopsop, but it still doesn't accumulate each frame. I know how to change the value of an attribute with the attributeCreate->writeValues section, but I don't know how to update that attribute each frame with a new value. Anybody have a solution for that?

thanks,

James
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
If your talking about updating an attribute based on it's previous value, you would need to do this in DOPs, or in the new solver sop (which is actually in a dopnet anyways).

To try it, make a sphere, and plug it into the solver sop. In the solver sop, below lastframe put a point sop. Put $TX + 1 in tx. Now go back outside of the solver sop and hit play.
.
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
That example was cool in showing how to do this with a vopsop, but it still doesn't accumulate each frame. I know how to change the value of an attribute with the attributeCreate->writeValues section, but I don't know how to update that attribute each frame with a new value. Anybody have a solution for that?

Hi
Your original post did not ask for a value that increases over time. Your question was about altering an attribute once it had been created. You don't need Dops to do this.

See attached for an example. The example shows an increasing value over a user defined frame range. so you can pick the start and end frame. Use the ramp to increase or decrease the attributes value.

Rob

Attachments:
rse_vopsop_attributeChangingoverFrame.hip (86.6 KB)

Gone fishing
  • Quick Links