Jump to content

several somewhat interesting shader questions..


anupamd

Recommended Posts

1. How do I bring in point attributes from SOP level into a shader. (for example, say I have a curvature point attribute that Im trying to use in a shader)

in vops i've tried "attribut"e and "import surface variable" but nothing works. "attribute" using cd seems to work in VOPS, but any custom attribute does not.

2. I'm trying to bake out micropolygon displacements out of houdini so that I can generate normals in something like xnormal...etc. is there a good workflow for this, i've read through several threads about this topic and it seems like no one has yet come up with a good pipeline. Seems like this is a super easy thing.. or is it one of those "super easy in other apps, but super hard in houdini" things? Any examples, or links to other topics would be appreciated.

3. On the topic of micropolygon displacements, is there any way to convert mucropolygon displacements into an actual mesh. Im thinking.. some kind of .. point cloud bake the build an SDF volume from that,and then use volumesurfacer to get the polys. Or if there is a simpler way. Anything to get me started in the right direction would be awesome.

Thanks!

-A

Link to comment
Share on other sites

1. How do I bring in point attributes from SOP level into a shader. (for example, say I have a curvature point attribute that Im trying to use in a shader)

in vops i've tried "attribut"e and "import surface variable" but nothing works. "attribute" using cd seems to work in VOPS, but any custom attribute does not.

use the 'Parameter" node in a shader (also works in SOPs)

2. I'm trying to bake out micropolygon displacements out of houdini so that I can generate normals in something like xnormal...etc. is there a good workflow for this, i've read through several threads about this topic and it seems like no one has yet come up with a good pipeline. Seems like this is a super easy thing.. or is it one of those "super easy in other apps, but super hard in houdini" things? Any examples, or links to other topics would be appreciated.

This should be easy if I understand what you want. Do you know how to render in UV space using the "UV object" parameter on the mantra node?

Once you have that you can just plug your normals into the Cf output in the shader. you will get your normals. If you happen to have a disp shader it will render those normals.

I attached an example.

3. On the topic of micropolygon displacements, is there any way to convert mucropolygon displacements into an actual mesh. Im thinking.. some kind of .. point cloud bake the build an SDF volume from that,and then use volumesurfacer to get the polys. Or if there is a simpler way. Anything to get me started in the right direction would be awesome.

Thanks!

-A

Yup, you can write point clouds from a shader. You would need the normals, then you can use iso offset in point cloud mode to make the mesh.

Might work? would be a very heavy mesh though.....

renderNormals.hip

Link to comment
Share on other sites

THANKS for the reply, I will try your rendernormals trick now. But speaking of using pointclouds, why would I need the normal as well in the pointcloud info?

How would I utilize the normals in sop space then?

-A

use the 'Parameter" node in a shader (also works in SOPs)

This should be easy if I understand what you want. Do you know how to render in UV space using the "UV object" parameter on the mantra node?

Once you have that you can just plug your normals into the Cf output in the shader. you will get your normals. If you happen to have a disp shader it will render those normals.

I attached an example.

Yup, you can write point clouds from a shader. You would need the normals, then you can use iso offset in point cloud mode to make the mesh.

Might work? would be a very heavy mesh though.....

Link to comment
Share on other sites

I think the iso offset node needs normals on the points in pointcloud mode.

But this seems like a very roundabout way to do it ... I'm not sure of any other surfacing techniques that would help though ...

Edited by sam.h
Link to comment
Share on other sites

3. On the topic of micropolygon displacements, is there any way to convert mucropolygon displacements into an actual mesh. Im thinking.. some kind of .. point cloud bake the build an SDF volume from that,and then use volumesurfacer to get the polys. Or if there is a simpler way. Anything to get me started in the right direction would be awesome.

If you need the exact micropolygon detail in SOPs I think your mesh would become too heavy especially when generating the surface from the pointcloud. You could however use the pointcloud to transfer the position data to your original mesh (assuming it is reasonably subdivided).

I would do the displacement part in SOPs right away using a VOP SOP. See this thread for an example: Procedural Stones/Rock

If you want to use a texture instead of a procedural pattern you can use the colormap VOP.

-dennis

Edited by dennis.weil
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...