no books on c++ model loading ?

Started by
6 comments, last by maya18222 12 years, 3 months ago
Why is there no programming books on c++ 3d model loading with bones and animation , most just cover the directx functions which i don't want to use,why is it such a secret anyway?
:)
Advertisement

Why is there no programming books on c++ 3d model loading with bones and animation , most just cover the directx functions which i don't want to use,why is it such a secret anyway?


Well, probably since there are a whole bunch of different types of mesh formats which come and go every so often, and each of those has a different structure

Really, if you want to load in assets you just need to find a good description of the format of said asset (which is freely available online for a lot of formats) and some basic file IO knowledge in your language of choice, writing a book about the subject would be a bit much

There's nothing secret about it at all...

I gets all your texture budgets!

http://www.khronos.org/files/collada_spec_1_4.pdf tongue.gif

Why is there no programming books on c++ 3d model loading with bones and animation , most just cover the directx functions which i don't want to use,why is it such a secret anyway?

Probably because it's a highly specific topic with a very limited interest. Don't get me wrong, there is quite a bit to loading and displaying models -- but just the formats and parsing them is laborious and boring more than 'complex'. Writing a book on the subject would probably not help much as it is already covered in various other books -- implementing your own shouldn't be much more than choosing a format, finding out its structure and start hammering away on your very own parser.

Any particular question you'd like to ask?
"I will personally burn everything I've made to the fucking ground if I think I can catch them in the flames."
~ Gabe
"I don't mean to rush you but you are keeping two civilizations waiting!"
~ Cavil, BSG.
"If it's really important to you that other people follow your True Brace Style, it just indicates you're inexperienced. Go find something productive to do."
[size=2]~ Bregma

"Well, you're not alone.


There's a club for people like that. It's called Everybody and we meet at the bar[size=2].

"

[size=2]~

[size=1]Antheus
As the others say theres so many formats and you dont realy need a book for the formats.. read their docs and see how they are built up..

There is however some books that explains skeleton and animation systems.. eg. Game Engine Architecture by Jason Gregory has a animation system chapter..
Someone on this forum should write a book, there is so many indy devs out there that are looking for this information and we always come back to the stupid .x format.
:)
Ok, but think about that for a minute... Let's say someone decides to write that book for you...

Should they be picking a particular format to write about in detail? That's probably going to be a pretty short book, and it's also probably going to be repeating a lot of what has already been said in the documentation for the format in question. It's also only useful if you're wanting to use that particular format, or may be a minor help if you're trying to use a very similar format and are aware that it's similar.

Should they be picking a collection of commonly used formats? This one is probably better, but how do they pick which formats? There are a lot of different formats, and there are good and bad reasons for using them all in different situations. Again, this book wouldn't really be helpful unless you're wanting to use one of the formats described. Again, it would probably be repeating a lot of information that already exists elsewhere.

Should they be trying to create some sort of "model loading bible", which describes how to load every format out there? That would be an encyclopaedic series of very large books, and it would take forever to write... and the day after it was published a new format would probably be created. Again, it would also probably be repeating information that is available elsewhere.



Perhaps, rather than wishing for the writing of such a book, what you really need is some help with learning the general process of figuring out how to load a particular format.



Let's say for example we want to load a model stored in the COLLADA format.

A good starting point might be to do some research on the format. A quick search with Google (or your favourite search engine) turns up a COLLADA Wikipedia page and an official COLLADA website, as well as this COLLADA wiki which is packed full of information. Between the three of these we can read a lot about the format -- when and why it was created, a bit about what it might be good for, etc.
Scrolling through the Wikipedia entry we find a list of engines that are able to load COLLADA files out of the box; perhaps we could use on of those, but for now we're interested in loading the files ourselves, so we'll continue.
Continue scrolling and we find a list of libraries that can be used to load COLLADA files. Pick one, and check out the documentation. If it does what you need we can use this and move on to other parts of our project. Maybe we want to write our own library as a learning experience though, or because there isn't one available for our target platform...
The official website provides a reference card explaining how information is stored in the format, as well as a much more detailed specification. If you've learned about the general process of loading a file and converting it to a usable format you should be able to write your own loader based on this. But let's say we're not quite there yet, and we need some help...

When all else fails, a Google search for "Loading a COLLADA model in C++ tutorial" turns up numerous results, and the same is generally true of the majority of formats you might want to use.


With all that information already available there just isn't much demand for the book you're describing.

I hope that helps to give you an idea of how you might approach learning to load different formats, as the same process I did with COLLADA above should turn up plenty of information with most formats you might be interested in.


Lastly, unless you really want the learning experience, don't waste too much time trying to write your own model loading code if there are libraries already available that meet your needs -- model loading is a fairly pedestrian task, and unless there's a good reason why you need to do so it shouldn't be the thing you're spending your valuable time working on.

smile.gif

- Jason Astle-Adams

Here is a rather old one http://www.amazon.com/Focus-Models-Premier-Press-Development/dp/1592000339

But my advice is just to use existing formats like FBX, as they can be exported from lots and lots of tools and are easy to extract from. Once you get to the point of efficiency you can then write a simple converter that will convert all your fbx data into something more efficient for you particular engine. OR even go as writing your own script for your favourite 3d program.

This topic is closed to new replies.

Advertisement