Hacker News new | comments | show | ask | jobs | submit login
Articles on fractals, computer graphics, mathematics, demoscene and more (iquilezles.org)
289 points by adamnemecek on Sept 7, 2017 | hide | past | web | favorite | 17 comments

Inigo Quilez was responsible for modeling vegetation procedurally in Brave:

“If you just render the geometry, it’s pretty, but it doesn’t look lush and furry,” says supervising technical director Bill Wise. “We wanted Spanish moss hanging from tree limbs, and clumps and hummocks of moss. The Highlands of Scotland were like another character in the film, a living backdrop for what was going on. We had never tackled as vast an outdoor landscape, but we were able to generate it using insane procedural geometry developed by Inigo Quilez. He’s a magician.” (http://www.cgw.com/Publications/CGW/2012/Volume-35-Issue-4-J..., section "Painting with Code")

He contributed some basic lessons about it to Khan Academy's "Pixar in a Box" section on Environment modeling (https://www.khanacademy.org/partner-content/pixar/environmen..., direct link to first video: https://www.youtube.com/watch?v=fuwUltMAdYQ).

Also worth checking out is "Elevated", one of the coolest 4066-byte programs you'll ever see: http://www.pouet.net/prod.php?which=52938.

Here's a direct YouTube link for Elevated:


He's also got a Shadertoy version here: https://www.shadertoy.com/view/MdX3Rr

I met Inigo at an internship when I was just starting out my CS career and he was kind and patient enough to mentor me on all sorts of cool computer graphics. A quote from "The Prestige" comes to mind:

Oh, no, sir. This wasn't built by a magician. This was built by a wizard. A man who can actually do what magicians pretend to do.

He does things that I wouldn't have dreamed possible with fragment shaders and implicit geometry. https://www.youtube.com/watch?v=yMpG6qEb8js

IQ is a wizard and really inspired my interest in programming and math.

His snail animation is amazing too: https://www.youtube.com/watch?v=__G43hELHL0

...and you can see how it was made from basic shapes: https://www.youtube.com/watch?v=XuSnLbB1j6E

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/

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

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)

Could be interesting to combine it with things like 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.

XRA 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/

Link: 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.

I made a game that uses SDFs for a game jam. Here's a video:


The game designs that SDFs allow haven't been explored fully, so I'm picking away at it game jam by game jam. ;)

His YouTube tutorial where he creates the beating heart composited on live video as he explains it is a great introduction for beginners and younger people [1]. I've learned so much from his sharing of his techniques and knowledge. Thanks Inigo!

  [1]  https://www.youtube.com/watch?v=aNR4n0i2ZlM

Inigo Quilez is the person behind https://shadertoy.com.

Both he and Pol Jeremias, I thought.

Recently I came across http://iquilezles.org/www/articles/ibilinear/ibilinear.htm when researching how to draw textured non-parallelogram quadrilaterals, without affine texture mapping, with WebGL / OpenGL ES 2.

I was disappointed to learn that OpenGL wouldn't do it and we have to calculate it on our own and send in a 3rd texture coordinate to each vertex for extra calculation on the shader.

Sadly, there isn't much useful info on this subject on the internet (I'm not talking about projective mapping, but bilinear interpolation). I've found this: http://www.reedbeta.com/blog/quadrilateral-interpolation-par... that I think will work for my case.

My problem is that I also use normals to do "fake" parallel lighting on quads and it accentuates even more the affine errors on non parallelogram quadrilaterals. It's easier to just subdivide the quad to minimize the affine artifacts.

If anyone knows a better way to solve it, I'd love to learn.

A number of articles seem to sadly be in the vein of dry "so I did a thing once and it worked". Kind of missed opportunity.

The information is great but the website design is truly obnoxious (at least on mobile). What is the point of replacing the browsers scrolling with your own crappy version of scrolling while adding nothing?

Obligatory calling out for scrolljacking.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact