Question about jit.gl.texture.

Mar 25, 2012 at 1:33am

Question about jit.gl.texture.

I’m working on a patch where I basically am texturing a bunch of hexagons with the input from my webcam.

– Pasted Max Patch, click to expand. –

I’m just wondering if it’s possible to texture the hexagons in such a way that they don’t wrap around the hexagons but instead I can just see the input straight on.

Thanks!

#62583
Mar 25, 2012 at 1:54am

it’s possible, but you’ll have to remap the texture coordinates somehow. You can do this one of 2 ways:

1) use jit.gl.gridshape @matrixoutput 1 and send the vertices to a mesh along with custom texture coordinates
2) use a shader (jit.gl.shader) to remap the texture coordinates on the graphics card

#226010
Mar 25, 2012 at 2:01am

I don’t know if this is of use but one of the jitter recipes from back when was doing something like this… may be of use (pretty sure it doesn’t use multiple though).

– Pasted Max Patch, click to expand. –
#226011
Mar 28, 2012 at 6:52am

Hey thanks for all your help guys. I finally figured out the ins and outs of texture mapping and came up with a pretty simple solution.

– Pasted Max Patch, click to expand. –

Hope this helps out the next weary traveler.

#226012

You must be logged in to reply to this topic.