ikoon Posted October 26, 2016 Share Posted October 26, 2016 (edited) I am looking for a VEX equivalent of chop() expression. I have tried the ch() function as attached. I know, that ch() in the Wrangle is usually used to read the Parameter from the Interface. But the help file says "Evaluates a channel (or parameter) and return its value." Am I close, please? What is the best practice for this? vex read chop.hiplc Edited October 27, 2016 by ikoon Quote Link to comment Share on other sites More sharing options...
Atom Posted October 26, 2016 Share Posted October 26, 2016 (edited) A simple way is to just add a float value to your wrangle and then explicitly export from CHOPS to that float. then VEX can just read the local value directly. ap_vex read chop.hiplc Edited October 26, 2016 by Atom 2 Quote Link to comment Share on other sites More sharing options...
Aeoll Posted October 26, 2016 Share Posted October 26, 2016 I had this issue a couple of days ago and was intending to post the same question. @Atom Can the parameter creation can be skipped so the chop is referenced directly in the wrangle? That's the question being asked here. Quote Link to comment Share on other sites More sharing options...
fsimerey Posted October 26, 2016 Share Posted October 26, 2016 You can get it with a Channel SOP, then use it in wrangler node. See attached file. VEX_CHOP.hip 2 Quote Link to comment Share on other sites More sharing options...
Atom Posted October 26, 2016 Share Posted October 26, 2016 You can back tick hScript code into a vex expression but that is getting messing. v = `chop("/ch/ch1/wave1/chan1")`; Quote Link to comment Share on other sites More sharing options...
Aeoll Posted October 26, 2016 Share Posted October 26, 2016 22 minutes ago, Atom said: You can back tick hScript code into a vex expression but that is getting messing. v = `chop("/ch/ch1/wave1/chan1")`; The time dependency is lost when HScript is backticked into a wrangle so this won't work for an animated channel? 1 Quote Link to comment Share on other sites More sharing options...
ikoon Posted October 27, 2016 Author Share Posted October 27, 2016 (edited) Thank you very much! I have tried these approaches: A] backtick method - unfortunately it seems to evaluate only on the first frame B] export chop - I have tried to make it "automatic" with this code in the export chop: `run("chopls ../OUT")` - everything works fine, but if I add channel, I have to restart Houdini (or delete/undo the chopnet) to make that `run` code initialize (you can see the attachment and try to add more channels). C] channel sop and geometry sop - this combination is great, but what if I would like to have just one channel to affect one detail attribute and not to evaluate all the points? It seems to me, that CHOPnet in Houdini is quite "abandoned area". Am I right? I am quite new to Houdini. Everything seems to be a workaround in chops: - for example the `run(chopls)` backtick listing, generated by Motion FX. It is a combination of HScript() and Expression language - also that UI message "Overridden by /obj/geo1/chopnet1/export1" - it seems, that there is no vex equivalent of chop() expression I would love to use chops to make the animations visually appealing using chops and these principes. I think that these principles work not only in the cartoon, but also in VFX and Motion design: http://the12principles.tumblr.com/post/84179271499/anticipationhttp://the12principles.tumblr.com/post/84177204689/follow-through-overlappinghttp://the12principles.tumblr.com/post/84179300674/squash-stretch What do you think will be the future of Chops? I mean, is there a market for these simple "nonvfx" chops/vex? Are people using it? I see the chops to be somehow distracted (motion fx / agents / animation layers / ui implementation). On one hand, CHOPs seem to be everywhere in Houdini, but on the other hand ... that `run("chopls ../OUT")` vex read chop - A - backtick - v0.hiplc vex read chop - B - export chop - v0.hiplc Edited October 27, 2016 by ikoon Quote Link to comment Share on other sites More sharing options...
fsimerey Posted October 27, 2016 Share Posted October 27, 2016 For C solution, i will copy detail attrib on a single point, use it as a point attrib in chopnet, then copy again to the original geometry. See attached screenshot. 1 Quote Link to comment Share on other sites More sharing options...
ikoon Posted March 2, 2017 Author Share Posted March 2, 2017 (edited) I have tried this new VEX function "chattr" but unfortunately I have not succeeded:https://www.sidefx.com/docs/houdini/vex/functions/chattr It is strange, that I got "undefined function" error. I think I am doing it wrong, but also ... isn't it a bug? I am not that skilled to decide. Edited March 2, 2017 by ikoon Quote Link to comment Share on other sites More sharing options...
dedeks3000 Posted March 2, 2017 Share Posted March 2, 2017 (edited) I think that your "chattr" function is used with the wrong input . From the docs , the function read value from the connected CHOP input Edited March 2, 2017 by dedeks3000 error 1 Quote Link to comment Share on other sites More sharing options...
ikoon Posted March 2, 2017 Author Share Posted March 2, 2017 Dedeks, you are right. In the Channel Wrangle, the function is working. So my old question probably remains unanswered with H16 ... or can we reference CHOP directly from the SOP wrangle in H16? Quote Link to comment Share on other sites More sharing options...
dedeks3000 Posted March 2, 2017 Share Posted March 2, 2017 (edited) For me , the Atom method seems OK but instead of using the export flag in your parm , just use the chop() expression directly , and in your code just reference your parm with ch() expr. Concerning CHOP and his future , Houdini 16 come with really good stuff , look at the constraint system and the channel Wrangle . On the other hand, accessing chop data directly from vex code would be great vex read chop.hipnc Edited March 2, 2017 by dedeks3000 correction 1 Quote Link to comment Share on other sites More sharing options...
dyei nightmare Posted September 19, 2018 Share Posted September 19, 2018 great topic, and i think we should keep wondering a way for this, cause could be useful 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.