PDA

View Full Version : NURBS continuity - howto achieve using Math/opengl

martiniinthemorning
02-10-2010, 07:07 AM
Hi,

I am modelling a 3d character(very simple :o) and I'm currently using opengl's NURBS surface evaluator. I've noticed discontinuities on the NURBS edges, well this is because I've designed it that way. But later on I had this requirement to as much as possible remove discontinuities between the NURBS edges. I know in theory that NURBS can achieve c1 and c2 continuities but my problem is how I am going to do this using MAth. Or is there any function in opengl that avoids discontinuities between NURBS joined edges? By the way, using a 3d software is not an option for me(sorry :( ).

strattonbrazil
02-10-2010, 09:02 AM
What do you mean 3d software is not an option for you? What are you modeling in then?

Um, patching NURBS isn't trivial. A picture of your current model would help to understand what the problem is. With NURBS you have a grid of points, which OpenGL can break up into triangles to render. With OpenGL evaluators, like pretty much everything else in OpenGL, it has no knowledge of adjacency so it can't see what patch is beside it to make C1 or C2 continuous. To make it continuous you need to adjust the points in each grid to better match neighboring grids. You might be able to hack something together, but an elegant solution to get C1 continuity is not easy and impossible if you don't want to use math. It involves building a large linear system since each patch is dependent on neighboring patches as well as special cases for different kinds of vertices.

In short, OpenGL can't do that for you to my knowledge and the math is pretty hard unless you have plenty of time to look into it. It might help to better explain your problem. If you're modeling in NURBs, why aren't they C1 on export? Are you modeling in polygons and converting to NURBs or something?

martiniinthemorning
02-27-2010, 05:51 AM
This is actually a master's project. We are discouraged to use 3d softwares.

Thanks for the info, I pretty convinced now that OpenGL leaves these kinds of calculations to its users.