cube uvs

Blitz3D Forums/Blitz3D Programming/cube uvs

D4NM4N(Posted 2005) [#1]
has anyone got or know how to code cubic uv maps for an entity? im trying to stop texture stretching on a editable mesh terrain.


jfk EO-11110(Posted 2005) [#2]
You could check the orientation of each triangle, then use some trigonometric formula (that I don't know :) ) to determine what side of the cube the triangle should be part of.

Put the problem will be you won't get seamlessy welded UVs easily AFAIK.

It may be much easier when you only update a plane mapped texture. this way you only need to convert the vertices x and z positions relative to 1.0. (well, get min and max x,z of the vertices may represent 0.0 to 1.0 of the UVs)