Micropro's picture

problem with add .obj file into opentk

how do i insert .obj file into opentk

i try many code for this but it's don't worked

please help me


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ebnf's picture

You have to convert the .obj file into a format OpenGL can use.

http://tinyurl.com/3s3zq8s

hope this helps :)

opcon's picture

I don't think your comment will be of much help to him.
Personally the library that I've had luck with loading .obj models is http://www.opentk.com/project/Meshomatic, which seems to work very well, and definitely serves as a good starting base if you are just starting out.

puklaus's picture

^ That is good, and you can use csat too, it loads .obj and .md5 (doom3 animation file format), it's in the gallery.
Nowadays I personally use Horde3D (c++ engine) + Horde.Net wrapper + OpenTK (for window, input, sounds), works great on windows, linux too (and mac, when I get horde3d library's mac binaries).

Micropro's picture

http://www.opentk.com/project/Meshomatic

this library i used it but it's include a problem with texture

can you give me a simple example about use this library

Micropro's picture

please help me with another library for add 3d model in opentk with c# windows application

Micropro's picture

please help me with another library for add 3d model in opentk with c# windows application

Radar's picture

As far as i understand, there is no information about the textures in the obj-file. These infos are stored in a separate material file.

Do you see at least an untextured version of your object?
If yes, you are half way there. Just load a texture manually and check if it is working on your model.

I (mis)used the material name to point to textures, that way you can automate it. I don't know if meshomatic supports stuff like that i wrote my own obj-reader anyway.

To obj file format is extremly easy to read and can be editet with notepad (if you want to add special stuff).

Micropro's picture

Thanks for your help
it's worked out