strangely stretched video as a texture for a NURBS

Aug 30, 2012 at 5:50pm

strangely stretched video as a texture for a NURBS

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
#64162
Aug 31, 2012 at 2:16am

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?

#231428
Aug 31, 2012 at 8:34am

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

#231429

You must be logged in to reply to this topic.