/* Real Explosion Ver .5 Created by H.E. Day mailto: PovRayGuy@aol.com This is a demonstation of the explosion. I will add more features and functions soetine in the future. Feel free to use this version in any pic or anim as long as you give me credit for the explosion. I recommend that you render this with 60 frames or more. Happy destruction! */ #version unofficial MegaPov 0.4; global_settings { post_process {soft_glow{.675, 2}} } #declare Rand = -18 #declare Deform = 1 #declare Detail = .05 //.001 - .1 are good values. #declare Smoke = on //turns the light-sampling smoke on or off #declare SmokeAmount = 1.25 //.5 is about minimum #declare SmokeGlowAmount = 1/2 #declare FireBrightness = 1 //.5 is about minimum #declare FireRedness = 1/2 #declare SmokeBrightness = 1 //.5 is about minimum #declare SmokeDrift = off //Will the smoke drift? Any wind? #declare SmokeDriftDirection = y //doesn't matter if not using SmokeDrift #declare SmokeDriftAmount = 1 //doesn't matter if not using SmokeDrift #declare ModClock = pow(clock,.5) #if (SmokeDrift = off) #declare SmokeTranslate = vrotate(ModClock/2*y,Rand-90) #declare SmallSmokeTranslate = vrotate(ModClock/4*y,7*Rand) #else #declare SmokeTranslate = ModClock*SmokeDriftDirection*SmokeDriftAmount #declare SmallSmokeTranslate = ModClock*(SmokeDriftDirection/2)*SmokeDriftAmount #end #declare Base=function {"sphere",<1>} #declare Add1= function { pigment {granite color_map {[0 rgb 1][1 rgb 0]} scale 3 translate 2*ModClock warp {turbulence 1 omega 0} translate -2*ModClock translate Rand translate SmokeTranslate } } #declare Add3= function { pigment {granite color_map {[0 rgb 0][1 rgb 1]} scale 4 translate 2*ModClock warp {turbulence 1 omega 0} translate -2*ModClock translate Rand translate SmokeTranslate } } #declare Add2= function { pigment {granite color_map {[0 rgb 1][1 rgb 0]} scale 1/4 translate 1*ModClock warp {turbulence 1 omega 0} translate -1*ModClock translate Rand translate SmallSmokeTranslate } } isosurface { function { Base(x,y,z) +(Add1(y,z,x))*(.65*Deform-(clock*.15*Deform)) +(Add2(y,z,x))*(.15*Deform-(clock*.05*Deform)) } eval accuracy Detail contained_by{sphere{0,1}} texture { pigment { granite color_map {[.3+.7*clock rgb SmokeBrightness-(sin((clock-.25)*2*pi)/2+.5)/2 transmit 2*clock-1][.7+.3*(2*clock-1) rgb SmokeBrightness-sin(clock * 2 * pi)/2 transmit pow(clock,.75)/2]} scale 1/2 translate 2*ModClock warp {turbulence 1 omega 0} translate -2*ModClock translate Rand translate SmokeTranslate } normal {bumps scale .125/3 turbulence .5 bump_size .45*clock} #if (Smoke = on) finish {ambient 1/2-clock/2 diffuse 1-clock } #else finish {ambient 0 diffuse 0 } #end } texture { pigment {spherical color_map { [.15*(1-SmokeGlowAmount) rgbt <1,1/2*(1-FireRedness),0,1>*FireBrightness] [.4 rgbt <1,1/2*(1-FireRedness),0,.5>*FireBrightness] [.575 rgb <1,.75-(.5*ModClock)*FireRedness,.1>*1.5*FireBrightness] [1 rgb 1] }scale 10 warp {turbulence 1 omega .125} scale 1/10 turbulence .35} finish {ambient 1} scale (1.5-(clock*1.5)*(SmokeAmount/2+1/2))*1.45 } hollow on scale 1/2+ModClock*3/2 } camera { direction 1 location <0,0,2>*2 look_at <0,0,0> } light_source {<75,20,0>*100 rgb 1} sphere {0,1/3 pigment { rgb 1}}