EmergencyBrake
Member
Hi,
I need help with the SetTextureCoordinates codes for textured LUL power rails.
My route started with coloured rails but now I felt that the aesthetics will be better with photoreal textured rails (thanks for voting in my other post guys!).
I managed to apply a texture to the straight sections, but I have hit a problem with Im trying to do the same for the curved sections. Up to now, I still do not know everything about the coordinates section- especially for a complex object like track objects, so I copied and pasted the coords from a normal running rail.
Heres the code for the power rail for a 500 radius left curve-
CreateMeshBuilder,
AddVertex,.059,.05,25.294,
AddVertex,.115,.05,22.765,
AddVertex,.159,.05,20.235,
AddVertex,.19,.05,17.706,
AddVertex,.208,.05,15.176,
AddVertex,.214,.05,12.646,
AddVertex,.207,.05,10.116,
AddVertex,.187,.05,7.587,
AddVertex,.151,.05,5.057,
AddVertex,.107,.05,2.528,
AddVertex,.05,.05,-.001,
AddVertex,-.041,.05,25.291,
AddVertex,.015,.05,22.763,
AddVertex,.059,.05,20.234,
AddVertex,.09,.05,17.705,
AddVertex,.108,.05,15.175,
AddVertex,.114,.05,12.646,
AddVertex,.107,.05,10.117,
AddVertex,.087,.05,7.588,
AddVertex,.054,.05,5.059,
AddVertex,.008,.05,2.53,
AddVertex,-.05,.05,.001,
AddFace,0, 1, 12, 11,
AddFace,1, 2, 13, 12,
AddFace,2, 3, 14, 13,
AddFace,3, 4, 15, 14,
AddFace,4, 5, 16, 15,
AddFace,5, 6, 17, 16,
AddFace,6, 7, 18, 17,
AddFace,7, 8, 19, 18,
AddFace,8, 9, 20, 19,
AddFace,9, 10, 21, 20,
GenerateNormals,
LoadTexture,top.bmp,
SetTextureCoordinates,0, 1.02, 10,
SetTextureCoordinates,1, -0.02, 10,
SetTextureCoordinates,2, 1.02, 8,
SetTextureCoordinates,3, -0.02, 8,
SetTextureCoordinates,4, 1.02, 6,
SetTextureCoordinates,5, -0.02, 6,
SetTextureCoordinates,6, 1.02, 4,
SetTextureCoordinates,7, -0.02, 4,
SetTextureCoordinates,8, 1.02, 2,
SetTextureCoordinates,9, -0.02, 2,
SetTextureCoordinates,10, 1.02, 0,
SetTextureCoordinates,11, -0.02, 0,
and heres the results (I know that the problem is because there are 21 vertices and the coords only defined 11 of them)-
Can somebody with better knowledge about the coords statement help me by posting the correct set of coords for the whole chunck of addvertex statements please. Credits will be given.
Thanks
I need help with the SetTextureCoordinates codes for textured LUL power rails.
My route started with coloured rails but now I felt that the aesthetics will be better with photoreal textured rails (thanks for voting in my other post guys!).
I managed to apply a texture to the straight sections, but I have hit a problem with Im trying to do the same for the curved sections. Up to now, I still do not know everything about the coordinates section- especially for a complex object like track objects, so I copied and pasted the coords from a normal running rail.
Heres the code for the power rail for a 500 radius left curve-
CreateMeshBuilder,
AddVertex,.059,.05,25.294,
AddVertex,.115,.05,22.765,
AddVertex,.159,.05,20.235,
AddVertex,.19,.05,17.706,
AddVertex,.208,.05,15.176,
AddVertex,.214,.05,12.646,
AddVertex,.207,.05,10.116,
AddVertex,.187,.05,7.587,
AddVertex,.151,.05,5.057,
AddVertex,.107,.05,2.528,
AddVertex,.05,.05,-.001,
AddVertex,-.041,.05,25.291,
AddVertex,.015,.05,22.763,
AddVertex,.059,.05,20.234,
AddVertex,.09,.05,17.705,
AddVertex,.108,.05,15.175,
AddVertex,.114,.05,12.646,
AddVertex,.107,.05,10.117,
AddVertex,.087,.05,7.588,
AddVertex,.054,.05,5.059,
AddVertex,.008,.05,2.53,
AddVertex,-.05,.05,.001,
AddFace,0, 1, 12, 11,
AddFace,1, 2, 13, 12,
AddFace,2, 3, 14, 13,
AddFace,3, 4, 15, 14,
AddFace,4, 5, 16, 15,
AddFace,5, 6, 17, 16,
AddFace,6, 7, 18, 17,
AddFace,7, 8, 19, 18,
AddFace,8, 9, 20, 19,
AddFace,9, 10, 21, 20,
GenerateNormals,
LoadTexture,top.bmp,
SetTextureCoordinates,0, 1.02, 10,
SetTextureCoordinates,1, -0.02, 10,
SetTextureCoordinates,2, 1.02, 8,
SetTextureCoordinates,3, -0.02, 8,
SetTextureCoordinates,4, 1.02, 6,
SetTextureCoordinates,5, -0.02, 6,
SetTextureCoordinates,6, 1.02, 4,
SetTextureCoordinates,7, -0.02, 4,
SetTextureCoordinates,8, 1.02, 2,
SetTextureCoordinates,9, -0.02, 2,
SetTextureCoordinates,10, 1.02, 0,
SetTextureCoordinates,11, -0.02, 0,
and heres the results (I know that the problem is because there are 21 vertices and the coords only defined 11 of them)-

Can somebody with better knowledge about the coords statement help me by posting the correct set of coords for the whole chunck of addvertex statements please. Credits will be given.
Thanks