sabato 7 marzo 2015

A whole scene example

This is another example of a whole scene constructed with POV Ray, the picture is based on the woodbox.pov file; has been recreated modifing position and other charactheristic of the example.

// POV-Ray 3.7 Scene File "Prova6.pov"   basato su woodbox
// author:  Max
// Date:   07/03/2015

#version 3.7;
global_settings { assumed_gamma 1.2 }

#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "metals.inc"
#include "glass.inc"
#include "woods.inc"

camera {
   location <-5, 22, -26.5>
   angle 45
   right x*image_width/image_height
   look_at <0,0,0>
}


#declare Dist=80.0;
light_source {< -50, 25, -50> color White
     fade_distance Dist fade_power 2
  area_light <-40, 0, -40>, <40, 0, 40>, 3, 3
   adaptive 2
   jitter
}
light_source {< 50, 10,  -4> color Gray30
     fade_distance Dist fade_power 2
  area_light <-20, 0, -20>, <20, 0, 20>, 3, 3
   adaptive 1
  jitter
}
light_source {< 0, 200,  0> color Gray30
     fade_distance Dist fade_power 1
        area_light <-30, 0, -30>, <30, 0, 30>, 3, 3
        adaptive 1
        jitter
}

sky_sphere {
    pigment {
        gradient y
        color_map {
            [0, 1  color Gray60 color Gray80]
        }
    }
}

#declare M_Legno18b =
colour_map {
    [0.00 0.35   color rgbf < 0.50, 0.26, 0.12, 0.10>
                 color rgbf < 0.54, 0.29, 0.13, 0.20>]
    [0.35 0.45   color rgbf < 0.54, 0.29, 0.13, 0.20>
                 color rgbf < 0.55, 0.28, 0.10, 0.70>]
    [0.45 0.50   color rgbf < 0.55, 0.28, 0.10, 0.70>
                 color rgbf < 0.50, 0.23, 0.15, 0.95>]
    [0.50 0.70   color rgbf < 0.50, 0.23, 0.15, 0.95>
                 color rgbf < 0.56, 0.29, 0.17, 0.70>]
    [0.70 0.95   color rgbf < 0.56, 0.29, 0.17, 0.70>
                 color rgbf < 0.54, 0.29, 0.13, 0.20>]
    [0.95 1.00   color rgbf < 0.54, 0.29, 0.13, 0.20>
                 color rgbf < 0.50, 0.26, 0.12, 0.10>]
}


#declare Trama_pavimento =
    texture { pigment { P_WoodGrain18A color_map { M_Wood18A }}}
    texture { pigment { P_WoodGrain12A color_map { M_Legno18b }}}
    texture {
        pigment { P_WoodGrain12B color_map { M_Legno18b }}
        finish { reflection 0.25 }
    }

#declare Pavimento =
plane { y,0
    texture { Trama_pavimento
        scale 2.5
        rotate y*90
        rotate <10, 0, 15>
        translate z*4
    }
}

#declare T0 = texture { T_Wood15 }

#declare T =
texture { T0
    finish { specular 0.50 roughness 0.1 ambient 0.25 }
}

#declare T1 = texture { T translate  x*10 rotate <0, 87, 0> }
#declare T2 = texture { T translate  y*10 rotate <0,  1, 0> }
#declare T3 = texture { T translate -x*10 rotate  <0, 90, 0> translate z*10}

#declare Pannello_frontale =
box      { <-5.75, 0.00, -0.5>,
           < 5.75, 1.75,  0.0> }

#declare Bordo_fronte_alto   =
cylinder { <-5.75, 1.75,  0.0>,
           < 5.75, 1.75,  0.0>, 0.5 }

#declare Bordo_fronte_destro =
cylinder { < 5.75, 0.00,  0.0>,
           < 5.75, 1.75,  0.0>, 0.5 }

#declare Bordo_fronte_sinistro  =
cylinder { <-5.75, 0.00,  0.0>,
           <-5.75, 1.75,  0.0>, 0.5 }

#declare Angolo_as_fronte  = sphere   { <-5.75, 1.75,  0.0>, 0.5 }
#declare Angolo_ad_fronte  = sphere   { < 5.75, 1.75,  0.0>, 0.5 }


#declare Pannello_sinistro      = box { <-0.50, 0, -5.75>, <0.50, 1.75, 5.75> }
#declare Bordo_sinistro_alto   = cylinder { <0, 1.75, -5.75>, <0, 1.75, 5.75>, 0.5 }

#declare Parte_sinistra =
intersection {
    union {
        object { Pannello_sinistro       }
        object { Bordo_sinistro_alto    }
    }
    plane { x, 0 }
    texture { T2 scale 2.5}
    bounded_by { box { <-0.501, 0.01, -5.251>, <0.01, 2.251, 5.251> } }
}

#declare Fronte_scatola =
intersection {
    union {
        object { Pannello_frontale      }
        object { Bordo_fronte_alto   }
        object { Bordo_fronte_sinistro  }
        object { Bordo_fronte_destro }
        object { Angolo_as_fronte  }
        object { Angolo_ad_fronte  }
    }
    plane { z, 0 }
    texture { T1 scale 2.5}
    bounded_by { box { <-6.251, 0.01, -0.51>, <6.251, 2.251,  0.01> }}
}
#declare Fondo_scatola = box {<-5.75, 0.0, -5.75> <5.75, 0.25, 5.75> texture {T3} }
#declare Coperchio_scatola =    box {<-5.75, 0.0, -5.75> <5.75, 0.25, 5.75>
    translate -5.25*z    // mette il fulcro nell'origine
    rotate x*35          // apre il coperchio
    translate 5.25*z     // muove il fulcro indietro e
    translate y*2        //sposta in alto
    texture {T3 scale 2.5}
}
#declare Scatola =
union {
    object { Fronte_scatola translate -z*5.25}
    object { Fronte_scatola scale <1,1,-1> translate z*5.25}
    object { Parte_sinistra translate -x*5.75 }
    object { Parte_sinistra scale <-1,1,1> translate x*5.75 }
    object { Coperchio_scatola  }
    object { Fondo_scatola }
}
#declare Sfere =
union {

    // Nella scatola
    sphere { <1.5, 1.5, -0.75>, 1.25
        texture {
            T_Wood14
            finish { specular 0.35 roughness 0.05 ambient 0.3 }
            translate x*1
            rotate <15, 10, 0>
            translate y*2
        }
    }
    // Nella scatola
    sphere { <-1.5, 1.25,  0.5>, 1
        texture { T_Wood18
            finish { specular 0.25 roughness 0.025 ambient 0.35 }
            scale 0.33
            translate x*1
            rotate <10, 20, 30>
            translate y*10
        }
    }
    // Nella scatola
    sphere { <-0.75, 1.0, -1.5>, 0.75
        texture { T_Wood10
            finish { specular 0.5 roughness 0.1 ambient 0.35 }
            translate x*1
            rotate <30, 10, 20>
        }
    }

    // Fuori dalla scatola
    sphere { <-0.75, 0.75, -7.5>, 0.75
        texture { T_Wood4
            finish { specular 0.25 roughness 0.115 ambient 0.2 }
        }
    }
    // Fuori dalla scatola
    sphere { <-2.25, 0.45, -7.5>, 0.45
        texture { T_Wood20
            finish { specular 0.15 roughness 0.15 ambient 0.3 }
            rotate <45, 10, 45>
            translate x*10
        }
    }

    // Fuori dalla scatola
    sphere { <-7.5, 0.95, 0.8>, 0.95
    
      material {
        texture {
          pigment { color rgbf <0.98, 1.0, 0.99, 0.75> }
          finish { F_Glass4 }
          }
        interior {I_Glass caustics 1}
        }
      }
    // Fuori dalla scatola 
    sphere { <-15.5, 0.95, 0.8>, 1.2
      material {
        texture {
          pigment { color rgbf <0.98, 1.0, 0.99, 0.75> }
          finish { F_Glass4 }
          }
        interior {I_Glass caustics 1}
        }
      } 
    // Fuori dalla scatola
    sphere { <-7.00, 0.75, -2.0>, 0.75 texture { T_Copper_2B} }
    // Fuori dalla scatola
    sphere { <-1.75, 0.40, -7.4>, 0.40 texture { T_Brass_3B} }
}
union {
    object { Pavimento }
    object { Scatola }
    object { Sfere }
    rotate -y*45
}


Here the picture generated.

Nessun commento:

Posta un commento