Igor Posted June 21, 2016 Share Posted June 21, 2016 Hi everybody, I´m Igor a long time lurker but first time poster here on OdForce I´d like to ask what is best way to calculate curvature flow in volume. I searched the docs and found VDBAnalysis with curvature option but how can I calculate other curvature type like Vectorfield follows curvature? Thanks for any idea! Quote Link to comment Share on other sites More sharing options...
Igor Posted June 22, 2016 Author Share Posted June 22, 2016 No one has any idea how it can work? Maybe I did explain it badly (sorry for my English btw.) but pictures show best what I mean. It is Vectorfield that follows the curvature of Levelset. Is there any way to do it with VDB in Houdini? Thanks! Quote Link to comment Share on other sites More sharing options...
djwarder Posted June 22, 2016 Share Posted June 22, 2016 Not quite sure what you want to do, but if you want to create a flow field around an object then you could use info from this post ... Quote Link to comment Share on other sites More sharing options...
Igor Posted June 22, 2016 Author Share Posted June 22, 2016 Thanks Dan! I had look at the post but this is not what I mean. What I mean is Vectorfield that describes the surface in regards to curvature. If you look at pictures you can see how vector does follow surface with strong curvature and I want advect particles along this Vectorfield. Hope it is clear what I mean. Thanks! Quote Link to comment Share on other sites More sharing options...
petz Posted June 23, 2016 Share Posted June 23, 2016 not sure if this is what you meant, but looking at the images in your second post i would say you are talking about principal curvature directions. if so, i don´t think there is any direct method in houdini but it shouldn´t be too hard to implement with a volumewrangle ... hth. petz 1 Quote Link to comment Share on other sites More sharing options...
Igor Posted June 24, 2016 Author Share Posted June 24, 2016 (edited) Thanks petz! You are right, Pricipal Curvature Direction is what I mean. I found formula on Website of MIT but do not know how to tranlate into VEX. Formula Can somebody give me hint how to do it please? Thanks! Edited June 24, 2016 by Igor Quote Link to comment Share on other sites More sharing options...
Popular Post petz Posted June 24, 2016 Popular Post Share Posted June 24, 2016 attached is a file with all sorts of curvature computation for vdbs ... hth. petz vdb_curvature.hipnc 25 Quote Link to comment Share on other sites More sharing options...
paulh Posted June 24, 2016 Share Posted June 24, 2016 Fantastic file! Thanks Petz. Quote Link to comment Share on other sites More sharing options...
Igor Posted June 27, 2016 Author Share Posted June 27, 2016 Thank you so much petz! This is wunderful and is exact what I wanted to do. Quote Link to comment Share on other sites More sharing options...
TheDude Posted June 28, 2016 Share Posted June 28, 2016 Will look at this hip file soon, but I think what you are wanting is to get the vector direction of the sdf surface, then get the average sdf of surface in the area (could use projected point cloud in this) and then using a cross product between the original surface direction vector, and the local average's, you will get a new vector field that flows along the surface that appears like the image you posted, it kind of resembles topology of a map. 1 Quote Link to comment Share on other sites More sharing options...
Igor Posted June 29, 2016 Author Share Posted June 29, 2016 Thanks Jamie! I did try your idea and also got Vectorfield but it is different as in example from petz. It is not pointing in direction of curvature. Can you explain the difference? Perhaps Problem is that I did it on polygon-surface because I do not know how to get pointcloud around sampling Point in VDB. Quote Link to comment Share on other sites More sharing options...
ikoon Posted February 11, 2017 Share Posted February 11, 2017 Petz, your knowledge is amazing. Thank you for your source file, I am trying to understand the math behind it, you helped me a lot. But it is quite a long run I forgot lots of things from the university. Please, why are there those interesting "zigzags" in the attachement? The gradient of curvature should be theoretically smooth, no voxels are missing and increasing the iteration accuracy doesn't help. What I allready understand: Hessian matrix, mean curvature value (from its diagonal), gradients, cross and dot products I would like to achieve these kind of effects:http://forums.odforce.net/topic/28239-gabor-kernels-oil-painted-cop-convolution-filter What do you think is crucial to learn next? I will study these: eigenvectors, trace of matrix Do these lead me to some creative effects? Do I have to understand them really well? frobenius norm of matrix, outer product(shape operator), inverse power iteration If anybody could direct me, I will really appreciate. vdb_curvature - zigzags - v0.hipnc 1 Quote Link to comment Share on other sites More sharing options...
petz Posted February 13, 2017 Share Posted February 13, 2017 the "zigzags" in the trails are the result of vectors pointing into opposite directions and this is due the way how they are calculated. when you calculate the eigenvectors of the matrix there is no easy way to determine in which direction (+ or -) the vector is pointing because both directions are true. an easy way to handle this problem is to check and reverse neighbouring vectors recursively, starting from one point, or write your own streamline algorithm in vex which ignores opposite vectors based on a given threshold. either way, this is not be a perfect solution but depending on your needs it might be enough. if you want a vectorfield on the mesh which is as smooth as possible, then that´s a completely different story and it becomes much more complicated... in regards to your other question, if you need to fully understand all the things in the file, i would say no. it´s nice and sometimes helpful if you do but this is something you´ll barely need for day to day work. but that is just a personal opinion based on personal experience and not an advice by any means. hth. petz 1 Quote Link to comment Share on other sites More sharing options...
fuat Posted February 13, 2017 Share Posted February 13, 2017 (edited) VDBAnalysis SOP. outputs whatever field you want Edited February 13, 2017 by fuat Quote Link to comment Share on other sites More sharing options...
petz Posted February 13, 2017 Share Posted February 13, 2017 3 minutes ago, fuat said: VDBAnalysis SOP. outputs whatever field you want no, it doesn`t ... 2 Quote Link to comment Share on other sites More sharing options...
fuat Posted February 13, 2017 Share Posted February 13, 2017 On 6/22/2016 at 10:34 AM, Igor said: It is Vectorfield that follows the curvature of Levelset that was what he asked for? doesnt the vdbanalysis exactly output that? or am i missing something? correct me if i am wrong Quote Link to comment Share on other sites More sharing options...
petz Posted February 13, 2017 Share Posted February 13, 2017 well, it is possible to get the curvature, or more precisely the mean curvature with vdbAnalysis but not the curvature-direction. even though you could get a somewhat curvature-related vectorfield, if you calculate the curvature first and then the gradient of it (which is possible with vdbAnalysis) it wouldn´t be the same. principal curvature directions are quite different and sometimes they are useful since they have a few special properties. Quote Link to comment Share on other sites More sharing options...
trzanko Posted March 6, 2017 Share Posted March 6, 2017 (edited) On 6/22/2016 at 10:00 AM, Igor said: Thanks Dan! I had look at the post but this is not what I mean. What I mean is Vectorfield that describes the surface in regards to curvature. If you look at pictures you can see how vector does follow surface with strong curvature and I want advect particles along this Vectorfield. Hope it is clear what I mean. Thanks! Created a tool to calculate the gradient and curl along the curvature of a given geometry. If I'm understanding what you're looking for correctly I think this might help: (link to the file is in the vimeo description) It runs on geometry but there's no reason you can't go to and from volumes. Hope this helps, -Tighe Edited March 6, 2017 by trzanko 2 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted July 18, 2021 Share Posted July 18, 2021 On 24.6.2016 at 8:03 PM, petz said: attached is a file with all sorts of curvature computation for vdbs Thank you for sharing this! Is there any way on a volume to normalize and regularize curvature values between -1 and +1 ? place unique points on local minima and/or maxima? Quote Link to comment Share on other sites More sharing options...
papsphilip Posted September 23, 2021 Share Posted September 23, 2021 (edited) On 6/24/2016 at 9:03 PM, petz said: attached is a file with all sorts of curvature computation for vdbs ... hth. petz vdb_curvature.hipnc This is so helpful! thank you for sharing! Is it aslo possible to get the gradient y component of a volume like you do with a measure sop on meshes? Edited September 25, 2021 by papsphilip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.