looking for an equivalent for gl.mesh to 'order' interpolation in gl.nurbs
Hi,
I repeat this topic here on the Jitter forum as I posted it on the wrong forum yesterday...
I do not quite understand the mechanics behind the function, but order used on jit.gl.nurbs does smooth the curve of the grid between (?) the points composing it. I am trying to reproduce a similar effect on a gl.mesh, but I do not know where to start.
Here is a small example patch of what I wish to acomplish. Changing the order value on the nurbs smoothes its curve.
Is something similar possible on a gl.mesh ?
Thanks in advance for any hint
Alain
if you need a nurbs type shape to be drawn with jit.gl.mesh, simply enable matrixoutput on your gl.nurbs, and sent the output to a gl.mesh:
Thank you Rob for your reply,
This sort of works, but raises two questions:
I switched to use gl.mesh for my project because I noticed that I could get higher dim when using gridshape+mesh than with gl.nurbs.
When I increase the dim of the nurbs, my CPU usage starts to go up, and this does not happen when using the gridsahpe+mesh version. Is this normal ? as seen in the simple example attached.
And then, the drwaback of your solution is that when I change the draw_mode of the gl.mesh object I do not get the expected result,
So the question: is there a way to change the way the gl.nurbs object draws ?
Thanks
Alain
cpu increase is expected since there are many more calculations taking place to generate the curved surface.
not sure what you mean by "is there a way to change the way the gl.nurbs object draws"
thanks again Rob for taking your time.
the fact is that in the small patch attached, the CPU increases when i change the dimensions of the surface that is NOT curved.
when I change the dimension of the nurbs on the right, from 10 10 to 150 150 i get a 20 % cpu increse
when i change the dimension of the nurbs->mesh on the left i only get about 1% increase even if I change the order to get the curved surface.
and sorry for my lack of gl vocabulary. what i mean by 'the way gl.nurbs odbjet draws' is if there is an equivalent to the draw_mode attribute of the mesh object for the nurbs.
i thought i did see somewhere that there is a way to change the draw_mode of the gl objects (or the gl.renderer) but i am unable to find the information (if it does exist and i did not make it up).