Home Technical Talk

Exporting / Importing in to the programming

polycounter lvl 14
Offline / Send Message
DrunkShaman polycounter lvl 14
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

  • kdm3d
    This one would be for the coders to answer. Every game company has its own proprietary engine, therefore their own tools to import into that engine. As far as content side, we have nothing to do with it.

    Just as UDK has its own import tools...
  • DrunkShaman
    Offline / Send Message
    DrunkShaman polycounter lvl 14
    In other words I'll have create my own game engine in order to do that.....

    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.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    can you be a bit more specific to what you want/need.
    If you manage to import and export animations, doing "sets of animations" is just a trivial extension?
  • PieJesu
    Well, when a game engine is made the programmers either choose an existing animation format and build the engine around that, or they create their own animation format to fulfill their own needs. After this they'll develop tools to convert the output from their animation software into a format accepted by the game engine. When working with existing formats, the animation can be plugged in directly or formatted upon loading in order to work around their engine's processes. The latter is basically the same as having your own format, just they never physically store it on the disk. Not much changes when they use their own format other than that they might make a plug-in exporter for their animation software. Everything is handled by the engine after that.

    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).
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    google:
    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.
  • DrunkShaman
    Offline / Send Message
    DrunkShaman polycounter lvl 14
    yes!! Thank you renderhjs thats what I meant. Though I wouldnt disagree with other people here. I'll check the sites out.

    Thanks again.
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    related thread:
    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!
  • DrunkShaman
    Offline / Send Message
    DrunkShaman polycounter lvl 14
    Ya, the person wanted to understand the *.x file rather than converting the model to xfile with animation.

    But I guess it could relate to that. Will follow that one up. Thanks :)
Sign In or Register to comment.