by ianthehenry on 8/24/23, 5:35 AM with 10 comments
by ianthehenry on 8/25/23, 5:12 AM
The operation here is that you distort space with the modulo operator. So now you have space that repeats -- and when you trace rays through this repeated space, you're basically teleporting the rays back to the origin (using mod in the classic "wrapping around" fashion) every time they pass out of a section of space.
And then ultimately the ray will collide with the shape -- the one shape -- that exists in this distorted space, after wrapping around some number of times.
If the idea of "taking the mod of space" is intriguing, I would encourage you to try playing with SDFs! It's a really incredible technique for real-time rendering of "3D vector graphics."
Also shameless plug for my SDF playground https://bauble.studio, and an example program that uses instanced repetition to render an "infinite" number of varying shapes:
(tile [400 0 300] (fn [i]
(torus :z 60 30
| twist :y (sin (t + (hash i * 10)) * 0.05)
| rotate :pi :y (t * hash i) :z 0.05
| move :x 50
| mirror :r 10 :x
| fresnel
| slow 0.5)))
Obviously a lot less compelling than the author's examples...by Liquix on 8/25/23, 2:41 AM
by jasonjmcghee on 8/25/23, 4:24 AM
At some point that led me to iq and his work is just incredible- not to mention he’s a great educator and freely shares his work and techniques with others.
Similar to his many under tutorials, this is a really great resource for generative artists and game developers.
by nick__m on 8/25/23, 12:31 AM
by wildpeaks on 8/25/23, 12:15 PM
An example of how different thinking in SDF is: in classic modeling, you define a 3D sphere mesh using a bunch of 3D coordinates (vertices), grouped into triangles for the surface. Therefore you need more vertices to make the sphere appear smoother.
On the other hand with SDF, you have a function that takes an arbitrary 3D coordinate and returns whether the coordinate is inside the sphere or not (easily done by comparing the distance from the center), meaning the smoothness of the sphere is already the maximum it can be.
by binary132 on 8/25/23, 3:15 PM