POV-Ray : Newsgroups : povray.newusers : Image mapping on triangles : Re: Image mapping on triangles Server Time
8 Jul 2024 01:10:12 EDT (-0400)
  Re: Image mapping on triangles  
From: clipka
Date: 3 Nov 2009 19:53:39
Message: <4af0d093$1@news.povray.org>
solanb schrieb:

> Ok, but then how to define the uv_vector corresponding to each triangle?
> 
> My image to be mapped consists of spots of a given dimension (eg. 1cm diameter),

> also in cm. And I want to keep the scale of my image when I project it on the
> scene's triangles.

Like with all image-backed texture stuff in POV-Ray, coordinate values 
<0,0>, <0,1>, <1,0> and <1,1> correspond to the corners of the texture 
image.

If you want the image to repeat, just use larger coordinate values; e.g. 
if you use <0,0>, <0,100>, <100,0> for some triangle's UV coordinates, 
the image will repeat 100 times along the edges.

Provided that you know the shape of your triangles, you can compute 
suitable UV coordinates from the length of any single of the triangle's 
edges (using vlength(P1-P2) for instance, or using the same base values 
you use to generate the triangle XYZ coordinates in the first place).


Post a reply to this message

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