Jump to content

Cloud Shader


Recommended Posts

Hi ,

at the moment I´m experimenting a lot with Cloud shading and currently I´m using the default houdini cloud shader that comes with the cloud tools. This shader is pretty basic and lacks a lot of features. Searching the web I came across this great Thesis that is all about rendering clouds in realtime which you can find here:


I was wondering if anyone already implemented all those great things into any houdini volume shader to get all those nice SSS effects?

Link to comment
Share on other sites

Yeah i came across this also and built it into the cloud shader. It reproduces some nice features, but seems more like a proof of concept than a production ready shader. Is there maybe anything else where one can also better fake the extensive scattering that clouds do? Currently I´m trying to fake it with blurred dmaps, but maybe there is a better method?

Link to comment
Share on other sites

Hey Oliver,

We used that paper as the basis for a cloud shader being used in production at the moment. I also integrated Matt's awesome work into the shader. The trick is to break the shader into direct and indirect lighting as well as single scatter and multiple scattering. At least that's how I handled it. So Matt's texture lookup is great for direct lighting for the first scatter component so you can get all those cool features from the lookup. Then to mimic increased orders of scattering we used a gi light to generate photons for the cloud and used a point cloud lookup or the vex photon function in the shader. So we were using pbr for the photon generation and then micropoly for the image render. If you have any question let me know.

Link to comment
Share on other sites

hi mike!

that sounds pretty interesting..looks like you were exactly doing what i wanted to do. I got some questions because im not an houdini expert at all;) Did you use some sort of base shader to build your cloud shader from or did you do everything from scratch by yourself and how do you break up your shader in the different lighting components? have you any reference tips on tutorials or anything else on such a topic?

The other thing that sounds pretty interesting to me is your lighting. I experimented a lot with pbr and pbr lighting (means environment light and area lights) which gives a nice lighting out of the box but is pretty expensive in rendering.. I ended up with frames taking like 18h for a rendering that was anything else than noiseless...

So do you work mostly with spotlights and dmaps and what lightsources do you use to create your photonmaps from?

And the last thing;) did you investigate the cloud light and did you use it in any way?

please enlighten me;)


Link to comment
Share on other sites

I started with the basic smoke shader and built it from there. You could even use Matt's modified shader as a starting point. The light setup was pretty much the same as the setup in the paper(section 7.4 and 7.5). One light for the sun, one for sky illumination and for the ground bounce illumination. You could add more if needed but that is enough to get you started. Because each light is representing such a large light source you could get away with using directional lights. All the lights used dmap shadows. Even though I don't think directional lights are meant to work for photon generation they do.

So an initial render generates the photons using pbr, then a second render generates the image using micro poly renderer. So you're not actually rendering the image using pbr, you're just generating the photon map with the pbr engine and then using the photon map in the shader in combination with the other stuff to do a micropoly render. That way you're not waiting 18h for a frame.

I wish there were tutorials on this kind of stuff but none that I know of. A lot of the time I just had to keep testing different possible solutions until something worked. I'd say these forums and the sidefx site/forums are your best bet for finding more info. One tip I can give is if you want to separate lights in the shader you can use the light mask parameter on the illuminance loop inside the shader.

We created our cloud setup before 12.5 was released and it's cloud tools were available. I've played around with the cloud fx tools but haven't used them in production. The cloud light is trying to solve the same problem though - how to approximate multiple scattering in a cloud. The difference is the cloud light is attempting to calculate this within sops while we chose to compute this at render time. I had tried to compute the scattering in sops using the volume bake sop when we were doing rnd but the photon map generation option was already further along and I never had time to go back and explore some more.

One big take away from the paper, and Matt's shader and texture lookup addresses this, is that clouds are heavily forward scattering. I mention this because if you're going to approximate how light travels through a cloud with the tools available then I'd recommend you use a phase function of 0.9 or above(the built in cloud shader uses 0.2). At least that's roughly the response for a single order scatter. Things start changing with increased orders of scattering and you can see that in the paper. I can't count how many times I read through that paper so I really understood what was physically correct and then how to approximate that in the lighting and shader setup.

Hopefully one day I'll be able to talk in more detail about the setup I used. For now, if you have any more questions I'll try and answer them.


  • Like 2
Link to comment
Share on other sites

thank you very much for taking the time for such a detailed explanation...again your approach is pretty interesting and maybe i will have a try if I got enough time to do so..I think if I´m working on this stuff again more questions will come up;) I´m pretty curious for the look of your clouds! you have to tell when we are able to see it anywhere..at least if you are allowed to tell...

cheers oli

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...