PDA

View Full Version : Advanced .OBJ loader/viewer



The Little Body
02-16-2015, 01:38 PM
Hi,

I search one .OBJ (Wavefront 3D models) loader/viewer but than can handle free-form curve/surface body statements like this :



cstype rat bspline
deg 2 2
surf -1.0 2.5 -2.0 2.0 -9 -8 -7 -6 -5 -4 -3 -2 -1
parm u -1.00 -1.00 -1.00 2.50 2.50 2.50
parm v -2.00 -2.00 -2.00 -2.00 -2.00 -2.00
trim 0.0 2.0 1
end


But alls sources codes that I have found only handle points, lines, triangles and polygons shapes, nothing about splines or patch :(

Where can I find something like this ?

__bob__
02-17-2015, 02:19 AM
Take a look at the wiki of .obj : spline are unsuported by most of the loaders. And it sounds normal... OpenGL deals with triangles/quad/line/point. You have to build your own loader and own glsl code (geometry/tesellation shader) to generate a correct geometry (uv too) from your spline datas.

The Little Body
02-19-2015, 01:25 PM
This is why I ask this question :D

This can certainly to be handled via the standard GLU library http://www.glprogramming.com/red/chapter12.html, no ?