# Volumetric Clouds

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

## Recommended Posts

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?

##### Share on other sites

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

This topic is now closed to further replies.

1. 1
2. 2
3. 3
4. 4
Rutin
15
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633724
• Total Posts
3013556
×