Jump to content
  • Advertisement
Sign in to follow this  
Kealthes

Parser c++ and .obj

This topic is 2598 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hee people,

I need to somehow implement 3ds max models into opengl and some people strongly adviced me to make use of wavefront .obj files. Then I was told to write a parser. My question is fairly simple, how do you write a parser and can this be achieved with c++. I must admit that I am new to c++ and am still learning, but I need to explore the possiblities before going on. When I know c++ will I be able to write a parser or are there still other things that i need to learn. I saw that there are not may tutorials and stuff like that on writing one, so that's why I am asking.

Thanks a lot for your help!

Share this post


Link to post
Share on other sites
Advertisement
It can be done in any language that can open text files. OBJ files are just text files, open one in notepad and take a look. You only need a very basic knowledge of 3D theory to parse them

Share this post


Link to post
Share on other sites
If you are asking if it's simple: it is. At least writing a very basic one is simple. By very basic I mean you only read ONE object, and only the mesh data (positions of vertices, triangles, texture coordinates and maybe vertex normals). Loading materials is a different thing, but that's not hard either. There are tons of references about .obj on the net, maybe even source codes or libraries.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!