|
|
Le 2022-08-04 à 14:12, Chris R a écrit :
> Alain Martel <kua### [at] videotronca> wrote:
>> Le 2022-08-02 à 11:29, Chris R a écrit :
>>> Whenever I create a scene that contains objects made of glass, I spend a lot of
>>> time tweaking the various pigment, finish, and interior parameters of the
>>> material to try and get something that looks realistic. Sometimes I start with
>>> what I can find in glass.inc, but it doesn't appear to have been updated since
>>> v3.5.
>>>
>>> Has anyone worked on something similar to RC3Metal for glass that takes
>>> advantage of all of the new finish features in later versions? It might be
>>> something I'd be willing to explore, but I don't have a great grasp on how all
>>> of combinations, including fresnel interact, so it's going to be hit and miss.
>>>
>>> Thanks,
>>>
>>> -- Chris R.
>>>
>>>
>>
>> Normally, for a transparent object having an IOR, you use reflection{1
>> fresnel} to control the reflectivity. There is usually no need to use
>> another value here.
>> Fresnel reflection depends entirely on the ratio between the ior on each
>> sides of the surface and the angle of incidence. A ratio of 1 mean NO
>> reflection. A standalone object without an interior defining an ior
>> different from 1 will also show no fresnel reflection.
>>
>> When the fresnel keyword is present, it always default to ON.
>> falloff and exponent should be left to their default values. Don't use
>> those.
>> Do not use metallic.
>>
>> Then, you should also use the fresnel option for the highlights. Need
>> the latest version. IIRC, it was not implemented in version 3.7, but is
>> supported in the latest V1.8 beta.
>> Examples : specular 0.7 fresnel roughness 0.001, phong 0.7 fresnel
>> phong_size 500
>>
>> Also, you should use transmit 1 or filter 1 as your pigment.
>> If you want the object to be coloured, use fading in the interior
>> statement :
>> interior{ior 1.5 fade_color rgb<1, 0.6, 0.6> fade_distance 1 fade_power
>> 1001}// A pink object.
>> Adjust fade_distance for the dimension and scale of your object. It's
>> easily the most important parameter when using fading colours in an
>> interior.
>>
>> ALWAYS use conserve_energy.
>>
>> Sample glass :
>> texture{
>> pigment{rgbt 1}
>> finish{specular 1 roughness 0.001 fresnel
>> ambient 0 diffuse 0
>> reflection{ 1 fresnel }
>> conserve_energy
>> }
>> }
>> interior{ ior 1.5 //typical glass IOR
>> fade_color rgb<0.9, 1, 0.9>//slightly greenish
>> fade_distance 2 // Adjust to the size and scale of the object
>> fade_power 1001}
>
> Thanks for the insights. I am trying them out now.
>
> I don't have a good understanding of when to use the albedo keywork for specular
> and diffuse reflection. I note that you do not use it above.
>
> -- Chris R.
>
>
You use albedo when you also use a brilliance that differs from the
default of 1.
As I did not use brilliance in my example, it was not useful to use albedo.
Example of the use of albedo and fresnel with an opaque pigment :
pigment{rgb< 0.7, 1, 0.2>}
finish{
brilliance 10 //high brilliance for a very highly polished surface
diffuse albedo 0.7 // albedo needed to have correct illumination
specular albedo 1 roughness 0.01// albedo also needed due to the high
brilliance
// I like to put the roughness on the same line as specular as they work
together
// Same thing for phong and phong_size.
fresnel // have the IOR also affect the highlights
reflection{1 fresnel}
}
interior{ior 1.7}
Post a reply to this message
|
|