POV-Ray : Newsgroups : povray.windows : New Povray User... : Re: New Povray User... Server Time
28 Jul 2024 16:17:00 EDT (-0400)
  Re: New Povray User...  
From: Grey
Date: 20 Jul 1998 20:56:36
Message: <35B3D9AE.980B0EED@spam.com>
> What you are trying to do is called an image map in POV.  They are
> declared as part of the pigment.  .jpg isn't suitable for POV, but .tga,
> .png and.gif will work.  A trick about image maps is that POV assumes
> that they are being projected along the positive z axis (into the
> screen).  They also are projected to a unit square from <0, 0, 0> to <1,
> 1, 0>.  Therefore, you may need to scale, rotate and/or translate the
> image map to the place and orientation you desire.  If the object is too
> large, a (planar) image map will tile unless you use the once option.
> Here is the proper syntax for a simple image map texture based on what
> you attempted.  For more details, consult the documentation.  *Note* If
> you are using the 3.1 beta, you will want to download the 3.02 docs,
> since they are much better organized at the moment.
> 
> #declare Object1texture =
> texture
>   {
>     pigment { image_map { tga "Myimage.tga" } }
>     finish { ambient 1 diffuse 1 } // This is a very odd setting!
>     // Are you sure that is what you want?
>   }
> 
> Then you use the texture as, say:
> 
> box { <0, 0, 0>, <1, 1, 1> // or whatever object
>   texture { Object1texture }
>   }
> 
> The indentation is optional.  That is just how I do it.
> Good luck
> 
> Jerry Anning
> cle### [at] dholcom

Here's what I did, I resaved the Bitmap file as texture004.tga, and
replaced the previously posted syntax with the following:


// Object1

#declare Object1texture =
texture
  {
    pigment { image_map { tga "texture004.tga" } }
    finish { ambient 1 diffuse 1 } // This is a very odd setting!
    // Are you sure that is what you want?
  }



What I'm getting is an error message: C:Rhino\box001.pov:67 error: no
matching } in texture, indeclared identifire "Object1Texture" found
instead.

I've looked through this, and I can't find a missing }, and as far as I
know the bitmap is simply supposed to be in the same directory as the
original POV file, which is where it is... forgive me for not
understanding this...  I appreciate the help though.

Ian Grey


Post a reply to this message

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