exporting texturecoords

Blitz3D Forums/Blitz3D Programming/exporting texturecoords

RGR(Posted 2003) [#1]
;-


fredborg(Posted 2003) [#2]
You can export texture scale, position and angle in B3D files.


RGR(Posted 2003) [#3]
;-


fredborg(Posted 2003) [#4]
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?


RGR(Posted 2003) [#5]
;-


fredborg(Posted 2003) [#6]
Is it the VertexU and VertexV commands you are looking for?


RGR(Posted 2003) [#7]
;-


RGR(Posted 2003) [#8]
;-


fredborg(Posted 2003) [#9]
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



RGR(Posted 2003) [#10]
;-