POV-Ray : Newsgroups : povray.newusers : using a .jpeg as a texture Server Time
29 Jul 2024 10:24:23 EDT (-0400)
  using a .jpeg as a texture (Message 1 to 7 of 7)  
From: mine
Subject: using a .jpeg as a texture
Date: 28 Apr 2006 02:00:07
Message: <web.4451af049f851e8316cc43700@news.povray.org>
I want to use a .jpeg format picture as a texture, how do I do it?


Post a reply to this message

From: PM 2Ring
Subject: Re: using a .jpeg as a texture
Date: 28 Apr 2006 02:30:01
Message: <web.4451b5372b743d3e76ba2c900@news.povray.org>
"mine" <nomail@nomail> wrote:
> I want to use a .jpeg format picture as a texture, how do I do it?

If you just want to 'paint' the jpeg image onto a surface, use image_map.
But if (as I suspect) you want to sort-of 'carve' the jpeg into your object
to create a textured surface, then you want to use bump_map. In the 3.6
docs, see '3.5.1.5  Image Maps' and '3.5.2.3  Bump Maps'. Or look at the
online docs.

I know the docs are big, but you really do have to read them to know what
POV can do for you. :)

For an example of a bump_map picture I did see

http://news.povray.org/povray.binaries.images/attachment/%3Cweb.42556d981db933923d6ca37a0%40news.povray.org%3E/earthk1.
png

Check out the rest of the "Blue Marble" thread for code & other examples
that use image maps.


Post a reply to this message

From: mine
Subject: Re: using a .jpeg as a texture
Date: 28 Apr 2006 03:35:01
Message: <web.4451c4262b743d3e16cc43700@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> "mine" <nomail@nomail> wrote:
> > I want to use a .jpeg format picture as a texture, how do I do it?
>
> If you just want to 'paint' the jpeg image onto a surface, use image_map.
> But if (as I suspect) you want to sort-of 'carve' the jpeg into your object
> to create a textured surface, then you want to use bump_map. In the 3.6
> docs, see '3.5.1.5  Image Maps' and '3.5.2.3  Bump Maps'. Or look at the
> online docs.
>
> I know the docs are big, but you really do have to read them to know what
> POV can do for you. :)
>
> For an example of a bump_map picture I did see
>
>
http://news.povray.org/povray.binaries.images/attachment/%3Cweb.42556d981db933923d6ca37a0%40news.povray.org%3E/earthk
1.
> png
>
> Check out the rest of the "Blue Marble" thread for code & other examples
> that use image maps.

Thanks for the help.I tried using an 'image map'.I put in:

plane { <0, 1, 0>, 0
  pigment { image_map {jpeg "pavement1-512x512.jpeg"}
  }
 }

but I get "Parse Error: cannot open JPEG file.". The jpeg is in the same
directory as the .pov file. can you help?


Post a reply to this message

From: Marc Jacquier
Subject: Re: using a .jpeg as a texture
Date: 28 Apr 2006 04:16:35
Message: <4451cf63@news.povray.org>

tried using an 'image map'.I put in:
>
> plane { <0, 1, 0>, 0
>   pigment { image_map {jpeg "pavement1-512x512.jpeg"}
>   }
>  }
>
> but I get "Parse Error: cannot open JPEG file.". The jpeg is in the same
> directory as the .pov file. can you help?
>
maybe the file extension is jpg ...
in this case the image_map line  should be
pigment { image_map {jpeg "pavement1-512x512.jpg"}

Marc


Post a reply to this message

From: Chris B
Subject: Re: using a .jpeg as a texture
Date: 28 Apr 2006 04:16:38
Message: <4451cf66@news.povray.org>
"mine" <nomail@nomail> wrote in message 
news:web.4451c4262b743d3e16cc43700@news.povray.org...
> "PM 2Ring" <nomail@nomail> wrote:
>> "mine" <nomail@nomail> wrote:
>> > I want to use a .jpeg format picture as a texture, how do I do it?
>>
> ... snip ...
>
> Thanks for the help.I tried using an 'image map'.I put in:
>
> plane { <0, 1, 0>, 0
>  pigment { image_map {jpeg "pavement1-512x512.jpeg"}
>  }
> }
>
> but I get "Parse Error: cannot open JPEG file.". The jpeg is in the same
> directory as the .pov file. can you help?
>

Hi,

I tried pasting your sample into a scene file and creating a jpeg of the 
name you've used and it worked fine on Windows XP with POV-Ray 3.6.

A few possibilities spring to mind -
1. Your file name may not be exactly the same (l (L)instead of 1 (one), 
underscore instead of hyphen, space in front of or at the end of the file 
name, case difference (p vs P).)
2. Something a bit odd with the file format (incorrect conversion to JPEG, 
corrupted file)
3. Something operating system specific about the name - try renaming it to 
aaa.jpg and see if that works.

p.s. with the plane you defined you won't see much as the image is projected 
onto the XY plane. You need <0,0,1> or to rotate the pigment through x*90.

Hope that helps.
Regards,
Chris B.


Post a reply to this message

From: mine
Subject: Re: using a .jpeg as a texture
Date: 28 Apr 2006 04:30:00
Message: <web.4451d1932b743d3e16cc43700@news.povray.org>
thanks for your help. I used an 'image_map'. I put this in:

plane { <0, 1, 0>, 0
  pigment { image_map {jpeg "pavement1-512x512.jpeg"}
  }
 }

But I get "Parse Error: Cannot open JPEG file.", can you help? The jpeg is
in the same directory as the .pov file. The reason is probably really
obvious, but I can't figure it out.


Post a reply to this message

From: mine
Subject: Re: using a .jpeg as a texture
Date: 28 Apr 2006 04:35:01
Message: <web.4451d2cd2b743d3e16cc43700@news.povray.org>
sorry about last post, mistake. thanks for help


Post a reply to this message

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