Advertisement

Glistening snow how would you achieve this ?

Started by March 31, 2018 07:58 PM
3 comments, last by Hodgman 6 years, 10 months ago

Hi

I have a basic shader that has an applied texture, and a normal map. Now i want to make it "glisten" with like sparkling dots of light, based on the changes between camera and the ground. 

I am wondering what would the general logical approach be to do this ? I am still learning shaders and am trying to do this to learn more with them. But i've not mastered the way to think in terms of shaders yet so i am struggling to think of the logical approach to make the effect.

Any suggestions ? 

Matcap shaders are perfect for this and very-very easy to make. Matcaps are just a simple math formula and are great for glass(snow) like effects.

Although if this is to learn shaders then maybe a metal pass would be more worth your time, as matcaps take 30 min - 60 min to learn.

 

Advertisement

You should check out specular maps. Builds off of the logic of normal maps, except you are determining the specular intensity of each pixel leveraging your bumpmap normal, and an additional texture for your specular map. It's been a bit since I've last implemented it, but, depending on your environment, Rastertek did an article on it for D3D

http://www.rastertek.com/dx11tut21.html

 

1e6c4630357c2ec2313d61c5acc1d34c.jpg

pic0069.gif

For my sparkle effect (both snow and metallic paints) I run my specular code twice. One uses the regular normal and material parameters. The other one uses a very low roughness (high specular exponent) and a random normal (generated by generating a random direction by hashing the position, the reflecting it by the original normal). This creates random little specular highlights across the object that change location when the viewing angle changes. 

This topic is closed to new replies.

Advertisement