Live data from Hacker News

SDF Fractal Noise

iquilezles.org

21–30 of 44 posts

Re: SDF Fractal Noise

#21

This is fascinating. Can someone help me understand why SDF-only techniques are valuable (aside from being interesting in their own right)? I know very little gfx but so far I mostly saw SDFs used for accomplishing stuff in fragment shader that would otherwise be done with geometry, kind of as a workaround for limitation of shadertoy environment

MagicaCSG is a graphical signed distance field editor (by the author of Magica Voxel). The example video and images demonstrate how SDFs can be used for complex modelling!

https://ephtracy.github.io/index.html?page=magicacsg

Re: SDF Fractal Noise

#24

It's an interesting and very clever technique. But those landscapes don't look real in any sense. They look like painted clouds. Uncanny valley? Maybe not even that close to reality.

Yet it is better than most air fighting games landscapes.

Re: SDF Fractal Noise

#25

Cool, but this looks like it’s really the same as the old side scrolling mountain landscape screensaver (which I can’t seem to find anymore). Is it just a new technique to achieve the same?

There are other ways to do it like fractals and heightmaps but this does it all with SDFs

Re: SDF Fractal Noise

#26

Earlier quoted context omitted.

If you want to generate textures which you then read at runtime, this kind of technique is very useful - for instance, imagine you want to create the normal map of a cloud, or create a height map to displace vertices with (for a procedural landscape).

But using noise to generate textures isn't directly related to SDF (I think?) from other replies I think the point here is there are no "vertices", i.e. no mesh geometry

Well yeah, but you can obviously use signed distance functions to create a texture (that's what a shader is doing) that can be used at runtime. Imagine you want to make the normal map for a bubbly surface, for example, but you also want the bubbles to be animated. One way of doing this would be to render the normals from a bunch of sdf spheres onto a 3d texture, which would then be used later.

I don't use this a work - it's just an approach that I've had some success with at home. On my machine, complex fragment shaders are always slow - so maybe this kind of sdf-based approach works in realtime for other people.

Re: SDF Fractal Noise

#27
post #14
post #12

> As Signed Distance Functions start making it into mainstream and commercial applications, it's important to find replacements or alternatives to common things artists used to do in polygon-land. So are SDFs really going to replace polygons then? Is this for just the demoscene, or for some specific applications, or do experts think this is the future for all 3D graphics? I know enough about SDFs to know that they ar…

It won't replace polygons. But it has been a very useful tool in the gfx programmer toolbox. It can be used for font/vector rendering, modelling / rendering complex shapes that are difficult to do using traditional modelling methods, and it has a lot of niche usages (I remember one talk about using some SDF to procedurally generates fakes).

>> It can be used for font/vector rendering...

I'd like to see a simple unencumbered SDF font file format become widespread.

Re: SDF Fractal Noise

#28
post #16

SDFs are another tool. Very useful for content creation, for example, although there are still very few tools to create SDFs. You can't create SDFs in Blender for example. SDFs will be more used in the future, polygons are a mess... :) Games like Dreams (PS4 / PS5) make extensive use of SDFs

The opportunity for optimizing polygons in the rendering pipeline is extraordinary compared to SDFs. For that reason alone, it will not likely be economical to use them anytime in the near future for the majority of modern commercial 3D work, perhaps ever.

They are cool though!

Re: SDF Fractal Noise

#29
> So, when adding a regular fBM, sine wave or any other displacement function to a "host" SDF, we don't get a valid SDF anymore (we violate the principle that the gradient of an SDF must have length 1.0).

Can someone elaborate or point to an elaboration of this point? I guess there must be a good reason why the gradient cannot just be normalised, but I don't know what it is.

Re: SDF Fractal Noise

#30

Cool, but this looks like it’s really the same as the old side scrolling mountain landscape screensaver (which I can’t seem to find anymore). Is it just a new technique to achieve the same?

There are other ways to do it like fractals and heightmaps but this does it all with SDFs

I know but in the end, doesn’t it result in the same data?
Post reply on HN