File:Pov ray media and glass sphere sample 1 r 1.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(1,600 × 1,200 pixels, file size: 1.16 MB, MIME type: image/png)

Captions

Captions

POV-Ray media and glass sphere sample

Summary[edit]

Description
English: POV-Ray media and glass sphere sample
Date
Source Own work
Author Merikanto

POV-Ray source code

  #include "shapes.inc" 
#include "colors.inc"
  1. include "textures.inc"
  2. include "stones.inc"
#include "glass.inc"
  1. include "consts.inc" // Index of refraction constants
  2. include "skies.inc"

// global_settings { assumed_gamma 1 }

 #declare Rad_Quality = 0;

global_settings {

 assumed_gamma 1.0
  1. switch (Rad_Quality)
#case (1)
 radiosity {             // --- Settings 1 (fast) ---
   pretrace_start 0.08
   pretrace_end   0.02
   count 50
   error_bound 0.5
   recursion_limit 1
 }
#break
#case (2)
 radiosity {             // --- Settings 2 (medium quality) ---
   pretrace_start 0.08
   pretrace_end   0.01
   count 120
   error_bound 0.25
   recursion_limit 1
 }
#break
#case (3)
 radiosity {             // --- Settings 3 (high quality) ---
   pretrace_start 0.08
   pretrace_end   0.005
   count 400
   error_bound 0.1
   recursion_limit 1
 }
#break
#case (4)
 radiosity {             // --- Settings 4 (medium quality, recursion_limit 2) ---
   pretrace_start 0.08
   pretrace_end   0.005
   count 350
   error_bound 0.15
   recursion_limit 2
 }
#break
#end

}

/*

global_settings
{ photons
  { count 20000
    media 100
  }
}
  • /
  1. default {finish{ambient 0}}
 camera {

// location <20,10,-10> *2

    location <0,0,-10> *15
look_at 0
   angle 7
 }

// background { color rgb <1/2,1/2,1> }

  background { color rgb 0 }
 light_source{ <1, 1, 100>*1000*1000*1000 Gold*2 }   

// light_source{ <15, -15, 100>*1000*1000*1000 Red } // light_source{ <-15, -15, 100>*1000*1000*1000 Blue }

/*

fog {

   distance 500
   color rgbt<1,1,1,0.9>
 }
  */
  1. declare ross1= union {
box {<-1,-2,-2>,<1,2,2> scale x*10 scale 0.1 translate y*0}
box {<-2,-1,-2>,<2,1,2> scale y*10  translate y*0 scale 0.1}
rotate z*45

// pigment { color Black} // finish { phong 1 metallic specular 0.5}

}



  1. declare wall1= object {

box {<-100,-100,-1/2>,<100,100,1/2>}

//scale <100,1,100>

//texture { pigment { color rgb Tan } texture {

 T_Stone2

//T_Grnt3

normal { agate scale 0.1 bump_size 1}

finish {reflection 0 diffuse 0.2}
}

}


  1. declare crosswall1=difference {

object {wall1}

  1. declare xx=0;
  2. for (yy,-5,5)
  3. for (xx,-5,5)

object {ross1 scale z*5

translate <xx*2.5,yy*2.5,0>
scale 1.5 

}

 #end
   #end

}

  1. declare GlassSphere =

intersection { sphere { <0, 0, 0>, 1 }

interior{ior Flint_Glass_Ior} texture { T_Glass3 finish { reflection 0 } }

scale 2 }



object { GlassSphere

scale 3

rotate y*90 translate z*-5 translate y*0.29 translate x*4 }


  1. declare PearlescentGlass =
 material {
  texture {
   pigment { rgb 0 transmit 1 }
   finish {
    reflection { .01, .95 fresnel } conserve_energy
    //big fat phong highlight, to give ethereal sheen to the material.
    //make phong fade with angle, using pov's metallic effect on black
    //(because there's no fresnel for phong)
    phong 30 phong_size 20 metallic 1
    specular 50 roughness .0004   //layer a sharp highlight on top.
   }
  }
  interior {
   ior 1.5
   fade_colour <1,.25,.0>
   fade_distance .5
   fade_power 2
  }
 }
 
  1. declare xobject1=object {

ross1 scale 3

translate z*-4

texture { pigment {granite } }

// interior{ior Flint_Glass_Ior} //texture { //T_Glass3 // T_Glass_Ruby

material { PearlescentGlass

//finish { //reflection 0 // Over-ride reflection //}

}

scale 1.75

rotate <20,30,40>

}



object { crosswall1 }

object { wall1

translate z*-199 }

object {wall1 rotate x*90 translate y*-99

translate z*-100 scale z*2 }

object {wall1

rotate x*90 translate y*99 translate z*-100 scale z*2 }


object {wall1

rotate y*90 translate x*99 translate z*-100 scale z*2 }


object {wall1

rotate y*90 translate x*-99 translate z*-100 scale z*2 }



#declare media1=   box
{ -50,50 pigment { rgbt 1 } hollow
  interior
  { media  
   
    { 
       samples 200,300   
intervals 1

scattering { 1, 0.01 extinction 0.01 }

 }
  }
} 


object {media1}

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current08:58, 15 July 2023Thumbnail for version as of 08:58, 15 July 20231,600 × 1,200 (1.16 MB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata