POV-Ray : Newsgroups : povray.general : Image maps and textures Server Time
4 Nov 2024 17:36:06 EST (-0500)
  Image maps and textures (Message 1 to 4 of 4)  
From: Chris Field
Subject: Image maps and textures
Date: 10 Feb 1999 06:56:43
Message: <36c173fb.0@news.povray.org>
I was wondering if it was possible to overlay an image map on an object that
already has a texture.
can you make the image map transparent in parts and put it on top of a
texture so that the texture shows through?
any help greatly appreciated.

Chris.


Post a reply to this message

From: Ken
Subject: Re: Image maps and textures
Date: 10 Feb 1999 07:08:19
Message: <36C17675.1EFE9EBF@pacbell.net>
Chris Field wrote:
> 
> I was wondering if it was possible to overlay an image map on an object that
> already has a texture.
> can you make the image map transparent in parts and put it on top of a
> texture so that the texture shows through?
> any help greatly appreciated.
> 
> Chris.

Yes it is possible. Read up in the docs on filter/transimit for
image maps. Basicaly you need to make the image_map's background
a single filterable color. You also need to know what the pallet
index for that color is. You could also specifiy a filter all
value if you prefer.

If I recall correctly the syntax for filtering a single color in a
image map is:

pigment{
 image_map{
  gif "MyImage.gif
   interpolate 2
  filter 255,1
 }
}

The first number is the pallet index number for the backgound color
( I have choosen 255 = white for this example) and the second is the
filter amount. I may have that backward so check the docs. You can 
also specify a transmit amount the same way. It's best to use .gif
files for this if possible because it uses a 256 color pallet for the
image which is compatible with the pov syntax for the feature.


-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Bob Hughes
Subject: Re: Image maps and textures
Date: 10 Feb 1999 18:29:39
Message: <36C2163E.A83A6C44@aol.com>
To further enhance upon this hopefully, you can apply filtering or
tranmitting to larger amounts of the image_map by using a #while loop to
increase the number of palette index numbers used and can also vary the
filter value too. Many variations of this can be done. Hope this
somewhat thrifty example shows you the idea well enough. Beware, I had
to cancel this message once already because I left out the #end of the
loop.

#declare C=192; //starting palette index number
#declare FA=1; //starts with full filtering

texture {YourUnderlyingTexture}
texture {
 pigment{
  image_map{
   gif "MyImage.gif"
    interpolate 2
 #while (C>127) //ending palette index number
   filter PN,FA
 #declare PN=C; //palette index number
 #declare FA=FA-((192-C)/64); //filter value, based upon start/end
 #declare C=C-1; //countdown [integers only]
 #end
  }
 }
}

Please note that a custom palette or one ordered in some way makes for
better control than a mix and match kind, in which case a 24-bit targa
is a better candidate due to the palettelessness and should be more
color-based as seen in the picture.



Ken wrote:
> 
> Chris Field wrote:
> >
> > I was wondering if it was possible to overlay an image map on an object that
> > already has a texture.
> > can you make the image map transparent in parts and put it on top of a
> > texture so that the texture shows through?
> > any help greatly appreciated.
> >
> > Chris.
> 
> Yes it is possible. Read up in the docs on filter/transimit for
> image maps. Basicaly you need to make the image_map's background
> a single filterable color. You also need to know what the pallet
> index for that color is. You could also specifiy a filter all
> value if you prefer.
> 
> If I recall correctly the syntax for filtering a single color in a
> image map is:
> 
> pigment{
>  image_map{
>   gif "MyImage.gif
>    interpolate 2
>   filter 255,1
>  }
> }
> 
> The first number is the pallet index number for the backgound color
> ( I have choosen 255 = white for this example) and the second is the
> filter amount. I may have that backward so check the docs. You can
> also specify a transmit amount the same way. It's best to use .gif
> files for this if possible because it uses a 256 color pallet for the
> image which is compatible with the pov syntax for the feature.
> 
> --
> Ken Tyler
> 
> mailto://tylereng@pacbell.net

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
 mailto:inv### [at] aolcom?PoV


Post a reply to this message

From: BC
Subject: Re: Image maps and textures
Date: 10 Feb 1999 23:52:15
Message: <01be557a$91bb60e0$0c0b010a@angela>
Something else to keep in mind is that POV will use the mask layer in TGA
files with this format. This gives you complete control over the overlay.

Gordon

Bob Hughes <inv### [at] aolcom> wrote in article
<36C2163E.A83A6C44@aol.com>...
> To further enhance upon this hopefully, you can apply filtering or
> tranmitting to larger amounts of the image_map by using a #while loop to
> increase the number of palette index numbers used and can also vary the
> filter value too. Many variations of this can be done. Hope this
> somewhat thrifty example shows you the idea well enough. Beware, I had
> to cancel this message once already because I left out the #end of the
> loop.
> 
> #declare C=192; //starting palette index number
> #declare FA=1; //starts with full filtering
> 
> texture {YourUnderlyingTexture}
> texture {
>  pigment{
>   image_map{
>    gif "MyImage.gif"
>     interpolate 2
>  #while (C>127) //ending palette index number
>    filter PN,FA
>  #declare PN=C; //palette index number
>  #declare FA=FA-((192-C)/64); //filter value, based upon start/end
>  #declare C=C-1; //countdown [integers only]
>  #end
>   }
>  }
> }
> 
> Please note that a custom palette or one ordered in some way makes for
> better control than a mix and match kind, in which case a 24-bit targa
> is a better candidate due to the palettelessness and should be more
> color-based as seen in the picture.
> 
> 
> 
> Ken wrote:
> > 
> > Chris Field wrote:
> > >
> > > I was wondering if it was possible to overlay an image map on an
object that
> > > already has a texture.
> > > can you make the image map transparent in parts and put it on top of
a
> > > texture so that the texture shows through?
> > > any help greatly appreciated.
> > >
> > > Chris.
> > 
> > Yes it is possible. Read up in the docs on filter/transimit for
> > image maps. Basicaly you need to make the image_map's background
> > a single filterable color. You also need to know what the pallet
> > index for that color is. You could also specifiy a filter all
> > value if you prefer.
> > 
> > If I recall correctly the syntax for filtering a single color in a
> > image map is:
> > 
> > pigment{
> >  image_map{
> >   gif "MyImage.gif
> >    interpolate 2
> >   filter 255,1
> >  }
> > }
> > 
> > The first number is the pallet index number for the backgound color
> > ( I have choosen 255 = white for this example) and the second is the
> > filter amount. I may have that backward so check the docs. You can
> > also specify a transmit amount the same way. It's best to use .gif
> > files for this if possible because it uses a 256 color pallet for the
> > image which is compatible with the pov syntax for the feature.
> > 
> > --
> > Ken Tyler
> > 
> > mailto://tylereng@pacbell.net
> 
> -- 
>  omniVERSE: beyond the universe
>   http://members.aol.com/inversez/POVring.htm
>  mailto:inv### [at] aolcom?PoV
>


Post a reply to this message

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