Archived

This topic is now archived and is closed to further replies.

Youngster51

Really newbie question

Recommended Posts

Youngster51    122
I''m new to C++ but I understand the basics of programming however, I want to make a 3D game. I have my models made in my 3D application and I''m wondering how''d I''d get them in a format so I can use them in my code. How can I accomplish this? I use Dev C++ if that helps. Thanx in advance "How can you shoot women and children? It''''s easy, don''''t lead ''''em as much." -Full Metal Jacket

Share this post


Link to post
Share on other sites
CautionMan    122
Is this "your" 3D application in that it''s the one you bought or the one you wrote? If it''s the former case, you''re probably best off googling or searching gamedev.net for whatever formats the app can export, as somebody''s probably already written, and is willing to give away, code that will do all the tricky stuff for you. If it''s the latter case, you have two options: (1) learn about reading and writing files (fstreams are a good, cross-platform, if somewhat low-level, solution), then design a file format for you data and write the code to write to and read from that format; or (2) write code that can translate your run-time data structures into an existing format which you can then run through somebody else''s code for saving/loading that format.

Share this post


Link to post
Share on other sites
Oluseyi    2103
You need to obtain the vertices from the model, and optionally the materials and textures. To obtain the vertices, you need to be able to read the file format. Virtually all mainstream 3D model formats are documented or have freely available "exporters" (programs/libraries that read the file and provide the vertex list to your code); Google for your particular format.

For more detailed information, you''d need to provide more specifics: model format, 3D API, etc.

Share this post


Link to post
Share on other sites