ikoon Posted July 11, 2016 Share Posted July 11, 2016 Hello, please, have you seen a good tutorial or PDF or example of VDB Analysis SOP? I dont understand the practical purpose of these: - Laplacian - Divergence Quote Link to comment Share on other sites More sharing options...
3dome Posted July 11, 2016 Share Posted July 11, 2016 (edited) this should help later in the thread they also talk about laplacian Edited July 11, 2016 by 3dome 1 Quote Link to comment Share on other sites More sharing options...
ikoon Posted July 13, 2016 Author Share Posted July 13, 2016 Thank you very much Dominik. I have tried to understand the divergence and the most intuitive explanation is this: You and three friends float down a river, each marking a corner of a square. If your square is getting bigger, the river has positive divergence. If it's shrinking, negative divergence. It is sum of the vector components of the gradient. I have also made a small HIP to explore an visualize it. Attached. As regards the Laplacian, I unfortunately don't understand what it does and where to use it, but I will explore more. Thank you very much! divergence.hipnc Quote Link to comment Share on other sites More sharing options...
Skybar Posted July 13, 2016 Share Posted July 13, 2016 Both divergence and laplacian are mathematical stuff, so there should be lots of info if you just google it. 1 Quote Link to comment Share on other sites More sharing options...
ciliath Posted July 13, 2016 Share Posted July 13, 2016 Gradient, a vector, is the rate of change of a vector in Its x,y and z axis. In other words, the acceleration of a vector in Its 3 directions. So if you have a vector g(x,y,z) = (3x, y^2, 2z^2) Its Gradient would be the vector <3,2y,4z> Divergence, a float, is the magnitude of flow that goes inwards/outwards at one point in space. Positive values represent flow that goes away from the point, negative values for flow that goes towards. If we use the same vector as above, the divergence would be = 3 + 2y + 4z. Laplacian is the divergence of the gradient. So you would get the magnitude of acceleration of flow in a point. With the same vector as above, we'd have to derive It again, and add It's components. (3,2y,4z) --> (0,2,4) --> = 0+ 2 +4. It is usually used to help solve partial differential equations... But for houdini, well I'm not too sure. In image processing they use It for edge detection, maybe It could find some same usage on fluids? Else, I quote from Wikipedia "For instance, the net rate at which a chemical dissolved in a fluid moves toward or away from some point is proportional to the Laplacian of the chemical concentration at that point; expressed symbolically, the resulting equation is the diffusion equation." So that's one usage you can find for It 3 1 Quote Link to comment Share on other sites More sharing options...
Pazuzu Posted July 14, 2016 Share Posted July 14, 2016 (edited) 9 hours ago, ciliath said: It is usually used to help solve partial differential equations... But for houdini, well I'm not too sure. In image processing they use It for edge detection, maybe It could find some same usage on fluids? Else, I quote from Wikipedia "For instance, the net rate at which a chemical dissolved in a fluid moves toward or away from some point is proportional to the Laplacian of the chemical concentration at that point; expressed symbolically, the resulting equation is the diffusion equation." So that's one usage you can find for It I usually use laplacian as a factor of perturbation in a smoke or FLIP sim, so you compute the laplacian (curvature has also a very close effect as with laplacian) of your surface field + a gradient to displace your particles for example. In the case of a smoke sim, I drive the divergence with the laplacian, so you can get nice bulbs without the use of vorticles or custom particles solutions to perturb the vel field. Hope that helps! Alejandro Edited July 14, 2016 by Pazuzu 8 Quote Link to comment Share on other sites More sharing options...
ikoon Posted July 14, 2016 Author Share Posted July 14, 2016 Thank you very much guys, great help! Felix, when you say this: "So if you have a vector g(x,y,z) = (3x, y^2, 2z^2)" ... You mean "the scalar value of the point in space is 3x + y^2 + 2z^2", right? Because I thought, that Houdini evaluates gradient as a direction (with magnitude) of scalar field. Thinking about this helped me a lot, great, thank you, Felix: "Laplacian is the divergence of the gradient. So you would get the magnitude of acceleration of flow in a point." If I am wrong, you don't have to waste your time with me I really appreciate how you have helped me now, thank you! I have to study more on my own. Quote Link to comment Share on other sites More sharing options...
ciliath Posted July 14, 2016 Share Posted July 14, 2016 5 hours ago, Pazuzu said: I usually use laplacian as a factor of perturbation in a smoke or FLIP sim, so you compute the laplacian (curvature has also a very close effect as with laplacian) of your surface field + a gradient to displace your particles for example. In the case of a smoke sim, I drive the divergence with the laplacian, so you can get nice bulbs without the use of vorticles or custom particles solutions to perturb the vel field. Hope that helps! Alejandro Hey, that's really smart. I knew of the method with curvature, but using the laplacian instead that's cool. Thanks for the insight :> Quote Link to comment Share on other sites More sharing options...
Diego A Grimaldi Posted July 14, 2016 Share Posted July 14, 2016 Hey @Pazuzu, Could you post a simple hip file of this? Thanks 1 Quote Link to comment Share on other sites More sharing options...
Popular Post Pazuzu Posted July 14, 2016 Popular Post Share Posted July 14, 2016 (edited) 19 hours ago, Diego A Grimaldi said: Hey @Pazuzu, Could you post a simple hip file of this? Thanks Hey Diego! Sure! Here is a very basic FLIP surface tension implementation using laplacian as a factor; You can change from Laplacian to Curvature to see some little differences, But for most cases Laplacian works better for my tests, and even better yet for smoke, as you can see in the example file, the FLIP sim behaves almost like a pyroclastic cloud at the begining, so imagine this in a gas sim. Hope That Helps! Alejandro ST_tutorial.hip Edited July 15, 2016 by Pazuzu 11 Quote Link to comment Share on other sites More sharing options...
ftaswin Posted September 22, 2016 Share Posted September 22, 2016 This is sooo aawesome thanks guys Quote Link to comment Share on other sites More sharing options...
Popular Post Pazuzu Posted October 9, 2016 Popular Post Share Posted October 9, 2016 (edited) On 7/14/2016 at 5:45 PM, Pazuzu said: Hey Diego! Sure! Here is a very basic FLIP surface tension implementation using laplacian as a factor; You can change from Laplacian to Curvature to see some little differences, But for most cases Laplacian works better for my tests, and even better yet for smoke, as you can see in the example file, the FLIP sim behaves almost like a pyroclastic cloud at the begining, so imagine this in a gas sim. Hope That Helps! Alejandro ST_tutorial.hip Hi! I just want to show something about what was talking about pyroclatic details using laplacian as a factor for curvature decimation in a gas sim. This vimeo video shows a custom solver that I have been working on; Is still incomplete, but I'm having really nice results, because is very very easy to configure in comparison with pyro solver and the most important, is fast. I hope you like it! Thank you!! Alejandro Edited October 9, 2016 by Pazuzu 14 Quote Link to comment Share on other sites More sharing options...
mathieu Posted April 18, 2020 Share Posted April 18, 2020 Quote Sure! Here is a very basic FLIP surface tension implementation using laplacian as a factor; You can change from Laplacian to Curvature to see some little differences, But for most cases Laplacian works better for my tests, and even better yet for smoke, as you can see in the example file, the FLIP sim behaves almost like a pyroclastic cloud at the begining, so imagine this in a gas sim. I have a question for you @Pazuzu. I think I understand your use of laplacian or curvature (of density field I guess ?) as scalar masks but I wonder what kind of vector field you use to inject or modulate velocity field into smoke simulation. Did you use the gradient of density field as in your flip ST examples ? Best regards. Quote Link to comment Share on other sites More sharing options...
Pazuzu Posted April 19, 2020 Share Posted April 19, 2020 On 4/18/2020 at 11:33 AM, mathieu said: I have a question for you @Pazuzu. I think I understand your use of laplacian or curvature (of density field I guess ?) as scalar masks but I wonder what kind of vector field you use to inject or modulate velocity field into smoke simulation. Did you use the gradient of density field as in your flip ST examples ? Best regards. Hi Mathieu! Yes exactly, I used the gradient of the density field modulated by the laplacian to then modified the velocity of the system. One thing that I did, and I think is very important to have more precise results, is to compute both the laplacian and the gradient using a SDF version of the density field. This will give way more power to sculpt your sim as well, for example you can even displace that SDF before the laplacian and gradient computation to inject details to your sim without using noises that can mess you vel field or introduce overshooting. Also this is way more lightweight than to compute 1000's of masks to drive your sim and to end up with a very nice looking sim but so bad simulation times. I hope this is clear! Thanks, Alejandro 1 Quote Link to comment Share on other sites More sharing options...
mathieu Posted April 22, 2020 Share Posted April 22, 2020 Thanks a lot for your answer and tips, very clear to me. Now i have to put your advices in practice Thanks again. 1 Quote Link to comment Share on other sites More sharing options...
kuvaka Posted April 29, 2020 Share Posted April 29, 2020 On 19.04.2020 at 11:23 PM, Pazuzu said: Hi Mathieu! Yes exactly, I used the gradient of the density field modulated by the laplacian to then modified the velocity of the system. One thing that I did, and I think is very important to have more precise results, is to compute both the laplacian and the gradient using a SDF version of the density field. This will give way more power to sculpt your sim as well, for example you can even displace that SDF before the laplacian and gradient computation to inject details to your sim without using noises that can mess you vel field or introduce overshooting. Also this is way more lightweight than to compute 1000's of masks to drive your sim and to end up with a very nice looking sim but so bad simulation times. I hope this is clear! Thanks, Alejandro Can you please tell us how you turn the density field into sdf, the nodes that do this are not in dop Quote Link to comment Share on other sites More sharing options...
Pazuzu Posted April 29, 2020 Share Posted April 29, 2020 1 hour ago, kuvaka said: Can you please tell us how you turn the density field into sdf, the nodes that do this are not in dop You can do it with some microsolvers, but is a bit of a pain and the resulting sdf will lack of detail. The best way is to use a vdb pipeline inside a sop solver, you will have all the vdb arsenal at your disposal. Quote Link to comment Share on other sites More sharing options...
kuvaka Posted April 29, 2020 Share Posted April 29, 2020 7 minutes ago, Pazuzu said: You can do it with some microsolvers, but is a bit of a pain and the resulting sdf will lack of detail. The best way is to use a vdb pipeline inside a sop solver, you will have all the vdb arsenal at your disposal. Thank! It turns out that I do so, but it was curious how this can be done inside the dop thank Quote Link to comment Share on other sites More sharing options...
kuvaka Posted April 29, 2020 Share Posted April 29, 2020 21 minutes ago, Pazuzu said: You can do it with some microsolvers, but is a bit of a pain and the resulting sdf will lack of detail. The best way is to use a vdb pipeline inside a sop solver, you will have all the vdb arsenal at your disposal. And here is another question, do you use any masks or restrictions for your pyroclastic? Quote Link to comment Share on other sites More sharing options...
Pazuzu Posted April 29, 2020 Share Posted April 29, 2020 (edited) 16 minutes ago, kuvaka said: And here is another question, do you use any masks or restrictions for your pyroclastic? When I worked on that solver (from the vimeo video) I used the standard pyroclastic noise displacement, but I used also the curvature (or you can use laplacian as well) as the main factor for the pyroclastic displacement and decimation. So yes that was my restriction/mask, mainly to have a more nicer evolving material, and I think it works, of course, the video just shows the backbone of the system, but you can have way better details developing it a bit more. Edited April 29, 2020 by Pazuzu 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.