Jump to content

Access geometry from custom VEX function


Recommended Posts

Hi, 

Does anyone the how I to access the input geometry from a custom VEX function.  I know I can use the path of the node as an argument and get the input geometry, but is there anyway to create a VEX function that can access the current geometry?

For example, I have a pointwrangle node and I create an attribute, then I call my custom VEX function, how can I get access to that geometry?  Or would that have to be handled by something like a VEX_GeoCommand and it's only possible to access the input geo from the HDK?

 

Thanks,

Tom

Edited by MrScienceOfficer
Link to comment
Share on other sites

I doubt it's possible. What kind of problem you're trying to solve this way?

 If you need something very specialized, you could create a custom SOP with CVEX engine inside, reverting - so to speak - the problem. Now you own the geometry, and you send to VEX whatever you want, but this is completely different setup. 

Link to comment
Share on other sites

For now, I have an point array attribute that represents the connectivity a hierarchy, so I want to be able to traverse the hierarchy.  Without recursion thats a huge pain in the butt.  Using a primitive array instead and detail array for a map might help a bit, but I'm not sure if it really solves the recursion issue.  

I've been debating using CVEX, basically what I'm doing is developing a SOP based bone system.  More specifically, my intention is develop a way to build a control rig using a GU_Detail that gets evaluated in VEX, this way I can solve the rig programmatically.

My issue was using CVEX didn't solve my problem of accessing geometry in a custom VEX function, but what your saying make sense, it doesn't really matter anymore, I can do whatever I need to in C++ first then send it to VEX. 

My only question now is would that potentially be inefficient?  Meaning to say, would a wrangle node be more significantly more efficient due my ignorance/inability to implement my custom CVEX engine the same way?

Link to comment
Share on other sites

Thinking this through a bit more, I could probably make this quite efficient as a specialized rig evaluating engine.  I'm sure the hard part will be the writing the "pre-compiler" to replicate how the wrangle set up works, cuz what fun would it be otherwise.

 

For now I'm gonna hack it, faking recursion over a hierarchy isn't that hard. :)

 

Thanks!

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