Closed andybak closed 5 years ago
It's gradient of distance.
https://shaderfun.com/2018/07/23/signed-distance-fields-part-8-gradients-bevels-and-noise/
I'm closing this issue now. Please feel free to reopen for further questions.
Hi @keijiro thanks for the awesome examples ! They are very inspiring. I'm hijacking this issue in order to know if you have any tips in how to generate the gradient distance fields from Houdini ? I'm using Unity VFX Toolbox but I can't find anything in the examples regarding the gradient. I gave it a try using the "Volume Analysis > gradient" node but it generates three volumes (one for each axis) and the volume exporter only accepts one named volume (I tried to combine them but no luck). If you have some pointers that would be awesome ! Thanks again
@superguigui
Thanks for your quick answer ! It worked as you said. However the resulting Volume Gradient looks way different than yours (using the Utah Teapot model). Would you mind sharing your Houdini export setup ?
@superguigui
I used a network like this:
I prefer using VDB nodes instead of standard volume nodes (actually I've never used the standard volumes). You can convert them to standard ones using a Convert VDB node.
Thanks a lot @keijiro it's very helpful !
Hey @keijiro, I have been spending the last few days diving into Unity's VFX Graph. I have been looking at all of the different projects that you have up here and I have been learning alot!
I'm currently trying to create my own vector field files using the exporter. I'm pretty new to the world of Houdini so it took me some time before I created anything but I figured out how to create a simple one from a SDF Volume. https://www.sidefx.com/forum/attachment/b9ccb3234a33dc6d97e308abfa6312cb6d2aecb9/
I'm now trying to follow the method you have described in this thread on how to create both the SignedDistance and DistanceGradient using VDB nodes but as a complete beginner to this it is proving difficult.
Would it be possible for you to share a .hipnc file from your example above so I can see how each of the nodes are setup and learn from it? Cheers!
@ShaneMckenna23 I've been fiddling with Vector Gradients too after seeing the cool stuff in this repo.
Rather than mess with Houdini I've been attempting to modify https://github.com/xraxra/SDFr to also create gradients. It's mostly working. If you're like to help out then get in touch. (probably best via email: andy@ixxy.co.uk )
@keijiro Would you be able to share your houdini file which shows the nodes their settings you used to create the SDF and DistanceGradient files?
@tyen901 The problem is that I'm not sure if it's okay to share a Houdini project file made with Houdini FX. If I remember correctly, there is no format compatibility between Houdini FX, Core, Indie and Apprentice -- I was afraid that most people can't open it. There is also a license mix restriction in the EULA. I didn't have much time for researching this kind of problems, so I didn't share the Houdini project file.
Do you know if there is a guideline for sharing example/tutorial contents in Houdini?
There is such a resource for exchanging circuits in Houdini . https://hdbp.io
@Paliy90 Thanks for the info. I didn't know this site. It looks useful for sharing Houdini examples. Still there is a licensing problem though.
Did somebody manage to generate Distance gradients? There is an example file in the toolbox, but its currently for noises only. Cant get it to work for geometries.
@JorgeVelez I made some progress modifying https://github.com/xraxra/SDFr but the results didn't look terribly promising and I stopped digging. It might have been because SDFr was creating it's SDF via voxelization and gradients suffered because of the low grid resolution.
Or it might have been because I was doing something wrong in creating the gradient from the SDF. If I get a chance I'll dig out the project and take another look.
Hi Andy. Let me know how that goes. I don't fully understand the calculation, so I can't help you with it for the moment. I read the article Keijiro suggested and it uses pixels in s 2D image, so voxelization must definitely have a lot to do with the outcome.
Have you managed to generate it in houdini? I cant seem to do it. This is what I have so far:
Does anyone have a working Houdini project for Distance gradients? Or can someone confirm these settings are fine?
I resolved the license problem (actually, there is no such a problem -- you can open FX/CORE .hip
files even if you're using Indie/Apprentice), so I uploaded the example Houdini project to the Houdini
directory in this repository.
https://github.com/keijiro/VectorFieldExamples/tree/master/Houdini
Sorry for being late to do this. I hope this helps to understand how the exporter works.
Hi,
I'm trying to recreate this without the use of Houdini.
Can you explain a bit more about the Distance Field Gradient file?
If I understand it correctly there are many possible gradient vectors for every point in a distance field. What is the gradient in relation to? A tangent on the surface? Or something else?