POV-Ray : Newsgroups : povray.general : photons + media Server Time
5 Nov 2024 15:54:01 EST (-0500)
  photons + media (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Rafal 'Raf256' Maj
Subject: photons + media
Date: 24 Feb 2003 15:06:46
Message: <Xns932CD71A953D1raf256com@204.213.191.226>
Hi,
I have a little problem - how can I show photons (using media?)

My scene (will be posted in .b.i in a minute) looks like :


         
    *  Y=0 spot light
    ^    1 light
   / \   2 light
  =====  3 glass = box+ior+normal + photons{refraction on}
  //|\\  4 photons
 ///|\\\ 5 photons
-------- 6 photons stored on floor (collect=on)

Scattering media is everywhere in scene (global). 
Problem is, that media shows light in Y=1,2, BUT photons in Y=4,5 are NOT 
showned in media - this photons do NOT light scattering media. In area 4,5 
media acts exacly as the box would be totaly solid and as this part of 
media was in shadow. 

Photons are correcly shown on floor (Y=6).

In global_settings i use
 radiosity { media on }
 photons { count 100*1000  media 100  }

and glass box is :
  pigment { rgbf .99 }
  finish { reflection .2 specular .9 roughness 0.02 }
  interior { ior 1.3 }
  normal { bozo scale .4 }
  photons { refraction on  target on }

What can be wrong ? 

Second box (on image in b.i) has in addition :
  dispersion 1.04 dispersion_samples 20  



-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: photons + media
Date: 24 Feb 2003 15:08:32
Message: <Xns932CD767855AFraf256com@204.213.191.226>
"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in
news:Xns### [at] 204213191226 

[...]

and ofcourse, my media settings :

// --- media ---
media {
  scattering { 1 rgb .3 extinction .1 }
  samples 1000  
}

full scene source will be posted in a minute

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Tim Nikias
Subject: Re: photons + media
Date: 24 Feb 2003 17:27:59
Message: <3e5a9c6f@news.povray.org>
There are several things I'd look at:
1. Don't use count. IMHO its more intuitive to use spacing,
 as decreased values lead to predictable better results.Also,
your count seems way too low, I always get several
hundreds of thousand, sometimes millions of photons for
decent results, and it should be higher cause you're even spreading
some across the media.
2. Set max_trace_level for the photons higher, they might
be too low (I think 5 is default)
3. Global-Media doesn't work very nice AFAIK, its better
to use containment. Since its all happening in a box, why don't
you use a box?

I'll download your scene-file and see what I can do.

Regards,
Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

>
> and ofcourse, my media settings :
>
> // --- media ---
> media {
>   scattering { 1 rgb .3 extinction .1 }
>   samples 1000
> }
>
> full scene source will be posted in a minute
>
> --
> #macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
> pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
> );g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
> y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Tim Nikias
Subject: Re: photons + media
Date: 24 Feb 2003 17:53:14
Message: <3e5aa25a$1@news.povray.org>
Okay, here goes:
1. Make that glass use rgbt not rgbf. f=filter, so if you
set rgbf .99 just about every piece of light is filtered
by .99, so that leaves you .01 of the original amount of light.
2. Get rid of those sphere which you've placed ON the
lightsources. Somehow they block the media-photons,
even though caustics work with them.
3. Place your media inside the inverse box at the
beginning, and don't forget to remove that inverse
and replace it with hollow (since we want to be INSIDE
a media-filled box).

Thats about it. Tweaking those settings is up to you, but
it sure gets hell...

Regards,
Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Christopher James Huff
Subject: Re: photons + media
Date: 24 Feb 2003 18:49:13
Message: <cjameshuff-D66808.18452824022003@netplex.aussie.org>
In article <3e5aa25a$1@news.povray.org>,
 "Tim Nikias" <tim### [at] gmxde> wrote:

> Okay, here goes:
> 1. Make that glass use rgbt not rgbf. f=filter, so if you
> set rgbf .99 just about every piece of light is filtered
> by .99, so that leaves you .01 of the original amount of light.

I think you need to go review at the behavior of filtering. It doesn't 
behave anything like you describe.
rgbf  is the same as rgbf < 0.99, 0.99, 0.99, 0.99>, which is nearly 
perfectly transparent. This is not the problem.

Rafal: look at the optics.pov demo scene.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: photons + media
Date: 24 Feb 2003 18:57:24
Message: <Xns932DA11DB213raf256com@204.213.191.226>
Christopher James Huff <cja### [at] earthlinknet> wrote in
news:cja### [at] netplexaussieorg

> Rafal: look at the optics.pov demo scene.

Ok, and in btw - minimal scene to reproduce my problem :


camera { location <0,9,-8> look_at 0 angle 70 }
#declare UseMedia = 1; // <====
#declare UsePhotons = 1; // <====

#if (UsePhotons) global_settings { photons { spacing .005 media 100 } } #end
light_source { y*5 rgb .5 shadowless } // fill-light
plane { y,0.01 pigment { checker rgb .7 rgb .8 }  finish { diffuse .6 } }
 
light_source { // spot
  <0,9,0> rgb 1 spotlight  point_at <0,0,0>
  radius  10 falloff 10+10 tightness 3 
}

box { // glass box
  -1,+1 scale 2*<1,.05,1> rotate -y*20 translate <2,3,0>
  pigment { rgbt 1 } // <---
  interior { ior 1.5 }  normal { bozo .5 scale .4 }
  photons { refraction on  target on }  hollow 
}

#if (UseMedia) // media - dust box
box {
  <-5,-1,-5>, <+5,8,+5>
  pigment { rgbt 1 } // <---
  interior { media {
      samples 100
      scattering { 1 rgb .1 extinction 0 }
  } }  
  hollow // <--- 
}
#end



Using media is ok, using photons is ok, but using them both gives problem.


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Tim Nikias
Subject: Re: photons + media
Date: 24 Feb 2003 20:03:59
Message: <3e5ac0ff$1@news.povray.org>
Hm, you're right. I somehow messed something up
with that "subtractive transparency" talk in the docs.


--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

>
> I think you need to go review at the behavior of filtering. It doesn't
> behave anything like you describe.
> rgbf  is the same as rgbf < 0.99, 0.99, 0.99, 0.99>, which is nearly
> perfectly transparent. This is not the problem.
>


Post a reply to this message

From: Christopher James Huff
Subject: Re: photons + media
Date: 24 Feb 2003 20:26:32
Message: <cjameshuff-F7D95F.20224924022003@netplex.aussie.org>
In article <Xns### [at] 204213191226>,
 "Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote:

> #if (UseMedia) // media - dust box
> box {
>   <-5,-1,-5>, <+5,8,+5>
>   pigment { rgbt 1 } // <---
>   interior { media {
>       samples 100
>       scattering { 1 rgb .1 extinction 0 }
>   } }  
>   hollow // <--- 
> }
> #end
> 
> Using media is ok, using photons is ok, but using them both gives problem.

Try adding a photon block with pass_through, if that doesn't work try 
making it a photon target. Or maybe the media itself is off...

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Tom Melly
Subject: Re: photons + media
Date: 25 Feb 2003 04:34:09
Message: <3e5b3891@news.povray.org>
"Tim Nikias" <tim### [at] gmxde> wrote in message
news:3e5ac0ff$1@news.povray.org...
> Hm, you're right. I somehow messed something up
> with that "subtractive transparency" talk in the docs.

I'm not sure that section of the docs is wrong, but it certainly is
misleading...


Post a reply to this message

From: Tom Melly
Subject: Re: photons + media
Date: 25 Feb 2003 05:47:59
Message: <3e5b49df$1@news.povray.org>
"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in message
news:Xns### [at] 204213191226...
>
> Ok, and in btw - minimal scene to reproduce my problem :

Dunno if it's a bug or not, but you can fix it by making your media container a
bit taller so that the spotlight is inside it.

So, instead of:

>
> #if (UseMedia) // media - dust box
> box {
>   <-5,-1,-5>, <+5,8,+5>

try

> #if (UseMedia) // media - dust box
> box {
>   <-5,-1,-5>, <+5,9.5,+5>

... and watch those render times slow to a crawl (must be working then ;)

BTW I don't think your glass box needs the hollow keyword.


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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