Jump to content

Vops-vex Surface Shader - Referencing Point Info?


Recommended Posts

Getting access to point information for specific groups in the context of vex geometry operators is easy enough: Create a parameter that accepts geometry as input, then use a for loop with a 'point in group' operator connected to an 'import attribute' operator to get all of the necessary information (there isn't an easier way, is there?). Great, if you're working in that context.

But what do you do in the case of vex surface shaders, which lack the 'point in group' and 'import attribute' operators (I'm assuming all shader contexts don't have these)?

I know that in Renderman, shader writers sometimes use lights to pass along certain bits of data, and I'm sure that even using Mantra, I could potentially setup a network that could pipe in the point data I need through dozens of lights (probably with a lot of unnecessary overhead). Or alternatively, I could potentially save all of the point info I need to an image3d texture, and load that up with the 'texture 3d' operator within the vex surface shader.

Both ways could potentially work, but they're both a little... awkward. Just want to check and see if there's a better way to get access to point info of specific groups before I start trying anything like that. Any tips? :blink:

Sorry if this has been asked before. Search didn't turn up anything. :unsure:

EDIT: Just one more point to note: The import point info in this particular case is world-space position and edge connections. The specific points I need are not a part of the mesh that the surface shader is attached to.

Link to comment
Share on other sites

Edge connections might be difficult since an "edge" doesn't really seem to mean anything in Houdini. There's a discussion going on about this on the SideFX forum the last couple days. Points though, points shouldn't be difficult to get at, Just cache out the points you want the information from which aren't a part of your surface and look into the point cloud functions, pcopen, pciterate, pcimport, pcclose, etc. You could potentially use a texture or whatever but a point cloud would be more appropriate.

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