Hi, i’m playing with nurbs surfaces using (glu functions) and facing two problems :
I haven’t found any example of how to texture it (it works well without textures), i’d really appreciate one, because glu always send me error messages when i’m calling gluNurbsSurface (…, GL_MAP2_TEXTURE_COORD_2); - in fact i just don’t know what parameters to give, knots, control vertices…
When exporting nurbs from 3ds Max, it works well with 4x4 surfaces (8 & 8knots), but when it comes to larger surfaces, max doesn’t give me enough knots for glu, for example 10 and 10 knots on a 6x6 surface, whereas glu requires 12. I tried to ‘complete’ the missing knots, but what i tried didn’t really worked
I searched a lot over the web, but couldn’t find anything, so you’re my only hope
Thanks a lot.
I’d be interested by a bit of source code showing how to tessellate nurbs surfaces, without using glu functions (ok, this is no more opengl related but i have to find a way)…
Are you sure, you have the same order for both nurbs? glu uses (number of controlpoints) + (order) = (number of knots). If your larger surface were a cubic nurbs (order=4), then glu only requires 10 knots, maybe you mixed up the number of controlpoints (4 resp. 6) with the order (4 in both cases).
Though it’s pretty late, i hope i could give you an idea.
I agree with knut.
Are you trying to use all the control points from the MAX file as the control points of your patch. I your are, then you’ve created a surface with a higher order than a cubic nurbs patch.
Make smaller 4*4 patches from the the array of points given from the MAX file. This will work because NURBS have C2 continuity, the control points of a series of contiguous patchs share control points. In 2D, a cubic NURBS curve with 6 control points would be created from 3 NURBS curves with points ,  and .
Someone posted the source for a bezier tesselator on the boards a couple of weeks ago.