POV-Ray : Newsgroups : povray.programming : media emission value Server Time
17 May 2024 04:07:05 EDT (-0400)
  media emission value (Message 1 to 6 of 6)  
From: m1j
Subject: media emission value
Date: 13 Jul 2005 15:25:01
Message: <web.42d5698252c58b6d2b4e50870@news.povray.org>
I was looking for the part in media.cpp where emission of the media is
applied to the radiosity values. When media is in the radiosity statement
then the emission of the media adds to the radiosity. Knowing this I was
going to tinker and see if I can increase the emission effect on the
radiosity value. To make the radiosity value think there is more emission
than there is.

This the first time I have taken a serious look at the source. :) But to
learn I must start some place.

Thanks in advance.


Post a reply to this message

From: Christoph Hormann
Subject: Re: media emission value
Date: 14 Jul 2005 02:15:01
Message: <db4vmr$9te$1@chho.imagico.de>
m1j wrote:
> I was looking for the part in media.cpp where emission of the media is
> applied to the radiosity values. When media is in the radiosity statement
> then the emission of the media adds to the radiosity. Knowing this I was
> going to tinker and see if I can increase the emission effect on the
> radiosity value. To make the radiosity value think there is more emission
> than there is.

Radiosity is calculated by tracing rays in the scene, just like normal 
camera rays, there is no special handling of media for radiosity.  To do 
what you describe you would need the media sampling code to selectively 
increase the media intensity if a radiosity evaluation is detected. 
Doing this does not make a lot of sense.  You can already achieve what 
you want using the no_radiosity flag in MegaPOV - create one instance of 
your media object with stronger media and no_image, no_reflection and 
no_shadow and the normal one with no_radiosity.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 01 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Slime
Subject: Re: media emission value
Date: 14 Jul 2005 16:00:04
Message: <42d6c444$1@news.povray.org>
> Radiosity is calculated by tracing rays in the scene, just like normal
> camera rays, there is no special handling of media for radiosity.

Despite the fact that this effect can be achieved without modifying the
source code, I was wondering: there *is* some special handling of media for
radiosity, since by default it doesn't affect radiosity, right? So there
must be some way that radiosity rays are flagged to ignore media unless
"media on" is specified.

Of course, that doesn't mean it would be easy to modify that bit of code to
change the effect of media.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Christoph Hormann
Subject: Re: media emission value
Date: 14 Jul 2005 16:30:02
Message: <db6hrj$3v2$1@chho.imagico.de>
Slime wrote:
> 
> Despite the fact that this effect can be achieved without modifying the
> source code, I was wondering: there *is* some special handling of media for
> radiosity, since by default it doesn't affect radiosity, right? So there
> must be some way that radiosity rays are flagged to ignore media unless
> "media on" is specified.

This is done by setting the quality flags accordingly.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 01 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: m1j
Subject: Re: media emission value
Date: 15 Jul 2005 11:35:00
Message: <web.42d7d773c3eedf722b4e50870@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
> m1j wrote:
> > I was looking for the part in media.cpp where emission of the media is
> > applied to the radiosity values. When media is in the radiosity statement
> > then the emission of the media adds to the radiosity. Knowing this I was
> > going to tinker and see if I can increase the emission effect on the
> > radiosity value. To make the radiosity value think there is more emission
> > than there is.
>
> Radiosity is calculated by tracing rays in the scene, just like normal
> camera rays, there is no special handling of media for radiosity.  To do
> what you describe you would need the media sampling code to selectively
> increase the media intensity if a radiosity evaluation is detected.
> Doing this does not make a lot of sense.  You can already achieve what
> you want using the no_radiosity flag in MegaPOV - create one instance of
> your media object with stronger media and no_image, no_reflection and
> no_shadow and the normal one with no_radiosity.
>
> Christoph
>
> --
> POV-Ray tutorials, include files, Landscape of the week:
> http://www.tu-bs.de/~y0013390/ (Last updated 01 Jul. 2005)
> MegaPOV with mechanics simulation: http://megapov.inetart.net/

It seems to me that this duplicated manner would be quite slow. I was
looking for a way to force the radiosity calculation to gather a high and
thus brighter value from the media. A media multiplier value. I was looking
for the location in the code that this value could be placed. I speculated
that it could be one location or many. I just did not know where to look.


Post a reply to this message

From: Christoph Hormann
Subject: Re: media emission value
Date: 15 Jul 2005 11:55:02
Message: <db8m7s$m50$1@chho.imagico.de>
m1j wrote:
> 
> It seems to me that this duplicated manner would be quite slow. I was
> looking for a way to force the radiosity calculation to gather a high and
> thus brighter value from the media. 

The slowdown depends on how expensive the intersection test for the 
container is - but unless you use an extremely slow isosurface or 
similar it is unlikely that this is considerable compared to the media 
evaluation - there are no additional media calculations necessary with 
this technique.

> A media multiplier value. I was looking
> for the location in the code that this value could be placed. I speculated
> that it could be one location or many. I just did not know where to look.

The place is sample_media() in media.cpp.  As it is you don't have a way 
to determine if the evaluation is in a radiosity ray or not (the 
NO_RADIOSITY_PATCH in MegaPOV provides one though).

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 01 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

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