Forums > Jitter

Simple plane askew, warps texture in gl.


Apr 12 2008 | 1:33 am

THe attached pat (and js) make for a simple interactive keystone correction. In theory. the odd thing is that the texture warps, as if the plane is folded in the center, rather than just skewing uniformly. Draw a grid on a piece of paper and hold it up to the camera (or add a qtmovie and use a picture of a grid) and it’s very apparent what I mean. It’s neat, but not what I’m after. ANy thoughts on how to avoid this?

P.boer

Apr 13 2008 | 2:21 pm

A neat interface indeed!
Tried it with "texgen objectspace" sent to the "mov" texture. Seems to lose the distortion, though then it also means you need some method of scaling the texture, like "tex_plane_s, tex_plane_t" for other gl objects. Don’t know how to go about doing that directly with the texture object. Or you could use jit.gl.mesh to render instead of the direct gl.render method (then correct using s and t), or maybe just "correcting" with a shader.
my 2 cents, hope it helps
-nadav

Apr 13 2008 | 9:15 pm

its an interesting method but i use nurbs to keystone, this looks a bit
complicated and restrictive. and the control mesh of nurbs works.

On Sun, Apr 13, 2008 at 4:21 PM, Nadav Assor wrote:

>
> A neat interface indeed!
> Tried it with "texgen objectspace" sent to the "mov" texture. Seems to
> lose the distortion, though then it also means you need some method of
> scaling the texture, like "tex_plane_s, tex_plane_t" for other gl objects.
> Don’t know how to go about doing that directly with the texture object. Or
> you could use jit.gl.mesh to render instead of the direct gl.render method
> (then correct using s and t), or maybe just "correcting" with a shader.
> my 2 cents, hope it helps
> -nadav
>

Apr 14 2008 | 5:18 pm

hmmm…textgen object space is interesting, but, yeah, fails to distort the image at all (besides shrinking it!). The plane becomes a mask rather than a surface.
re: nurbs. I guess I’ll have to try that route. I wanted to avoid it because I wanted it to be restricted!
Thanks for the inputs…

p

Apr 14 2008 | 6:31 pm

So I took the nurbs suggestion and went with that. Here’s a successful version of the trapezoid warping, using the jit.window mouse coords as interface.

Peter.

Mar 02 2011 | 9:20 pm

Hi, I would like to take a look at the patch using mouse coords to warping…
Is it possible you could post the patch?

Thank you very much!

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

Forums > Jitter