POV-Ray : Newsgroups : moray.win : image mapping experts out there? : Re: image mapping experts out there? Server Time
28 Jul 2024 20:30:51 EDT (-0400)
  Re: image mapping experts out there?  
From: Ken
Date: 21 Feb 2000 00:21:16
Message: <38B0CB00.B2BEB26F@pacbell.net>
Ben Hamatake wrote:
> 
> Okay, I was just wondering if there is any way to somehow set a certain
> color of an image map to "transparent", as in the case of placing an
> image on a window of a store, or an etching on a wine glass.  I thought
> it was possible with pigmentmaps somehow, but I'm lost.  Thanks.
> 
> Ben Hamatake

I do not know if this is possible with Moray but there is a way to
do this in POV-Ray itself...

*IF* you use a palleted 256 color 8 bit image (such as the gif format)
you can specify a filter amount for a particular color pallet number.
For example if your image contained White areas and the pallet number
in your gif image for White were 255 then you could specify a filter
or transmit amount for that pallet number using the following syntax -

pigment {
 image_map { gif "your_image.gif" filter 255, 1 }
}

The first number is the pallet number of the color you want to filter
and the second number after the comma is the amount of filtering you
want added to that color. You can use any filter amount from 0 - 1.

This method does not work with images that are not a palleted type
such are 24 bit .tga images.

Another method is to use the .png format that uses alpha channels
specified in the image itself and then you can instruct POV-Ray to
use the alpha channel for the image map. I don't have an example
handy for this method but you can read up on it in the POV-Ray
documentation. This method has the benefit that you can use images
with a greater color depth but requires that you pre-process the
image you plan to use i.e. you must save the image with alpha
channels enabled for the color you need filtered.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

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