Jump to content

What is faster to execute VEX or expressions


meshsmooth

Recommended Posts

What is faster to execute a VEX built operation or an expression? It is a general question but I just want to know where I should focus.

I have made some rather fancy character rigs in the past with other software (animation master) with plenty of complexity under the hood. I was wondering if I was to set up a leg system would it be the done thing to rig it in a vex chops thing

Link to comment
Share on other sites

What is faster to execute a VEX built operation or an expression? It is a general question but I just want to know where I should focus.

I put down a point SOP and stuck the following expression in the Y component of the position: $TY + sin($F+$BBX*360).

I then built a VOP net to mimic the behaviour of the point SOP.

I then fed a 100x100 mesh into both deforming SOPs and opened up the "Performance Monitor". Here are my results:

Point SOP:

Creation time: 5 seconds

Execution time: 250 ms. per cook (100x100 mesh)

Execution time: 1 second (200x200 mesh)

VOP Network:

Creation time: 4 minutes

Execution time: 15 ms. per cook (100x100 mesh)

Execution time: 60 ms. (200x200 mesh)

The VEX code is roughly 16 times faster. However, it would take almost 1000 cooks of the SOP to make up the time it took me to build the VOP network. Of course, there's a lot less frustration when the geometry cooks faster.

P.S. I didn't spend too much time trying to optimize the VOP network.

Link to comment
Share on other sites

From what I've heard, VEX Chops are not parallelized as well as VEX Sops.

For character rigs, interactive performance is also very important. This means that you want your CHOPs to cook only the current frame, not the entire frame range. In that case, you'll be able to parallelize at most the computation for each track which won't really nearly give you the speed up you otherwise would get with VEX Sops. Plus many things you would want to do in character rigging, it's not possible to parallelize across tracks. Things like matrix transforms manipulation.

Having said that, complicated expressions are not necessarily the best way either. If you can do them with native Objects or CHOPs, then that would be the way to go. It all really depends on what you want to do.

Link to comment
Share on other sites

well for example a leg rig has constraints like "look ats" and translation and orientation between say 6 controller objects... now I can see all the tools in vex with the vector quats matrix stuff ect. All the things I would use in a rig. So I am wondering is are they put in there for me to use in rigging or what? Or they just tools that can come in handy so they are added to be a full tool set.

Link to comment
Share on other sites

Hmmm sounds like a challenge...

Not to toot my own horn (warning horn tooting in progress) but in animation master.... yes it isnt used by the indastry but it dose have the best character rigging tools. I almost reached rigging nirvana. There were a few things you had to do that were non intuitive and moving bones to re compensate. That was only one or two over a whole rig, small problems that were found because I was at the limit of the tool set. It was pretty fast too. But that is mostly thanks to the fast constraints of animation master.

This is a new ball game I can hardly crawl at the moment in Houdini. At the moment I am focusing on trying to make a VEX SOP that can displace on a bent vector I think I have most of the concepts and I think my theory is sound but I am stuck on a few points. The first is I didn

Link to comment
Share on other sites

What is faster to execute a VEX built operation or an expression? It is a general question but I just want to know where I should focus.

I put down a point SOP and stuck the following expression in the Y component of the position: $TY + sin($F+$BBX*360).

I then built a VOP net to mimic the behaviour of the point SOP.

I then fed a 100x100 mesh into both deforming SOPs and opened up the "Performance Monitor". Here are my results:

Point SOP:

Creation time: 5 seconds

Execution time: 250 ms. per cook (100x100 mesh)

Execution time: 1 second (200x200 mesh)

VOP Network:

Creation time: 4 minutes

Execution time: 15 ms. per cook (100x100 mesh)

Execution time: 60 ms. (200x200 mesh)

The VEX code is roughly 16 times faster. However, it would take almost 1000 cooks of the SOP to make up the time it took me to build the VOP network. Of course, there's a lot less frustration when the geometry cooks faster.

P.S. I didn't spend too much time trying to optimize the VOP network.

Nice stats. Interesting point about the 1000 cooks.... :)

You can easily get 100,000s of cooks in a session.

Like the IK solver has to cook every time you move the goal.

Its amazing the amount of work Houdini does behind our backs.

jim.

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