Perlin noise
Blitz3D Forums/Blitz3D Programming/Perlin noise
| ||
So I have a small 2d PN Generator but I want to get interpolation to work. can't quite figure it out. |
| ||
how do you know that isn't working, i don't understand your problem. is your code? seen your signature music, octaves and then pixels? are you tring to do something with textures or for audio? when a run the example i see a randomized image, gray scale, ok you use the same color for r,g,b. Against what can i compare the result to know isn't ok? if you spect some smoothed values, the problem should be in the operations between floats and integers, their when mixed in operations give us some headaches, but i see some floats and seems to be carefully written. Juan |
| ||
I'm trying to achieve a smooth height map. like the image from http://freespace.virgin.net/hugo.elias/models/m_perlin.htm ![]() instead it ends up blocks, and it's because of the incorrect usage of linear interpolation. Maybe it's because I'm adding them backwards I really don't know. |
| ||
when averagin in the for o=0 to Octaves-1 .. loop you only use the last interpolate value: t# = interpolate#(a#,b#,ty#) i think that the rest should be accumulated: t# = t# + interpolate#(a#,b#,ty#) but this is just a "may be" really i don't know the basis of the algorithm. modifying this line, the image is better, using Octaves=16 or 32 implies more smoothed (averaged) pictures. Juan |