|
|
Problem: fade color seems to disappear on single sphere of union when using
photons. see povray.binary.images for image and longer description.
// begin scene
#version 3.5;
#declare Radiosity=on;
#declare Photons=off;
#declare Transmit=on;
global_settings {
assumed_gamma 1.0
max_trace_level 12
#if (Photons) // global photon block
photons {
//spacing 0.005 // specify the density of photons
count 3000000 // alternatively use a total number of
photons
//gather min, max // amount of photons gathered during
render [20, 100]
//media max_steps [,factor] // media photons
//jitter 1.0 // jitter phor photon rays
//max_trace_level 5 // optional separate max_trace_level
//adc_bailout 1/255 // see global adc_bailout
save_file "excl_1.pho" // save photons to file
//load_file "excl_1.pho" // load photons from file
//autostop 0 // photon autostop option
//radius 10 // manually specified search radius
// (---Adaptive Search Radius---)
//steps 1
//expand_thresholds 0.2, 40
}
#end
#if (Radiosity)
radiosity {
pretrace_start 0.08 // start pretrace at this size
pretrace_end 0.04 // end pretrace at this size
count 35 // higher -> higher quality (1..1600)
[35]
nearest_count 5 // higher -> higher quality (1..10) [5]
error_bound 1.8 // higher -> smoother, less accurate
[1.8]
recursion_limit 3 // how much interreflections are
calculated (1..5+) [3]
low_error_factor .5 // reduce error_bound during last
pretrace step
gray_threshold 0.0 // increase for weakening colors (0..1)
[0]
minimum_reuse 0.015 // reuse of old radiosity samples
[0.015]
brightness 1 // brightness of radiosity effects
(0..1) [1]
adc_bailout 0.01/2
//normal on // take surface normals into account
[off]
//media on // take media into account [off]
//save_file "file_name" // save radiosity data
//load_file "file_name" // load saved radiosity data
//always_sample off // turn sampling in final trace off [on]
//max_sample 1.0 // maximum brightness of samples
}
#end
}
#default {
texture {
pigment {rgb 1}
#if (Radiosity)
finish {
ambient 0.0
diffuse 0.6
specular 0.3
}
#else
finish {
ambient 0.1
diffuse 0.6
specular 0.3
}
#end
}
}
// ----------------------------------------
camera {
right x*image_width/image_height
location <0,0.65,-2>
look_at <0,0.35,0>
}
light_source {
<500,500,-500> // light's position
color rgb <1, 1, 1> // light's color
photons { // photon block for a light source
refraction on
reflection on
}
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
#declare w1 = 8;
#declare t1 = <0.34, 0.53, 0.43>;
#while (w1 > 0)
warp {repeat x flip y}
warp {turbulence t1 }
scale 1.1
#declare w1 = w1 - 1;
#end
}
}
plane {
-z, 0
texture {
pigment {rgb 1}
normal {
quilted 0.4 // amount
control0 -1 // lower curvature (-1...1)
control1 1 // upper curvature (-1...1)
scale 0.0065
}
}
}
#declare t1 = texture {
pigment {
rgb 1 //<1, 0.5, 0>*2
#if (Transmit)
transmit 1
#end
//filter 0.2
}
finish {
specular 1
roughness 0.0065
diffuse 0.2
reflection {
0.1, 0.45
fresnel on
}
}
}
#declare i1 = interior {
ior 1.65
//dispersion 1.1 // needs a color_map in the light source
//dispersion_samples 10 // accuracy of calculation (2..100) [7]
fade_power 1003 // values larger than 1000 give realistic
exponential attenuation
fade_distance 0.45 // distance where light reaches half intensity
fade_color <1, 0.65, 0.0>
}
#declare i2 = interior {
ior 1.65
//dispersion 1.1 // needs a color_map in the light source
//dispersion_samples 10 // accuracy of calculation (2..100) [7]
fade_power 1003 // values larger than 1000 give realistic
exponential attenuation
fade_distance 0.05 // distance where light reaches half intensity
fade_color <1, 0.65, 0.0>
}
#declare m1 = material {
interior {i1}
texture {t1}
}
#declare m2 = material {
interior {i2}
texture {t1}
}
union {
merge {
cone {
<0, 1, 0>, 0.25,
<0, 0, 0>, 0.1
hollow
}
sphere {
<0, 0, 0>, 0.25
scale <1, 0.5, 1>
translate 1*y
hollow
}
sphere {
<0, 0, 0>, 0.1
scale <1, 0.5, 1>
hollow
}
rotate -x*(degrees(asin(0.25-0.1)))
translate <0, 0, -0.1>
material {m1}
}
sphere {
<0, -0.35, 0>, 0.2
translate <0, 0, -0.1>
hollow
material {m2}
}
photons {
target
reflection on
refraction on
collect on
}
rotate -10*z
translate <0, 0.065, 0>
}
Post a reply to this message
|
|