/* chess_caustics-sim.pov * * Based on chess_caustics.pov. * * © 2008 Richard Callwood III. Some rights reserved, under the terms of the * Creative Commons GNU General Public License. No warranty, express or implied. * See http://creativecommons.org/licenses/GPL/2.0/ for more information. * Created 26-aug-2008 * * Note: this is not the scene file that created the images that I submitted to * povray.binaries.images. My original chess_caustics.pov makes heavy use of a * pre-fab scene setting and other include files that I'm not ready to release * to the community. This file approximates that setting based on #debug outputs * and poring through code. * * WarpChess.inc can be downloaded from http://lib.povray.org/ under a separate * license. */ //==================== reconstruction of pre-fab setting ======================= #ifndef (PH) #declare PH = 0.002; #end #declare Light_origin = <-4.20, 6.77, -5.00>; #declare Light_color = <1.442, 1.298, 1.010>; #declare Light_short = 3; #declare Light_boost = (pow (Light_short, 2) + 1) / 2; //reciprocal of POV-Ray fade_power formula #declare Scene_focus = 2.5*y; global_settings { assumed_gamma 1 #if (PH) photons { spacing PH autostop 0 } #end max_trace_level 15 } camera { angle 44.51 location <2.378, 3.978, 1.665> look_at Scene_focus + <0.035, -0.3, -0.049> } #default { finish { ambient <0.054, 0.049, 0.038> } } light_source { Light_origin rgb Light_color * Light_boost fade_power 2 fade_distance vlength (Light_origin - Scene_focus) / Light_short spotlight point_at Scene_focus radius 45 falloff 90 } plane { y, 0 pigment { checker rgb 0.05 rgb 0.1 } finish { specular 0.35 roughness 0.04 } } plane { -y, -8 pigment { rgb 1 } } box { -6, 6 hollow translate 4*y pigment { rgb 0.05 } } //===================== reconstruction of texture macro ======================== //yes, they're metal, not wood #declare WarpChess_WhiteSquareTexture = texture { pigment { rgb <0.95, 0.80, 0.40> } finish { reflection { 0.6 metallic } diffuse 0.320 ambient <0.054, 0.049, 0.038> * 0.4 specular 1.775 metallic 0.95 roughness 0.01127 brilliance 7.896 } normal { bumps 0.1 scale <1000, 1, 1> / 200 } } #declare WarpChess_BlackSquareTexture = texture { pigment { rgb <0.18, 0.11, 0.06> } finish { reflection { 0.6 metallic } diffuse 0.320 ambient <0.054, 0.049, 0.038> * 0.4 specular 1.775 metallic 0.95 roughness 0.01127 brilliance 7.896 } normal { bumps 0.1 scale <1, 1, 1000> / 200 } } //====================== original code, lightly edited ========================= #ifndef (Fast) #declare Fast = no; #end #ifndef (Disp) #declare Disp = 0; #end #ifndef (Samp) #declare Samp = 7; #end #include "consts.inc" #include "colors.inc" #include "woods.inc" #include "shapes.inc" #declare t_Glass = texture { pigment { rgbf 1 } finish { reflection { 0 1 fresnel } conserve_energy specular 1 roughness 0.001 } } #macro Glass_i (Tint, Disp) #local Rbow = 1 + Disp * (Quartz_Glass_Dispersion - 1); interior { ior 1.5 dispersion Rbow dispersion_samples Samp #debug concat ("Glass_i(): dispersion ", str(Rbow,0,4), "\n") fade_power 1 fade_distance 0.05 fade_color Tint #if (!PH) caustics 1 #end } #end #declare WarpChess_WoodTexture = texture { T_Wood6 finish { specular 0.5 roughness 0.01 reflection { 0.04 0.4 falloff 4 } } rotate <-15, 90, 0> } #if (!Fast) #declare WarpChess_BoardFont = "" #declare WarpChess_BaseTexture = texture { pigment { rgbf 1 } finish { specular 1 roughness 0.001 } } #declare WarpChess_WhiteMaterial = material { texture { t_Glass } Glass_i (rgb <0.85, 1, 0.85>, Disp) } #declare WarpChess_BlackMaterial = material { texture { t_Glass } Glass_i (rgb <0.9, 0.3, 0>, Disp) } #end #include "WarpChess.inc" #if (!Fast) #macro Light_up (Obj) #declare Obj = object { Obj photons { target refraction on } } #end Light_up (WarpChess_WhitePawn) Light_up (WarpChess_WhiteRook) Light_up (WarpChess_WhiteKnight) Light_up (WarpChess_WhiteBishop) Light_up (WarpChess_WhiteQueen) Light_up (WarpChess_WhiteKing) Light_up (WarpChess_BlackPawn) Light_up (WarpChess_BlackRook) Light_up (WarpChess_BlackKnight) Light_up (WarpChess_BlackBishop) Light_up (WarpChess_BlackQueen) Light_up (WarpChess_BlackKing) #end #declare Moves = array[8] //from sample WarpChess file { "E2E4", "E7E5", "G1F3", "B8C6", "D2D3", "F8B4", "B1C3", "G8F6" } #declare Board = WarpChess_CreateBoard (Moves) #declare Table = union { Round_Cylinder (<0,0,0>, -0.75*y, 18, 0.1, no) cylinder { 0, -30*y, 1.5 } translate trace (Board, -10*y, y) texture { T_Wood22 rotate <0, -45, 0> } texture { pigment { rgb 0 transmit 1/3 } finish { specular 0.5 roughness 0.005 } } } union { object { Board } object { Table } scale 1/12 translate Scene_focus }