exporting texturecoords
Blitz3D Forums/Blitz3D Programming/exporting texturecoords
| ||
;- |
| ||
You can export texture scale, position and angle in B3D files. |
| ||
;- |
| ||
So is your question about how to save UV coordinates, or about saving texture properties? I'd like to help you know :) Is it the VertexU and VertexV commands you are looking for? |
| ||
;- |
| ||
Is it the VertexU and VertexV commands you are looking for? |
| ||
;- |
| ||
;- |
| ||
This pseudo-code does the trick:textranspiv = CreatePivot() t_offsetu# = "The texture offset U" t_offsetv# = "The texture offset V" t_scaleu# = "The texture scale U" t_scalev# = "The texture scale V" t_angle# = "The texture rotation" For vert = 0 To CountVertices(surf)-1 ScaleEntity textranspiv,t_scaleu,1,t_scalev RotateEntity textranspiv,0,-t_angle,0 TFormPoint VertexU(surf,vert),0,VertexV(surf,vert),0,textranspiv u# = TFormedX()-t_offsetu v# = TFormedZ()-t_offsetv Next |
| ||
;- |