I've got a shape like a line graph that I want to apply a texture (bmp with vertical lines) to. I apply the texture and the lines are horizontal. I rotate the bmp 90 degrees and still the lines are horizontal. I know it's to do with the "u" and "v" values, but it's got me going nuts. Can someone have a look at this code and see if you can help me figure out how to fix the texturing problem.
For each point on the x axis of the graph where I have a y value, I put a vertex at 0, and a vertex at y-value. I then move to the next x value.
------------- code section --------------
For GraphLoop = 1 To NumXValues
v=AddVertex(Surf,4,0,GraphLoop,0,1,0) ; create vertex on horiz plane
v=AddVertex(Surf,4,GraphLoop(GraphValues),tempy,0,0,0) ; create vertex at y-value
Next
For GraphPolyLoop = 0 To 5
v0 = GraphPolyLoop * 2
v1 = v0 + 1
v2 = v1 + 1
v3 = v2 + 1
AddTriangle (surf,v0,v1,v2)
AddTriangle (surf,v2,v1,v3)
next
--------------------------------
I load a brush and paint it with
PaintMesh (GraphMesh,GraphTextureBrush)
Any thoughts would be appreciated!!!
Cheers!
Shane
For each point on the x axis of the graph where I have a y value, I put a vertex at 0, and a vertex at y-value. I then move to the next x value.
------------- code section --------------
For GraphLoop = 1 To NumXValues
v=AddVertex(Surf,4,0,GraphLoop,0,1,0) ; create vertex on horiz plane
v=AddVertex(Surf,4,GraphLoop(GraphValues),tempy,0,0,0) ; create vertex at y-value
Next
For GraphPolyLoop = 0 To 5
v0 = GraphPolyLoop * 2
v1 = v0 + 1
v2 = v1 + 1
v3 = v2 + 1
AddTriangle (surf,v0,v1,v2)
AddTriangle (surf,v2,v1,v3)
next
--------------------------------
I load a brush and paint it with
PaintMesh (GraphMesh,GraphTextureBrush)
Any thoughts would be appreciated!!!
Cheers!
Shane