POV-Ray : Newsgroups : povray.newusers : Image_map transparent color interracts with fog Server Time
4 Nov 2024 23:16:24 EST (-0500)
  Image_map transparent color interracts with fog (Message 1 to 8 of 8)  
From: StDunstan
Subject: Image_map transparent color interracts with fog
Date: 30 Aug 2004 08:50:01
Message: <web.4133223fba38b838d99800df0@news.povray.org>
For remotes objects, I use a simple flat box mapped with a GIF image. As
this object is not rectangular, all part of the rectangle outside the
object is set with a transparent color.

example.
box {<0,0,0><1,1,1>
texture {

                    pigment {
                      image_map {gif "facadesmakefacade02d192.gif"
transmit    192, 1.0
                      }

                    }
                    finish
                 {
                    ambient 0.25
                    diffuse 0.78

                 }
         }

scale <576,1032,0.0030>* 0.8
translate x* (525*1.25  + 321*0.85 )
rotate -y*12
translate orgFacadesSud


On the example above, the color 192 is mase transparent


It works fine as long as there is no fog effect. But if I set a fog

fog {
    distance 2850
    color rgbft<0.4, 0.41, 0.41, .5,.6>
    turbulence 5 omega .2
    turb_depth 0.99
}

The transparent color is colored with the fog color making all the rectangle
frame visible directly or dropping shadow.

Is there any way to avoid this ??


Post a reply to this message

From: wacampbell
Subject: Re: Image_map transparent color interracts with fog
Date: 30 Aug 2004 10:50:01
Message: <web.41333e42aa38adac920f01dd0@news.povray.org>
I also use this technique ( alpha images on billboards ) and have run into
this problem with fog.

Try using the 'hollow' keyword on your billboard object.  In my case, for
billboards formed from a simple 2 triangle mesh, use of the 'hollow'
keyword solved the problem.


Wayne


Post a reply to this message

From: StDunstan
Subject: Re: Image_map transparent color interracts with fog
Date: 30 Aug 2004 14:35:00
Message: <web.41337270aa38adacd99800df0@news.povray.org>
"wacampbell" <nomail@nomail> wrote:
> I also use this technique ( alpha images on billboards ) and have run into
> this problem with fog.
>
> Try using the 'hollow' keyword on your billboard object.  In my case, for
> billboards formed from a simple 2 triangle mesh, use of the 'hollow'
> keyword solved the problem.
>
>
> Wayne

Thanks a lot Wayne !

Unfortunately, in my case his hollow statement did not change the result,
the transparent area through the fog still become translucent with the
fog's color ;-(

But using a mesh rather than a box make the problem less obvious (may be
because the mesh has just ONE surface while the box has two ?)

However thanks for the idea using the mesh. May be I will simply define the
roof slopes and chimneys in the mesh ?...

Or may be I simply did not use the hollow keyword properly ?

Here is the object

        mesh {
    /* top side */
    triangle {
      <0,0,0>, <1,0,0>, <0,1,0>
      //texture { Red }
    }
    triangle {
      <1,0,0>, <0,1,0>, <1,1,0>
      //texture { Red }
    }

        texture {

                            pigment {
                              image_map {gif "facades71gtr192d.gif"
transmit    192, 1.00
                              }

                            }
                            finish
                         {
                            ambient 0.25
                            diffuse 0.78

                         }
                 }

        scale <390,802,10>*1.45
        rotate y*3
        translate 2 * x* 390 *1.45
        hollow
        }


Post a reply to this message

From: Slime
Subject: Re: Image_map transparent color interracts with fog
Date: 30 Aug 2004 18:13:54
Message: <4133a6a2$1@news.povray.org>
> Unfortunately, in my case his hollow statement did not change the result,
> the transparent area through the fog still become translucent with the
> fog's color ;-(

It seems strange to me that a transparent object would change the appearance
of fog. The fog against the background should look the same as the fog
against the background through the transparent object.

However, if you're using *turbulence* in your fog, then that's the problem.
The fog turbulence effect is caused by a simple calculation which doesn't
actually simulate a continuous density function in 3D space. Against
transparent objects, the turbulence calculations come up with different
results than if the objects weren't there, causing the fog to appear
turbulated a different amount over the transparent object than against the
background next to it.

If this is the problem you're facing, then you have two options as I see it:

 - remove the turbulence in your fog
 - replace the fog with media (and sacrifice render time)

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


Post a reply to this message

From: StDunstan
Subject: Re: Image_map transparent color interracts with fog
Date: 31 Aug 2004 12:30:00
Message: <web.4134a75baa38adacd99800df0@news.povray.org>
Thanks for your help folks but, currently none of my tries has given any
result,

I removed the turbulence, used a tga with alpha channel, added hollow
keyword, tried all sort of transmit, filter settings... No way. The fog
still give a color to the transparent part of the mesh. ;-((

I will then have to define all the details in the source...



" It seems strange to me that a transparent object would change the
appearance
> of fog. The fog against the background should look the same as the fog
> against the background through the transparent object.
>
> However, if you're using *turbulence* in your fog, then that's the problem.
> The fog turbulence effect is caused by a simple calculation which doesn't
> actually simulate a continuous density function in 3D space. Against
> transparent objects, the turbulence calculations come up with different
> results than if the objects weren't there, causing the fog to appear
> turbulated a different amount over the transparent object than against the
> background next to it.
>
> If this is the problem you're facing, then you have two options as I see it:
>
>  - remove the turbulence in your fog
>  - replace the fog with media (and sacrifice render time)
>
>  - Slime
>  [ http://www.slimeland.com/ ]


Post a reply to this message

From: Slime
Subject: Re: Image_map transparent color interracts with fog
Date: 31 Aug 2004 12:59:30
Message: <4134ae72$1@news.povray.org>
> I removed the turbulence, used a tga with alpha channel, added hollow
> keyword, tried all sort of transmit, filter settings... No way. The fog
> still give a color to the transparent part of the mesh. ;-((

Maybe you should post an image in povray.binaries.images which shows the
problem.

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


Post a reply to this message

From: StDunstan
Subject: Re: Image_map transparent color interracts with fog
Date: 1 Sep 2004 08:15:00
Message: <web.4135bd30aa38adacd99800df0@news.povray.org>
I just did on povray.binaries, thanks


"Slime" <fak### [at] emailaddress> wrote:
> > I removed the turbulence, used a tga with alpha channel, added hollow
> > keyword, tried all sort of transmit, filter settings... No way. The fog
> > still give a color to the transparent part of the mesh. ;-((
>
> Maybe you should post an image in povray.binaries.images which shows the
> problem.
>
>  - Slime
>  [ http://www.slimeland.com/ ]


Post a reply to this message

From: StDunstan
Subject: Re: Image_map transparent color interracts with fog
Date: 1 Sep 2004 13:45:01
Message: <web.413609b1aa38adacd99800df0@news.povray.org>
An image and description of the problem is now posted in
povray.binaries.images

Thanks


> Maybe you should post an image in povray.binaries.images which shows the
> problem.
>
>  - Slime
>  [ http://www.slimeland.com/ ]


Post a reply to this message

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