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

Generating structures in a blocky world #703

Open
Aghostcat opened this issue Sep 13, 2024 · 1 comment
Open

Generating structures in a blocky world #703

Aghostcat opened this issue Sep 13, 2024 · 1 comment
Labels

Comments

@Aghostcat
Copy link

Is there an easy customizable way to generate structures out of voxels in blocky terrain like buildings, dungeons, towns, etc?
I've been looking at the generators and not sure if the way trees are made really apply here.

@MGilleronFJ
Copy link

MGilleronFJ commented Sep 13, 2024

No, there isn't. It's not always a trivial thing to solve, and not easy to make "built in" because it depends a lot on how you generate your base terrain in the first place. You have to come up with that. It might be a bit easier to do with a multipass generator (though it has relatively high costs to pay for that convenience). Otherwise you may exploit determinism and use seed/hashing/voronoi noise to determine deterministic points per chunk, which might be easier or harder to do depending on how you structure your base terrain (height-based? 3D noise?). Determinism-based methods have the best parallelism so they may be preferred, even if they lead to some redundancy (calculating the same structure multiple times in multiple chunks; the point being, chunks don't need to inter-access/modify each other, which is a threading nightmare), though they can be harder to understand. Or in the worst case, manage your own thread-safe data structures to "remember" where things should be as the world progressively generate around, at the cost of potentially worsening parallelism.
The only bits of docs I wrote about that is here https://voxel-tools.readthedocs.io/en/latest/procedural_generation/#handling-block-boundaries-with-voxel-structures

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

No branches or pull requests

3 participants