How to visualize gradient field in houdini? Thanks.

1,902 views
Skip to first unread message

yu zheng

unread,
Dec 3, 2013, 4:18:06 AM12/3/13
to openvd...@googlegroups.com
I am trying to implement the implicit surfacing ( siggraph 13 paper) in houdini with openvdb.  In the simple test of two adjacent spheres, it seems good, but totally wrong when applied to skeleton arms.  Some points go in the unexpected direction. I guess maybe there is something wrong with the gradient ( the blending iso value field looks like right ) . So I am wondering if there is some way to visualize the gradient field in houdini,  or I need to modify the OpenVDBVisualize node and use the color value to represent gradient vectors.  Any help is appreciated. Thanks a lot. wo
QQ截图20131203171522.png
QQ截图20131203171652.png

edward

unread,
Dec 3, 2013, 11:04:09 AM12/3/13
to openvd...@googlegroups.com
Offhand, using the Volume Slice in Houdini 12.5+ will be useful.

To visualize the entire field as colour, try renaming it to Cd using a Name SOP after creating it with VDB Analysis. You will also need to convert your SDF into a fog volume volume so that it gets visualized as a density field with Cd as the colour. I don't have Houdini in front of me though (on vacation) so YMMV.

-Edward

yu zheng

unread,
Dec 3, 2013, 8:34:50 PM12/3/13
to openvd...@googlegroups.com
Thank you very much for your reply.  I think it is a solution.  But I am not familiar with houdini, and I find that openvdb grid is listed as sparse volume primitive when I middle clike on the analysis node. I do not know how to convert it to attribute.  Anyway, I will try to learn more about houdini and try again. Thanks.

yu zheng

unread,
Dec 3, 2013, 10:51:12 PM12/3/13
to openvd...@googlegroups.com
I find another node called OpenVDBAdvectPoints,  with option output streamline on,  which can help to see the vertex movement in the gradient field. But I encounter another problem. This node only work once and does not work any more if time goes on. I see the source code, and it seems that it does not update every frame. Is it a bug? 

edward

unread,
Dec 4, 2013, 7:26:03 PM12/4/13
to openvd...@googlegroups.com
I think for volumes (native or VDB), they're just named "Cd" in following convention because there's no such thing as a volume "attribute".

-Edward

edward

unread,
Dec 4, 2013, 7:36:49 PM12/4/13
to openvd...@googlegroups.com
I'm not sure why it would not animate. I see no reason offhand that it would not work. Is it's input animated?

-Edward

Ken Museth

unread,
Dec 5, 2013, 2:28:52 PM12/5/13
to openvd...@googlegroups.com
Hi Yu,

The OpenVDBAdvectPoints node can indeed create animated streamlines - we do this all the time here at the studio :) We need more information to help you.

-K

yu zheng

unread,
Dec 6, 2013, 3:04:40 AM12/6/13
to openvd...@googlegroups.com
Sorry for my delay. My work environment is ubuntu 12.04.2 + openvdb(check out from github) + houdini 13. In the attachment is the test file and openvdb ( including value and gradient field ) . Thanks a lot for your help. I guess I made a stupid mistake. 
gradientField.hip
sphere.vdb

yu zheng

unread,
Dec 6, 2013, 3:11:28 AM12/6/13
to openvd...@googlegroups.com
 In my guess, the points should move in the field when time increases, provided with a static gradient vector field. I watched the source code,  it seems like that the point samples at its location the value of gradient vector, then multiplied by timestep and add to it current location. In the attachment is my test scene and the vdb file.
gradientField.hip
sphere.vdb

Jeff Budsberg

unread,
Dec 6, 2013, 10:42:44 PM12/6/13
to openvd...@googlegroups.com
is this the sort of thing you are after?  I didn't check out the paper, but just hacked this HIP together... 

FYI, I like to visualize vdb vector grids like this: scatter a bunch of points, sampling the vector grid on to the points, rename the point attribute N (and visualize the normals) .

I hope that helps!
-jeff
skin.hip
tmp2.jpg
tmp.jpg

yu zheng

unread,
Dec 10, 2013, 8:25:29 PM12/10/13
to openvd...@googlegroups.com
thank you. Just like what you do.  The paper tries to solve the elbow skinning problem. Besides, it also declare to make bulge. I can only implement the first goal now. For the bulge, it seems that I have to increase the radius ( the affect region extended from skin surface with field value 0.5 outwards( value 0)/inwards (value 0)) bigger than the object 1/2 bbox size, which I do not think it is right. BTW, I will try your advice first. 
Screenshot from 2013-12-11 09:19:05.png

edward

unread,
Dec 11, 2013, 1:00:11 PM12/11/13
to openvd...@googlegroups.com
Sorry for the slow reply but the VDB Advect Points SOP only advects the points given the amount of Substeps. So if you want the points to animate across time, you can either do it in a SOP Solver, or set Substeps to $F and Time Step to $T. See the documentation for more info (in particular the "Animating advection" section):

http://www.sidefx.com/docs/houdini13.0/nodes/sop/vdbadvectpoints

Best Regards,
-Edward

yu zheng

unread,
Dec 18, 2013, 8:11:36 PM12/18/13
to openvd...@googlegroups.com
thank you very very much. I will try it. 
Reply all
Reply to author
Forward
0 new messages