PDA

View Full Version : spline funcions in openGL



woleksy
04-13-2004, 07:40 PM
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

W

mikael_aronsson
04-13-2004, 10:17 PM
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.

Mikael

ZbuffeR
04-16-2004, 03:51 AM
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 :) .

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

http://www.opengl.org/resources/libraries/glx.html