Jump to content

How to record the maximum value for Position?


Recommended Posts

hi evryone i have a grid that move up and then move back down so i want to creat attribute that it will record the $TY for evry point and when the $TY take the maximum value for example 1 the attribute will stop record the the position of the Y when it will come to be less than the maximum : i mean $TY it will be in the first 0 and then it will go up to 1 and then back down to 0 over the time i want to create attribute reccord this value when it will go up just and stop record it when it will back down

i used this expression but it dos't work: if( $TY>$ATTRIBUTE(1) , $TY , $ATTRIBUTE(1) ) as i seid didn't work and in the case of particles attribute it is work

so ................... how to do that ?

Link to comment
Share on other sites

hi evryone i have a grid that move up and then move back down so i want to creat attribute that it will record the $TY for evry point and when the $TY take the maximum value for example 1 the attribute will stop record the the position of the Y when it will come to be less than the maximum : i mean $TY it will be in the first 0 and then it will go up to 1 and then back down to 0 over the time i want to create attribute reccord this value when it will go up just and stop record it when it will back down

i used this expression but it dos't work: if( $TY>$ATTRIBUTE(1) , $TY , $ATTRIBUTE(1) ) as i seid didn't work and in the case of particles attribute it is work

so ................... how to do that ?

Pull it into CHOPs using a Geometry CHOP - and then you can use the icmax() expression on the CHOP to extract the bounds of any channel.

Link to comment
Share on other sites

and are there any way to do it within attribute in the sop...............

No, there is not a builtin expression that'll look through an animation range and do this for you. You have to get it to process an animation range, right? I think it'd be a tricky ForeachSOP with TimeOffsets in it to do this. It's about 2 nodes to do it through CHOPs.. CHOPnet, Geometry CHOP - and then you can use the EnvelopeCHOP or some other effects if you want extended behaviours.

Link to comment
Share on other sites

No, there is not a builtin expression that'll look through an animation range and do this for you. You have to get it to process an animation range, right? I think it'd be a tricky ForeachSOP with TimeOffsets in it to do this. It's about 2 nodes to do it through CHOPs.. CHOPnet, Geometry CHOP - and then you can use the EnvelopeCHOP or some other effects if you want extended behaviours.

take a look to the hip . it is recorded the value for the Y position in particles and if this think to go down it will stop and save the last maximum value for it but with the chop i couldn't to do that it just catch the maximum value .............. and the same expression in particles don't work in sop level ...and this is not an builtin expression, it is (if) expression................

record_the_max_value.hip

Link to comment
Share on other sites

That's the key difference between SOPs & POPs. SOPs do not retain values over time as you've found out while POPs is an iterative process so you can set the maximum value and not have it reset.

CHOPs is the other way to do this and recently, there were other similar posts to retaining a value using a Lag CHOP.

Maybe you can look into writing a Python SOP to do this?

Cheers!

steven

Link to comment
Share on other sites

That's the key difference between SOPs & POPs. SOPs do not retain values over time as you've found out while POPs is an iterative process so you can set the maximum value and not have it reset.

CHOPs is the other way to do this and recently, there were other similar posts to retaining a value using a Lag CHOP.

Maybe you can look into writing a Python SOP to do this?

Cheers!

steven

can't find this posts can you help......................

Link to comment
Share on other sites

so if any one know where is the post about use chop lag node to get the maximum value put it here and thanks................

That's still using CHOPs, though. If you're in CHOPs, use the Envelope CHOP - or just try the Lag CHOP and check the results out.

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