POV-Ray : Newsgroups : povray.text.scene-files : Radiosity Bug? Server Time
1 Jun 2024 16:31:23 EDT (-0400)
  Radiosity Bug? (Message 1 to 1 of 1)  
From: Michael Raiford
Subject: Radiosity Bug?
Date: 13 Jun 2004 00:50:37
Message: <40cbdd1d@news.povray.org>
Here is a minium scene that causes the problem:

Note: I know the scene is a bit more complex that is optimal, but removing
lights and geometry on the affected parts changes the outcome, removing the
scattering media causes the problem to vanish. I've stripped out all items
and textures that are not necessary. I am still using some textures that are
pre-defined with POV-Ray.

------------------------------------------------------

max_trace_level 200
#declare use_radiosity = yes;

#include "colors.inc"
#include "textures.inc"

#declare epsilon = 1.0e-10;

#macro OrangeJuiceMaterial()
        #local OJ_Color = rgb <1.0, 0.8, 0.01>;
        pigment {
                color OJ_Color filter 1.0
        }
        finish {
            specular 0.1 roughness 0.0001
        }
        interior
        {
            ior 1.34

            media
            {
                absorption  (1.0-OJ_Color)*2
                    scattering { 1, 3.0 }
                method 3
            }
        }
        photons
        {


        }
#end

#macro CylindricalGlass2_Liquid(r1, th1, h1, amt)

    #local r = r1/h1*2;
    #local th = th1/h1*2;
    #local h = 2;

    // This will be differenced from the solid portion of the glass
    merge
    {
        cylinder { <0, 0.25*0.5, 0>, <0, h*amt-epsilon, 0>, r - th +
epsilon }
        sphere { <0, 0.5, 0>, 0.5 scale <2*(r-th+epsilon), 0.25+epsilon,
2*(r-th+epsilon)> }
        translate y*(0.2+0.05)
        scale h1/2
    }

#end

light_source {
        <-15 , 45 , -35> color rgb<1.0, 1.0, 1.0>
        area_light <10,0 ,0 >, <0,0 ,20 >, 20, 20
        adaptive 0
        jitter
}
light_source {< 0, 10, 5> color White
        spotlight
        point_at <0, 0, 5>
        radius 10
        falloff 30
        tightness 1
}
light_source {< 10, 10, 5> color White
        spotlight
        point_at <10, 0, 5>
        radius 10
        falloff 30
        tightness 1
}

light_source {< 20, 10, 5> color White
        spotlight
        point_at <20, 0, 5>
        radius 10
        falloff 30
        tightness 1
}

light_source {< 5, 60, -7> color rgb <0.5, 0.5, 0.5>
        area_light <10,0 ,0 >, <0,0 ,10 >, 20, 20
        adaptive 0
        jitter

        spotlight
        point_at <5, 0, -7>
        radius 10
        falloff 20
        tightness 1
}

global_settings {

    #if(use_radiosity)
    // radiosity (global illumination) settings
    radiosity {
        pretrace_start 0.08           // start pretrace at this size
        pretrace_end   0.01           // end pretrace at this size
        count 350                     // 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 5             // 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
    }
        ambient_light 0
    #end

}

camera {
location <3*3, 7*3, -26*3>
direction <0, 0, 3.0>
look_at  <5, 2.25, -7 >
}

// Orange Juice, Half filled ...
#declare Juice = object {
CylindricalGlass2_Liquid(1, 0.1, 3.0, 0.5)
hollow
OrangeJuiceMaterial()
}








//--------------------------< The Kitchen Cabinet
>---------------------------
//DMFWood1 rotate <75, 0, 0> scale<50, 50, 50>
#declare CounterBody = union {
box {<-20,8,-7.5>, <20, 10, 7.5>
texture {
DMFWood1 rotate <0, 90, 0> scale<10, 10, 10>
}
}
box {<-20,-10,-7.5>, <20, -8, 7.5>
texture {
DMFWood1 rotate <0, 90, 0> scale<10, 10, 10>
}
}
box {<-20,-8,-7.5>, <-18, 8, 7.5>
texture {
DMFWood1 rotate <90, 0, 0> scale<10, 10, 10>
}
}
box {<18,-8,-7.5>, <20, 8, 7.5>
texture {
DMFWood1 rotate <90, 0, 0> scale<10, 10, 10>
}
}
box {<-1,-8,-7.5>, <1, 8, 7.5>
texture {
DMFWood1 rotate <90, 0, 0> scale<10, 10, 10>
}
}
}
#declare PanelBlank =
box {<-9,-8.5,-8 >, < 9, 8.5, -7.5 >
}
#declare Panel = difference {
object{PanelBlank}
box {<-8,-7.5,-8.1 >, < -0.5, -0.5, -7.75 >}
box {<0.5,-7.5,-8.1 >, < 8, -0.5, -7.75 >}
box {<-8,0.5,-8.1 >, < -0.5, 7.5, -7.75 >}
box {<0.5,0.5,-8.1 >, < 8, 7.5, -7.75 >}
cylinder {<-9, -8.6, -8>, <-9, 8.6, -8>, .25}
cylinder {< 9, -8.6, -8>, < 9, 8.6, -8>, .25}
cylinder {<-9.1, 8.5, -8>, < 9.1, 8.5, -8>, .25}
cylinder {<-9.1, -8.5, -8>, < 9.1, -8.5, -8>, .25}
texture {
DMFWood1 rotate <90, 0, 0> scale<1, 1, 1>
finish {
diffuse .9
brilliance .7
}
}
}
#declare Cabinet = union{
object{CounterBody}
object{Panel translate <-9.5, 0, 0>}
object{Panel translate < 9.5, 0, 0>}
}


#declare Counter = union {
    union
    {
        box {<-40, -2, -10>, <40, 0, 10>}
        cylinder {<-40, -1, -10>, <40, -1, -10>, 1}
        //material{ Brown_Granite scale 2}
        pigment { color rgb 1.0 }
    }
}
box {<-40, -30, -8>, <40, -2, 10>
texture {
DMFWood1 rotate <90, 0, 0> scale<1, 1, 1>
}
}



object
{
    plane { -z, 1 pigment { color rgb 1.0 }}
    scale <1,1,4>
    translate <-25, 0, 10>
}

object {Counter}
object {Cabinet translate <15, 20, 10>}
object {Juice translate <5, -epsilon, -7>}


Post a reply to this message

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