I made this post on Reddit. I need ideas and information on how to create the ground mesh for my specifications.
Need suggestions for creating dungeon ground geometry
Tricky keeping an eye on both the posts there and here and timeline .. but yeah that suggestion about splitting up your floor into a grid, doing your deform with whatever you like noise algorithm sounds like a start. You could then run a mesh simplification on it to reduce the polys if you wanted (might not even be worth it depending on resolution that you want).
You might need to lock certain parts to certain heights (like linking bits around doors), and maybe blend these into your noise heights in the surrounding area.
Uneven floors may introduce other issues which need dealing with, leg IK, collisions, line of sight etc. So maybe think carefully whether you might want uneven walls and ceiling too in the future, as it may be easier to deal with it all at once rather than retrofit other stuff later.
Why not just use a deform/ height map? I used one for a small RPG project and it worked perfectly for making floors:
This mesh is the result of running a decimate formula over the hight map. I removed the Albedo texture so you can see the resulting triangles.
The grid lines are from a Normal and Albedo map, so they don't add to the mesh poly count. I generated 5 Lods with the decimator. Because the Height map decimating combo was so effective, I adjusted my LODs so they looked good:
By doing it this way I didn't need to make a shader to hide the LOD transitions; there is no LOD "popping". Collision was just a flat plain over the terrain.
This was rushed, however with a little work I bet you could use something like this to great effect in your game.
2 hours ago, lawnjelly said:You could then run a mesh simplification on it to reduce the polys if you wanted (might not even be worth it depending on resolution that you want).
A guy on reddit suggested that I use surface nets, which are supposed to be optimized (I think).
48 minutes ago, Scouting Ninja said:Why not just use a deform/ height map? I used one for a small RPG project and it worked perfectly for making floors:
Because I need 3D voxel data. I just need to draw it somehow
2 hours ago, lawnjelly said:Tricky keeping an eye on both the posts there and here and timeline ..
Sorry! It's also tricky posting a question on multiple forums.
Anyway, thanks guys, I'll give it a shot with the surface nets and see if it works as intended.
Hide yo cheese! Hide yo wife!
3 minutes ago, thecheeselover said:Because I need 3D voxel data.
Yes, that is what I meant. You said in your post you want hight maps so why not just use the voxels like hight maps?
Grab the highest voxel, that is 1 and the lowest voxel, that is 0. Then all the in between voxels are the the depth, like in a height map. You could even have a layer system that defines ground levels, walls and roof.
From there you make a mesh that uses decimation or maybe surface nets. Shouldn't be too hard because you already have voxel data.
Of course marching cubes is also a possibility. However it looks like everyone is using it these days.