Hello Polycounters;
It has been a day so far since I have been looking for a resource that explains the Exporting the character model from 3ds max with different sets of animation for the same character model and import it in your program. (AKA: Exporting the animation in to the programming tutorial. According to the google search)
My question is exactly that. Can anyone direct me to resource that has the legit tutorial for this?
All I could find was Exporting the character animation to the UDK....
Also I couldnt find anything related to this topic on PC so I apologies if this has been discussed already and I was unable to read it.
Thanks for help in advance.
EDIT: Also you can call me a noob, because importing a character (file.x) in to C++ is easy. Animating it in the program is a pain, so I am looking for something that can be done in 3ds max, saved as / converted to xfile and import in the program so that it would trigger on event.
Replies
Just as UDK has its own import tools...
Thats a bummer.
Like I said there are many tutorials (actually a real book of 3d Animation with C++) to code set(s) of animation in programming, but I havent seen anyone creating sets of animations in 3ds max and exporting it to his program, except for World of warcraft behind the scene video. So I thought it was possible.
If you manage to import and export animations, doing "sets of animations" is just a trivial extension?
So with your program I take it you're working with an existing engine and haven't made your own. In that case you'll need to read the documentation regarding the engine and see how it handles animation. If it has no animation capabilities then you'll need to code it in (but this will be active on the CPU, not the Graphics Card since the engine is already controlling that). If it has animation capabilities then you need to ensure you reformat all animation data you load into the correct format as specified by the documentation.
It's better if you make your own engine. In this day and age it's not difficult at all (there are so many books containing tried and tested results and NVIDIA have heaps of resources and papers on the latest techniques). You can be a complete novice and within a month have a decent rendering engine made around your own purposes.
Anyway, with your own engine you'll need to have your vertex program transform the vertices according to what's specified in your animation format. Basically you can do whatever the hell you want when you have your own engine. You should be, at least, familiar with the graphics pipeline. I'd keep all transforms within the vertex program so it operates on the graphics hardware instead of your CPU but with NVIDIA's Cg you can put anything on the hardware.
I wouldn't waste time with HLSL because Cg is exactly the same language. HLSL was made in coalition with NVIDIA and is simply Microsoft's implementation. Cg is held by NVIDIA and has multi-platform support for OpenGL and DirectX. Plus the fact that it's NVIDIA means you'll get the latest support and be able to take control of the latest hardware features (using the latest extensions from all vendors). It's also easy to swap from Cg to HLSL, but the reverse is not true (Microsoft specific bullshit!).
So yeah, animations are usually carried out by the shader now. It's not a shader as such, more like a program that runs on the graphics hardware (Cg's implementation). The CPU shouldn't be doing that stuff which means you shouldn't be putting it into your program (unless you have access to the graphics hardware which I'm guessing you don't, otherwise you'd know all this already).
I'll also note that you're suggesting only one way exists. Every program is different. You can do anything however you want. Saying it's easy to import this file format and bla is pointless because not everyone will have their animations handled the same way, nor use the same format. It's handled on a case by case basis and whilst some methods are more preferable, you can do what you want. You don't need to follow a tutorial, everyone just gets by doing it in a way that provides them with all the features they require. Not everyone will handle and process the format your way. There are infinite methods and equally infinite uses.
I could be using key frame data to specify the extents to which a head can turn. Then again, I could make my own format that stores this information explicitly. I could also use a walking animation to specify the 'standard' walking model and then alter this procedurally based on the terrain so the foot always lies above the ground. Or I might choose not to use an animation and instead make my own format that specified the walking model entirely procedurally as opposed to deviating from the standard model.
As said above, content creators aren't responsible for this stuff. It's better if they know about it so they can create content based on how it works, but that's up to them (and up to the programmers in explaining it).
http://www.mvps.org/vbdx/tutorials/exportx/index.html
http://www.3impact.com/3Impact_Engine/hulk7123/3dsmaxtips.htm
http://www.andytather.co.uk/Panda/directxmax.aspx
so there should be already available exporters for *.x. Another way would be to use a popular format and or standard and use free classes that are available. Popular formats are DAE, FBX,.. If you need special or unique stuff better write your own exporter in maxScript or using the MaxSDK.
Thanks again.
http://boards.polycount.net/showthread.php?t=72339
your thread title could be more descriptive like the addition of *.x, almost couldn't find it back!
But I guess it could relate to that. Will follow that one up. Thanks