POV-Ray : Newsgroups : povray.newusers : image_map documentation Server Time
5 Nov 2024 09:25:56 EST (-0500)
  image_map documentation (Message 1 to 3 of 3)  
From: ianh
Subject: image_map documentation
Date: 1 Dec 2003 12:40:01
Message: <web.3fcb7b931a517fb2d57ec95b0@news.povray.org>
I have been trying to use image_map to get a 3D object from a cross
section within a gif. The effect of what I am after would be similar to a
complex prism. I set the ouside of the object to have filter 1.0 to make
it transparent and the remainder to have default filter i.e. solid.

According to the image_map documentation "With image maps you should imagine
that each pixel is a long, thin, square, colored rod that extends parallel
to the z-axis. The image is made from rows and columns of these rods
bundled together and the object is then carved from the bundle."

When using map_type 0 with a box I get the image on the front face of the
box,
and the reflection on the rear face and the interior of the box is empty.
The front and rear faces generate separate shadows. This is not what is
implied in the documentation.

a) Is the documentation or my interpretation wrong?
b) Is there another way of getting a prism like 3D object from an image?

Ian


Post a reply to this message

From: Mike Williams
Subject: Re: image_map documentation
Date: 1 Dec 2003 14:08:57
Message: <t3gzhRAIF5y$Ewj9@econym.demon.co.uk>
Wasn't it ianh who wrote:
>I have been trying to use image_map to get a 3D object from a cross
>section within a gif. The effect of what I am after would be similar to a
>complex prism. I set the ouside of the object to have filter 1.0 to make
>it transparent and the remainder to have default filter i.e. solid.
>
>According to the image_map documentation "With image maps you should imagine
>that each pixel is a long, thin, square, colored rod that extends parallel
>to the z-axis. The image is made from rows and columns of these rods
>bundled together and the object is then carved from the bundle."
>
>When using map_type 0 with a box I get the image on the front face of the
>box,
>and the reflection on the rear face and the interior of the box is empty.
>The front and rear faces generate separate shadows. This is not what is
>implied in the documentation.
>
>a) Is the documentation or my interpretation wrong?
>b) Is there another way of getting a prism like 3D object from an image?

a) Perhaps that particular analogy isn't as good as the one in the
previous paragraph "The image is /projected/ onto the object as though
there were a slide projector somewhere in the -z-direction". You only
see the projected colour at points where the surface exists. The "long
thin square coloured rod" analogy works for opaque image_maps, but could
be seen to imply that you would expect to see the sides of the rods when
using an image_map with some transparent regions.

b) You could try investigating the height_field object. In particular,
note the use of water_level.

For example, if you create a PNG file which has the shape drawn in pure
white on a pure black background you can use code like this to extrude
your prism:

camera {location  <0,2,-2> look_at <0,0,0> angle 50}
light_source {<-30, 100, -30> color rgb 1}

height_field {png "image.png"
   water_level 0.00001
   pigment {rgb 1}
   translate <-0.5,-0.5,-0.5>
}

The water_level keyword prevents the black bits (colour 0) from making a
flat area at the base.

Be aware that the object is open at the bottom.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: image_map documentation
Date: 1 Dec 2003 14:13:14
Message: <3fcb92ca@news.povray.org>
In article <web.3fcb7b931a517fb2d57ec95b0@news.povray.org> , "ianh" 
<ian### [at] tesconet> wrote:

> When using map_type 0 with a box I get the image on the front face of the
> box,
> and the reflection on the rear face and the interior of the box is empty.
> The front and rear faces generate separate shadows. This is not what is
> implied in the documentation.

You misunderstand the documentation.  From your description it isn't clear
at all what you are trying to to.  In order to help you, a _small_ but
complete scene showing your problem will be needed.  Put it in the message
body.  No need to post the image map.

    Thorsten


Post a reply to this message

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