POV-Ray : Newsgroups : povray.newusers : Add a Gif as Texture : Re: Add a Gif as Texture Server Time
30 Jul 2024 22:22:42 EDT (-0400)
  Re: Add a Gif as Texture  
From: Hughes, B 
Date: 21 Jun 2003 11:10:50
Message: <3ef4757a$1@news.povray.org>
plane {
          <0, 1, 0>,0
          texture {
            pigment {
              image_map {
                gif "test.gif"
              }
    translate -0.5 scale 1 rotate 90*x
            }
          }
 }

is what you are needing if you want it centered and showing as a floor or
ceiling oriented image. To explain further, you would need to adjust
position (size too) from the pigment statement for a y plane like yours. The
default is for z plane instead, with the lower left corner being at <0,0,0>
then up and right one unit to <1,1,0>. The depth infinite along z. Notice
that you transform it from the pigment statement and not from the image_map
statement. However, you'll need to add the keyword 'once' to image_map to
prevent tiling.

My translate -0.5 infers a <-0.5,-0.5,-0.5>, where z doesn't matter since it
will project all along that axis, so that it will be centered and when
scaling will expand or contract from the <0,0,0> coordinate and also rotate
around that point instead of a corner of the image. For me that's the
easiest way to work with it, you could do it differently if you like. Main
thing is that you understand the the defaults for image_map are to place it
on the z plane going from <0,0,0> to <1,1,0>. You've simply ended up with a
image as an infinitely small line across a y plane so it's invisible.

Bob H.


Post a reply to this message

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