POV-Ray : Newsgroups : povray.newusers : Texturing landscapes : Re: Texturing landscapes Server Time
29 Jul 2024 10:28:45 EDT (-0400)
  Re: Texturing landscapes  
From: Chris B
Date: 13 Mar 2006 06:19:16
Message: <44155534@news.povray.org>
"Prodan" <nomail@nomail> wrote in message 
news:web.44153ba2f111dca5ef7b24140@news.povray.org...
> What is the best way to texture a object.
>

Hi Prodan,
There are lots of ways and I'm not sure there is necessarily a best way.


> Here is the code:
>
> ... snip ...
>
> difference {
>        box { <20, 0, -15>, <21, 65, -30> }
>        box { <19, 51, -20>, <22, 58, -25> }
>        texture {
>        pigment{ image_map { jpeg "stone01.jpg" } }
>        }
> }
>

I would guess you are starting from a photograph in the file 'stone01.jpg'. 
This can give reasonable results with some photos, but is a bit fiddly as it 
works best when the viewing angle and lighting in the rendered image match 
those with which the photo was taken and this can be difficult to achieve.
One problem with your example is that the surface of the box is flat and the 
edges are sharp. This immediately tells the eye that it's not a real stone 
surface.
Another problem is that, when the image repeats vertically and horizontally 
you may well see the joins.

>  ... snip ...
>
> It just seems that the box is not textured properly, how can I make it
> realistic?
>

One way is of using image maps is illustrated on my site at 
http://www.telinco.co.uk/c_bartlett/povray/stonecol/stonecol.htm.
It's a bit old and may need some changes for running in the current version 
of POV-Ray. Nevertheless, the source still may serve as an example.
This uses an image map for the stone colours and a second image map to 
control a height field that gives a profile to the surface.
To hide the joins at the edges of the image, these images have been adapted, 
so that the left-hand edge matches the right-hand edge and the top-edge 
marries up with the bottom-edge.

Hope this gives you some ideas.
Regards,
Chris B.


Post a reply to this message

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