Talk:Perlin noise: Difference between revisions

No edit summary
Line 5:
 
http://4.bp.blogspot.com/-u4wfD21sIvU/UsI85U78XYI/AAAAAAAAAx8/NG2fEzYjTUA/s1600/perlin2.png
 
:Your image is not correct. The perlin noise has a range between -1 and 1, and you use this to convert it into an unsigned byte:
 
:<code>Gray(cast(ubyte)(p * 256))</code>
 
:Try this:
 
:<code>Gray(cast(ubyte)((p+1)/2 * 256))</code>
 
:Also, your image will look smoother than the example you found on blogspot.com, since this imag is made with several octaves.
 
:--[[User:Grondilu|Grondilu]] ([[User talk:Grondilu|talk]]) 17:49, 5 March 2014 (UTC)
1,934

edits