// Persistence of Vision Ray Tracer Scene Description File // File: MediaTutorial.pov // Vers: 3.5 // Desc: A small scene showing how Media and Photons work (together) // Date: November 2002 // Auth: /* Here's the simplest scene I could come up with that uses both media and photons, but you're right - a good tutorial would be an asset. */ /* #version 3.5; #include "colors.inc" #include "textures.inc" global_settings { assumed_gamma 1.0 photons { spacing 0.01 // larger = worse } } camera { location <0.0, 10, -20.0> look_at <0.0, 0, 0.0> } light_source { 0*x color rgb <1,1,1> spotlight translate <40, 80,0> point_at <0, 0, 0> radius 1 falloff 2 } media {scattering{1, rgb 0.1} method 3} plane{y,0 pigment{Gray}} // this object won't affect photons, but will show them cylinder{<2,5,0>,<2.1,5,0>,1 texture{pigment{White} finish{Mirror}} photons{ // this object will affect photons target refraction on reflection on } } */ /* BTW one thing to bear in mind with media is that, unlike most things in pov, it is very scale-dependant. By this I mean that if you scale all elements in a non-media scene by the same amount, the scene will appear the same (a sphere of radius 1 viewed at a distance of 10 units will look the same as a sphere of radius 10 viewed at a distance of 100 units). Try playing with the myScale value in the scene below, and note the alternative line in the media definition that makes the media "scalable".... */ // Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.5 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // #version 3.5; #declare myScale = 1000; #declare myMedia = media { // atmospheric media sample intervals 10 //scattering { 1, rgb 0.03} // this won't scale - as you scale up, the media becomes more opaque.. scattering { 1, rgb 0.03/myScale } //..but this will scale since the media is thinned. samples 1, 10 confidence 0.9999 variance 1/1000 ratio 0.9 } #include "colors.inc" #include "textures.inc" global_settings { assumed_gamma 1.0 } camera { location <0.0, 0, -50.0>*myScale look_at <0.0, 0, 0.0> } light_source { 0*x color rgb <1,1,1> translate <40, 80,0>*myScale } plane{-z,-50 pigment{brick} scale myScale} sphere{0,5 pigment{bozo pigment_map{[0 White][1 Black]}} translate x*10 scale myScale} sphere{0,5 pigment{rgbf 1} interior{media{myMedia}} hollow translate x*-10 scale myScale}