View Full Version : Nurbs Evaluator
04-28-2005, 04:33 AM
Just wondering if someone can let me know if I'm going at this the right way. I've been drawing some curves using glMap1 and glEvalCoord etc and that works fine. Now I want to actually get the XYZ values of the points generated. My thoughts are to set up a feedback buffer with GL_3D enabled and render the curve in feedback mode. Will this give me the XYZs in the feedback buffer? If not, is there another/better way...? Thanks for the help.
04-28-2005, 05:19 PM
When implementing this method, the values in the feedback buffer form the shape of the curve but are way off in their absulute values. Obviously I'm missing something? Any ideas? Or is it easier just to write the formula for the curve and generate the XYZs from scratch?
04-28-2005, 07:57 PM
i generated the whole shebang from scratch the other day. i'm not going to tell you its simple... but i did it in about two full time days with only cursory knowledge of nurbs going in.
i had an old senior level graphics programming textbook though to get me started. the mesa source code helped a lot as well in the normal/tangent sampling department in the end (though i wouldn't recommend the mesa workflow).
nurbs are a really great way to burn high level calculus concepts into your brain.
i wish i could be more helpful than i really have time to be. but if you want to try to generate the data from scratch and give it an hearnest effort... if you have any questions i will try to answer them.
maybe start another thread in the math/algorithms forums... and if i don't see the question soon enough stick a pointer in this thread to get my attention.
once you get it done from scratch and use vertex buffer objects for rendering it will run maybe 20 + times faster than say using gluNurbsSurface and a display list on a consumer class card.
if you have some free time and want to make a turorial out of your quest, a good solid down and dirty nurbs tutorial is probably sorely needed on the internet. at least i could've used one going in.
04-29-2005, 03:47 AM
Thanks, it looks like I'll be going that route. (Time to put the old math degree to work...)
Having taken the time to actually readup on feedback rendering, I realised that I'm getting the XYZs back in screen coordinates! ( Note to self: read first, code second. )
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.