Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extreme terrain at chunk edge? #18

Open
lawik opened this issue Feb 22, 2015 · 3 comments
Open

Extreme terrain at chunk edge? #18

lawik opened this issue Feb 22, 2015 · 3 comments

Comments

@lawik
Copy link

lawik commented Feb 22, 2015

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.

chunk-edges

I have made modifications, specifically I've modified the stuff passed to showChunk to be compatible with the normal voxel.meshers.greedy mesher:

var chunk_data = {
    voxels: chunk.data,
    position: chunk.position,
    dims: [self.opts.chunkSize,self.opts.chunkSize,self.opts.chunkSize]
}
self.game.showChunk(chunk_data);

Or is this a consequence of not using voxel-mesher for voxel-land?

@lawik
Copy link
Author

lawik commented Feb 22, 2015

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.

@lawik
Copy link
Author

lawik commented Feb 23, 2015

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.

@deathcap
Copy link
Member

@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: c01750c GH-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants