POV-Ray : Newsgroups : povray.general : Media question Server Time
8 Aug 2024 10:25:38 EDT (-0400)
  Media question (Message 1 to 5 of 5)  
From: Jonathan Hunt
Subject: Media question
Date: 21 Jan 2001 11:59:07
Message: <3a6b155b@news.povray.org>
Hi folks,

I'm trying to update one of my old POVray files that used 'halo' to
work with 3.1 using media.  The original halo block looked like...

      halo {
        emitting
        spherical_mapping
        linear
        turbulence 1.5
        color_map {
          [ 0.0 color rgbt <1, 0, 0,  1> ]
          [ 0.5 color rgbt <1, 1, 0, -2> ]
          [ 1.0 color rgbt <1, 0, 0,  1> ]
        }
        frequency 2
        samples 20
        scale 0.3
      }


And I've got so far as using the following media...

      interior {
        media {
          emission rgb<1, 1, 1>
          density {
            spherical
            turbulence 1.5
            color_map {
              [ 0.0 rgbt <1, 0, 0, 1> ]
              [ 0.5 rgbt <1, 1, 0, -2> ]
              [ 1.0 rgbt <1, 0, 0, 1> ]
            }
//            frequency 2
            scale 0.3
          }
//          samples 20,20
        }
      }

But the problem I'm having is that with the original halo, the color_map
gave me a graduation from 'completely transparent red' (ie. black if viewed
on a black surface) to yellow and back again.

Where as with the media, I'm getting red to yellow to red. i.e It's
ignoring the transparency completely, and I get a mainly red sphere
rather than a mainly transparent one.

Am I doing something silly?

Cheers,

--
Jonathan Hunt
jon### [at] xlcuscouk


Post a reply to this message

From: Margus Ramst
Subject: Re: Media question
Date: 21 Jan 2001 13:25:08
Message: <3A6B29E9.9C0DCF1A@peak.edu.ee>
Jonathan Hunt wrote:
> 
> But the problem I'm having is that with the original halo, the color_map
> gave me a graduation from 'completely transparent red' (ie. black if viewed
> on a black surface) to yellow and back again.
> 
> Where as with the media, I'm getting red to yellow to red. i.e It's
> ignoring the transparency completely, and I get a mainly red sphere
> rather than a mainly transparent one.
> 

Media does not use the filter/transmit components of the colour. Density
(transparency) is determined by the brightness of the colour(s) used, i.e. rgb
<.1,0,0> gives a much more transparent (red) media than rgb <1,0,0>

Also remember that the smaller the media container, the denser (higher rgb
value) you should make your media. This is because the smaller the container,
the less media there is to "see through", and thus the more transparent the
media will appear (at the same density).

Anyway, this should do close to what you want (untested):

media{
  emission rgb 1 //set higher to get denser (more opaque) media
  density{
    spherical
    colour_map{
      [0 rgb <0, 0, 0>] //completely transparent
      [0.25 rgb <0.5, 0, 0>] //50% density red
      [0.5 rgb <1,1,0>] //yellow
      [0.75 rgb <0.5, 0, 0>] //50% density red
      [1 rgb <0, 0, 0>] //completely transparent
    }
  }
}

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Home page http://www.hot.ee/margusrt


Post a reply to this message

From: Jonathan Hunt
Subject: Re: Media question
Date: 21 Jan 2001 15:09:29
Message: <3a6b41f9@news.povray.org>
Thanks Margus. Cheers for the helpful info.
Got it sorted now.

--
Jonathan Hunt
jon### [at] xlcuscouk
http://www.xlcus.co.uk/povray/


Post a reply to this message

From: Jonathan Hunt
Subject: Re: Media question (again ;-) )
Date: 22 Jan 2001 18:51:52
Message: <3a6cc798@news.povray.org>
Hi all,

Well thanks to Margus, I got my fireball rendering again, and it
looks almost exactly the same as it did before with the halos
which is great, except for one thing.  The media version looks
*so* much grainer than the halo version did.  Is this how it's
supposed to be?  It also seems to render a lot slower. Am I
expecting too much?

I can make the media version less grainy by increasing the number
of samples, but to get it looking as good as the halo the number
of samples needs to be so high that the render speed drops to
a crawl.

Am I alone in having this problem?  If so, it's probably me just
doing something silly again :-)

Cheers,

--
Jonathan
http://www.xlcus.co.uk/povray/


Post a reply to this message

From: Chris Huff
Subject: Re: Media question (again ;-) )
Date: 22 Jan 2001 19:04:17
Message: <chrishuff-3A7687.19052422012001@news.povray.org>
In article <3a6cc798@news.povray.org>, "Jonathan Hunt" 
<jon### [at] xlcuscouk> wrote:

> I can make the media version less grainy by increasing the number
> of samples, but to get it looking as good as the halo the number
> of samples needs to be so high that the render speed drops to
> a crawl.

The sampling algorithm was one of the things that changed from halo to 
media. The one in media should be more accurate, but is also a lot 
slower because it requires a large number of samples to get smooth 
results. MegaPOV has two additional sampling methods that can really 
speed things up by getting you smoother results with fewer samples, 
method 3 is very close to the old halo sampling.
MegaPOV is available here: http://nathan.kopp.com/patched.htm

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

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