

Rendering Worlds with Two Triangles with raytracing on the GPU in 4096 bytes [pdf] - bemmu
http://www.iquilezles.org/www/material/nvscene2008/rwwtt.pdf

======
sp332
Discussion from last time:
[https://news.ycombinator.com/item?id=8070879](https://news.ycombinator.com/item?id=8070879)

------
gavanwoolery
Distance field marching has some pros and cons (the biggest downside is that
it takes many steps when you get close to an object but not close enough to
intersect it).

<self promo> If anyone is interested, I am presenting a new method soon that
is a hybrid of distance field marching (explained in this paper) and some
other pretty simple techniques. Preview here:

[https://twitter.com/gavanw/status/590884138871230464](https://twitter.com/gavanw/status/590884138871230464)

~~~
darkmighty
No shame in self promo, improving and sharing techniques is something very
cool :)

~~~
gavanwoolery
:)

------
bemmu
Came upon the article while trying to understand how this example works:
[https://www.shadertoy.com/view/MsX3WN](https://www.shadertoy.com/view/MsX3WN)

------
westoncb
The part where he shows the super simple blending of the monster's 'legs' with
the sphere (page 42), opened up in my mind a lot of possibilities for
procedural model generation I hadn't considered before. Eventually I
understood why it was possible/powerful (via a certain generalization called
'FRep':
[http://en.wikipedia.org/wiki/Function_representation](http://en.wikipedia.org/wiki/Function_representation)).
Very different from the sort of 'polygon stitching' I thought was necessary
(e.g. when I tried this: [https://github.com/westoncb/3D-Mushroom-
Generator](https://github.com/westoncb/3D-Mushroom-Generator))

The fact that you can do such cool things in real-time with raymarching (as
the Shadertoy website is largely a showcase of) is pretty awesome. I have
tried building raymarched games on iOS and Android—but I've only gotten to the
point of setting up basic scenes and estimating it's still not quite possible
to do a full game this way, yet (on mobile anyway). Maybe something very
simple at 30fps on a nice device.

~~~
kayamon
If you want to do it in realtime, your best bet is to use Marching Cubes to
tessellate the isosurface into a triangle mesh. You can either do that every
frame, or cache the result and animate it via conventional means.

~~~
westoncb
That's an interesting idea. Thanks. Though, personally, a big part of what
appeals to me about rendering with distance fields is the simplicity of it: no
triangles and, most everything is in the shader so I don't have to waste time
fine tuning how my buffers are pushed around for OpenGL.

