5 ms·
> No voxels anymore So how do you represent geometry then? Mesh? SDF? Space tetrahedralization?
by rsp1984 11y ago
> No voxels anymore
So how do you represent geometry then? Mesh? SDF? Space tetrahedralization?
- gavanwoolery 11y agoSame way I've always done in VQ - with math/logic :)
- chrisseaton 11y agoI don't get it - do you write a mathematical function that says whether or not you have intersected with anything in the world? How does that not turn into a huge piecewise? How does that allow you to change the geometry, as I guess it gets compiled into the shader?
- gavanwoolery 11y agoYou can get somewhat of an idea how it works here: http://www.voxelquest.com/news/how-does-it-work http://www.voxelquest.com/news/how-does-it-work You can change geometry by passing parameters to to the shader or creating special object generation functions within the shader. This is not intended to render everything in the game, mostly just aspects of the environment that can be easily procedurally generated like terrain and structures. Other things can be merged in from a traditional pipeline like using polygonal character models (or even sprites, as I have shown in my past demos). The more that you can define mathematically, the better. Doing texture lookups is almost an order of magnitude more expensive sometimes, and less precise always. You start really simple, and say did I hit the bounding box that contains the object? If so, did I hit the more complex piece of geometry within that? If so, what UVW coordinate did I hit on the geometry? Marching through the UVW coordinates on the ray, you can create any sort of procedural texture. I have shown a voronoi texture and a shingle texture but really anything can be created and some procedural textures are very cheap compares to others (voronoi is relatively expensive). If you look at old shots of my terrain, it is all created with voronoi and noise pretty much. http://www.voxelquest.com/gallery.html http://www.voxelquest.com/gallery.html It is possible things will get too expensive to do in realtime, but the option will always be there. Worst case scenario is that I can render like I did with my old isometric engine and cache the render results. At the very least the option will always be there for more powerful computers in the future. That said I think realtime is feasible on decent midrange/modern hardware.
- fla 11y agoThis website has some nice explanations (old, but still relevant) http://iquilezles.org/www/articles/raymarchingdf/raymarchingdf.htm http://iquilezles.org/www/articles/raymarchingdf/raymarching... Edit: Direct link to Iñigo Quílez' s presentation http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf
- rsp1984 11y agoCan you provide more details on this? It's where it gets interesting... :)
- gavanwoolery 11y agoYep, to avoid duplicating answers see if the above info that I just posted answers any of your questions :)
- chrisseaton 11y agoYeah that's what I'm really interested in. I get how the shader rendering works for amazingly complicated geometry when it's just a simple function to calculate it, like a fractal or something like that, but when you have a world full of irregular, non-repeating shapes how do you represent that?
- gavanwoolery 11y agoEach cell can contain any number of arbitrary shapes (and they can intersect, despite what my test environment might suggest). Even the most irregular shapes can often be approximated mathematically, in ways that you might not be as complex as it seems. I would read up here, there is a wealth of information on these topics (and lots more if you google around): http://www.iquilezles.org/www/index.htm http://www.iquilezles.org/www/index.htm