Second iteration



Today I decided to cave in and publisch the current state. It lacks a lot of what I wanted to add before releasing, but regular updates are something I want to keep up. Every 20 days sounds like a good aim!
First thing I wanted to do after I posted the previous build was to restore the interactions with cells I had before, removing and adding them, I got stuck on this because I am learning about Zenject usage and trying to set up scene context for a new UI was really frustrating. Anyway, I settled on having an interaction detector on each chunk, which then looks up the closest cell to the click point translated to world space. After that, the cell is marked as inactive and chunk regenerates its mesh (which only displays active cells). Next steps here are adding cells (which is just flipping the boolean), then creating something like a brush tools to affect clumps of cells at once. Of course this will require some optimizations, because the bigger the chunk, the longer it takes to regenerate it.
Next thing was adding colours. I was really anxious that generating submesh for each material will fuck with my perfomance so badly that it will be impossible to deal with. But, with proper memory management and Unity Jobs system, everything worked out! Now we can have as many cell types as we want, materials are mapped to types and assigned dynamically.
Third thing was fixing generation from images. I noticed that only a part of each heightmap was processed - that is because images sizes were not matching the world size, and some other calculations were not delivering what I wanted. The Hello Kitty test was my celebration of correct heightmap to terrain translation!
Next, just for aesthetics, I worked on colors beong less solid, added shader to color vertexes and adjustable color palette for each material.
Next steps:
finally, simulationg some real stuff - temperature, day and night cycles, water cycles, more realistic cells distribution, and cells influencing each other! I will work closely with my partner, who teaches me on processes in nature.
Files
Get Hex-Terrain (working title)
Hex-Terrain (working title)
interactive procedural generation of terrain based on hexagonal voxel grid
Status | Prototype |
Author | Firewalk |
Genre | Simulation |
Tags | 3D, hexagon, Procedural Generation, Prototype, Sandbox, Voxel |
More posts
- First biomes!14 days ago
- First public build32 days ago
Leave a comment
Log in with itch.io to leave a comment.