Jump to content
ikoon

CHOPs, VEX and the future of chops in Houdini

Recommended Posts

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 to chop.PNG

vex read chop.hiplc

Edited by ikoon

Share this post


Link to post
Share on other sites

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.

 

Untitled-1.jpg

ap_vex read chop.hiplc

Edited by Atom
  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

You can back tick hScript code into a vex expression but that is getting messing.

v = `chop("/ch/ch1/wave1/chan1")`;

 

Share this post


Link to post
Share on other sites
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?

  • Like 1

Share this post


Link to post
Share on other sites

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/anticipation
http://the12principles.tumblr.com/post/84177204689/follow-through-overlapping
http://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 by ikoon

Share this post


Link to post
Share on other sites

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.

VEX_chop_detail.png

  • Like 1

Share this post


Link to post
Share on other sites

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.

 

chattr.PNG

Edited by ikoon

Share this post


Link to post
Share on other sites

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 by dedeks3000
error
  • Like 1

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 by dedeks3000
correction
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×