Jump to content
  • Advertisement
ChenA

Horizon:zero Dawn Cloud System

Recommended Posts

Advertisement

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 this post


Link to post
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 this post


Link to post
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 mask = (noise.r*0.6+noise.g*0.8+noise.b+noise.a*0.6)/3.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 this post


Link to post
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 mask = (noise.r*0.6+noise.g*0.8+noise.b+noise.a*0.6)/3.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 this post


Link to post
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 this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!