Le pigment définit la couleur
de la surface de l'objet. - Ce peut-être une simple couleur, définie par les trois composants <R,G,B>, chacune des trois valeurs se situe entre 0 et 1, correspondant à une saturation de 0 à 100% de chaque composant. En les combinant, les couleurs tendent vers le blanc. Quand un logiciel de dessin donne des valeurs codées de 0 à 255, il est très simple de faire la conversion en divisant ces valeurs par 255. - Ce peut-être aussi un motif de couleurs. On utilise dans ce cas une "color_map" (palette de couleurs).Différents motifs : gradient x , gradient y, wood, marble, agate, bozo, quilted, wrinkles, granite...
|
|
// ==== includes standards
==== #include "colors.inc" #include "textures.inc" // ==== declaration des objets de la scene ==== #declare boite = box { <0, 0, 0>,<10, 5, 10> pigment { wood color_map { [0 rgb <255, 237, 44>/255 ] [0.5 rgb <255, 185, 97>/255 ] [1 rgb <255, 114, 53>/255] } turbulence 0.1 } } #declare boulle = sphere { <0, 0, 0>, 2 pigment { bozo color_map { [0 rgb <255, 237, 44>/255] [0.5 rgb <255, 185, 97>/255] [1 rgb <255, 114, 53>/255] } } } #declare tube = cylinder { <0, 0, 0>, <0, 0, 10>,2 pigment { crackle color_map { [0 rgb <255, 237, 44>/255] [0.2 rgb <255, 185, 97>/255] [1 rgb <255, 114, 53>/255] } } } #declare tube_elargi = cone { <0, 0, 0>,0.5 <0, 8, 0>,1.5 pigment { gradient y color_map { [0 rgb <255, 237, 44>/255 ] [0.5 rgb <255, 185, 97>/255 ] [1 rgb <255, 114, 53>/255 ] } } } #declare anneau = torus { 3, 0.6 pigment { granite color_map { [0 rgb <255, 237, 44>/255 ] [0.5 rgb <255, 185, 97>/255 ] [1 rgb <255, 114, 53>/255 ] } } } |
![]() // ==== realisation de la scene === object { boite } object { tube translate <15, 2, 0> } object { tube_elargi } object { boulle translate <-3, 2, -3> } object { anneau translate <8, 0, -4> } object { sol} background { color Grey } // ==== eclairage ==== light_source { <1600, 2000, -800> color White } // ==== camera ==== camera { location < 5, 10, -18> look_at <5, 0, 0>} |
le finish contrôle la façon dont
la surface d'un objet réagit à la lumière. |
|
// ==== includes standards ==== #include "colors.inc" #include "textures.inc" // ==== declaration des objets de la scene ==== #declare boite = box { <0, 0, 0>,<10, 5, 10> pigment { Red} finish { reflection 0.3 } } #declare boulle = sphere { <0, 0, 0>, 2 pigment { Aquamarine } finish { ambient 0.2 specular 0.2 roughness 0.05 brilliance 2 reflection 0.2 } } #declare tube = cylinder { <0, 0, 0>, <-5, 0.6, 0>,1 pigment { Cyan } finish { specular 0.6 roughness 0.01 brilliance 1.5 } } #declare tube_elargi = cone { <0, 0, 0>,0.5 <0, 8, 0>,1.5 pigment { MediumGoldenrod } finish { specular 0.8 roughness 0.2 brilliance 0.8 reflection 0.2 } } #declare anneau = torus { 3, 0.3 pigment { Magenta} finish { specular 0.8 roughness 0.008 } } #declare sol= plane { y, 0 pigment { checker color White color CoolCopper //scale 2 } finish { diffuse 0.3 reflection 0.3 } } |
![]() // ==== realisation de la scene === object { boite } object { tube translate <12, 1, -3> } object { tube_elargi } object { anneau translate <5, 0.3, -4> } object { boulle translate <-3, 2, -3> } object { sol} background { color Grey } // ==== eclairage ==== light_source { <1600, 2000, -200> color White } // ==== camera ==== camera { location < 5, 10, -18> look_at <5,1,0> } |
sommaire |
csg |
interior |