Introduction to Fresnel effect and color dispersion

Source: Internet
Author: User

1. Fresnel Effect

In general, when the light reaches the contact surface of two kinds of materials, some light is reflected out on the contact surface, and another part of the light will be reflected through the contact surface, this phenomenon is calledFresnel Effect. The Fresnel formula describes how much light is reflected and how much light is reflected. The following is an approximation of the Fresnel formula:

Reflectioncoefficient = max (0, min (1, bias + scale x (1 + I · N) power ))

The range of the reflection coefficient reflectioncoefficient is limited to [0, 1]. We use reflectioncoefficient to mix the reflection and refraction Vectors based on the following formula (C stands for the color ):

Cfinal = reflectioncoefficient × creflected + (1-reflectioncoefficient) × crefracted

There is also a commonly used formula for Approximate Calculation of Fresnel:
Fastfresnel = R + (1-r) * POW (1.0-dot (viewdir, normal), 5.0 );
The reflection coefficient R value can be obtained through physical measurement. For example, the air-to-water reflection coefficient is about 0.02037.
Thus
Cfinal = fastfresnel × creflected + (1-fastfresnel) × crefracted

2. color dispersion

In addition to the surface vector, incident angle, and refractive coefficient ratio, the refraction volume also depends on the wavelength of the incident light. For example, red light is much more refraction than blue light. This phenomenon is calledColor dispersion(Chromatic dispersion ). This is why a rainbow is formed when white light enters the prism.

A real light has a wavelength, not just three special discrete wavelengths. However, we can simulate only the wavelength of the red, green, and blue components of light. Practice has proved that this approximation is effective.

Combining the color dispersion Fresnel effect will create a rainbow effect, as if the rendered object is made of crystal.

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.