POV-Ray : Newsgroups : povray.newusers : Media scattering and photons doesn't work! : Re: Media scattering and photons doesn't work! Server Time
2 Jun 2024 13:07:11 EDT (-0400)
  Re: Media scattering and photons doesn't work!  
From: LanuHum
Date: 27 Jul 2013 02:20:00
Message: <web.51f36565f0c558ea7a3e03fe0@news.povray.org>
Hi.
Problem:
http://yadi.sk/d/NZMlm3V67GSZa
1. if scattering box == false and global setting photons == true:
good image with photons
2. if scattering box == true and global setting photons == false:
good image with scattering
3. if scattering box == true and global setting photons == true:
bad image with scattering and photons!

in scattering box:    photons { pass_through }
but scattering box is visible :(
why scattering box is visible?

my code:
//----------------------------------------------
//--Exported with POV-Ray exporter for Blender--
//----------------------------------------------

#version 3.7;

//--Global settings and background--

global_settings {
    assumed_gamma 1
    max_trace_level 5
    photons {
        count 200000
        media 100
    }
}

background {rgbt<0.0517, 0.563, 1, 0>}

//--Material Definitions--


#declare Texture_2_Cube_000 = pigment {color rgb<0,0,0>}
#declare Texture_2_Cube_001 = pigment {color rgb<0,0,0>}

#declare shader_Material_000 = finish {
    reflection {
        <0.1,0.41,0.0439>
    }
}

#declare Texture_1_Cube_000 = texture {pigment {rgb 1}
                              finish {shader_Material_000}}

#declare shader_Material_001 = finish {
    brilliance 2
    diffuse 0.8 0

}

#declare Texture_1_Cube_001 = texture {pigment {color rgbft<0.8,0.8,0.8,0,0>}
                              finish {shader_Material_001}}


//--Mesh objects--
#declare T_Map_Cube_000 = pigment {rgb 0}
#declare Cube_000_tex = texture { pigment_pattern { T_Map_Cube_000 }texture_map{
[0.0 Texture_1_Cube_000] [1.0 Texture_2_Cube_000]}}
#declare Cube_000 =
mesh {
    triangle {<-17.36,-10.29,17.36>,<-17.36,-10.29,-17.36>,<17.36,-10.29,17.36>}
    triangle {<-17.36,-10.29,-17.36>,<17.36,-10.29,-17.36>,<17.36,-10.29,17.36>}
    texture {Cube_000_tex}
    photons {reflection on  target 0.0002}
}
object {Cube_000}

#declare T_Map_Cube_001 = pigment {rgb 0}
#declare Cube_001_tex = texture { pigment_pattern { T_Map_Cube_001 }texture_map{
[0.0 Texture_1_Cube_001] [1.0 Texture_2_Cube_001]}}
#declare Cube_001 =
mesh {
    triangle {<-17.36,10.29,17.36>,<-17.36,10.29,-17.36>,<-17.36,-10.29,17.36>}
    triangle {<-17.36,10.29,-17.36>,<17.36,10.29,-17.36>,<-12.54,6.876,-17.36>}
    triangle {<17.36,10.29,-17.36>,<17.36,10.29,17.36>,<17.36,-10.29,-17.36>}
    triangle {<17.36,10.29,17.36>,<-17.36,10.29,17.36>,<17.36,-10.29,17.36>}
    triangle {<17.36,10.29,17.36>,<17.36,10.29,-17.36>,<-17.36,10.29,17.36>}
    triangle
{<-17.36,-10.29,-17.36>,<-17.36,10.29,-17.36>,<-12.54,6.876,-17.36>}
    triangle {<17.36,10.29,-17.36>,<17.36,-10.29,-17.36>,<-4.857,6.876,-17.36>}
    triangle
{<17.36,-10.29,-17.36>,<-17.36,-10.29,-17.36>,<-12.54,2.322,-17.36>}
    triangle {<-4.857,2.322,-17.36>,<-12.54,2.322,-17.36>,<-4.857,2.322,-18.74>}
    triangle {<-12.54,2.322,-17.36>,<-12.54,6.876,-17.36>,<-12.54,2.322,-18.74>}
    triangle {<-12.54,6.876,-17.36>,<-4.857,6.876,-17.36>,<-12.54,6.876,-18.74>}
    triangle {<-4.857,6.876,-17.36>,<-4.857,2.322,-17.36>,<-4.857,6.876,-18.74>}
    triangle
{<-17.36,10.29,-17.36>,<-17.36,-10.29,-17.36>,<-17.36,-10.29,17.36>}
    triangle {<17.36,10.29,-17.36>,<-4.857,6.876,-17.36>,<-12.54,6.876,-17.36>}
    triangle {<17.36,10.29,17.36>,<17.36,-10.29,17.36>,<17.36,-10.29,-17.36>}
    triangle {<-17.36,10.29,17.36>,<-17.36,-10.29,17.36>,<17.36,-10.29,17.36>}
    triangle {<17.36,10.29,-17.36>,<-17.36,10.29,-17.36>,<-17.36,10.29,17.36>}
    triangle
{<-12.54,2.322,-17.36>,<-17.36,-10.29,-17.36>,<-12.54,6.876,-17.36>}
    triangle {<17.36,-10.29,-17.36>,<-4.857,2.322,-17.36>,<-4.857,6.876,-17.36>}
    triangle {<-4.857,2.322,-17.36>,<17.36,-10.29,-17.36>,<-12.54,2.322,-17.36>}
    triangle {<-12.54,2.322,-17.36>,<-12.54,2.322,-18.74>,<-4.857,2.322,-18.74>}
    triangle {<-12.54,6.876,-17.36>,<-12.54,6.876,-18.74>,<-12.54,2.322,-18.74>}
    triangle {<-4.857,6.876,-17.36>,<-4.857,6.876,-18.74>,<-12.54,6.876,-18.74>}
    triangle {<-4.857,2.322,-17.36>,<-4.857,2.322,-18.74>,<-4.857,6.876,-18.74>}
    texture {Cube_001_tex}

}
object {Cube_001}

//--Lamps--

light_source {
    <-5.08,104,-132>
    color rgb<1, 1, 1>
    parallel
    point_at  <0, 0, -1>
}
light_source {
    <0,0,0>
    color rgb<0.5, 0.5, 0.5>
    media_interaction off
}

//--Cameras--

camera {
    perspective
    location  <0, 0, 0>
    look_at  <0, 0, -1>
    right <-1.7777777777777777, 0, 0>
    up <0, 1, 0>
    angle  96.805211
    rotate  <-0.194128, 89.999996, 0.000000>
    translate <16.497437, 5.343666, -0.000000>
}
//--Scattering media box--
box {
    <-12.06,43.79,-27.81>,
    <-0.03095,-11.48,17.8>
    pigment { rgbt 1 } hollow
    photons { pass_through }
    interior {
         media {
              scattering { 1,
                  <0.06998, 0.06998, 0.06998>
               extinction 0.01 }
              samples 100
}}}

Thanks!


Post a reply to this message

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