From blender/3DS max to .papa a (hopefully) foolproof guide

Discussion in 'Mod Discussions' started by liquius, June 27, 2014.

  1. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    Edit: If you want to use blender, use this instead. 3DS Max fbx -> papa doesn't fully work. I am missing some settings some where that causes bones to point left. This guide is still valid for materials.



    To start with you will want your model and your 3 textures
    • <model_name>.blend (or .max)
    • <model_name>_diffuse.png
    • <model_name>_mask.png
    • <model_name>_material.png
    First thing is to make sure you have a bone at {0,0,0} called bone_root. You also want to make sure the mesh is called mesh and not mesh.1 or any other variation.

    Next step is to save the file as .fbx

    At this point its a good idea create a folder and stick everything in there. You will also want to add these to your folder.
    • default.settings from Planetary Annihilation\stable\media\pa
    • papatran.exe from Planetary Annihilation\stable\bin_x86\tools
    You should now have a folder with
    • <model_name>_diffuse.png
    • <model_name>_mask.png
    • <model_name>_material.png
    • <model_name>.fbx
    • default.setting
    • papatran.exe
    Next step, open up windows powershell.

    Type (location of your folder)\papatran.exe --texture-mode strip -o (location of your folder)\<model_name>.papa (location of your .fbx file) and then press enter.

    If it worked properly you should now have a .papa file in your folder.

    Now we do a similar thing for the textures (make sure you have the default.settings file in the same folder as the textures, this is the only bit that's mandatory).

    Type (location of your folder)\papatran.exe --texture-mode include -o (location of your folder)\<model_name>_diffuse.papa (location of your <model_name>_diffuse.png file) and then press enter.

    Do the same for the <model_name>_mask.png and <model_name>_material.png.

    You should now have 4 .papa files that are ready to be put in the game. Good luck.
    Last edited: July 26, 2014
    cwarner7264, SXX, aevs and 1 other person like this.
  2. zhaii

    zhaii Active Member

    Messages:
    134
    Likes Received:
    48
    Anything for 3DS max? Blender is... blender.
  3. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    3DS Max can natively export as FBX also, so the same instructions should apply (some people have reported issues though). With Blender, the issue has been that historically the FBX exporter was broken, making this process impossible.
  4. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Squishy and I tried it a couple of days ago, didn't work.
  5. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    @YourLocalMadSci was able to get one into PA successfully, but I don't know the details of how. It's in the Realm balance mod thread.
  6. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    last I heard that was still kinda "awkward", I think it still had a huge selection area...thingy...I forget what it was called.

    Mike
  7. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Does the file need to be saved as .fbx or as .FBX?
  8. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    They are both the same.
  9. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    Thinking about it, this guide should work for 3DS max. Replace the word blender with 3DS max and you shouldn't have a problem.
  10. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Liquius, if I sent you a .FBX would you mind getting it through papatran? Stuart and I are still having problems and we have no idea why. We want to see if it's because of the .FBX, or because of us failing at putting it through papatran.
  11. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    Sure, might be good to send you .blend file as well.
  12. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Alrighty then, here you go.

    Edit: Whoops, it didn't seem to send at first. :p

    Attached Files:

  13. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    I had a look at it in blender and it wasn't set up properly. The mesh shouldn't have a parent. After fixing that it worked without problems and I got it into the game.

    One thing I am not sure about is if the animations will work. The is an option with papatran related to animations, but I haven't played around with that yet.

    If you have any more question feel free to poke me on the realm ts.

    Attached Files:

  14. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Don't worry, tanks don't have animations, all their aiming is controlled by the engine(?), basically if an enemy comes near the units bones aim at it. :p

    Oh and thank you so, so much!
  15. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    We have enough unused bot models, it is a benefit just getting vehicle/air/ship models.
  16. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Hey Liquius it doesn't seem to work, as importing the .papa you created back into blender give the model, but with only three bones, and these bone aren't even connected to anything. They're given the names: "Mesh", "solid", and "diffuse color." Any idea what could be causing this problem? (Oh and it's broken in game as well, the model does not show up, an invisible unit, and when it tries to fire it crashes the entire server, because there's no bones for the shots to come out of I'd imagine.)
  17. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Those three bones are meant to be there, and don't need to be connected to each other. A fourth bone, bone_root, should be created and all other bones (turret, barrels etc.) should be hierarchical under this.
    Reference: https://forums.uberent.com/threads/reference-models-textures.48081/
    thetrophysystem likes this.
  18. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Well yes, I know, but the trick is.. there are no other bones.

    When I import any of the other game's .papa files I get those bones, as well as all they lead to, with this, I only get those three bones.
    stuart98 likes this.
  19. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    So I have had a play around with this. It seems that when exporting from blender to .fbx and then .papa, it gets rid of all the bones (other then the 3 that don't matter). However when you do the same thing from 3DS max, the bones stay.

    I plan to play around with this a little further, however I don't think my results will change.
  20. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    After further experimentation it seems that blender -> .fbx doesn't work with bones. The only way I could bones to work is with 3DS max.

Share This Page