Been working on a pretty big project to make things more efficient in ‘rendering’…part of which requires me to code some file translators, data exchange mechanism, etc. It’s been a really great experience, definitely pushes the limits of my C++ design skills. Both the project and my friend Andrew have motivated me to buy The Design and Evolution of C++. But C++ stuff, I ran across something today that I’ve never thought about – mostly because I was unaffected. I don’t know if this will be helpful to anyone, but it’s a bit interesting…maybe.
Knots in MFnNurbsCurve/MFnNurbsSurface
If you hadn’t taken the time to notice, there isn’t a method for MFnNurbsCurve and MFnNurbsSurface that lets you set the knot domain(s). At least not one that I could find. When I was coding the MayaBGEO importer/exporter I didn’t even think about it. BGEO files do not seem to carry the knot domain start/end in NURBS curves or surfaces – so I never had to set or get them.
From my observation, Maya calculates them when you set the knot vector itself. This is very nice of the Maya API. So if you ask Maya for domain of the knot(s), you always get the right values. Obviously Houdini calculates them as well. But since I didn’t have to interface with Houdini through the HDK, I don’t know exactly how it does it.
At some point when I get sleep and finish up other projects, I’ll put together something detailing the different NURBS formats between Maya and Houdini that I’ve encountered.