POV-Ray : Newsgroups : povray.advanced-users : Re: media fire Server Time
26 Nov 2024 06:24:20 EST (-0500)
  Re: media fire (Message 1 to 2 of 2)  
From: Chris Huff
Subject: Re: media fire
Date: 14 Dec 2000 17:34:13
Message: <chrishuff-93EE4F.17351214122000@news.povray.org>
In article <3a394566.8957677@news.povray.org>, j.l### [at] liberoit 
(Jonathan Rafael Ghiglia) wrote:

> I made a candle lit with an emission media.
> When the background is black the flames look right, but as soon as I
> add the candle to my scene the fire looks too clear, even if I
> increase the amount of emission. What should I do? 
> Should I add absorption or scattering media to the fire ?

(seems I'm doing this a lot lately...)
This doesn't really have anything specifically to do with patches(though 
the media sampling features of MegaPOV can be helpful, and some of the 
new patterns would be useful), so it should probably be posted in 
povray.advanced-users, not povray.unofficial.patches. I set the 
Follup-To header to .advanced-users.

In answer to your question, some absorbing media should help a lot. 
Emitting media only adds to what is behind it, so you can only overpower 
things seen through it, but absorbing media blocks light, which will 
make your flame appear more "solid". Use the opposite color you used for 
emission, in other words "rgb < 1, 1, 1>-EmisionColor".

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Rune
Subject: Re: media fire
Date: 14 Dec 2000 18:31:48
Message: <3a395864@news.povray.org>
"Chris Huff" wrote:
> absorbing media blocks light, which will make your flame
> appear more "solid". Use the opposite color you used for
> emission, in other words "rgb < 1, 1, 1>-EmisionColor".

In addition to that, here's some more advise you might find useful.

When working with media densities there's no direct way of distinguishing
between color and opacity. You can't specify transmit or filter like you can
in pigments. Densities are simply transparent when you write <0,0,0>.
Because of that it's sometimes difficult to figure out which combination of
emission and absorbing media you should use to get the desired effect.

Here's a trick I use which make it easy to distinguish color from opacity.

In the emission density write colors as Opacity *( Color )
After the density is made use the exact same density for the absorption
media.
Only, add 1- inside all the parenthesis.

Using that method, a Color of <1,1,1> will be white, and a Color of <0,0,0>
will be black, not transparent. If you want something to be transparent you
set the Opacity to 0.

Example:

interior {
   media {
      emission 1.0
      density {
         spherical
         color_map {
            [0.0, color Opacity1 *( Color1 )]
            [1.0, color Opacity2 *( Color2 )]
         }
      }
   }
   media {
      absorption 1.5
      density {
         spherical
         color_map {
            [0.0, color Opacity1 *(1- Color1 )]
            [1.0, color Opacity2 *(1- Color2 )]
         }
      }
   }
}

NB: The emission and absorption values should usually be somewhat close to
each other. The values in the example are simply based on tweaking.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated October 9)
/ Also visit http://www.povrayusers.org


Post a reply to this message

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