I am trying to create a fullscreen image (texturized nurb) that I can "dent" inwards where clicking and dragging the mouse. After poking around a bit it looks like jit.nurb would be the way to go. But I am having trouble with a couple basics.
can anyone point me to examples doing something similar? I have looked at the nurb help patch and the manipulator patch example from Jitter Recipes 2 but have not been able to make the leap.
Also, how do I grab the mouse click and drag from the jit GL window without rotating the nurb surface. I would like it to stay still and only manipulate the control matrix in the Z direction using the mouse drag coordinates.
I was recently working on something similar to this. I was unable to find much detail in the documentation about what the control matrix format is, but with a little experimentation I got the results I was looking for.
For cubic NURBS, the matrix is a 4×4 array of control points with 3 planes for the X,Y and Z coordinates.
To do the "dent" effect you want, you can make the base control matrix a plane at Z=0, then push the Z in the negative direction for the middle 4 points (indicated with X).