POV-Ray : Newsgroups : povray.general : PovRay 3.6 + WinXP - is "image_map" with alpha channels borked? : Re: PovRay 3.6 + WinXP - is "image_map" with alpha channels borked? Server Time
1 Aug 2024 22:16:07 EDT (-0400)
  Re: PovRay 3.6 + WinXP - is "image_map" with alpha channels borked?  
From: PM 2Ring
Date: 7 Apr 2005 10:50:00
Message: <web.42554732e4938383d6ca37a0@news.povray.org>
"Tim Otholt" <nomail@nomail> wrote:
     texture
>     {
>       pigment{ image_map { tiff "land_ocean_ice_8192.tif" map_type 1 } }
>       finish { ambient 0.6  phong 0.3 diffuse 1 }
>     }
> //=================================
>
> For the image map, it comes from NASA's blue marble website:

I'm trying to replicate the Blue Marble image itself, but I need help with
lighting/finish.

>
> Problem:
>
> 1) When I render the picture, the image is almost completely black.  It
> appears POVRAY doesn't work with .TIF files with alpha channels?

> Converting to an indexed color format is not a good solution to me as the
> color banding when the video is processed by my mpeg encoder makes the
> image rather useless.
>
> Is there something special about using images with alpha channels?  Is there
> a bug with POVRAY and handling .TGA / .PNG files with alpha channels?

You can use the filter all & transmit all arguments with all image files,
not just palette-mapped images. For example (from my Blue Marble stuff):

#declare TOcean =
texture {
  pigment{
    image_map {
      jpeg "land_shallow_topo_2048.jpg"

      filter all 2.675
      transmit all 0.175

      map_type 1
      interpolate 2
    }
  }
  finish{
    Reflective
    ambient  rgb<0,0,0.5>
    diffuse 0.1
  }
}

#declare TLand =
texture{
  pigment {
    image_map {
      jpeg "land_shallow_topo_2048.jpg"
      filter all 0.15
      transmit all 0.075

      map_type 1
      interpolate 2
    }
  }
  finish{
    Reflective
    ambient 0 diffuse  0.7
  }
}

#declare TPlanet =
texture {
  image_pattern{
    sys "EAlpha.bmp"
    map_type 1
    interpolate 2
  }
  texture_map
  {
   [.5 TOcean]
   [.5 TLand]
 }
}

//-----------------------------

I created EAlpha.bmp (a black&white mask) using the free Netpbm programs.


Post a reply to this message

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