3 ms·
Rendering Worlds with Two Triangles with raytracing on the GPU in 4096 bytes [pdf]
- bemmu 11y agoCame upon the article while trying to understand how this example works: https://www.shadertoy.com/view/MsX3WN https://www.shadertoy.com/view/MsX3WN
- sp332 11y agoDiscussion from last time: https://news.ycombinator.com/item?id=8070879 https://news.ycombinator.com/item?id=8070879
- gavanwoolery 11y agoDistance 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 11y agoNo shame in self promo, improving and sharing techniques is something very cool :)
- gavanwoolery 11y ago:)
- westoncb 11y agoThe 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 11y agoIf 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 11y agoThat'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.