[Reference] .fbx and .papa import and export related information

Discussion in 'Mod Discussions' started by thetrophysystem, June 7, 2014.

  1. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    bgolus:

    FBX is a bit of a magic box. It's a closed format with ten ways to skin a cat. All of our software is written using the official FBX SDK and exporting from 3ds Max, so we handle data with those expectations. Other (even official FBX) software may give us data in ways we're not expecting and don't handle well.

    I'm going to assume you're using Blender. Blender's FBX exporters are all incomplete attempts to reverse engineer the FBX which result in malformed FBX files that just happen to be "close enough" for the cases those who wrote it tested against, but not for ours. As we have no control over FBX nor can we write an FBX exporter for Blender (as we don't have any internal knowledge of FBX either) we released the format for the .papa format for the community to write their own Blender to .papa exporter / importer along with Papatran (which also handles texture compression) for those who use 3ds Max.

    To be honest I have no idea if an FBX file exported from Maya or Softimage work with Papatran either...
    ___________________________________

    So when it comes to units we run .fbx files (the mesh and the animations) through Papatran like this:
    Code:
    papatran.exe --texture-mode strip -o {filename.papa} {filename.fbx}
    Terrain .fbx files, both for features and csg, use this:
    Code:
    papatran.exe --texture-mode reference -o {filename.papa} {filename.fbx}
    Then we run over the png files individually with:
    Code:
    papatran.exe --texture-mode include -o {filename.papa} {filename.png}
    We don't use --no-materials, --no-baked-anim, or --dependencies for our build process at all. I realize this has probably never been listed out anywhere.
    ___________________________

    Loading a .png file and converting it to the compressed format required by the game (dxt1 and dxt5) is slower than just loading the pre-compressed texture. The way the engine was architected assets aren't loaded until they're needed, but that meant every time you saw a unit for the first time (or saw an effect that used a new texture) there is a small delay before that thing can actually appear. For the most part this is a really short amount of time, a frame or two maybe, but for textures this could be a lot longer, especially if loading a lot of textures. Units for example are multiple textures, and if multiple textures came into view at once this could cause a multiple second long delay before everything shows.

    Note, this is "in the background" so the game wouldn't necessarily stop rendering, just that particular object might not render or would partially render with incorrect data.

    For particle systems this caused a bug in that the first time you saw a particle effect it wouldn't even show. The system would spawn, it would request a few textures, the texture loader would say "not ready yet" and the particle system would continue on doing it's thing with out the textures. Next time that effect would spawn the textures would probably be loaded and it'd be fine.
  2. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    The official FBX SDK you are speaking of is at http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=10775847 correct? FBX SKD 2015.1 VS2013(exe - 94654Kb) ? Using this to export models out of 3ds max should give us working models inside of PA? Perhaps you could elaborate a bit (with a basic tutorial maybe?) for those of us who don't have much experience in the way of importing/exporting. Specifically, how textures/animations should be set up prior to the FBX export. Perhaps also some info about diffuse/specular maps? Can you also bring in glow textures or team textures right from 3ds max??
  3. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    not sure, I mostly describe what the devs mentioned their process is. I would imagine they vouch that their tool works, if its from their own toolset, and they describe how they use it. I think the limit with most people is that 3ds max isn't reasonable to obtain for all.

    they expect with a great degree of extremely sharp computer skill and know how, that it is possible to convert blender, to a higher recognized format of .fbx, and then it would port with their tool. If anyone knows enough in this field, is able to make that blender format adjuster, please please do.
  4. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Squishy, Trophy, and myself were messing around with this last night. No matter what we did the model was shrunk and the bones were removed except for one in the center, called, simply, "Armature".
  5. nuketf

    nuketf Active Member

    Messages:
    702
    Likes Received:
    130
    what about blender? NO ONE CARES THAT THE BLENDER ONE IS BROKEN? :(
  6. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    Does anyone have an example .fbx from 3ds max to show what its structure is? I think Knight was sent one directly from the devs, but he didn't distribute it. I'm curious if they have the same structure anyone else using 3ds Max will get, or if there's something particular to the way their models are put together. (I'm cautious about popping a 30-day trial just for a 5 minute test.)
  7. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    Any idea why we haven't been provided with more info on how to bring models into the game? From everything I have seen, the devs over at Uber want us to mod the heck out of PA.
  8. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    I remember they were made with triangles, every shape must be converted to triangles IIRC.
  9. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    Not helpful.
    This is about the structure of the .fbx file, not the mesh data, which is just a small part of what the .fbx stores.

Share This Page