POV-Ray : Newsgroups : povray.general : cannot open png file : Re: cannot open png file Server Time
1 Aug 2024 04:13:52 EDT (-0400)
  Re: cannot open png file  
From: Trevor G Quayle
Date: 5 Apr 2006 09:35:00
Message: <web.4433c678f7526d8d6c4803960@news.povray.org>
"cpmac" <web### [at] cpmaccom> wrote:
>  #declare panel= prism {
>     linear_sweep
>     linear_spline
>     0, // sweep the following shape from here ...
>     0.01, // ... up through here
>     4, // the number of points making up the shape ...
>     <0,0>, <5,0>, <5,5>, <0,5>
>      texture {
>       pigment{
>       image_map {png "noddy2.png"
>         }
>        }
>
>       }
>  rotate<-90,0,0>
>  translate<0,6,0>
>  scale 0.5
>   }
> The file parses with no error message but no visible result.
> How is an image file supposed to adapt to it's suport. The image file has a
> transparent part. Could it be that only the transparent part is on the
> panel?
>
> cpmac

You should prisms are created as curves on the x-z plane and swept through
the y-axis.  On the other hand, image_maps are mapped on the x-y plane and
swept through the z-axis.  In order to get what I assume you are expecting,
you need to rotate the image_map to suit the prism face orientation.  Also
note that image_maps are mapped from <0,0> to <1,1> and repeated (unless
the once keyword is used) so if you want the image_map to fit the 5x5 prism
face exactly, you will need to scale it as well.
(see 3.5.1.5.1  Specifying an Image Map)

-tgq


Post a reply to this message

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