[HN Gopher] Sharing everything I could understand about gradient...
       ___________________________________________________________________
        
       Sharing everything I could understand about gradient noise
        
       Author : ux
       Score  : 119 points
       Date   : 2025-06-06 14:53 UTC (1 days ago)
        
 (HTM) web link (blog.pkh.me)
 (TXT) w3m dump (blog.pkh.me)
        
       | Dusksky wrote:
       | What an impressive and thorough deep dive. I remember first
       | learning about gradient noise through shader examples online, but
       | never realized how much complexity lies beneath the surface. In
       | my own projects, I've definitely been guilty of assuming "it
       | looks good enough" without considering all the finer mathematical
       | details. Seeing how derivatives and numerical stability play such
       | a key role really gives me a new appreciation for how much work
       | goes into getting these effects to look smooth and natural. Have
       | any of you ever gotten lost tweaking fade functions to get that
       | perfect wave-like look?
        
         | ux wrote:
         | > What an impressive and thorough deep dive.
         | 
         | Thanks!
         | 
         | > Have any of you ever gotten lost tweaking fade functions to
         | get that perfect wave-like look?
         | 
         | You cannot use anything for the fade function, because you
         | likely want the derivative (and potentially the second
         | derivative) to be 0. See
         | https://gist.github.com/KdotJPG/417d62708c76d53972f006cb906f...
         | for making different ones. I personally never tried anything
         | else than the hermite and the quintic.
        
       | nigels-com wrote:
       | One thing I've been meaning to look into - how to adapt 3D perlin
       | noise to produce gaussian noise - given a specified (scalar) mean
       | and standard deviation.
        
         | ahmetrcagil wrote:
         | Why not generate gaussian noise from scratch? By definition it
         | should be indistinguishable.
        
       | dib258 wrote:
       | Thank you for explaining this better! This is still a bit
       | complicated on the Math side but it's well illustrated to see the
       | result.
        
       | nxpnsv wrote:
       | Pretty and informative!
        
       | purplesyringa wrote:
       | The illustrations were cool. They could've been just prerecorded
       | animations, but I really appreciate making them endless. Quite
       | mesmerizing and motivates reading.
        
         | ux wrote:
         | Hehe, thanks. The thing is, it could hardly have been
         | prerecorded animations :D
         | 
         | I don't know if you tried before, but compressing noise is
         | particularly hard, so 16 videos would have been quite too much
         | of bandwidth. The total size of the shaders is something around
         | 70kB (not minimized) for endless lossless videos, and since I
         | had to write them anyway if I were doing records of them, it
         | was really a no-brainer to embed them to be honest.
        
       | joshu wrote:
       | i wish there were other flavors of smooth noise. it feels
       | overused now.
       | 
       | this is a great explanation though!
        
       ___________________________________________________________________
       (page generated 2025-06-07 23:01 UTC)