c++ - Perlin Noise and FBM generated image too grey -
I am working on creating noise using Perlin Noise and FBM because I understand it and I think Bits of a problem
The images I am generating seem to be very gray when they are for grayscale but I do not see any white or black variation
This is an example of this image (this can be generated using 8 Octave
What did I produce I'm expecting an image;
I generate noise as follows I am;
Float result = 0.0f; Float amp = 1.0f; Float frequency = 2.0 f; Flat Max Amplification = 0.0 f; Int i = _octaves; While (i -) {result = = noise (x * frequency, y * frequency, z * frequency) * amp; Frequency * = 2.0 f; Max Amplify + = amp; Amp * = 0.5f; } Return result / Maximum appripiidization; } Where noise function Ken Pearlin's improved noise function has been found; And I'm using the default scheduling table.
Then as I generate images, I do the following to get a grayscale image;
ppm_image.pixel_colour [kk] = 255.0 f * noise; I was wondering how can I generate the same height map in colors with more variety (black rather than white and just black).
I usually know that some methods apply to noise as a posting process It usually works for me:
float minute = data [0]; Flat max = data [0]; (Float and F: data) {f = (f- (for minus & gt; f) min = f; if maximum (lt; f) max = f;} (for float and f: data) Min) / (max-min);}
Comments
Post a Comment