|
 |
Le 2025-04-23 à 10:01, GioSeregni a écrit :
> Hi all,
> I am sorry.
> I don't understand the complex explanation of some changes made after version
> 2.x, but I'm "reverting" some of my files.
> I would appreciate if someone could translate these instructions because my old
> compiler got from the CAD layer name and wrote something like this, which is now
> not valid.
>
My take.
> DEF GOLDDARK Material {diffuseColor 0.81 0.71 0.23 ambientIntensity 0.5
> specularColor 1 1 1 shininess 1}
#declare GOLDDARK = material{
pigment{rgb<0.81, 0.71, 0.23>}
finish{diffuse 0.5 ambient 0 specular 1 metallic roughness 0.01
reflection{0.6 metallic}
}
}// This is a metal.
The metallic key word cause the highlight and reflection to take the
colour of the surface.
Need an environment to show in the reflection.
>
> DEF POLIBLUE Material {emissiveColor 0 0 0 diffuseColor 0.05 0 0.50
> ambientIntensity 0.4 specularColor 0.8 0.8 0.8 shininess 0.625}
#declare POLIBLUE = material{
pigment{rgb<0.05, 0, 0.5>}
finish{diffuse 0.7 ambient 0.1 specular 0.8 roughness 0.375}
// That's a rather dull surface.
}
Make roughness smaller to make the highlight tighter.
>
> DEF DEMIRED Material {ambientIntensity 0.4 diffuseColor 0.6 0.1 0.1
> specularColor 0.6 0.1 0.1 shininess 0.8 transparency 0.3}
#declare DEMIRED = material{
pigment{rgbt<1, 0.8, 0.8, 0.6>}//transparent pigment.
finish{diffuse 0.5 ambient 0 specular 0.8 fresnel roughness 0.1
reflection{ 1 fresnel}
}
interior{ior 1.5// required for fresnel to work
dispersion 1.02// blue refract more than red by that amount
fade_color rgb<0.6, 0.1, 0.1>//Actual colour
fade_distance 0.1//Define how the thickness affect the colour
fade_power 1001 //a standard value
}
}
That's a transparent material. Made it have a colour that depends on the
thickness. Adjust fade_distance as needed. fade_distance depends on the
scale of your scene.
Need an IOR for the fresnel reflection to work. Will show refraction.
Fresnel highlight and reflection are minimal when the surface is viewed
perpendicularly and maximum at grazing angles.
Need an environment to show in the transparency and the effect of
refraction.
>
> Thanks in advanced!
> G.
>
>
Post a reply to this message
|
 |