|
|
web.4aa64f7175ff90ec9dacbac0@news.povray.org...
> Hi all,
> This is an image here:-
> http://www.flickr.com/photos/40381418@N02/3717188064/
> on Flickr. Can anyone show how this image was made, especially the
> lighting and
> the glass material and how it's so vivid and vibrant please.
>
> Any help/pointer would be greatly appreciated.
>
I took as a challenge to try and get as close as I could to the image.
The main issue is the ior for which I couldn't find a good value for both
refraction and caustics width
Marc
.
Here is the code :
#version 3.6
#declare Photons=1;
global_settings {
max_trace_level 11
#if (Photons) // global photon block
photons {
spacing 0.02 // specify the density of photons
}
#end
}
// ----------------------------------------
camera {
right x*image_width/image_height
location <-5,3,-5>
look_at <0,0.0,0>
}
light_source {
<-500,400,200>*.2
color rgb 1.0
photons {
refraction on
reflection on
}
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb 1.3]
[0.7 rgb <0.8,0.8,0.8>]
}
}
}
// ----------------------------------------
plane {
y, 0
texture {
pigment { color rgb 1 }
finish {ambient 0 diffuse .6 brilliance 0
reflection {
.5
}
// conserve_energy
}
}
}
#macro M_Glass(Cnt_spheres)
material {
texture {pigment {color Fadecolors[Cnt_spheres] transmit .7 filter .3}
finish {
ambient 0.0
diffuse 0.0
specular 1
roughness 0.005
reflection {
0.3, 1
// fresnel on
falloff 3
}
conserve_energy
}
}
interior {fade_color Fadecolors[Cnt_spheres]
ior 1.5
#if(Photons=0)
caustics .2
#end
fade_power 1001
fade_distance .8
}
}
#end
#declare
Fadecolors=array[7]{<1,0,0>,<1,0.5,0>,<1,1,0>,<0,1,0>,<0,0.5,1>,<0,0,1>,<.8,0,.8>};
#declare Rayon=.5;
#declare Nb_spheres=7;
#declare Depart=(Nb_spheres/2)*-Rayon;
#declare Cnt_spheres=0;
#while (Cnt_spheres<Nb_spheres)
sphere {
y*Rayon, Rayon
translate x*(Depart+(Rayon*2*Cnt_spheres))
M_Glass(Cnt_spheres)
photons { // photon block for an object
target 1.0
refraction on
reflection on
}
hollow
}
#declare Cnt_spheres=Cnt_spheres+1;
#end
Post a reply to this message
|
|