Jump to content
  • Advertisement
Sign in to follow this  
riuthamus

Voxel Abnormal blocks

This topic is 2208 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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. 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 )

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!