POV-Ray : Newsgroups : povray.general : Fog and Media sphere Server Time
25 Dec 2024 01:15:00 EST (-0500)
  Fog and Media sphere (Message 1 to 7 of 7)  
From: Francis
Subject: Fog and Media sphere
Date: 7 Jun 2006 15:45:01
Message: <web.44872c3c307411394e7319190@news.povray.org>
Hi,

This is my first message here, so I will introduce myself briefly :
I live in the south of France, I'm 36 and in real life, I'm ground
instructor in a flight school. I've used Povray 10 years ago, when my PC
needed to compute all night long to display the famous yellow ball ;-)
I started again raytracing a few days ago, and here is my first problem (I
didn't find any solution searching the web and the news) :

I want a fire in my fog :-)
The problem is that my sphere containing the media is visible in the fog :
http://www.chezgligli.net/img/light_fog_01.jpg

I had the same problem with the water reflection and no fog, but with
max_trace_level 10 it disappeared :
http://www.chezgligli.net/img/light_fog_02.jpg

Hope someone can help ;-)

Here is the scene, the sphere and the fog are at the end :

global_settings
{
  max_trace_level 10
}

#include "colors.inc"
#include "textures.inc"

camera
{
    location  <0, 2, -26>
    look_at <0,0,10>
}

//=====================================

//=====================================
light_source
{
    <0, 0, 0>, rgb <1, .2, 0>
    translate <0, 5, 150>
}

//=====================================

//=====================================

plane
{
    y, -1

    pigment
    {
        bozo
        pigment_map
        {
            [0.1 color <0, .5, .7>]
            [0.3 color <.3, .8, .7>]
            [0.6 color <.2, .6, .5>]
            [0.9 color <0.2, .2, .9>]
        }

        turbulence .5
    }
}

//=====================================
// L'eau / Water
//=====================================

box
{
    <-150, -.9, -100>, <150, -.8, 1000>

    texture
    {
        pigment
        {
            rgbf 1
        }

        normal
        {
            ripples 0.75
            frequency 2
            scale y*.1
            turbulence .1
        }

        finish
        {
            reflection {0.1, 1 fresnel}
            conserve_energy
        }

    }

    interior
    {
        ior 1.33
    }

}

//=====================================
// Le Soleil / the Sun
//=====================================

sphere // transparent sphere containing media
{
    0, 1 pigment { rgbt 1 } hollow

    interior
    {
        media
        {
            emission 1
            density
            {
                spherical density_map
                {
                    [0 rgb <0, 0, 0>]
                    [0.5 rgb <1, .3, 0>]
                    [0.5 rgb <1, .3, 0>]
                    [1 rgb <1, 0, 0>]
                }
            }
        }
    }
    scale 30
    translate <0, 5, 200>
}

//=====================================

//=====================================

  sky_sphere {
    pigment {
      gradient y
      color_map {
        [0.000 0.002 color rgb <1.0, 0.2, 0.0>
                     color rgb <1.0, 0.2, 0.0>]
        [0.002 0.200 color rgb <1.0, 0.2, 0.0>
                     color rgb <0.2, 0.2, 0.3>]
      }
      scale 2
      translate -1
    }
    rotate -95*x
  }
//=====================================
// Flammes / Flames
//=====================================

sphere
{
    <0,0,0>, 1
    hollow
   no_shadow
    pigment {rgbf 1}
    scale <.6, 1, .3>
    interior
    {
        media
        {
            intervals 5
            samples 5
            emission 6
            absorption 1
            density
            {
                spherical
                scale <5, 25, 4>
                warp
                {
                    turbulence 10 lambda 2 octaves 4
                }
                density_map
                {
                    [0 rgb 0]
                    [.5 rgb 0]
                    [.7 color Orange]
                    [.8 color Orange]
                    [.9 color Red]
                    [1 color Red ]
                }
            }
        }
    }


    translate <2, 2, -20>
}

//=====================================
// Brouillard / Fog
//=====================================

#declare Brouillard=1;
#if(Brouillard)
    fog
    {
        distance 8
        color rgbf<.8, .9, .8, 1>
        fog_type 2
        fog_offset 2
        fog_alt 1
        turbulence <1, 1, 1>
        turb_depth .8
        octaves .2
        lambda .5
        omega 1
    }
#end


Post a reply to this message

From: Warp
Subject: Re: Fog and Media sphere
Date: 7 Jun 2006 15:49:09
Message: <44872db5@news.povray.org>
If I remember correctly, there are some issues related precisely to
the combination of fog and transparent objects (I don't remember if
media was necessary to trigger the misbehaviour or not). IOW there's
some kind of bug relating to this in POV-Ray and I don't know of a
simple way around it.

-- 
                                                          - Warp


Post a reply to this message

From: gonzo
Subject: Re: Fog and Media sphere
Date: 7 Jun 2006 22:54:40
Message: <44879170@news.povray.org>
Francis wrote:

> I want a fire in my fog :-)
> The problem is that my sphere containing the media is visible in the fog :
> http://www.chezgligli.net/img/light_fog_01.jpg
> 
> I had the same problem with the water reflection and no fog, but with
> max_trace_level 10 it disappeared :
> http://www.chezgligli.net/img/light_fog_02.jpg
> 
> Hope someone can help ;-)
> 

> #if(Brouillard)
>     fog
>     {
>         distance 8
>         color rgbf<.8, .9, .8, 1>
>         fog_type 2
>         fog_offset 2
>         fog_alt 1
>         turbulence <1, 1, 1>
>         turb_depth .8
>         octaves .2
>         lambda .5
>         omega 1
>     }
> #end
> 

Remove the filter component from your fog color and it should work, i.e. 
"color rgb<.8, .9, .8>".

I forget the long explanation behind this, but I had the same issue for 
my "mystery lights" IRTC entry, and there was a good description posted 
here when I asked.  The final answer though was that fog with a filter 
component results in an incorrect calculation along the length of the 
ray so you end up seeing the media container.

RG


Post a reply to this message

From: Francis
Subject: Re: Fog and Media sphere
Date: 8 Jun 2006 01:05:01
Message: <web.4487af9da15f45264e7319190@news.povray.org>
gonzo <rgo### [at] lansetcom> wrote:

> Remove the filter component from your fog color and it should work, i.e.
> "color rgb<.8, .9, .8>".

It works !
Thank you very much :-)


Post a reply to this message

From: Sven Littkowski
Subject: Re: Fog and Media sphere
Date: 8 Jun 2006 15:29:35
Message: <44887a9f@news.povray.org>
I rendered it. Hmm... It reminds me somehow for a beautiful sunset in the 
ocean. But just partially. I am curious what the final result will be...

Greetings,

Sven


Post a reply to this message

From: Francis
Subject: Re: Fog and Media sphere
Date: 10 Jun 2006 06:25:00
Message: <web.448a9cf3a15f45264e7319190@news.povray.org>
> I rendered it. Hmm... It reminds me somehow for a beautiful sunset in the
> ocean. But just partially. I am curious what the final result will be...

Well, I just gave you the parts of the scene that were the problem. Since I
had to chose a subject for my first work, I'm trying the IRTC theme "Light
and Fog".

No chance to have a prize, of course, but the important thing is to take
part ;-)

Is it ok to show the picture here or do I have to wait the end of the
competition ?


Post a reply to this message

From: M a r c
Subject: Re: Fog and Media sphere
Date: 10 Jun 2006 13:00:20
Message: <448afaa4@news.povray.org>

news:web.448a9cf3a15f45264e7319190@news.povray.org...
> No chance to have a prize, of course, but the important thing is to take
> part ;-)
Of course :-)
>
> Is it ok to show the picture here or do I have to wait the end of the
> competition ?
It's ok but not quite here, on povray.binaries.images

Marc


Post a reply to this message

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