Forums > Jitter

Rotate texture (x / y axis)

July 30, 2012 | 2:28 pm

Hi

I'm trying to show a texture in a shape drawn in a jit.gl.sketch. The shape is rotated back on the x axis but I want the texture to be corrected in the opposite direction to that rotation so that angle of the shape is impossible to see (see attached diagram). I've tried the tex_plane manipulor demo posted here (http://cycling74.com/forums/topic.php?id=12402) but I'm not sure if that's possible to modify to rotate on the x (or y) axis and I've tried an alternative version with gltexcoord offsetting the mappings but that just warps the texture. There are examples of both in the attached zip.

Is this possible with ether of these ways or perhaps a third which I've yet to try, cutting up my texture image, remapping it in a matrix and then making a texture out of that (the least flexible solution – I'd imagine trying to get the angle of this right will be hell)?

Garrett

[attachment=200515,4259]

Attachments:
  1. Archive.zip

July 31, 2012 | 11:51 am

Anyone??



MJ
July 31, 2013 | 6:01 am

example 1 gives a grey plane..

i dont understand what you want to achieve


July 31, 2013 | 9:03 am

since you’re already specifying texcoords in the second method, just change them so the texture is rotated however you like.


Viewing 4 posts - 1 through 4 (of 4 total)