circusmonkey
March 19, 2011 21:17:28
Hi ,
For some reason I am finding it hard to to display the gradient from a volume analysis SOP via a volume visualization.
Where am I going wrong ? On a side note what are some possible uses for the gradient values ?
Rob
koen
March 21, 2011 00:18:36
Vector fields are still tricky to display in sop's. One solution would be to bring the volume into dops and use the vector field visualization node. Another one Which I added to your example (attached) is to use use the attribute from volume sop and display that attribute as a vector.
The gradient can be thought of as the normal of a volume. In a sdf volume the gradient together with the value give you a very easy closest point transform. within the volume, if you move along the gradient by the amount in the sdf (the distance) you end up on the surface.
One great use of this is the “target drive smoke” force Jeff added to Houdini 11. It drives the smoke towards a goal by applying a force in the direction of the gradient. Another great use is particle collisions, you can do super fast collision tests on an sdf, and if the particle penetrates because it moves to fast, you can easily fix it .
Hope that helps,
cheers,
Koen
circusmonkey
March 21, 2011 00:40:19
Thanks koen,
For the break down and pointers > added to my notebook.
if you move along the gradient by the amount in the sdf (the distance) you end up on the surface.
How would you do this ?
rob
symek
March 21, 2011 04:54:45
circusmonkey
How would you do this ?
rob
Since gradient is a direction in which sdf field changes, and a sdf value itself is a distance to sdf surface, probing particle position for these two gives you an exact transformation to the place on a surface, where a particle should be.
circusmonkey
March 24, 2011 19:42:46
Volume sample > awesomeness
Rob