Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Skinning solutions and body animation

  1. #1

    Skinning solutions and body animation

    I am looking for advice on methods, code and model formats suitable to do body animations with skinning.

    I know how skinning works, and I could implement it from scratch (I have even authored a student lab on skinning), but time is limited so I would like to avoid detours on not-so-good formats, and if there is good (modern) code around then it would be wise not to miss it. I fear that what I know is aging and I want to be updated.

    Let's say, what is the current state on the subject? How do you work on body animation?

  2. #2
    My game engine is actually not that far yet to do bone based animation, but i know little about formats:
    OBJ: Does support multiple objects and textures but no frames or bones.
    MS3D(Milkshape3D): Propably supports it all but the format itself is weird. There is binary and ASCII versions, and i suppose different versions for the binary.
    3DS: One of the most popular ones to support all. If you find a good model reader for this you can do alot.

    Then there is also formats from other games like HalfLife 1 and 2, and Quake, was it MD2 and MD3 which had i guess compact bone animation format for gaming. I'm not sure how much Unreal-engines format is used, but graphics and models in their games are outstanding.

  3. #3
    AFAIK MD2 and MD3 are a bit too old-fashioned these days. OBJ is nice for rigid objects but no animation data.

    3DS is popular, no doubt about that. How about Collada, B3D? Any nice loaders/renderers around?

  4. #4
    xproger wrote an excellent tutorial about that http://xproger.mentalx.org/old/?id=1&page=2&doc=anim3d

    you will find also a source code + 3DS max exporter

    i personally used it

  5. #5
    While I never wrote my own model loader, when I used Unity3D and Horde3D I generally used Collada (and sometimes FBX in Unity) and I was really satisfied with it.
    Collada shouldn't be too difficult to parse, since it's just a big XML file. But I don't think there are any Collada loader written in Pascal though.
    There is also Restless, a model loader and format written in Pascal with a Blender exporter and it should support everything you for looking for. Unfortunately I haven't been able to get it working properly on Mac OS X as of yet. (Compiling the dynamic library works with some added compiler defines, but somehow it crashes in the example application.)
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

  6. #6
    Quote Originally Posted by Stoney View Post
    Collada shouldn't be too difficult to parse, since it's just a big XML file. But I don't think there are any Collada loader written in Pascal though.
    On the negative side, I understand that Collada is a very complex format so writing that loader might take a lot of time.
    There is also Restless, a model loader and format written in Pascal with a Blender exporter and it should support everything you for looking for. Unfortunately I haven't been able to get it working properly on Mac OS X as of yet. (Compiling the dynamic library works with some added compiler defines, but somehow it crashes in the example application.)
    As you say, the library compiles with a few tweaks (Delphi mode + replacing dglOpenGL by GL + GLext), which is a very good sign. Most packages I find that are written for Delphi tend to be littered with dependencies and Win32 calls, so I am happy that that wasn't the case here.

    So now I can try a demo though the debugger and see what happens.

  7. #7
    The longer I use GLScene, the longer I wonder why it was created, and since it was established why it is not used. You have the best format there - MD5 (I tried all) - just a few lines of code:
    Code:
      With TGLActor.CreateAsChild(GLScene.Objects) do
      begin
        Name:= 'Actor1';
        LoadFromFile('actormesh.md5mesh');
        MeshObjects.BuildTangentSpace(True, True);
        StructureChanged;
        TransformationChanged;
        AddDataFromFile('actoranim.md5anim');
        SwitchToAnimation('actoranim');
        AnimationMode:= aamLoop;
      end;
    Last edited by mobilus; 24-09-2011 at 10:24 AM.

  8. #8
    Quote Originally Posted by Ingemar View Post
    As you say, the library compiles with a few tweaks (Delphi mode + replacing dglOpenGL by GL + GLext), which is a very good sign. Most packages I find that are written for Delphi tend to be littered with dependencies and Win32 calls, so I am happy that that wasn't the case here.

    So now I can try a demo though the debugger and see what happens.
    It finds the file, but crashes in CreateVBO. Something is nil, and it looks like it is the current object. Or I am not allowed to take the address of a variable in the TRLS object. It is the @FVBO parameter to glGenBuffersARB that breaks.

    glGenBuffersARB, BTW. Isn't it well overdue to drop ARB from glGenBuffers? Not that I have cleaned up every code snippet I have but in a library like this I think I would. But it shouldn't matter, of course.

  9. #9
    Now I think I was all wrong; the problem must be that I don't initialize OpenGL properly.

    I can't seem to use dglOpenGL, it doesn't compile, and the error "Generating PIC, but reference is not PIC-safe" is not understandable to me. But dglOpenGL shouldn't be needed anyway.

    So I'll have to figure out how to initialize OpenGL in a way that enables glGenBuffersARB. Should be trivial.

    PS: And it was: load_GL_ARB_vertex_buffer_object

    So my current status is that is compiles, finds the files, runs... but doesn't draw anything.

    Stoney, how far did you get? Where did it crash for you?
    Last edited by Ingemar; 26-09-2011 at 08:23 AM.

  10. #10
    Using Mac OS X Lion and FreePascal 2.7.1 I get this error while compiling and linking one of the examples:
    Code:
    Assertion failed: (_dependentDylibs.size() != 0), function File, file /SourceCache/ld64/ld64-123.2.1/src/ld/parsers/macho_dylib_file.cpp, line 391.
    0  0x102efd71c  __assert_rtn + 76
    1  0x102f562c1  mach_o::dylib::File<x86>::File(unsigned char const*, unsigned long long, char const*, long, unsigned int, bool, bool, bool, ld::MacVersionMin, ld::IPhoneVersionMin, bool) + 2721
    2  0x102f4abe2  mach_o::dylib::parse(unsigned char const*, unsigned long long, char const*, long, Options const&, unsigned int, bool) + 706
    3  0x102f5c0a5  ld::tool::InputFiles::makeFile(Options::FileInfo const&) + 709
    4  0x102f5d6f9  ld::tool::InputFiles::InputFiles(Options&, char const**) + 665
    5  0x102efd947  main + 311
    I used dglOpenGL to build the library, but integrated those changes in dglOpenGL to get it working properly on Mac OS X.


    I'm pretty sure I was able to compile it on Mac OS Snow Leopard, but it crashed when I tried to execute one of the examples.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •