jit.gl.sketch, moving the camera, and jit.gl.videoplane

Sep 1, 2013 at 4:08pm

jit.gl.sketch, moving the camera, and jit.gl.videoplane

So I’m sending drawing instructions to jit.gl.sketch using a little sketchpad subpath I got from an old Jitter tutorial, then capturing the sketch to a texture to process with jit.gl.slab — and the chain of effects slabs ends in a jit.gl.videoplane.

However, when I modulate the camera location in the jit.gl.sketch drawing instructions, it shifts the whole rendering plane. It’s as if the jit.gl.sketch is registering the camera instructions after the jit.gl.videoplane has captured the scene….or something.

Any idea what’s going on? How I can keep the camera movement from affecting the videoplane? I’d like to be able to move the camera around and not have it moved the videoplane. I’ve tried to copy the patch below, but I’m not sure it reproduces the problem. I’d definitely appreciate any thoughts. Thank you!

Chris

<code>

– Pasted Max Patch, click to expand. –

</code>

#263927
Sep 1, 2013 at 4:38pm

I actually did figure this out.

But now I have a simpler question: the quality of the jit.gl.videoplane output is very low. When I render the sketchpad directly, it looks sharp. But when I capture the sketch to a texture and render the videoplane output, it looks extremely pixelated. Changing from dim 20 20 doesn’t help. Any tips?

#263931
Sep 2, 2013 at 2:05am

Checked your patch. I see no shapes or content to test the pixelation.
I have my video plane on dim 2 x 2 and an all images are super sharp.
Try the argument @transform_reset 2 on your plane for correct resizing instead of using the scale command. Scale will distort the image if all scale of one axis is different than the rest.

#263975
Sep 2, 2013 at 11:14am

maybe set @adapt 0 on you jit.gl.texture, and explicitly set the dimensions with the @dim attribute to whatever you want.

the @dim attribute of jit.gl.videoplane is related to the geometry dimensions, not the dimensions of the incoming texture.

#264022
Sep 2, 2013 at 11:31am

Thank you both for the replies. The original problem I solved by setting up a second drawing context and sending the jit.gl.videoplane to it.

I also found a way to fix the second problem. I was looking through some of Andrew Benson’s Jitter recipes and found instances of jit.gl.videoplane and jit.gl.texture that worked for me. I’m sending this initialization message to jit.gl.texture: ‘capture_depthbits 16, capture_source color, dim 1280 720′. Then I have these arguments in the jit.gl.videoplane instance: ‘@transform_reset 2 @automatic 0′.

Now I know this combination of things has solved my problem, but I’m not exactly sure why.

#264026

You must be logged in to reply to this topic.