Behold: it spins
-
Added some stuff to the debug overlay to procrastinate generating terrain geometry
(FPS hangs out around 1700 on this machine when vsync is disabled, for the curious)
-
@drewdevault Generating the terrain is so fun though! It's the first point where you get to start making creative decisions, rather than technical decisions.
-
Drew DeVaultreplied to spxtr last edited by [email protected]
@spxtr *not* terrain generation -- terrain *geometry* generation. Which is to say given a pre-generated chunk as input, convert the block array into verticies and such for rendering
-
@drewdevault Ahh, right. Well at least it's all cubes, mostly.
-
@spxtr not so! If you just render a bunch of cubes you will quickly run into a number of problems. First of all, it will look bad because floating point errors will cause minute gaps to appear between the cubes. Second, you would have to carefully sort everything back-to-front for rendering. Finally, you would have a *ton* of geometry underground which is populated but not visible, which would be a huge performance sink. You need to only generate geometry for blocks adjacent to [...]
-
@spxtr transparent blocks like air or water, and ideally only the adjacent faces, not the entire block. You also need to generate separate terrain meshes for those transparent blocks, to render them in a second pass.
-
@drewdevault You're right, definitely don't do them one at a time.
That everything is cubes still makes life way easier. You generate a grid of vertices, then all your cubes index into the grid, and there's no gaps. Skipping faces based on the presence of an adjacent block is relatively straightforward. If you have more arbitrary geometry then you have to work waaay harder.
I didn't do transparent blocks (besides air) when I did this, so no need for a second render pass
-
@spxtr hm, I'm wondering how to do this most efficiently. Your "grid of verticies" makes me think. The main problem with using a grid of verticies is that each vertex will have a different UV coordinate... but that can be worked around. Hm...
-
This post did not contain any content.
-
@drewdevault Is this written in Hare?
-
@notgull yes