3 ms·
Interesting timing as I've recently become mildly obsessed with signed distance fields - it seems a much more elegant way of describing 3d forms than piles of p
by andybak 9y ago
Interesting timing as I've recently become mildly obsessed with signed distance fields - it seems a much more elegant way of describing 3d forms than piles of polygons.
This page has a great cache of formulae for various primitives, patterns and blend functions: http://mercury.sexy/hg_sdf/ http://mercury.sexy/hg_sdf/
The boolean and domain stuff there blew my mind. It's incredible how concise the descriptions are - goes a long way to explaining some of the more magical stuff that came out of the Shaderlab/Demoscene world.
Question - are many people using SDF/Ray marching in games outside of very niche uses? (clouds etc)?
The performance benefits only seem to kick in for very specific applications but I'd like to see whole levels/environments built like this. Maybe as the current gen of GPUs drops in price and become ubiquitous it will become a more feasible approach all round.
PS If anyone has access to a Rift (or a Vive via ReVive with a bit of fiddling) try out https://github.com/jimbo00000/RiftRay https://github.com/jimbo00000/RiftRay
It's a lot of Shaderlab stuff in VR and some of it is truly astonishing in a headset. (I know you can run the website itself in WebVR but it's clunky as hell and performance isn't great)
- nikki93 9y agoCould be interesting to combine it with things like https://mitpress.mit.edu/sites/default/files/titles/content/sicm/book.html https://mitpress.mit.edu/sites/default/files/titles/content/... for analytic motion solutions and then just express the scene as expressions in terms of a global 'time' uniform. For 'designed' things where you place a bunch of spheres manually, the complexity of the mesh is still about linear in the complexity of the expression, and an 'eval' of the expression probably would be helped by spatial optimization strategies such as a k-d tree or other such things usually used in scene structures. It seems best for things where the complexity emerges out of a lower order of complexity of the expression itself. An analog (ha) can be made with how synth + sequenced music has two layers of complexity: an emergent one 'within' the sounds, and a designed one in the sequence.
- Adamantcheese 9y agoXRA is using SDF's in his game, Memory of a Broken Dimension, for a few different effects. He generates an SDF for the whole level and uses it as a sort of external structure for it, as well as a container for some particle cloud effects. I'd recommend checking out some of his dev streams sometime, they're rather interesting if you're into graphics programming: http://brokendimension.com/ http://brokendimension.com/
- andybak 9y agoLink: https://xra.itch.io/memory-of-a-broken-dimension https://xra.itch.io/memory-of-a-broken-dimension Downloading now. Itch is becoming a very interesting platform for discovering experimental games and interactive experiences.
- procedural_love 9y agoI made a game that uses SDFs for a game jam. Here's a video: https://www.youtube.com/watch?v=EEjee1CRko0 https://www.youtube.com/watch?v=EEjee1CRko0 The game designs that SDFs allow haven't been explored fully, so I'm picking away at it game jam by game jam. ;)