POV-Ray : Newsgroups : povray.windows : UV Coordinates : UV Coordinates Server Time
8 Jul 2024 03:37:16 EDT (-0400)
  UV Coordinates  
From: John Raptis
Date: 2 Sep 2000 09:50:59
Message: <39b105c3@news.povray.org>
Hi everyone,
I have a utility that I wrote in C to generate 3d models.  I have also
written an exporter that turns the models into 3d scripts that I can pass to
povray for final rendering.

The only problem is that I used openGL to make the modeler.  It carries a
vertex format like this:

x,y,z,u,v

With u and v being texture coordinates (from 0.0 to 1.0) on a vertex.  So, a
triangle in my format looks like this:

0,0,0, 0.0, 0.0
1,0,0, 1.0, 0.0
0,1,0  0.0, 1.0

After fiddling with povray, I didn't see any way to create a triangle and
specify how the texture goes onto it, except with SCALE and TRANSLATE.  In
an emergency, I think I could figure out a formula to scale and translate my
textures to fit my format, but I was wondering if povray offers any way to
specify the u and v of texture coordinates at the corners of a single
triangle.

Even if I had to make a 'mesh' of one triangle, that would be okay.  Speed
isn't crucial, so if anyone can tell me how to specify what coordinate of
the texture goes at each corner of the triangle, I would be very grateful!


Post a reply to this message

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