POV-Ray : Newsgroups : povray.windows : New Povray User... Server Time
24 Nov 2024 20:55:58 EST (-0500)
  New Povray User... (Message 1 to 4 of 4)  
From: Grey
Subject: New Povray User...
Date: 20 Jul 1998 15:52:35
Message: <35B39272.D54F7E49@spam.com>
Hey all...

I'm trying my hand at POVRAY by exporting objects from RHINO.

My very first issue is how to inlcude Texture Maps.  Can they be In JPG
format or do they need to be in another format?

I'm having difficulty understanding the Dialog on how they need to be
assigned.

I added the texture map to the following:

#declare Object1Texture = texture { 
   pigment { color rgb <1, 1, 1> }
   finish  { ambient 1 diffuse 1 }
}


By adding it thus:

#declare Object1Texture = texture { 
   pigment { color rgb <1, 1, 1> }
   finish  { ambient 1 diffuse 1 }
   texutre { texture001.jpg }
}


But of course that didn't work.  I know this is probably very boring
basic stuff for all y'all, but your help would be appreciated.

Thanks

Ian Grey


Post a reply to this message

From: Jerry Anning
Subject: Re: New Povray User...
Date: 20 Jul 1998 17:47:07
Message: <35B3ACCE.D5BE9606@dhol.com>
Grey wrote:

> I'm trying my hand at POVRAY by exporting objects from RHINO.
> 
> My very first issue is how to inlcude Texture Maps.  Can they be In JPG
> format or do they need to be in another format?
> 
> I'm having difficulty understanding the Dialog on how they need to be
> assigned.
> 
> I added the texture map to the following:
> 
> #declare Object1Texture = texture {
>    pigment { color rgb <1, 1, 1> }
>    finish  { ambient 1 diffuse 1 }
> }
> 
> By adding it thus:
> 
> #declare Object1Texture = texture {
>    pigment { color rgb <1, 1, 1> }
>    finish  { ambient 1 diffuse 1 }
>    texutre { texture001.jpg }
> }

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


Post a reply to this message

From: Grey
Subject: Re: New Povray User...
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

From: Ronald L  Parker
Subject: Re: New Povray User...
Date: 20 Jul 1998 23:18:04
Message: <35b3f68b.185028861@news.povray.org>
On Mon, 20 Jul 1998 16:58:38 -0700, Grey <nos### [at] spamcom> wrote:

You don't need to mung your address on this news server.  These groups
don't get propagated to the spammers.

[...]

>#declare Object1texture =

[...]

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

Case is important.  Is the T capitalized, or isn't it?  Whichever it
is, make sure it's consistent.


Post a reply to this message

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