Sign in to follow this  
riuthamus

Voxel Abnormal blocks

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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. Edited by Ashaman73

Share this post


Link to post
Share on other sites
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 )

[img]http://www.bhslaughter.com/forum/uploads/gallery/album_371/gallery_1_371_33887.jpg[/img]
[img]http://www.bhslaughter.com/forum/uploads/gallery/album_371/gallery_1_371_79151.jpg[/img]

[b]GRASS ADDITION:[/b]
[img]http://www.bhslaughter.com/forum/uploads/gallery/album_371/gallery_1_371_67288.jpg[/img]

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. Edited by riuthamus

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this