View Full Version : Scaling a vertex

09-03-2004, 10:58 PM
Hi! :)

I'm trying to do planar and cubic texture mapping, and to do that I have to scale each vertex from a mesh so it is in 0-1 range to use as texture coordinates.

Does someone know how to do this? :confused:
I tried normalising each vertex but that has distorted results (because normalising results in a -1 to 1 range, not 0 to 1)

Thanks y'all! :p

09-04-2004, 05:49 AM
vertex_range_0_1 = (vertex-meshmin)/(meshmax-meshmin)

09-04-2004, 10:01 PM
Why! That should do the trick ;)

Thank you very much :p