3 ms·
This is a great video. Not only is it really interesting, but the sound, the transitions, his voice, everything is just perfect. What I do not really understan
by jansan 6y ago
This is a great video. Not only is it really interesting, but the sound, the transitions, his voice, everything is just perfect.
What I do not really understand: Are all these functions (for example sdfCone()) generic modelling terminology or are they specific to a certain tool?
- jhncls 6y agosdf stands for "signed distance function". It helps the magic of ShaderToy [0] to obtain real time rendering in the browser. Note how the animations on the ShaderToy website aren't videos but real-time renderings. See e.g. how straightforward the coneSdf is implemented [1]. [0] https://www.shadertoy.com/ https://www.shadertoy.com/ [1] https://www.shadertoy.com/view/4l3BW7 https://www.shadertoy.com/view/4l3BW7 float coneSDF( vec3 p, vec2 c ) { float q = length(p.xz); return dot(c,vec2(q,p.y)); }
- swiftcoder 6y agoThey are fairly generic within the family of tools based on signed distance fields - which is mostly graphics programmers writing code in Shadertoy, but also underlies things like Dreams on PS4
- Netcob 6y agoAdding to the other explanations: I think the way you go about it is to simply google some SDF implementations of primitives (looking for them on shadertoy will already give you a basic set pretty quickly), and you can expect that implementation to take an arbitrary position in space, some parameters describing the primitive, and it will return the distance to the surface from that point - negative if the point is inside the primitive. Then all you need is some function that does raymarching and a bunch of other tricks to do shading. It's all part of graphics processing, so there is definitely some common terminology there. For some SDFs you could start with IQ's page: https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm https://www.iquilezles.org/www/articles/distfunctions/distfu...