/* I've found a problem with photons and a certain shape/pigment combination. If you render the glass dome [DomeOn=1] with the offending pigment [CrashPigment=1] and photons [PhotonOn=1] the program crashes while building the photon map. Turn off CrashPigment and the scene renders. Now, turn off the Dome (it will be replaced with a cube), turn on the crashing pigment, and the scene renders fine. In order to crash, you must have both the dome shape and the crashing pigment. Details box of crash message: *********************************** MEGAPOV caused a stack fault in module MEGAPOV.EXE at 0177:0047de56. Registers: EAX=021722e0 CS=0177 EIP=0047de56 EFLGS=00010206 EBX=0217255c SS=017f ESP=02171ea0 EBP=02172238 ECX=4eab531f DS=017f ESI=0217300c FS=10a7 EDX=0217255c ES=017f EDI=021722f8 GS=0000 Bytes at CS:EIP: 53 55 56 33 f6 57 56 e8 8e 13 02 00 a1 7c b5 51 Stack dump: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *********************************** */ #include "colors.inc" #declare PhotonOn = 1.0; // 0=no photons, 1=photons #declare CrashPigment = 1.0; // 0=renders, 1=crashes #declare DomeOn = 1.0; // 0=cube, 1=dome #if (CrashPigment) #declare GlassPig = pigment {color rgbf <0.99,0.99,0.99,0.99>} #else #declare GlassPig = pigment {color rgbf <0.98,0.98,0.98,0.98>} #end #declare phd = 0.4; #declare RadFactor = 6.0; global_settings { max_trace_level 512 #if (PhotonOn) photons { gather 20, 100 radius RadFactor*phd, 2, RadFactor*phd autostop 0 jitter .4 expand_thresholds 0.2, 40 } #end } // THE GLASS TEXTURE #declare GlassFin = finish { ambient 0.1 diffuse 0.1 reflection 0.1 specular 0.4 roughness 0.003 phong 0.51 phong_size 400 } #declare GlassInt = interior {ior 1.5} #declare GlassMat = material { texture { pigment {GlassPig} finish {GlassFin} } interior{GlassInt} } // GLASS DOME /* This is a segment cut/pasted from another scene, so there are a lot of useless variables. Basically it's a cylinder/sphere with a smaller cylinder/sphere differenced out of it to create a hollow dome. */ #declare baseDonutMaj = 13; #declare baseDonutMin = 1.1; #declare baseCylHite = baseDonutMin*1.4; #declare baseCylGrooveR1 = baseDonutMaj*0.92; #declare baseCylGrooveR2 = baseCylGrooveR1*0.91; #declare baseCylGrooveY = 0.3; #declare metbaseDonutMaj = baseCylGrooveR2*0.7; #declare domeHite = 22; #declare gap = 0.00001; #declare outerDome = merge { cylinder { <0,baseCylHite-baseCylGrooveY+gap,0>, <0,domeHite,0> baseCylGrooveR1-gap } sphere { <0,domeHite,0>, baseCylGrooveR1-gap-0.01 } } #declare innerDome = union { cylinder { <0,0,0>, <0,domeHite,0> baseCylGrooveR2+gap } sphere { <0,domeHite,0>, baseCylGrooveR2+gap-0.01 } } #if (DomeOn) #declare GlassObject = difference { object {outerDome} object {innerDome} clipped_by { union { cylinder { <0,baseCylHite-baseCylGrooveY+gap-0.01,0>, <0,domeHite,0> baseCylGrooveR1-gap+0.01 } sphere { <0,domeHite,0>, baseCylGrooveR1-gap } } } bounded_by {clipped_by} material {GlassMat} #if (PhotonOn) photons { separation phd refraction on reflection on //ignore_photons } #end } #else #declare GlassObject = box { <-10,0,-10>, <10,20,10> material {GlassMat} #if (PhotonOn) photons { separation phd refraction on reflection on //ignore_photons } #end } #end object {GlassObject} // floor cylinder { <0,-10,0>, <0,0,0> 35 pigment { checker color Green color Red scale 10 } } light_source { <0,0,0> color White*1.5 translate <0,0,-120> rotate x*31 rotate y*-59 } light_source { <0,0,0> color White*1.5 translate <0,0,-120> rotate x*60 rotate y*70 } camera { location <20,32,-120> look_at <0,4,0> angle 42 } background {CornflowerBlue}