Creating wind turbulence

Started by
10 comments, last by revearz 20 years, 4 months ago
Hi .. just confirming something:

F(x) = ((w - z)f(x, y, z) + z * f(x, y, z - w)) / w

If I place this in the triple for loop in the above post, would it be:

float x = nX / 8.0f,      y = nY / 8.0f,      z = nZ / 8.0f,       w = nSizeZ / 8.0f;noise = ((w - z)Noise3D(x, y, z) + z * Noise3D(x, y, z - w)) / w;


Thanks!

Advertisement
I'm assuming you're texture size is nSizeX by nSizeY and nSizeZ is number of textures. Assuming you are mapping the x coordinates from 0 to 8, y from 0 to 8 and z from 0 to 8, then:

x = 8.0f * nX / nSizeX
y = 8.0f * nY / nSizeY
z = 8.0f * nZ / nSizeZ

The w that I mentioned in the formula would then be 8.0f.

Hope this helps.


------------------------------------------------
DaWizard
http://www.geocities.com/ahmadkabani
------------------------------------------------


[edited by - DaWizard on December 5, 2003 1:38:42 PM]
------------------------------------------------DaWizardhttp://www.geocities.com/ahmadkabani------------------------------------------------

This topic is closed to new replies.

Advertisement