Jump to content

attribute vop/wrangle solver sop question


Recommended Posts

Hello,

I currently am having an issue evaluating with stating "if value of attribute X was 1 on previous frame, it will be 1 on current frame."

I'm not great with VEX coding, but thought it would be good to discover solution. I have inside of a solver sop current frame in input1 and previous in input2. 

In an attribute vop, I compare said attribute by dropping two getattrib > compare previous to current greater than > ....if begin and end blocks are where I am stuck.

Any advices will be appreciated.

**edit**

I can't upload a file at moment, but will later when home. It seems basic but having difficulties with. Thanks you for any help. I will continue to solve in meantime.

Edited by genesys
Link to comment
Share on other sites

Try this. 

Throw down an attribute wrangle inside of your sop solver. Make sure the "current frame" is in the first input, "previous frame" in your second input. 

i@attribute;

@attribute = max(@attribute, point(1, "attribute", @ptnum)); 

This should work if your values are just between 0 and 1 for your point attribute. Let me know if you need explanation on the text. 

 

  • Like 1
Link to comment
Share on other sites

Thank you all. All of the methods mentioned gave me results I was after. 

@mestela

I actually had to implement similar with velocity. I just manage to do it in sops with a point cloud, transferring the vel from animated geo to fracture points.

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...