POV-Ray : Newsgroups : povray.binaries.images : billboard tint : Re: billboard tint Server Time
25 Feb 2024 00:02:40 EST (-0500)
  Re: billboard tint  
From: Alain Martel
Date: 3 Nov 2023 17:19:21
Message: <654563d9$1@news.povray.org>
Le 2023-11-03 à 12:49, Mike Miller a écrit :
> After taking some time off from POV, I'm ready to tackle a few new scenes I have
> in mind. One involves a landscape with some foreground vegetation. I started
> collecting some 2D sprite images of moss, grasses, and weeds thinking that I
> could populate the ground with them. I've run into a problem with the
> transparent portion of the png when turning on fog. The fog is tinting the
> billboard shape. I've removed the finish and have tried a variety of things in
> the shader with no success. I can fall back on 3D models if I can't get the
> sprites to work.  Below is what I used to texture this example. I understand
> that the bump statement will not have much of an effect without a finish. Any
> help would be appreciated.
> Thanks,
> Mike.
> 
> #declare imgDiffuse = "plants/grass_A.png"
> #declare imgBump    = "plants/grass_A.png"
> 
> #declare M_grass_A =
> material {
>      texture {
>         pigment {
>              image_map {
>                  png imgDiffuse premultiplied 0 gamma 2.2
>                  map_type 0
>                  interpolate 4
>                  }
>        }
>      normal  {
>          bump_map {
>              png imgBump premultiplied 0 gamma 2.2
>              map_type 0
>              interpolate 4
> 
>          }
>          bump_size 5
>      }
>      finish {
>          phong 0
>          phong_size 0
>          ambient 0
>          }
>      }
>      scale <1,1,1>
>      translate <-.5,0,0>
> }
> 
> #declare sprite = box {<-.5,0,-.01>,<.5,1,.01> } ;
> object { sprite material {M_grass_A} scale <30,40,1> translate <0,-1,0>}
> 

The fog is more visible between the billboards because there is less of 
it. It's evaluation stops at the billboard.

You may try adding hollow to those. Not sure that it'll work with fog in 
this case, but it can make a huge difference with media.
Adding hollow MAY allow the evaluation of the fog behind the billboards. 
But, then, the fog could become more intense in those areas. Hard to tell.

Try
#declare sprite = box {<-.5,0,-.01>,<.5,1,.01> hollow} ;
object { sprite material {M_grass_A} scale <30,40,1> translate <0,-1,0>}
or
#declare sprite = box {<-.5,0,-.01>,<.5,1,.01> } ;
object { sprite material {M_grass_A} scale <30,40,1> translate 
<0,-1,0>hollow}


Post a reply to this message

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