[Base] Mipmapping Normal Maps

Source: Internet
Author: User


Http://developer.download.nvidia.com/whitepapers/2006/Mipmapping_Normal_Maps.pdf

A small essay from Nvidia, dealing with the problem of specular lighting, reflections and other flickering problems caused by incorrect calculation of distant normal map.

The core idea is to use the length of the average after the distance as a marker to measure the normal change rate, and to revise the East (specular lighting,env reflection ...) calculated with normal map.

The mathematical derivation of the middle is the essence (if the low level programming is good for Programmer's soul, then it can also be said that math is good for render programmer's soul)


Normal variation

General normal map processing time, the generation of mipmap, is the linear of the first level of downsample, so in the normal changes in a very large place, the average length of normal is very small.

Then the variance mathematical model of normal can be established according to the average length of normal:


Here once the normal deviation is large, then is the probability of the Gaussian distribution (we generally say that when we go to school, and we are evaluated when the middle of the big head, on both sides accounted for the same) to describe.


Specular lighting

A point in the distance can be thought of as a dot. Specular lighting average (discrete integral):


As can be seen here, the results are not linear correlation with normal, so take the average normal to calculate the difference is very far away from the results, so it will produce a large deviation (specular lighting and very bright, out is flashing).

So, with the description of variance, normal distribution in front normal, we can model the specular lighting calculation, and then use a simpler approximation of the mathematical function within a certain range (the common method of drawing derivation)

Finally specular lighting calculated this:


of which ft, in the text by the author Michael Toksvig became Toksvig factor:


where n is normal,s is specular power.

Finally, the visual description is that if the normal length is low, that is, the variance of normal (large change), then the distance specular power (gloss) decreased perception.

Crytek in the 14 siggraph paper, said that the normal distribution as part of the roughness, but also very reasonable, the distance normal is very scattered, is not roughness very big (relative gloss is low), Crytek is the use of this principle To correct the roughness according to the length of the normal.

Not doing roughness correction:


To have made corrections:


In fact, the direct look may not be particularly obvious, this situation if the move will be very sharp flash.

This mathematical conclusion is also closer to physical reality and intuitive perception.


Realize:

Paper Finally, it is recommended to use look up table to save the results, after all, the calculation is still a bit of a fee.




[Base] Mipmapping Normal Maps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.