Open martinlindhe opened 2 years ago
Maybe related to #33 ?
This indeed seems to be the same issue. Any success in tackling it?
I just worked around it by tweaking frequency and some other parameters. Something like
let noise = NoiseBuilder::fbm_2d(width, height)
.with_seed(seed as i32)
.with_freq(0.07 + scale(seed as f32, 0., u32::MAX as f32, 0., 0.2))
.generate_scaled(0., 255.);
fn scale(value_in: f32, base_min: f32, base_max: f32, limit_min: f32, limit_max: f32) -> f32 {
((limit_max - limit_min) * (value_in - base_min) / (base_max - base_min)) + limit_min
}
It does not fix the issue, but hides it a little.
That's an interesting workaround but not an ideal solution. @verpeteren any idea where the issue could lie? Not being able to properly seed the noise seems like a fairly serious issue.
I think that the clue lies in this comment. I need to dig deeper to understand what that means.
I created this branch for investigation
Consider the following code.
No matter the amount of random seeds, it only generates 8 unique outputs.
output: