POV-Ray : Newsgroups : povray.text.scene-files : first post. rusting chrome spheres.pov source Server Time
22 Dec 2024 08:58:02 EST (-0500)
  first post. rusting chrome spheres.pov source (Message 1 to 1 of 1)  
From: Tony
Subject: first post. rusting chrome spheres.pov source
Date: 26 Jan 2005 00:04:44
Message: <41f724ec@news.povray.org>
This is the source for my first post in p.b.images.  I think that I may have too 
much redundancy in the layered textures and I'm wondering whether they can be 
made more efficient.  Any suggestions are appreciated.



// Persistence of Vision Ray Tracer Scene Description File
// File: Rusting chrome spheres.pov
// Vers: 3.5
// Desc: Checkered Floor Example
// Date: 01/25/05
// Auth: Tony
//

#version 3.5;

#include "colors.inc"


global_settings {
   assumed_gamma 1.0
   max_trace_level 5
  // number_of_waves 1
}
background{ color rgb 0}
// ----------------------------------------

#declare RustedChrome =
   texture   //The rust spots are transparent.  This allows the finish to apply
	    //only to the chrome.
         {
          pigment
          {
             granite
             color_map
             {
                [ 0.0     rgbft <0.42, 0.2, 0.2, 0.0, 1> ]
                [ 0.3879  rgbft <0.6, 0.6, .6, 0.0, 0.0>] //still shiny chrome
                [0.388    rgbft <.5,.5,.5,0,0>]//still shiny chrome
                [ 0.508897  rgbft <0.5104, 0.2, 0.2, 0.0, 1> ]
                [ 0.654804  rgbft <0.3, 0.2, 0.2, 0.0, 1> ]
                [ 1.0     rgbft <0.3, 0.2, 0.2, 0.0, 1> ]
             }
          }
          finish
          {
            diffuse .3
            ambient 0.0
            specular 0.6
            reflection
            { .5
               metallic .01
            }
            conserve_energy
           }
           }

   texture   //the chrome is transparent allowing the reflective chrome from
	    //above to shine through
         {
          pigment
          {
             granite
             color_map
             {
                [ 0.0     rgbft <0.42, 0.2, 0.2, 0.0, 0> ]
                [ 0.3879  rgbft <0.6, 0.6, .6, 0.0, 1>]//still shiny chrome
                [0.388    rgbft <.5,.5,.5,0,1>]//still shiny chrome
                [ 0.508897  rgbft <0.5104, 0.2, 0.2, 0.0, 0> ]
                [ 0.654804  rgbft <0.3, 0.2, 0.2, 0.0, 0> ]
                [ 1.0     rgbft <0.3, 0.2, 0.2, 0.0, 0> ]
             }
          }
        }



          //  This texture was created by Thomas de Groot.  Modified by Tony



camera {
   location  <-1, .5, -5>
   direction 1.5*z
   right     x*image_width/image_height
   look_at   <0.0, 0.0,  0.0>
   //rotate x*90
}

sky_sphere {
         pigment {
                 gradient y
                 color_map {
                         [0.0 rgb <0.6,0.7,1>]
                         [0.7 rgb <0,0.1,0.8>]
                           }
                 }
            }

light_source {
   <0, 0, 0>            // light's position (translated below)
   color rgb <1, 1, 1>  // light's color
   translate <-30, 30, -30>

}

// ----------------------------------------

plane {               // checkered floor
   y, -1
   texture {
            pigment {
                 checker
                 color White //rgb <.7,.2,0>
                 color Blue
                 scale.5
                  }


            normal {
                    waves 0.5
                    translate <-1,-1,-1>}

            finish{
                 diffuse .3
                 ambient 0.0
                 specular 0.6
                 reflection {
                             1
                             metallic
                            }
                 conserve_energy
                  }
           }
       }




sphere {                                                //reflective sphere
          <-1,-.5,-1>,1.25
          texture {RustedChrome}
        }



sphere {                                                //reflective sphere
          <8,3,20>,2
          texture {RustedChrome}
        }


sphere {                                                //reflective sphere
          <25,10,40>,2
          texture {RustedChrome}
        }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.