Please sign in to access this page
Some voxel tools for Bevy Engine.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
I've still been working on meshing as well as revamping jsut everything. I've been trying to make it super idiomatic for rust.
I finished the block_library and saw another engine using binary greedy meshing, which I started cloning.
I compeltely forgot about logging. Anyways I've been working on a way to fix the weird uv problems by using a texture array
I finally figured out the bug (more of a PEBKAC error) which I could've fixed if I read the docs better. I got some jank working, still not entierly sure whats happening though.
So I have a framework for the block library thats theoretically done, it should now properly lookup attributes from the block library, however i'm unable to load the block library for some reason.
So after I setup the basic thing I started setting up an external blocklibrary asset so that I could map voxels to textures and materials without baking it into the binary. But I'm been having a ton of trouble actually using the blocklibrary. At first I had threading issues because bevys assets arent nativly threadsafe. Now I'm trying to figure out how to map the textures and materials to Meshes.
I did a bunch of stuff integrated ndshape and block-mesh, and greatly simplified how chunks worked. I finally got a working prototype.
I started to setup baking visibility into the voxels to efficiently mesh, but it got really confusing with my current setup. I also started looking at some other voxel engines and I'm switching how a few things are setup to make this easier as well as using some external crates I didn't know existed.
I've switched back to linear arrays as a representation. I also managed to start rendering some basic chunks however I've started switching some of the systems to be more reliant on bevy.
I've finally finished pallet chunk and array chunk. It took like super long because I generified everything. It was super satisfying but if i'm going to finish i think I gotta code rough.
Heres all the stuff I did:
Voxel:
A wrapper around an id.
Space:
I define a global voxel position as a ChunkPos with a VoxelLocalPosition (bound from 0 to chunk length)
I defined some traits to help with VoxelLocalPosition, CyclicBoundInt, BoundInt, and Wrapper that provide methods to ensure that the internal value doesn't leave the bounds.
Chunk Storage:
VoxelLocalPosition -> flatarrayindex
ArrayChunk, just a array of voxels.
PalletChunk --
Pallet - A sorted array of Voxels
PackedIndices - A array of numbers that pack smaller numbers (indices pointing to Pallet) in them using the smallest number of bits.
You can see more info in the Repo.
Next im gonna define a volumetric object made of chunks that will eventually turn into the world/ other objects made of voxels.
There is a bug where my first two devlogs seemed to have lost their time and now that time is stored in Since Last Devlog. I want to see what happens if I make a new devlog right after I made the old one even though I dont have more time.
I've finished the utils required for chunks. They are super polished. I have a rough structure for both flat chunks and for pallet chunks. You can see more commits in the repo.
I've made a number of changes however I haven't really finished any features. Notably I refined the bit_struct to have more methods to handle changing its internal data. I also am working on some other traits to help impliment a BoundInt that must be with a range: this is for local chunk coords which must be between 0 and 15.
I added a tool to store voxel pallets as a data efficient bit struct.
Anyway now I have to go actually create all the important systems instead of spending way too long optimizing.