Request to bgolus - please help us get model animations working ingame

Discussion in 'Mod Discussions' started by swizzlewizzle, October 27, 2014.

  1. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    As you may know, no one has been able to get animations with rotated bones (ie. anything that is somewhat humanoid) working yet. However, seeing as the game has quite a multitude of bots and walkers, it must be possible.

    So my request is simple - please @bgolus , spend a bit of time to let us know what we are doing wrong trying to bring in animations using the same tools your dev team is using. As you said before, all you use is papatran and 3ds max (with an animation plugin that shouldn't affect things) and yet we have not been able to get this pipeline working.

    Could you please walk us through all the little things we need to do to form our skeletons properly and get them in? (rotated bones issue is the big one, but i have a few skeletons that papatran simply won't process, instead giving a 100 byte file without any error output).

    Thanks!
  2. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    Pretty sure he doesn't use papatran, or at least not any version available to us. because the one we have was made by raevn and he hasn't figured out how to rotate bones properly yet.
  3. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    No papatran was given to us by Uber and in everyone's files, Raevn made an importer/exporter for blender. :p

    We can import animations, Zx0 has done so with a gunship. :D
  4. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    [​IMG]
    @zx0 I summon thee!
  5. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    Zx0's animation is pretty damm simple. It also something you can do without hitting into the wall that me and OP run into.

    What we need to do first is to have the ability to get a working model from 3ds Max into papa without using blender. Here's an example of my shitty model that went through papatran.
    [​IMG]
    Hint: the bones shouldn't be pointing to the right.
  6. zx0

    zx0 Well-Known Member

    Messages:
    295
    Likes Received:
    319
    OK, so you why don't you try doing something simple.
    Get my aircraft roll animation in mod, see if it works. If it does, try to export the same animation (just rotating bone_root). If this works create custom unit and apply roll animation and then you can try more complex animations.
  7. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    Did you make your animation in 3Ds Max?
  8. zx0

    zx0 Well-Known Member

    Messages:
    295
    Likes Received:
    319
    Wait, why do you need to use blender? I have exported all my models and animations(I didn't do complex animations yet though) without it.
    squishypon3 likes this.
  9. zx0

    zx0 Well-Known Member

    Messages:
    295
    Likes Received:
    319
    Yes.
    squishypon3 likes this.
  10. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    well. The more you know.
  11. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    @zx0 I appreciate the can-do attitude, but unless you can post a tutorial on how you are getting complex rotated bone animations into the game from 3ds max, this is something that the dev team at Uber needs to step in and help with.
  12. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    As @squishypon3 said, papatran is the exact executable we use internally to convert .fbx and .png files into .papa files for meshes, animations and textures.

    The blender support is created by the community (mostly @raevn afaik) from reverse engineering our .papa files with some assistance from us. I don't remember if we ever released the full format header files for .papa officially or not.

    To export animations from 3ds Max that work with existing game assets the bone hierarchy and orientation needs to match the ones we have perfectly. Since we didn't release a way to extract .papa files back to .fbx or some other format (note: we don't have one) it's been up to the community to get that working.

    A couple of key issues for Blender:
    The fbx files we have released are somewhat useless for Blender since the Blender fbx importer doesn't really work. The resulting blender mesh and skeleton have some issues, but it's what a lot of people have been trying to start with. To make things worse even if you had a perfect skeleton the exported fbx from Blender is completely useless. Blender's bone system always exports out the "armature" dummy node at the start of the hierarchy, which means it does not match our skeletons, thus won't work on existing models.
    Worse for some reason the official FBX SDK we use for reading .fbx files don't recognize there being any skeleton in the fbx files exported from Blender. I have no idea why, and the FBX SDK is a black box (not to mention they import into 3ds Max fine).

    Issues for 3ds Max:
    3ds max tries to be too clever when you export to .fbx if you're using dummy or mesh based skeletons. It will take any dummy bones that don't have anything weighted to them (like "bone_root", or any "socket_" dummies we might have) and essentially strips them from the skeleton. This is obviously a problem since all of our skeletons start with a bone_root. To export properly they must be max bones, which kind of suck and every 3ds max tutorial tells you to never use, but max won't try to optimize out. Our internal animation rigs for PA use Puppetshop which drives the Max bones we actually export and makes dealing with them less terrible. However this wasn't an issue we were aware of during production since we were always exporting from these existing max bone rigs and not from dummy rigs.


    So, what's going to happen going forward and how can you guys get working? I don't know yet.
    If you have max and some .fbx files (I think we released a few already?) and are importing into 3ds max, make sure in the fbx importer you set "leave as bones". This will at least give you a usable skeleton for export, though max likes making the bones stupidly thin by default. (0.0002 wide!?) Either we need to release .max files (with puppetshop removed) for our units, or release the .fbx files with better instructions on how to get them usable.
    For Blender I've found .dae (Collada)* files importer almost perfectly, which might get you guys into a better starting spot, though issues still remain for export because of the armature node. There has been some interest from people internally in writing our own .papa importer / exporter for Blender, but there have not been any serious conversations about it.

    The real solution might be us needing to do more work on our importer to accept files that don't perfectly conform, but that might not be possible either because we're at the whim of the FBX SDK there. Moving over to using Collada internally might be a solution, but that was rejected early on in the project because almost everyone here has used Collada at some point for a real project and has horror stories to tell...


    *I exported OpenCollada .dae files from our internal rigs to test, there's no way for you guys to get these on your own.
  13. ace63

    ace63 Post Master General

    Messages:
    1,067
    Likes Received:
    826
    And yet you still have Autodesk claiming that everything relating to FBX is just fine and working.
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Sounds to me like the easiest way to get out of the issues would be a working papa importer/exporter for blender, so the whole fbx blackbox is out of the way.
  15. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    Between the lack of a reference FBX showing the correct bone positions and orientations, and the lack of the full PAPA headers, I don't know how the community can get this working at all... There's no way to know if a conversion tool is putting out the correct data. Unless there's someone who has experience in successfully reverse-engineering 3d model formats, the community has a chicken and egg problem.
  16. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    We've pretty much fully reverse-engineered the papa format, so it's entirely possible to make a complete, working blender importer/exporter, including animations. The only things stopping this is my knowledge of 3D math (to correctly export rotated bones), and to actually write the animation importer/exporter (I think @cola_colin has reverse-engineered that format for the resizing tool he made). We can tell if the export is correct by comparing the output files against existing ones at a binary level using tools like 010 Editor.
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    yeah I have at least to a level where I know all positions in the file that contain a position of a bone for every animation frame there is. So basically all info that is required for an animation.
    From what I 've seen in the 101 editor template a fully working blender importer/exporter is quite possible and only a question of somebody doing it. I don't know 3D math by heart as well, but I am sure google knows.
  18. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    @cola_colin @raevn well then why don't we put out the bat signal to the greater modding community from other games and see if we can bring someone who knows 3d maths in? What exactly do we need? I could make a post on stack exchange begging for love. :D
  19. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    If you could lay out all of the math in the form of a question, i'm sure we could put it up on some of the math boards over there and get a bit of assistance.
  20. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    I wish that, given the devs may not make a tutorial video, if @zx0 @squishypon3 @stuart98 would do one, as they got multiple units into the game. Just each make a recording of them doing their part.

Share This Page