Voxel Abnormal blocks

Started by
1 comment, last by riuthamus 11 years, 8 months ago
We are adding in some abnormal blocks ( half blocks, corner blocks, stairs ) and I wanted to know if anybody knew of some good ways to do this. We had thought to use the instance system we have in place but the limitation with that is there is only so many things that can be instanced at once.

We cant instance all of the things we want and instanced player placed blocks as well. So, I come here asking how do you think would be the best way to represent blocks of an abnormal shape? I typed a search for halfblocks but got some really odd stuff. Maybe I dont know what I am looking for, thanks for any advice in advance.
Advertisement
I would use a static instancing system. By static I mean to collect the content of a certain area (grid) into a single mesh(maybe 2 or more for large content), including standard cubes and custom meshes for your halfcubes, putting them into a clean trianglestrip (use texture atlas, texture array to handle texture switches).

To avoid memory fragmentation on the GPU I would use some kind of paging, reserving certain memory blocks (i.e. 5000 tris max for each page). This should be kept in a cache (LRU). To avoid frequent updates of this static meshes I would use a second, dynamic approach (= your current?) to span the time until the static mesh has been created and uploaded. Further on create the static meshes in a second thread and only if it has not been modified in the last X seconds.
Well, after two days of work we have added in custom shaped blocks and allowed for their placement in different directions! On top of that we added in grass ( keep in mind the texture you see is by far NOT FINAL )

gallery_1_371_33887.jpg
gallery_1_371_79151.jpg

GRASS ADDITION:
gallery_1_371_67288.jpg

All in all this week has been VERY productive week for our game. With the hope of getting actual crafting working and some other core elements we are getting closer and closer to working on frontend rather than all backend.

This topic is closed to new replies.

Advertisement