POV-Ray : Newsgroups : povray.general : Fog & media together? : Re: Fog & media together? Server Time
5 Nov 2024 07:19:52 EST (-0500)
  Re: Fog & media together?  
From: gonzo
Date: 26 May 2003 15:32:34
Message: <3ed26bd2@news.povray.org>
Hughes, B. <omn### [at] charternet> wrote in message
news:3ed196fd@news.povray.org...
> I'm not at all sure if this is related to something discussed long ago but
> if it is it would be due to trouble with transparency or filtered colors.
I
> just can't remember if a fix was attempted in 3.5 either, and if so that
> making this a different problem. Or there's something else amiss in how
> you're scene is done I guess.
> ----
> Well, I checked a simple scene here and didn't see what you described.
Only
> thing that shows up is the shadow of the sphere, unless no_shadow is added
> to remove it. Shouldn't be seeing the shadow though, ideally, so that
could
> be a bug still.

Thanks for the input, Bob.  Your sample seems to work fine, so maybe I'm
doing something wrong in my code.  Here's a stripped down scene with the
media & fog I'm using...

#include "colors.inc"
#include "skies.inc"

#declare campos = <-13.5,6,-15.5>;
#declare seepos = <5,3.8,5>;

camera

    location campos
    look_at seepos
    angle 80
}
light_source { <-50,20,-10> White }
sky_sphere { S_Cloud5 }

fog {
    distance 125
    color rgbf <.550,.440,.400,.15>
    fog_type 2
    fog_offset 6.85
    fog_alt 7.1
    // turbulence .5  // doesn't make any difference
}

#declare Glow = sphere { 0, 1.3 hollow
    pigment { rgbt 1 }
    interior

        media {
            scattering {  3, <.025,.02,.002> extinction .15 }
            intervals 25
            samples 1.5,1.5
            confidence 0.98
            variance 1/1024
            density { spherical
                color_map {
                    [0.00 rgbf <.015,.005,.000, 1.00>]
                    [0.15 rgbf <.235,.115,.001, 0.80>]
                    [0.50 rgbf <.505,.425,.003, 0.60>]
                    [1.00 rgbf <.725,.580,.025, 0.15>]
                }
                scale 1.2
            }
        }
        media {
            emission <.225,.210,.055>
            density {  spherical
                color_map {
                    [0.00 rgb <.000,.000,.000>]
                    [0.10 rgb <.045,.015,.010>]
                    [0.25 rgb <.245,.135,.025>]
                    [1.00 rgb <.485,.280,.035>]
                }
                turbulence .65
            }
        }
    }
    no_shadow
    // inverse  // on or off doesn't make any difference
}

#declare E_Light = light_group

    light_source { <.2,0,.2> rgb <1.2, 1, .95> fade_power 11 fade_distance
1.5}
    object { Glow }
}
#declare Spook = union {
    object { E_Light }
    light_source { <0,0,0> rgb<.65,.5,.1> fade_power 1.9 fade_distance 9 }
}

object { Spook scale 3 translate y*7 }  // lights on...
// object { Glow scale 3 translate y*7 } // lights off (doesn't make a
difference)

plane { y .1 pigment { rgb <.6,.7,.1> } }

// eof

My lighting is different, but that doesn't seem to have any bearing.  If
I've done something blatantly stupid in my code, feel free to point it out.
:-)

RG


Post a reply to this message

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