Forums > Jitter

strangely stretched video as a texture for a NURBS

August 30, 2012 | 5:50 pm

hi there,
I have a a video coming from a qt.grab or qt.movie.
I convert that to a texture and apply it to a NURBS.
The purpose is : deforming the video in 2D by moving control points.

The whole patch works fine (I'll release it on my blog asap)

Everything seems fine with a NURBS order 1 1.
For better quality I'd like to use at least order degree 2 or 3. (I guess 2 can reduce cpu job a lot while providing a nice quality)

For 1 < degree order < 5 I have a strangely stretched video on the NURBS on the borders.
For 5 it is okay, but a bit high.

Any ideas about something I missed here to use a degree of 2 or 3 without stretching abnormally the texture ?

Second question: plunging my stuff in openGL, I have a light problem ; I mean, the vid seems very darker. What should I do in the openGL context to have the same video look that the jit.pwindow itself ??

any leads would be very great for me.

[attachment=202480,4349]

Attachments:
  1. strangelyStretched.PNG

August 31, 2012 | 2:16 am

the opengl objects default color attribute is grey, it might help to set it white.
what do you mean with better quality? order defines the curve http://www.cycling74.com/docs/max5/refpages/jit-ref/jit.gl.nurbs.html If your ctl-matrix width + height is too small, order 5 might not be possible and be identical with order 1
Regarding your purpose: did you had a look into jitter recipe 18?


August 31, 2012 | 8:34 am

order define the smoothness of the curves, yep.
I meant "quality of deformation using the nurbs’ control point" .. sorry for the lack of precision :-/

this recipe was one of my inspiration patch.
and indeed if you move just one control point (for instance the one in the bottom left corner) and change the order to 2 or 3, then the whole texture seems pinched to the center.

I surely miss something


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