|
|
Le 18-04-12 à 01:43, Sven Littkowski a écrit :
> Interesting. I never worked with these features (ior, fresnel, fresnel
> reflection, micronormal perturbation) and am eager to try them out.
>
> At the current level, the painted lumber still shows a bit of the grain,
> the deck even more, but I want to add now these new features that you
> mention to that.
>
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
>
A micronormal is nothing more than some normal scaled very small. It's
used exactly the same way as you would use regular normals. To look
correct, it demand anti-aliasing. Without, it looks very grainy. Coupled
with reflection, it's used to get blurred reflection.
It IOR is the index of refraction. Everything non-metallic have one,
even if it's opaque. When light encounter a surface, it's the difference
of the outside and inside IORs and the angle of incidence that dictate
how much reflection there will be. The specular or phong highlights are
really nothing more than the reflection of light source.
The ior is set in the interior block. Here are examples for water and
generic glass :
//pure water at 20°C
interior{ior 1.33}
//generic glass
interior{ior 1.5}
Most waxes have an IOR that is slightly lower than that of water (1.2 to
1.3). Glasses can have IORs ranging from about 1.4 all the way up to 1.8
or slightly more. Gems can range from 1.45 to 2.45 (diamond).
To enable fresnel in the reflection, you simply add fresnel into the
reflection block. You also need to set an ior !=1, or there will be no
reflection. Rays that are perpendicular to the surface will have very
little reflection and rays just grazing the surface will get fully, or
almost fully, reflected.
finish{reflection{1 fresnel} conserve_energy }
conserve_energy is used to adjust the transmitted ray relative to the
reflection when the reflection is not constant. Don't affect things for
opaque surfaces.
Using fresnel reflection is essential if you want to have some realistic
water, glass or gems.
With version 3.8, you can also have a finish level fresnel:
finish{diffuse 0.7 ambient 0.1 specular 0.5 roughness 0.001 fresnel}
Where the fresnel will affect both diffuse and specular, or phong. Here
also, you need to have an interior block to set the material's IOR.
With versions 3.7 or less, it won't work, but probably don't cause an
error, just have no effect.
Post a reply to this message
|
|