alpha mask from binary video applied to jit.gl.sketch. need some help

Nov 17, 2011 at 2:11pm

alpha mask from binary video applied to jit.gl.sketch. need some help

hi! i need some advice in my patch. i would like to recreate the whole section in left, but using open gl. i v started something, on the right side of mypatch, but i have stuck. Big thanks for any help!
adam

– Pasted Max Patch, click to expand. –

[attachment=176576,2921]

Attachments:
  1. export.jpg
#60073
Nov 17, 2011 at 2:37pm

You were very very close. You just need to have a jit.gl.texture object to pick up the texture that was captured by your sketch object. I made the very slight alterations, see below.

– Pasted Max Patch, click to expand. –
#216264
Nov 17, 2011 at 8:33pm

wow thanks :)
do you know, how to improve quality when i go fullscreen, or simply resize? the sharp edges are getting blury, and the lines are so fat..

Attachments:
  1. test2.maxpat
#216265
Nov 18, 2011 at 2:28pm

The default dimensions of the jit.gl.texture object are 256×256. By adding to the jit.gl.texture object the argument “@dim X Y” where X and Y are your dimensions, you can adjust that.

#216266
Nov 19, 2011 at 4:23pm

thats great, thanks again for advice! :)
i have got another little question. now i am going, to use spot light (max 6), to glow only some parts of silhouette. when i send attribute lightning_enable 1 to jit.gl.videoplane i am again loosing resolution. i figured out, that videoplane also gets @dim, but when i resize it to 1280/720 it looks great, but the framrate is going down. shuldnt it be rendering by gpu? i dont understand it.. Do you know what could be wrong?

– Pasted Max Patch, click to expand. –
#216267
Nov 19, 2011 at 4:57pm

From your post, I wasn’t sure if you were changing the texture’s dim to 1280×720 or videoplanes. Your patch changes the texture’s, which shouldn’t cause any big slowdown. The videoplane’s dim is for geometry, not image resolution, so it could be set to jit.gl.videoplane @dim 2 2 and be perfectly fine.

- you might want to consider using jit.gl.node for capturing to texture. It can be used to clarify what’s going on in the patch and also automatically adapts the texture resolution to the windows be default. With a small resolution, the rendering is very blocky, but at fullscreen looks great.

- you might want to consider using jit.gl.mesh instead of jit.gl.sketch if you’re drawing a ton of lines. It will be much much faster.

– Pasted Max Patch, click to expand. –
#216268

You must be logged in to reply to this topic.