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

Use Noise for Voxel Generation? #207

Open
superfrantv opened this issue Nov 24, 2021 · 0 comments
Open

Use Noise for Voxel Generation? #207

superfrantv opened this issue Nov 24, 2021 · 0 comments

Comments

@superfrantv
Copy link

``Hi,
iam currently have no plan how to use the snoise function for my voxels.

`int x = i / (renderDistance * renderDistance);
int y = (i - x * renderDistance * renderDistance) / renderDistance;
int z = i - x * renderDistance * renderDistance - y * renderDistance;

        float noise = Unity.Mathematics.noise.snoise(new float3(y, x, z)) * scale;

        if (y < noise) {
            part.solid = true;`

something like that will be. A flatten 3 dimensional array with all positions, then calculate noise on that positions and scale it a bit. next is the problem. How to check if Position at specifig Height should be solid or not?

Thank you

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

1 participant