I have however started messing around with my old Project Vox renderer though; optimizing it a bit and making the shader a bit more realistic. Times like these I can really appreciate the work done by people like Wollay and Gavan Woolery. I've gotten the engine fairly fast now but I'm not happy with it at all since it takes over 1GB of memory to render a 400x400 map.
Will see if I can do anything about that. Here's a screenshot:
EDIT: VBOs are so last year. I rewrote the engine to use Display Lists that take up a hell of a lot less memory. I have a 1000x1000 map working using only about 300MB of memory.
What is contained in that 1 GiB?
ReplyDeleteEvery chunk has a corresponding VBO. The VBO needs to contain the position [x, y, z] of every vertex for every voxel as well as an RGB value to cater for soft shading.
DeleteThat's 7 chars (plus one for padding) bringing us to 32 bytes per vertex.
For a 16x16x16 chunk and taking into account that every voxel has up to 24 vertices we get:
16x16x16x24x32 = 3MB per chunk.
Display lists are actually deprecated in opengl 3.1 and will eventually be removed. So they are actually "so last year", not vbos.
ReplyDelete