Scaling a vertex

Hi! :slight_smile:

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! :stuck_out_tongue:

vertex_range_0_1 = (vertex-meshmin)/(meshmax-meshmin)

Why! That should do the trick :wink:

Thank you very much :stuck_out_tongue: