user1641749
user1641749

Reputation: 81

Importing 3D model in C# -opengl

i want to know how to import 3d models from Blender into Opengl using C#.net. Blender can export model in Collada, .3ds, Stanford(.ply), .obj, .x3d and .fbx format. How to use any of the model mention above in C#-opengl. Is there any libraries ?

Upvotes: 6

Views: 13528

Answers (2)

Vasanth Sriram
Vasanth Sriram

Reputation: 1315

I suggest you use SharpGL. SharpGL library has inbuilt parsers to import models from other formats (.obj and .3ds). It also has WPF and Windows forms control for rendering 3d models in .NET environment. I am currently using it for exporting a 3d model designed in Blender as .Obj and importing it into WPF using SharpGL. It works pretty well for me.

Upvotes: 6

Dinesh Subedi
Dinesh Subedi

Reputation: 2663

OpenGL will not load model for you. Chose the model type then load that model files using a corresponding file loader/parser and feed the extracted data to OpenGL. For eg. your model may be MD2,3ds. If you study the file format specification of model and you are familiar with OpenGL then you can write your own parser. Here is link for the md2 file format specification http://tfc.duke.free.fr/coding/md2-specs-en.html Here is link for 3ds file format specification http://www.martinreddy.net/gfx/3d/3DS.spec you can find other model file format specification in google. Study them and write you own parser.

Upvotes: 0

Related Questions