Models for exercises
#1 Members - Reputation: 104
Posted 07 September 2011 - 04:50 AM
I found a C++ algorithm that generates spheres (with different parameters of amount of vertices it generates).
But I’d like to use other models, like bagels, cars, trees and so on in order to diversify new toy-programs.
I am a C++ programmer, not an artist (yet =)
Now I can’t use tools like 3dMax.
But I can extract raw data from some files (using C++) if I know structure of that file
Can anyone give me an idea from what source can I get the models and description of formats that models stored in?
The easiest way of extracting data from that files is the better for me.
Is there open source models?
Thanks in advance.
#2 Crossbones+ - Reputation: 5143
Posted 07 September 2011 - 05:15 AM
They will be in Maya, 3D Studio Max, and .OBJ mainly. From Maya or 3D Studio Max you can convert to FBX or COLLADA. Both file formats have SDK’s that will parse the files for you and allow you to get normals, vertices, UV coordinates, etc., on your own without having to parse anything.
L. Spiro
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
#3 Members - Reputation: 841
Posted 07 September 2011 - 05:22 AM
If you want to write your own loaders, try OBJ format first - it is text based and quite straightforward to parse.
3DS is also simple file format.
You can find descriptions of both file formats by googling.
First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/
#4 Members - Reputation: 127
Posted 07 September 2011 - 05:31 AM
As for loading the things, your choices as ever are to reinvent-the-wheel or embrace the middleware ;)
#5 Members - Reputation: 104
Posted 07 September 2011 - 05:45 AM
Thanks a lot! Good models. That is what I've looked for.Plenty of free models can be found here: http://www.gfx-3d-model.com/
They will be in Maya, 3D Studio Max, and .OBJ mainly. From Maya or 3D Studio Max you can convert to FBX or COLLADA. Both file formats have SDK’s that will parse the files for you and allow you to get normals, vertices, UV coordinates, etc., on your own without having to parse anything.
Big thanks for these links. They are really helpful.As for loading the things, your choices as ever are to reinvent-the-wheel or embrace the middleware ;)
#6 Members - Reputation: 149
Posted 12 September 2011 - 12:27 PM
#7 Members - Reputation: 102
Posted 17 September 2011 - 04:08 PM
The basic .blend format structure (I believe it's called "SDNA") actually doesn't require much code to parse. If you're only pulling in a few properties it's pretty basic. In fact, the format tends to favor an "opt-in" parser that can grab only the properties you want without it being much work to simply ignore the unrecognized attributes (i.e. new versions of Blender likely won't break your parser!). That also makes it easy to write a trivial parser (e.g. only parsers vertex position and normals) and then add in new attributes as you go (e.g. animation data).
As I said, I've found using Blender's native editor format to be very convenient. For one thing, Blender can import a ton of different formats, so it's easy to re-save other formats as .blend. Also, if you want to edit the model - you can just edit it directly - no need to import/export (in fact, you might even have your program check the timestamp on the file and reload the model on changes - thus letting you try out the model changes without even restarting your program). Of course, .blend files are large and not that efficient to load, so I wouldn't recommend it for production code; but it sounds like you're just looking for test models, like I was.
The simple .blend loader I wrote is available on GitHub here. It's not very polished , but it gets the job done on my system (I'm the only user at this point). I'd be glad to help you fork it / adapt it to your project. It'd probably be a good opportunity to make my own code a bit more robust and less of a it-works-so-leave-it-alone hack. (I also wrote a brief blog post about it when I first wrote it almost a year ago). Apologies that it's code of the quick and dirty variety, but it should be enough to get you started if you're interested!
#8 Members - Reputation: 579
Posted 18 September 2011 - 09:25 AM
I guess the modding community has produced plenty of free maps for various games so maybe it's possible to get those in a useful format?






