spline funcions in openGL

I am working on a project where I take renderman code and translate it for OpenGL, I am having trouble figureing out how to use renderman’s spline function in openGL anyone have any knowlege on this subject. What can I replace the spline with in OpenGL to make it work the same way. Any help is great thanks


Hi !

I do not remember what it look’s like in renderman, but it should not be very ricky, both opengl splines and renderman splines are based on order/degree, a vertex vector and a knot vector. So it should be pretty simple to translate from one to another, just read the renderman spec. and the opengl spec.


Funnily enougth, I worked on a small 3D modeler using OpenGL for interactive modelisation and Renderman for realistic rendering… We managed to get very similar visual results with simple phong textured shaders, only lacking shadows.

In fact it is quite easy, both API are quite similar. We used a BMRT lib to generate Renderman code from the modeler using OpenGL.

About your problem concerning splines, I seem to recall that we implemented them quite easily in OpenGL. I don’t have access to the sources right now, I need to dig a bit :slight_smile: .

But you can try reading the section of the GLU spec concerning NURBS, it may help you.