POV-Ray : Newsgroups : povray.newusers : Media scattering and photons doesn't work! Server Time
23 Nov 2024 14:51:51 EST (-0500)
  Media scattering and photons doesn't work! (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: yes
Subject: Media scattering and photons doesn't work!
Date: 12 May 2013 02:30:01
Message: <web.518f34065e6bf93c7a3e03fe0@news.povray.org>
Hellow!
Excuse, I don't speak English!
My OS - Fedora Linux 18
I write own exporter from Blender to Povray
For this purpose I study many examples
Everything was good
I already included in the exporter patterns and t-map for use of several
materials.
Now I want to include media.
Media scattering in examples in official documentation works operationally
Following example media scattering and photons doesn't works!
The reflective floor doesn't reflect yellow light on an opposite wall
I found other example in the Internet:
http://hsivonen.iki.fi/refl-light/
It too doesn't work.The render occurs without caustic drawing on an opposite
wall!

How to solve this problem?
I used 3.7RC6, then 3.7RC7, then 3.6.1 In total unsuccessfully


Post a reply to this message

From: LanuHum
Subject: Re: Media scattering and photons doesn't work!
Date: 12 May 2013 04:35:01
Message: <web.518f53ecf0c558ea7a3e03fe0@news.povray.org>
Sorry! First post by "yes" - this is my post. Error input.
Problem Scattering media and photons in this code:



global_settings{
    assumed_gamma 1
    max_trace_level 10
    photons {
        count 300000
        autostop 0
        jitter .4
    }
    adc_bailout 1/10
}

  #include "textures.inc"
  #include "colors.inc"
  camera {
    location <0, 1, -4>
    look_at <0, 2, 0>
    angle 80
  }



 camera { location <14.9, 1, -8> look_at -z angle 70 }
 light_source { <10,100,150>, 1 }
 background { rgb <0.3, 0.6, 0.9> }

 // A dim light source inside the room which does not
 // interact with media so that we can see the room:
 light_source { <14, -5, 2>, 0.5 media_interaction off photons { reflection off
} }

 // Room
 union
 { difference
   { box { <-11, -7, -11>, <16, 7, 10.5> }
     box { <-10, -6, -10>, <15, 6, 10> }
     box { <-4, -2, 9.9>, <2, 3, 10.6> }
   }
   box { <-1.25, -2, 10>, <-0.75, 3, 10.5> }
   box { <-4, 0.25, 10>, <2, 0.75, 10.5> }
   pigment { rgb 1 }
   photons { target reflection on }
 }
 // Reflective floor:
 box
 { <-10, -5.99, -10>, <15, -6, 10>
   pigment { rgb 1 }
   finish { reflection <0.5, 0.4, 0.2> }
   photons { target reflection on}
 }
 // Scattering media box:
 box
 { <-5, -6.5, -10.5>, <3, 6.5, 10.25>
   pigment { rgbt 1 } hollow
   interior
   { media
     { scattering { 1, 0.07 extinction 0.01 }
       samples 30
     }
   }
 }


Post a reply to this message

From: James Holsenback
Subject: Re: Media scattering and photons doesn't work!
Date: 12 May 2013 07:53:59
Message: <518f82d7$1@news.povray.org>
On 05/12/2013 04:33 AM, LanuHum wrote:
> Sorry! First post by "yes" - this is my post. Error input.
> Problem Scattering media and photons in this code:
>
>
>
> global_settings{
>      assumed_gamma 1
>      max_trace_level 10
>      photons {
>          count 300000
>          autostop 0
>          jitter .4
>      }
>      adc_bailout 1/10
> }
>
>    #include "textures.inc"
>    #include "colors.inc"
>    camera {
>      location <0, 1, -4>
>      look_at <0, 2, 0>
>      angle 80
>    }
>
>
>
>   camera { location <14.9, 1, -8> look_at -z angle 70 }
>   light_source { <10,100,150>, 1 }
>   background { rgb <0.3, 0.6, 0.9> }
>
>   // A dim light source inside the room which does not
>   // interact with media so that we can see the room:
>   light_source { <14, -5, 2>, 0.5 media_interaction off photons { reflection off
> } }
>
>   // Room
>   union
>   { difference
>     { box { <-11, -7, -11>, <16, 7, 10.5> }
>       box { <-10, -6, -10>, <15, 6, 10> }
>       box { <-4, -2, 9.9>, <2, 3, 10.6> }
>     }
>     box { <-1.25, -2, 10>, <-0.75, 3, 10.5> }
>     box { <-4, 0.25, 10>, <2, 0.75, 10.5> }
>     pigment { rgb 1 }
>     photons { target reflection on }
>   }
>   // Reflective floor:
>   box
>   { <-10, -5.99, -10>, <15, -6, 10>
>     pigment { rgb 1 }
>     finish { reflection <0.5, 0.4, 0.2> }
>     photons { target reflection on}
>   }
>   // Scattering media box:
>   box
>   { <-5, -6.5, -10.5>, <3, 6.5, 10.25>
>     pigment { rgbt 1 } hollow
>     interior
>     { media
>       { scattering { 1, 0.07 extinction 0.01 }
>         samples 30
>       }
>     }
>   }
>
>

I thought this example was very familiar ... it's basically from the the 
tutorial section on media. You forgot /one/ important step. Have a look 
at this section and see if you can spot it:

http://wiki.povray.org/content/Documentation:Tutorial_Section_3.7#Media_and_photons

BTW: you also have 2 camera definitions (one gets ignored ... see 
warning stream)


Post a reply to this message

From: LanuHum
Subject: Re: Media scattering and photons doesn't work!
Date: 12 May 2013 09:25:00
Message: <web.518f9700f0c558ea7a3e03fe0@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:

>
> I thought this example was very familiar ... it's basically from the the
> tutorial section on media. You forgot /one/ important step. Have a look
> at this section and see if you can spot it:
>
> http://wiki.povray.org/content
>/Documentation:Tutorial_Section_3.7#Media_and_photons
> BTW: you also have 2 camera definitions (one gets ignored ... see
> warning stream)

Yes! This is it's basically from the the
tutorial section on media

I rewrote again

I followed an example above where there are no photons and added reflecting
floor and changed global settings
Look:
http://blender3d.org.ua/forum/rendering/iwe/upload/povray_gluk.png

//I don't know that I miss in this text.Help me please!
 global_settings
 { photons
   { count 20000
     media 100
   }
 }
 camera { location <14.9, 1, -8> look_at -z angle 70 }
 light_source { <10,100,150>, 1 }
 background { rgb <0.3, 0.6, 0.9> }

 // A dim light source inside the room which does not
 // interact with media so that we can see the room:
 light_source { <14, -5, 2>, 0.5 media_interaction off }

 // Room
 union
 { difference
   { box { <-11, -7, -11>, <16, 7, 10.5> }
     box { <-10, -6, -10>, <15, 6, 10> }
     box { <-4, -2, 9.9>, <2, 3, 10.6> }
   }
   box { <-1.25, -2, 10>, <-0.75, 3, 10.5> }
   box { <-4, 0.25, 10>, <2, 0.75, 10.5> }
   pigment { rgb 1 }
 }
 // Reflective floor:
 box
 { <-10, -5.99, -10>, <15, -6, 10>
   pigment { rgb 1 }
   finish { reflection <0.5, 0.4, 0.2> }
   photons { target reflection on }
 }
 // Scattering media box:
 box
 { <-5, -6.5, -10.5>, <3, 6.5, 10.25>
   pigment { rgbt 1 } hollow
   interior
   { media
     { scattering { 1, 0.07 extinction 0.01 }
       samples 30
     }
   }
 }


Post a reply to this message

From: James Holsenback
Subject: Re: Media scattering and photons doesn't work!
Date: 12 May 2013 11:13:42
Message: <518fb1a6$1@news.povray.org>
On 05/12/2013 09:20 AM, LanuHum wrote:
>   // Scattering media box:
>   box
>   { <-5, -6.5, -10.5>, <3, 6.5, 10.25>
>     pigment { rgbt 1 } hollow
>     interior
>     { media
>       { scattering { 1, 0.07 extinction 0.01 }
>         samples 30
>       }
>     }
>   }

3rd paragraph in the passage I previously pointed you to ...

// Scattering media box:
box
   { <-5, -6.5, -10.5>, <3, 6.5, 10.25>
     pigment { rgbt 1 } hollow


     photons { pass_through }


     interior
     { media
       { scattering { 1, 0.07 extinction 0.01 }
         samples 30
       }
     }
   }


Post a reply to this message

From: LanuHum
Subject: Re: Media scattering and photons doesn't work!
Date: 12 May 2013 12:55:02
Message: <web.518fc8cdf0c558ea7a3e03fe0@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:

>
> 3rd paragraph in the passage I previously pointed you to ...
>
> // Scattering media box:
> box
>    { <-5, -6.5, -10.5>, <3, 6.5, 10.25>
>      pigment { rgbt 1 } hollow
>
>
>      photons { pass_through }
>
>
>      interior
>      { media
>        { scattering { 1, 0.07 extinction 0.01 }
>          samples 30
>        }
>      }
>    }


Yes!
Thanks!
Thanks! Thank you!


Post a reply to this message

From: Alain
Subject: Re: Media scattering and photons doesn't work!
Date: 12 May 2013 20:36:12
Message: <5190357c@news.povray.org>

> Hellow!
> Excuse, I don't speak English!
> My OS - Fedora Linux 18
> I write own exporter from Blender to Povray
> For this purpose I study many examples
> Everything was good
> I already included in the exporter patterns and t-map for use of several
> materials.
> Now I want to include media.
> Media scattering in examples in official documentation works operationally
> Following example media scattering and photons doesn't works!
> The reflective floor doesn't reflect yellow light on an opposite wall
> I found other example in the Internet:
> http://hsivonen.iki.fi/refl-light/
> It too doesn't work.The render occurs without caustic drawing on an opposite
> wall!
>
> How to solve this problem?
> I used 3.7RC6, then 3.7RC7, then 3.6.1 In total unsuccessfully
>
>
>
>
>

You realy need to enable photons maping.

For that, you add a photons block in the global_settings block:
global_settings{photons{spacing 0.1}}
This will make ALL light_source, except shadowless ones, emit photons 
toward any object having a photons block with target.

To make photons visible in a media, you also need to turn it on for medias:
global_settings{photons{spacing 0.1 media 10}}

Now, you need to set your reflective and refractive objects at photons 
target:
in the object definition, add this:
photons{target reflection on}// turn on reflection
OR
photons{target reflection on refraction on}
// turn on reflection AND refraction

If you have some transparent object between the light_source and target 
object, that transparent object will block the photons. To prevent that, 
add this to the problem object:
photons{pass_through}
To prevent it from interacting with primary photons.
Also, if you have some container for your media, it to must be set as 
pass_through.

Please read the included documentation to get further informations.


By the way, here are some media tips:

The default sampling method is method 3
The default samples value is samples 10
The default intervals value is 1 and must be left unchanged.
If you need beter sampling, increase samples, NEVER intervals. 
Increasing intervals have a HUGE negative impact on your rendering 
speed, increasing samples have minimal impact. For example,
samples 100 intervals 1
is realy much faster than
samples 5 intervals 10
for twice the samples.

samples use ONLY the first provided value. Any second value will be 
silently ignored.
ratio, variance and confidence are NOT used and will be silently 
ignored. They are used ONLY if you use method 1 or 2.




Alain


Post a reply to this message

From: Kenneth
Subject: Re: Media scattering and photons doesn't work!
Date: 12 May 2013 22:30:01
Message: <web.51904ecbf0c558eac2d977c20@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:

>
> 3rd paragraph in the passage I previously pointed you to ...
>
> // Scattering media box:
> box...

I thought the only problem was the missing media statement in global_settings
:-/  I should have looked more closely at the code.


Post a reply to this message

From: LanuHum
Subject: Re: Media scattering and photons doesn't work!
Date: 15 May 2013 15:15:00
Message: <web.5193dde3f0c558ea7a3e03fe0@news.povray.org>
Thanks a lot for dialog continuation
My first task to set export of parameters.
For this purpose it is necessary for me that everything was correctly assigned
Povray has very difficult logic
I didn't assume that examples in documentation - riddles
I considered that the example will show that shall be.
Your information is useful to me for further study
While it is important for Python:
[code]
if obj.use_media_scattering:
    file.write("photons { pass_through }")
[/code]

Once again, many thanks!
I still will ask you for the help!


Post a reply to this message

From: LanuHum
Subject: Re: Media scattering and photons doesn't work!
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

Goto Latest 10 Messages Next 6 Messages >>>

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