Nurbs surfaces problems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Nurbs surfaces problems

Hecaton
This post was updated on .
Hello there
I'm having some odd issues with my nurbs models on a couple of specific machines and was wondering if anyone had seen anything like these problems before.
In both these cases the applet in question runs without any problems on a variety of different windows platforms.
I'm using the jsr-231 jogl2.0 build.
(edit - no I'm not, I'm using 1.1.1a it turns out, will be trying 2.0 rc3 soon)

I'm rendering a bath from a mesh that includes some large weighting (to do squared off corners), this causes distorted shadows and reflections when run on a g4 Powerbook (with a geforce fx go5200 gpu).
It looks like the surface normals aren't being calculated correctly, I'm using GL_AUTO_NORMAL to do this.
If I change all the weights to 1 on that model then it renders correctly and I've been able to render other surfaces fine with varying (but low) weights.

I've been trying to manually set the normal map as a work around and here I'm drawing a blank.
Can't seem to turn up a decent tutorial on how to do this or even any example code - everyone just seems to use auto normals.
The code I have currently is:
gl.glEnable(GL.GL_MAP2_NORMAL);
glu.gluBeginSurface(nurbsRenderer);
glu.gluNurbsSurface(nurbsRenderer, 8, knots, 8, knots, 4 * 3, 3, normpoints, 4, 4, GL.GL_MAP2_NORMAL);
glu.gluNurbsSurface(nurbsRenderer, 8, knots, 8, knots, 4 * 3, 3, ctlpoints, 4, 4, GL.GL_MAP2_VERTEX_3);
glu.gluEndSurface(nurbsRenderer);
(note - this isn't the bath in question, this surface comes from the redbook, I'm just trying to get the normal specification correct initially)
       
When I enable GL_MAP2_NORMAL then I end up with a surface which only seems to be lit by ambient and without it
it's lit but the whole surface has a single normal direction ((0,0,1) by the looks of it). The line where I give it the normal map makes no difference in either case.
Is there anything glaringly obvious I'm missing or alternatively can anyone point me towards some code where this is being done correctly?


The other problem I've been having seems specific to a laptop with windows 7 and the Radeon mobility HD 3200 gpu so this is very much a shot in the dark. It'll draw nurbs surfaces of all kinds with no problems - unless you call that surface from a display list. Then you get nothing.
Plenty of other objects draw fine from lists, in fact polygons within the same list as the surface draw fine.
It's an odd one.

Cheers for any help.
Hecaton.
Reply | Threaded
Open this post in threaded view
|

Re: Nurbs surfaces problems

gouessej
Administrator
Hi

The last problem seems to be a driver bug or a poor implementation of display lists on this driver. I'm not surprised, display lists are badly supported, the situation is getting worse except on some professional NVIDIA graphics cards.
Julien Gouesse | Personal blog | Website