News for hackers. Stuff that matters.
Re:SDF Fractal Noise by xyzzy_plugh on Tuesday July 13, 2021 @10:40AM (#27821534)
Because you're displacing the existing gradient. The existing SDF is by definition valid but now being transformed. It's been a while since I dabbled in this but I'm not sure how you'd normalize and maintain the transform. If you naively normalize then you lose all the smooth continuity of the function, which is no bueno.
Re:SDF Fractal Noise by Athas on Tuesday July 13, 2021 @10:46AM (#27821620)
Could you naively compose the distance functions and then use automatic differentiation to compute the gradient? As long as the distance functions are differentiable, so should their composition be.
Re:SDF Fractal Noise by xyzzy_plugh on Tuesday July 13, 2021 @10:51AM (#27821702)
Possibly but I suspect that is more complex than it seems at first glance.
Re:SDF Fractal Noise by Athas on Tuesday July 13, 2021 @10:53AM (#27821729)
Certainly, it reduces to reverse-mode AD on fairly arbitrary (although usual scalar) code. You definitely need a compiler or preprocessor to do that for you.