Jump to content

VEX Shadeop ideas


Recommended Posts

Hi,

I need to write a VEX Shadeop that is pretty simple, it needs to check to see if the current geometry being shaded is in a primitive group and return 0 or 1.

The Primitive group list to check against will be in a text file specified as an argument to the VEX function. Mario's awesome data caching example will allow this to be as efficient as possible by loading and storing the text file once.

I can do most of it but I haven't use the HDK in over a year (tip: Don't become a manager if you want to retain your Houdini/HDK knowledge!) and my little brain isn't coughing up an idea on how to access the geometry being shaded from the shadeop to look for the group.

Any ideas? Pseudo code, a class to look in etc gratefully welcomed.

Cheers,

Peter B

Link to comment
Share on other sites

Were you able to figure this out?

If so I'd love to know how its done... I cant seem to get HDK VEX functions working at all, including the example with the drand48() and time() functions.

Nope, though I did get Mario's caching example from another thread working OK.

The trick with HDK VEX functions is the VEXdso index file to find the .dso file. You can test it easily by doing:

vcc -X surface

which will print all custom VEX functions at the bottom of the list. If you compile and install then do the above but don't see it, then it just wasn't found, likely due to the VEXdso file not being correctly configured.

Cheers,

Peter B

Link to comment
Share on other sites

Guest xionmark

Hi Peter,

It's been awhile since I wrote any VEX ops, but it wasn't all that difficult, maybe things have changed(?).

Have you been able to write this yet? I can help out if you need another set of HDK eyeballs to look at the problem. :-)

Mark

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