Sign in to follow this  

Volumetric Effects (fogs, clouds, lights...) ?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am thinking about adding some nice volumetric lights and fogs to my demo, for example volumetric moon rays coming in from room windows at night :) but i dont know the basic principles of these kind o volumetric effects, what kind of models do i need to draw to get some volumetric light rays, or fogs, do i need some depth map or light map textures first? i will write the shader in HLSL, can you tell me the basic principles or show me some HLSL codes? thanks

Share this post


Link to post
Share on other sites
Most of games used a "light model" with a simple effect like UV animation and Alpha Add to achieve this. The only game I see used a totally volume light is FEAR. It dynamically generate a lot of parallel faces which normal is same to the direct of the ray. The shadowed area of a face is summed by all it's parent faces (which closer to the light). Shader will calculate the thickness based on this faces and give the final result. The challenge here is to avoid the situation which the camera dir is just parallel those faces.That's also mean you can't achieve this only by shader in this way, Is there any other good idea ?

That's all I know, hope it works.

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

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

Sign in to follow this