Distance Field water foam

Distance Field Foam

Vectortoradialvalue, DistanceFieldGradient used for U channel and
DistanceToNearestSurface used for V.

I thought about how texture coordinates worked and how VectorToRadialValue worked. Both being gradients in R(U) and G(V), I had a theory about creating coordinates based on using Distancetonearestsurface node as G(V) channel and have VectorToRadialValue or Distancefieldgradient node as the R(U) channel. I was initially going to use the DistanceFieldGradient node that I learned about when making the distance field flow map. This is because the node had that Texture coordinate look to it but it adds a lot to the shader instructions so I went with VectorToRadialValue node. I extracted and used maths for the R channel from VectorToRadialValue and it produced the coordinates I wanted. I then added this coordinate to the noise based foam I made earlier using Alex Vinogradov's approach. I later decided to add Distancefieldgradient node just to see if it produced a slightly different result but it still relied on some of the maths from VectorToRadialValue to make it fully work. I added Switch parameter in case I decide to opt for the cheaper one.





Comments

  1. Hey,

    I've been trying to achieve the exact same thing you do here for the longest time and I was hoping to reach out to you for some pointers. Any chance I can get in contact with you? I don't see any e-mail or way of contacting you on the blog. Also big thanks for all the great posts on the blog, they are very insightful.

    ReplyDelete
  2. Same here. I can not get it work properly...

    ReplyDelete

Post a Comment

Popular posts from this blog

Environment Showcase Concepts

World alignment (Tri-planar mapping)