chaindriver Posted September 8, 2012 Share Posted September 8, 2012 Hi, I have a parameter in the OBJ level that is animated. How do I get the min/max value of that curve? Is it by an expression or maybe CHOPs? Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted September 8, 2012 Share Posted September 8, 2012 I'm like 90% sure this is a CHOP issue because it's history and future dependent. I don't exactly know how to do but you will likely how to send the output to a file and then load it in again as a static file. Each time the animation changes you'll have to cook the file again. Unless there is some short cut expression that can do this. I think that's the only way. Quote Link to comment Share on other sites More sharing options...
edward Posted September 10, 2012 Share Posted September 10, 2012 Use a Fetch CHOP to fetch the channel. Now append an Expression CHOP and use the icmax() expression. Quote Link to comment Share on other sites More sharing options...
chaindriver Posted September 11, 2012 Author Share Posted September 11, 2012 Just tried the icmax (and icmin) expression and it works like a charm. Thanks guys! Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted September 29, 2020 Share Posted September 29, 2020 Hi, I know this is a super old thread, but I'm trying to accomplish the same thing with no luck. I attached a simple example file. I'm trying to have CHOPS overwrite the speed attribute with the maximum speed that each point reaches over the course of the animation. Ultimately, I'd like to know the maximum value any of the points reaches. I'd appreciate if anyone could point me to what I'm doing wrong. Thanks! chop_help.hipnc Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 29, 2020 Share Posted September 29, 2020 If you change In method button to Animated you get Values . Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted September 30, 2020 Share Posted September 30, 2020 I do get values, but they change every frame, so clearly they're not the values I'm looking for. I need to get the maximum value the attribute reaches at any time over the course of the animation. Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 30, 2020 Share Posted September 30, 2020 In math range Trick chop_helpOD.hipnc Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted September 30, 2020 Share Posted September 30, 2020 Thanks for your help with the file! But the values here are still changing every frame, so it's not quite what I'm after. If I understand this correctly, what this setup seems to be doing is mapping the current speed of the points on the current frame to a range of 0 to 1, with respect to the maximum speed attained at any time. What I need is every point's actual maximum speed value, not a 0-1 mapping of it. Do you maybe have another idea how to get this data? Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 30, 2020 Share Posted September 30, 2020 Aha For What you exactly need this Just Curios Shuffle can SPLIT ALL samples and Math do maximum if I get You chop_helpODMAx.hipnc Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted September 30, 2020 Share Posted September 30, 2020 I really appreciate your help, it's just still not quite what I'm after (I hope I'm not asking too much). The speed attribute here is still changing per frame. I'll try to be as clear as I can: Let's assume that point X has @speed=1 in the beginning of the animation, @speed=5 in the middle, and @speed=3 in the last frame. I want to generate the attribute @max_speed=5. This value would be different per point, but would be constant throughout the animation, because every point has a definite maximum speed that it reaches. There are actually many situations where I find this info would be useful. Any time I'm modifying values with ramps, clamps and the like in VOPS and need some precision, rather than eyeballing it by plugging into the Cd output. Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 30, 2020 Share Posted September 30, 2020 Please just make one example in VOPS ... Max1.hipnc Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted October 1, 2020 Share Posted October 1, 2020 (edited) But now all the points have the same value, that can't be right. I think the Combine Channels operation on the Math node makes it take the maximum value any of the points reaches, and applies that value to all of them. Look here at the info on the Geometry node - these are the values I want to extract per-point. Is there a way to turn these values into attributes on the points themselves? So, for point 0, @max_speed = 2.1371527. For point 1, @max_speed = 2.371021, etc... I'm trying all sorts of approaches and can't get it to work. I found the function chinputlimits in the documentation, maybe that's the key? I'm just so inexperienced in CHOPS I don't seem to be using this function correctly in my attempts. Edited October 1, 2020 by jamesearnest244 Quote Link to comment Share on other sites More sharing options...
Librarian Posted October 1, 2020 Share Posted October 1, 2020 make something Please Max1box1y.hipnc Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted October 1, 2020 Share Posted October 1, 2020 I added the simplest use case I can think of to the last file you attached - deleting all points that exceed a certain speed at any time. But I don't want to delete them only when they reach that speed - if they are going to exceed it at any point in the future, then delete them right from the beginning (that way the point count remains consistent). The last file you attached does assign consistent values to the points, but they're not the actual speed values. I'm not sure what they are. So the wrangle I put in doesn't do what it's supposed to. CHOPS_UseCase.hipnc Quote Link to comment Share on other sites More sharing options...
Librarian Posted October 1, 2020 Share Posted October 1, 2020 (edited) IDNOPROBLEM.hipnc try to Play with Those V= chinput(0, C, ch("offset")); V= chinput(0, C, I+ ch("offset")); //ID V= chinput(0, C, C*ch("offset")); V= chinput(0,C, I+C*ch(offset")); @jamesearnest244 Edited October 1, 2020 by Librarian Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted October 1, 2020 Share Posted October 1, 2020 I finally figured it out! I had to write icmax(0, $C) in the expression CHOP. When writing icmax(0,0) it was using the 0th channel's data and applying it to all the channels, instead of evaluating per channel. So writing $C in an expression CHOP is kind of like writing @ptnum in point wrangles. I'm attaching the file in case anyone else runs into this in the future. Thanks @Librarian for sticking around! Chops_MaxValue_Solution.hipnc Quote Link to comment Share on other sites More sharing options...
Librarian Posted October 1, 2020 Share Posted October 1, 2020 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.