POV-Ray : Newsgroups : povray.newusers : Media scattering and photons doesn't work! Server Time
28 May 2024 16:39:34 EDT (-0400)
  Media scattering and photons doesn't work! (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
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

From: clipka
Subject: Re: Media scattering and photons doesn't work!
Date: 27 Jul 2013 02:38:42
Message: <51f36af2@news.povray.org>
Am 27.07.2013 08:16, schrieb LanuHum:
> 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?


> //--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
> }}}

Be aware that to get a really invisible box, setting the pigment to full 
transparency is not enough. You also need to make sure that you disable 
highlights.

By default, specular highlights are added to any material that does not 
have an explicit "specular" statement. You will need to add:

     finish { specular 0 }

You might also want to explicitly turn off diffuse and ambient:

     finish { ambeint 0 diffuse 0 specular 0 }

I think it shouldn't make a difference for fully transparent surfaces, 
but I might be mistaken there.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Media scattering and photons doesn't work!
Date: 27 Jul 2013 03:25:35
Message: <51f375ef$1@news.povray.org>
On 27-7-2013 8:38, clipka wrote:
> By default, specular highlights are added to any material that does not
> have an explicit "specular" statement. You will need to add:

Huh? I didn't know that! I thought that by default, and in the absence 
of a specular statement, specular was 0.

Thomas


Post a reply to this message

From: clipka
Subject: Re: Media scattering and photons doesn't work!
Date: 27 Jul 2013 03:53:58
Message: <51f37c96$1@news.povray.org>
Am 27.07.2013 09:25, schrieb Thomas de Groot:
> On 27-7-2013 8:38, clipka wrote:
>> By default, specular highlights are added to any material that does not
>> have an explicit "specular" statement. You will need to add:
>
> Huh? I didn't know that! I thought that by default, and in the absence
> of a specular statement, specular was 0.

You are indeed right, just checked the code. I probably messed it up 
with the defaults typically set by most of the scene templates from the 
insert menu.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Media scattering and photons doesn't work!
Date: 27 Jul 2013 07:01:46
Message: <51f3a89a@news.povray.org>
On 27-7-2013 9:53, clipka wrote:
> You are indeed right, just checked the code. I probably messed it up
> with the defaults typically set by most of the scene templates from the
> insert menu.
>
Pheeww.... my world almost toppled over ;-)

Thomas


Post a reply to this message

From: LanuHum
Subject: Re: Media scattering and photons doesn't work!
Date: 27 Jul 2013 08:00:01
Message: <web.51f3b574f0c558ea7a3e03fe0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
>      finish { ambeint 0 diffuse 0 specular 0 }
>

Didn't help. Changes not found.


Post a reply to this message

From: LanuHum
Subject: Re: Media scattering and photons doesn't work!
Date: 29 Jul 2013 12:25:01
Message: <web.51f6971af0c558ea7a3e03fe0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> clipka <ano### [at] anonymousorg> wrote:
>
> >
> >      finish { ambeint 0 diffuse 0 specular 0 }
> >
>
> Didn't help. Changes not found.

Yes!!!
{ scattering { 1, 0.07 extinction 0.01 } - bad way in my scene.
Good way - type 5 and eccentricity:
{ scattering { 5, 0.07 extinction 0.01 eccentricity 0.6 }

:)


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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