modify point attribute

   2807   2   0
User Avatar
Member
75 posts
Joined:
Offline
Hi guys, quick question.

Is there a way to set up and use an attribute to flag a piece of geometry for only a certain number of frames?

in code, I'm thinking like add an attribute called separated,
set it to 0,

then modify it with some expression to set separated to 1.

then for every frame after that, if separated is already 1, it should always stay as 1, even if the original modification expression would evaluate it back to 0 again. basically a one way switch attribute.

I know the nature of sops may not handle this, so is this a case for a sop solver within dops?

if it would be possible to do it in sops tho that would be ideal.


if anyone has any ideas that'd be awesome.

thanks in advance

-johnc
User Avatar
Member
1909 posts
Joined: Nov. 2006
Offline
You should be able to do it fairly easily using CHOPs. Just set up a trigger to detect the activation and don't have it decay. You can then use that channel to output a value of 1 using something like a Channel SOP.

Edit: Attached an example file. The condition is driven by an expression on the Channel CHOP and used to trigger a non-decaying signal that adds 1 (or whatever value you want) to the original value and then is read back into SOPs with a Channel SOP.

Attachments:
chop_modify_attribute.hip (38.6 KB)

Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
75 posts
Joined:
Offline
Graham, thank you for your example file, it helped. but now that I'm trying to put it into use, I'm still not sure if this is going to get me what I want.

I am confused about the “animated” parameters on the geometry chops. I'm using those to feed in 2 parameters, “distance” and “separated”

every time I turn on “animated” on the geometry nodes in the chopnet
and the channel operator, houdini goes into a total updating feedback loop and never stops computing

say I have 2 cubes and their points are overlapping, as they separate I am testing for distance between the points that are near each other, and once they reach a certain distance I want to flag that point as “separated”

but in “animated mode” it seems to never stop computing, and in “static” mode it seems to always use the same value from the first point or something.

I know I need to read the mainual, and watch some tuts, but i am deep in the middle of prod and need to get something working for this Asap.

hope this makes sense.

thanks :-)

-johnc
  • Quick Links