POV-Ray : Newsgroups : povray.binaries.images : Rainbow... : Re: Rainbow... Server Time
1 Aug 2024 06:24:42 EDT (-0400)
  Re: Rainbow...  
From: nemesis
Date: 27 Nov 2008 12:18:20
Message: <492ed65c@news.povray.org>
Trevor G Quayle escreveu:
> A simple doodle that I've been playing with the past couple days.

ha!  Incidentaly, I've done in the past a similar image.  I was trying 
to get it to look like with Mental Ray's dielectric shader:

http://en.wikipedia.org/wiki/Dielectric_Shader

I think it's hard to get colors like that.


code:


/**
  * mental ray can, so can povray
**/



#local GI = no;
#local CAUSTICS = on;
#local SOFTSHADOWS = on;
#local BLUR = 30;

background { rgb 0 }

#macro reflmat( fdcol )
	/*texture {
		pigment { rgbt fdcol + <0,0,0,.96> }
		finish {
		    diffuse .0 ambient .0 brilliance 1.1 metallic 1
		}
	}*/
	texture {
		//pigment { rgbt <1,1,1,.97> }
		pigment { rgbft fdcol + <0,0,0,.3,.68> }
		finish {
		    diffuse 20 ambient .0 brilliance 3 metallic 1
		    reflection { .05,.98 metallic 0 fresnel on
			exponent 2 }
			conserve_energy
		}
	}
         hollow
         interior { ior 1.5 //fade_power 2 fade_distance .2
		fade_color fdcol*1
             //media { scattering { 1, fdcol/10 extinction 1 } }
             media { absorption (1-fdcol)*.16 samples 5 }
             media { emission .3*fdcol }
         }
         photons { target on refraction on collect off }
#end


// cena
union {
     // chao
     plane { y, 0 pigment { rgb 1 } finish { ambient .06 diffuse .6 }
         photons { target off refraction on collect on }
     }
     // as duas semi-roscas:  red (x) e blue (z)
     union {
         torus { 1.2,.16 reflmat( z ) rotate x*90 translate -y*.0 + x/3 }
         torus { 2,.2 reflmat( x ) rotate x*90+y*90 translate -y*.4 }
         translate -y/2
     }

     light_source { 7*y 1.5
         #if (SOFTSHADOWS)
         //spotlight point_at 0
         area_light 1.4*x,1.4*z,5,5 jitter adaptive .001
         #end
         photons { refraction on area_light }
     }

     box { -1,1 scale y*2 translate y*5 no_image no_shadow
	pigment { rgb 1 } finish { ambient 2 diffuse 1 } }

     rotate -y*30
     rotate -x*30
     translate z*6+y/5
}

camera { angle 30 #if (BLUR) focal_point 0 aperture .002 blur_samples 
BLUR #end }

global_settings {
     max_trace_level 60
     #if (GI)
     ambient_light .002
     radiosity {
         brightness 1.6
         count 60
         error_bound .5
         gray_threshold .7
     }
     #end

     #if (CAUSTICS)
     photons { /*spacing .1*/ count 500000 }
     #end
}


Post a reply to this message


Attachments:
Download 'desafio-mental-dieletric-le_doublot-wip4.png' (302 KB)

Preview of image 'desafio-mental-dieletric-le_doublot-wip4.png'
desafio-mental-dieletric-le_doublot-wip4.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.