POV-Ray : Newsgroups : povray.newusers : Image mapping on triangles : Re: Image mapping on triangles Server Time
8 Jul 2024 00:06:02 EDT (-0400)
  Re: Image mapping on triangles  
From: clipka
Date: 3 Nov 2009 19:44:42
Message: <4af0ce7a@news.povray.org>
solanb schrieb:

> My constraint is that the image's projection on a given triangle must be in the
> same plane of the triangle.
> Using image_map, I have to rotate the texture in the triangle's plane: is there
> a way to calculate rotation parameters from triangle's coordinates?
> 
> I there an easier way to do this?

Yes: UV mapping.

Note that for this you will need a mesh (or mesh2) object (which is 
actually just a memory- and performance-efficient collection of 
triangles, so you should use this object type anyway).

Essentially, what this does is that you specify which points of the 
texture you want to end up at the individual vertices, and POV-Ray will 
automatically rotate and scale and skew the texture - and even 
nonlinearily distort it - as needed. For each triangle individually.


Post a reply to this message

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