wavelet noise

This topic is 3997 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

well, i read the pixar paper on wavelet noise (http://graphics.pixar.com/WaveletNoise/paper.pdf) and wanted to try it out using the sample code they provided, but i'm getting values in the range of -3e23 which is... way off. has anyone tried implementing this themselves?

Share on other sites
Hows your gaussianNoise() function implemented? I couldn't see an implementation for it in the paper and thats the first place I would check for errors, it says it requires a range from -1 to 1.

otherwise I would go through the code with a fine-tooth comb seeing if I copied it right :)

Share on other sites
here's my gaussian noise function:

const static int q = 15;
const static float c1 = (1 << q) - 1.f;
const static float c2 = ((int)(c1 / 3.f)) + 1.f;
const static float c3 = 1.f / c1;

float gaussianNoise() {
float random = ((float)rand() / (float)(RAND_MAX + 1));
return (2.f * ((random * c2) + (random * c2) + (random * c2)) - 3.f * (c2 - 1.f)) * c3;
}

it outputs values in the range of (-1,1)
and im fairly sure i copied the code right...

1. 1
Rutin
24
2. 2
3. 3
JoeJ
18
4. 4
5. 5

• 38
• 23
• 13
• 13
• 17
• Forum Statistics

• Total Topics
631706
• Total Posts
3001833
×