POV-Ray : Newsgroups : povray.general : blummin Media headache again! Server Time
3 Aug 2024 02:23:20 EDT (-0400)
  blummin Media headache again! (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Phil Cook
Subject: Re: blummin Media headache again!
Date: 1 Jul 2004 11:32:00
Message: <opsagtcrzaefp2ch@news.povray.org>
And lo on Thu, 1 Jul 2004 16:12:45 +0100, Josh <som### [at] microsoftcom> did  
spake, saying:

>> Make sure the container cylinder is hollow.
>> Media on should be in the radiosity block.
>> Try a constant density to rule out the cylindrical pattern as being  the
>> cause.
>
> "media on"  is showing my media ,thank you very much, I'll put the rifle
> away for now...

Hey I might be needing that, have you got a light_source in your scene or  
is the media showing up only with the ambient cylinder?

--
Phil Cook

-- 
All thoughts and comments are my own unless otherwise stated and I am  
happy to be proven wrong.


Post a reply to this message

From: Josh
Subject: Re: blummin Media headache again!
Date: 1 Jul 2004 11:38:00
Message: <40e42fd8$1@news.povray.org>
> Hey I might be needing that, have you got a light_source in your scene or
> is the media showing up only with the ambient cylinder?

just radiosity but it looks rubbish at the moment...what follows is not a
full scene but shows you what i've been on about


global_settings {
        max_trace_level 50
    radiosity {
      pretrace_start 0.08
      pretrace_end   0.04
      count 35
      media on

      nearest_count 5
      error_bound 1.8
      recursion_limit 3

      low_error_factor 0.5
      gray_threshold 0.0
      minimum_reuse 0.015
      brightness 10

      adc_bailout 0.01/2
    }
  }



cylinder        {
                <0,0,-10000>,
                <0,0,200000000>,
                2100
                hollow
                texture { pigment { Blue } finish { ambient 0 } }
                }


// Light Source
cylinder {
  <0,0,-1000>,
  <0,0,20000000>,
  20
  texture {
          pigment {
                  gradient z
                  pigment_map     {
                                  [0 White]
                                  [.1 White*.8]
                                  [.9 White*1.2]
                                  [1 White]
                                  }
                                scale 10
                  }
                        finish  {
                                ambient 3
                                }
          }
                }

cylinder        {
                <0,-1000,0>,
                <0,2000000000,0>,
                500
                hollow
                texture {
                        pigment {
                                Clear
                                }
                        finish { ambient 1 }
                        }
                interior{

                        media   {
                                samples 10
                                emission 1
                                density {
                                        cylindrical scale 400
                                        density_map     {
                                                        [0 rgb 0]
                                                        [1 White*.3]
                                                        }
                                        warp { turbulence 10 }
                                        }

                                }

                        media   {
                                absorption .02
                                }
                        }
                rotate <90,0,0>
                }


Post a reply to this message

From: Phil Cook
Subject: Re: blummin Media headache again!
Date: 1 Jul 2004 12:40:04
Message: <opsagwh3r2efp2ch@news.povray.org>
And lo on Thu, 1 Jul 2004 16:39:37 +0100, Josh <som### [at] microsoftcom> did  
spake, saying:

>> Hey I might be needing that, have you got a light_source in your scene  
>> or
>> is the media showing up only with the ambient cylinder?
>
> just radiosity but it looks rubbish at the moment...what follows is not a
> full scene but shows you what i've been on about
<snip code>

Hmmm interesting, from your code.

with:
camera{
location z*-5000
}
I note if I remove your cylinder 'light source' the picture remains  
unchanged if I then also remove the media{emission...} and add  
light_source{z*((20000000+1000)/2) rgb 1} that produces the fuzzy  
qualities I'd expect from media.

I'll ponder.

--
Phil Cook

-- 
All thoughts and comments are my own unless otherwise stated and I am  
happy to be proven wrong.


Post a reply to this message

From: Warp
Subject: Re: blummin Media headache again!
Date: 1 Jul 2004 13:16:31
Message: <40e446ee@news.povray.org>
Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:
> I thought media would only function with a light_source producing a ray to  
> sample along as stated in 6.8, AFAIK ambient, like emission, doesn't  
> produce light in this way even using radiosity.

  You thought wrong.

  Media does not need light sources to show up. Radiosity doesn't check
light sources, only the brightness of things. (Whether or not radiosity
takes media into account at all is another issue I haven't studied.
However, that's unrelated to light sources anyways.)

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Warp
Subject: Re: blummin Media headache again!
Date: 1 Jul 2004 13:18:30
Message: <40e44766@news.povray.org>
Josh <som### [at] microsoftcom> wrote:
> I have a simple radiosity scene, a cylinder with ambient 1 encased in a much
> bigger cylinder filled with cylindrical media.  For some reason I cant
> fathom, I cant see the media.  If there some setting that needs to be turned
> on for radiosity and media to interact

  AFAIK media does not take radiosity samples (that would be prohibitively
slow).
  You can make media to affect the illumination of surfaces (using
radiosity) but not the other way around.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Apache
Subject: Re: blummin Media headache again!
Date: 1 Jul 2004 19:14:15
Message: <40e49ac7$1@news.povray.org>
If I'm right the radiosity doesn't affect the media. Media affects the
radiosity instead.

If radiosity would affect media, things like light-bleeding would be very
easy to do. Unfortunately this would take ages to render of course..... but
it would be so cool!!!


Post a reply to this message

From: Phil Cook
Subject: Re: blummin Media headache again!
Date: 5 Jul 2004 06:21:37
Message: <opsantk8dcefp2ch@news.povray.org>
And lo on 1 Jul 2004 13:16:31 -0400, Warp <war### [at] tagpovrayorg> did spake,  
saying:

> Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:
>> I thought media would only function with a light_source producing a ray  
>> to
>> sample along as stated in 6.8, AFAIK ambient, like emission, doesn't
>> produce light in this way even using radiosity.
>
>   You thought wrong.

As usual

>   Media does not need light sources to show up. Radiosity doesn't check
> light sources, only the brightness of things. (Whether or not radiosity
> takes media into account at all is another issue I haven't studied.
> However, that's unrelated to light sources anyways.)

So what does it use to sample along if their are no light_source's? Does  
radiosity mean that ambient objects produce traceable light rays that  
media can use, really interested as I've never had media show up without a  
light_source regardless of radiosity or not and it would be useful to know.

//code
#declare Radiosity=on;
#declare Emission=off;

global_settings
{
#if (Radiosity)
radiosity{
media on
}
#end
}

camera{
location <10,15,10.5>
look_at <10,10,11>
}

box{0,<20,20,12> pigment{rgb 1} finish{ambient 0

#if (Radiosity)
diffuse 1
#end

} hollow
interior{media{scattering{3 rgb 0.001}
density{spotted
color_map{
[0 red 0]
[0.1 red 5]}
warp{turbulence 10}
}
}}
}

light_source{10 rgb 1}
#if (Radiosity)
#if (Emission)
sphere{10,1 pigment{rgbt 1} finish{diffuse 1} hollow
interior{media{emission rgb 1}}
}
#else
sphere{10,1 pigment{rgb 1} finish{ambient 1}}
#end
#else

#if (Emission)
sphere{10,1 pigment{rgbt 1} finish{diffuse 1} hollow
interior{media{emission rgb 1}}
}
#else
light_source{10 rgb 0.5}
#end
#end

sphere{<7,10,10>,1 pigment{rgb 1} finish{diffuse 1}}
//end code

Altering the Radiosity and Emission variables the only time I get a hint  
of red from the media is when the light_source is present.

Neither the wall nor second sphere displays any redness without the  
light_source present, neither does the emission.

I would be really really curious as to getting ambient and media working  
in this way.

--
Phil Cook

-- 
All thoughts and comments are my own unless otherwise stated and I am  
happy to be proven wrong.


Post a reply to this message

From: Warp
Subject: Re: blummin Media headache again!
Date: 7 Jul 2004 10:57:30
Message: <40ec0f5a@news.povray.org>
Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:
> >   Media does not need light sources to show up.

> So what does it use to sample along if their are no light_source's?

  I didn't say light sources do not affect media. I just said light
sources are not needed for media to show up (that is, they are not
the only thing that affect them).
  In fact, light sources do not have any effect whatsoever on emitting
media. In absorptive media light sources only affect the shadow of
the media. Scattering media fully takes into account light sources,
but can still be seen even if there are none.
  If you are lighting your scene using emitting media and radiosity,
light sources will not affect the brightness of the media.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Phil Cook
Subject: Re: blummin Media headache again!
Date: 7 Jul 2004 12:30:30
Message: <opsarz4stqefp2ch@news.povray.org>
And lo on 7 Jul 2004 10:57:30 -0400, Warp <war### [at] tagpovrayorg> did spake,  
saying:

> Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:
>> >   Media does not need light sources to show up.
>
>> So what does it use to sample along if their are no light_source's?
>
>   I didn't say light sources do not affect media. I just said light
> sources are not needed for media to show up (that is, they are not
> the only thing that affect them).

Might be bad phrasing on my part I'm not arguing with you I'm am genuinely  
trying to understand this, the ambient light_source has no point source  
how does Povray calculate the angle of the light ray from the surface in  
order to sample along it? lets put it another way. I shine a parallel  
light into a scattering media box that has a hole cut in it, the result is  
a 'light beam' through the media, I now substitute the parallel  
light_source for an ambient 1 plane will this still produce the 'light  
beam' with radiosity enabled. Hmm just tried it,seems to be a no.

>   In fact, light sources do not have any effect whatsoever on emitting
> media.

Yup

> In absorptive media light sources only affect the shadow of
> the media.

Yup

> Scattering media fully takes into account light sources,
> but can still be seen even if there are none.

Ah here we are, what are they seen with? All I can assume is that with  
radiosity a ray is being produced as a reflection from the surface from  
the ambient light_source to any surrounding surfaces and that the media  
affects this or uses this to sample along. I saw this when I altered a  
scattering media in front of an ambient 1 object and saw the apparent  
brightness drop, however the media was not illuminated around the object.  
In the code previously the media was red scattering with an white ambient,  
if the radiosity was being affected by the media why did the object  
continue to appear white when it should have been red?

>   If you are lighting your scene using emitting media and radiosity,
> light sources will not affect the brightness of the media.

I'm not sure what you mean by the brightness of the media, the only way I  
can take this is that the media affects the ambient/emission but the media  
*itself* is not affected which is why it does not show up. Ah I sort of  
see, perhaps, if you have a media with a density/colour map then an  
ambient object will shine through those areas that are 'clear' but be  
blocked by the 'dense' parts and show up as black rather than as a colour.  
Have I got that right?

--
Phil Cook

-- 
All thoughts and comments are my own unless otherwise stated and I am  
happy to be proven wrong.


Post a reply to this message

From: Christopher James Huff
Subject: Re: blummin Media headache again!
Date: 7 Jul 2004 13:23:09
Message: <cjameshuff-A69229.12232607072004@news.povray.org>
In article <opsarz4stqefp2ch@news.povray.org>,
 "Phil Cook" <phi### [at] nospamdeckingdealscouk> wrote:

> Might be bad phrasing on my part I'm not arguing with you I'm am genuinely  
> trying to understand this, the ambient light_source has no point source  
> how does Povray calculate the angle of the light ray from the surface in  
> order to sample along it?

It doesn't. Ambient light does not come from any direction, that's why 
it makes things flat colored instead of shaded.


> lets put it another way. I shine a parallel  
> light into a scattering media box that has a hole cut in it, the result is  
> a 'light beam' through the media, I now substitute the parallel  
> light_source for an ambient 1 plane will this still produce the 'light  
> beam' with radiosity enabled. Hmm just tried it,seems to be a no.

No, it won't. Radiosity does not affect media, doing so would be either 
extremely slow or memory consuming. However, media can optionally affect 
radiosity. This is slow, but workable.


> Ah here we are, what are they seen with?

They block light. Scattering media without direct light is essentially 
absorbing media.


> All I can assume is that with  
> radiosity a ray is being produced as a reflection from the surface from  
> the ambient light_source to any surrounding surfaces and that the media  
> affects this or uses this to sample along. I saw this when I altered a  
> scattering media in front of an ambient 1 object and saw the apparent  
> brightness drop, however the media was not illuminated around the object.  
> In the code previously the media was red scattering with an white ambient,  
> if the radiosity was being affected by the media why did the object  
> continue to appear white when it should have been red?

This assumption is wrong. It can't work this way...at least, not in a 
reasonable period of time. What you describe would be how a forward 
raytracer would do it. Global photon mapping could do the job, but the 
memory requirements would be huge.

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

<<< Previous 10 Messages Goto Initial 10 Messages

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