Skip to content

Need Help~ How to use simdnoise::NoiseBuilder::ridge_2d_offset? #3

Description

@zzhgithub

Maybe this issue is not about minkrift~~
I just find your world look good with using of imdnoise::NoiseBuilder::ridge_2d_offset

I also use it to build a world but it looks like very ugly. Why?
IF any tips on set params??
my core code like this:

let withd = 100;
let (noise, min, max) = simdnoise::NoiseBuilder::ridge_2d_offset(
            0.0,   
            withd, 
            0.0,
            withd,
        ) 
        .with_freq(0.025)
        .with_octaves(5)
        .with_seed(2022)
        .generate();

        for x in 0..withd {
            for z in 0..withd {
                info!("[{}],[{}]", x + z, noise[x + z]);
                let yy = (5.0 - noise[x + z]) * 512.0 + 128.0;
                for y in 0..256 {
                    let p = Point3D::new(x as i32, y as i32, z as i32);
                    if (y as f32) < yy {
                        res.data.insert(p, grass.clone());
                    }
                }
            }
        }

it any wrong with it ?
Please help me thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions