Jump to content

SDF + Volume Sample Question


catchyid

Recommended Posts

Hi, 

According to Houdini Docs, IsoSurface (SDF, Ray Intersect) should produce a volume such that if a vortex inside the input mesh it has a negative value, zero at the surface, and positive outside. To test it, I used "Sample Volume" VOP, but I always get the same value?? When I render the volume it's rendered right, so I am not sure what I am doing wrong

In the attached image,  "depth" attribute has a constant value? In the volume sample node, I read the second input so it's sampling the IsoSurface SDF volume...

Thanks,

 

SDF.png

Link to comment
Share on other sites

couple of things:

- did you specify which input to read in your volumeSampleFile1 ? Either change the input dropdown menu to Second Input, or connect Opinput2 to the filename, or promote the parameter and fill the path appropriately

- make sure the output type is set to SDF Volume on the isoOffsetSOP

- do not use addAttribute. From the doc: https://www.sidefx.com/docs/houdini/nodes/vop/addattrib

Quote

This does not change the attribute values. To change the value of the currently processed element, see the Bind Export VOP. To change other elements or other attribute classes, see Set Attribute VOP.

Just replace it by a bindExport.

- Finally... last but not least, you are trying to find the depth of each point of the sphere. They are by definition on the surface of the sphere.
That means you should have the same value for all points: 0 = on surface.
You will however see the depth attribute with values >0. This is because your are sampling a volume that is a representation of your sphere. The higher the resolution of your volume, the closer the depth attribute will be to 0, and the opposite.

  • Like 2
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...