Volumetric Clouds

Started by
0 comments, last by Evil Steve 13 years, 7 months ago
I'm trying to implement the fake volumetric clouds presented in
http://iquilezles.org/www/articles/dynclouds/dynclouds.htm

Ok, I've created a sky dome, a noise texture generator and a shader to render it.
I have some clouds, but now I want to add some lighting, to simulate the volumetric effect as described in the article.

"Remember that what we need is the value of the fbm in four points: the actual one (the blue one in the picture we saw), and the following three."


"...if we had our primitive noise textures correcly created: if the rgb channels of the each noise texture contained the noise values of the current texture after offseting the sampling point in the sun direction vector projected in the dome geometry. Basically, it means we have to put into the alpha channel of our noise textures the real noise value, into the blue channel the noise displaced by a raymarching-step (projected into the dome), into the green on the noise displaced by two steps, and into the red one the noise displaced by three steps."

I can't understand how he can pack the raymarching step into the noise texture.
Ok, I get the "4 steps, one in each channel" part, but how to calculate this
"raymarching-step (projected into the dome)"? Doesnt the raymarching result depends of each vertex position/normal relative to the sun?

I can even skip the texture channel optimization and just calculate every step on the shader, but still, I'm missing what calculations to do.. The only inputs I have is the texture coords and normals at each point, and the sun direction. Help?
Advertisement
Cross Post

This topic is closed to new replies.

Advertisement