# Horizon:zero Dawn Cloud System

## Recommended Posts

Hm, where does the buffer come from? This looks like C++ code, you do it on CPU? Do you run it for every pixel of the rendered image or only for those that are actually on "sky"?

Thanks for the paper, I will read it, need to find some good explanations how raymarching works, as I see a lot of weird equations about the actual volume sampling, but nothing about how is this actually rendered :)

##### Share on other sites

Hm, where does the buffer come from? This looks like C++ code, you do it on CPU? Do you run it for every pixel of the rendered image or only for those that are actually on "sky"?

Thanks for the paper, I will read it, need to find some good explanations how raymarching works, as I see a lot of weird equations about the actual volume sampling, but nothing about how is this actually rendered :)

just render on sky.

##### Share on other sites

rgba8 should be enough precision. After all it's just a simple density value. For the base detail, you can play araound with the scaling. My clouds start at around 1,8km in height and have a scaling of 68m per texel. The detail noise got a 16 times higher scaling.

For remapping i use a weird calculation.

float4 noise = tex3Dlod(WorleyCloud,float4(pos,0.0));
float denom = 1.0/(coverage*0.25+0.0001);
float lcov = 1.0-saturate((mask - coverage)*denom);
float4 n = saturate((noise-lcov)/(1.0001-lcov));

float cloud = saturate(max(n.x*1.1,max(n.y*1.14,max(n.z*1.13,n.w*1.12))));


That's what i use to sample the volume texture

Btw @ChenA

where did you find a tiling 3D perlin noise ?

Edited by Ryokeen

##### Share on other sites

rgba8 should be enough precision. After all it's just a simple density value. For the base detail, you can play araound with the scaling. My clouds start at around 1,8km in height and have a scaling of 68m per texel. The detail noise got a 16 times higher scaling.

For remapping i use a weird calculation.

float4 noise = tex3Dlod(WorleyCloud,float4(pos,0.0));
float denom = 1.0/(coverage*0.25+0.0001);
float lcov = 1.0-saturate((mask - coverage)*denom);
float4 n = saturate((noise-lcov)/(1.0001-lcov));

float cloud = saturate(max(n.x*1.1,max(n.y*1.14,max(n.z*1.13,n.w*1.12))));


That's what i use to sample the volume texture

Btw @ChenA

where did you find a tiling 3D perlin noise ?

i generate it myself, if you need, i can send you the source code.

##### Share on other sites

Thank you, that would be nice.

##### Share on other sites

i modify from a github project znoise.

i use vs2013, the project is on build/vs2013.

i save the result to a dds, you can use nvidia dds tools to view it.

Edited by ChenA

##### Share on other sites

i'm very confused that how to get these formula?

just try many times?

## Create an account

Register a new account

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

• 18
• 19
• 10
• 13
• 17
• ### Forum Statistics

• Total Topics
631694
• Total Posts
3001751
×