Open lawik opened 9 years ago
Ah, I seem to be treating the ndarray badly. I should probably not be touching chunk.data directly in that way. I will experiment further with converting the data to what the greedy mesher wants.
It seem I might have treated the ndarray quite okay.
Getting some other issues where along the chunk edges I get a raised line of blocks on every chunk edge. Any thoughts on how this could be? Also interested in why it is that I don't get a more uniform landscape from chunk to chunk.
@lawik it looks like the noise function is not continuous over the chunks, this could happen if the noise is sampled at a different position than the chunk dimensions expect. You might also try tweaking the chunkPad
option in addition to chunkSize
.
But I believe why you're seeing this problem, is that voxel-land is expecting a voxel-engine#ndarray engine, which is why it passes a raw ndarray instead of the {voxels, position, dims} chunk_data object — that's for the "older" (current, three.js-based voxel-engine). If you switch to voxel-engine#ndarray it should work, on the other hand, maybe voxel-land could be modified to support both chunk formats.
Older versions of voxel-land used the old format, changed sometime around this commit: https://github.com/deathcap/voxel-land/commit/c01750c3d44e57a33f041b99014e74565155ffe8 GH-12
I'm experimenting with using a modifed voxel-land module to generate my landscape. I have currently changed chunk size to 64 to more clearly show the problem I'm having.
Is this normal? Those vertical edges as chunks with vastly different terrain meet. They do not feel normal.
I have made modifications, specifically I've modified the stuff passed to showChunk to be compatible with the normal voxel.meshers.greedy mesher:
Or is this a consequence of not using voxel-mesher for voxel-land?