• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

ross-g

Captain
46 Badges
Apr 23, 2016
428
538
  • Europa Universalis IV: Art of War
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Surviving Mars
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Cadet
  • Shadowrun Returns
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Cities: Skylines
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Magicka
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
Over the past several months I've been writing a new Maya tool in my spare time to handle editing Paradox assets. :D Right now it will import .MESH and .ANIM files and setup all the content correctly in Maya. You can also export .MESH files to create models for the Clausewitz engine.

Aside from being able to save and load meshes/animations straight from the game files, the other advantage to re-writing this tool myself rather than using the official Paradox one is that it will work in any modern version of Maya (including Maya LT) as it's not a compiled plugin. So it should also be cross platform... though I'm completely unable to test this!

It's simple to use, download the attached zip and extract it into your Maya scripts directory.
(so on Windows you should have the folder unzipped to create the directory "C:\Users\user.name\Documents\maya\scripts\io_pdx_mesh" with an "__init__.py" file inside it)

Then to run the tool execute the Python command below from Mayas script editor or save it to a shelf button.
Code:
import io_pdx_mesh;reload(io_pdx_mesh)

Once the tool opens, just go to File > Import mesh... and pick a file, then select a few options for what you want to import.
You can import animations the same way, using File > Import animation... (but note: you must have at least a skeleton in the Maya scene already before importing an animation).
To export files you need to have a mesh in the scene with a valid material on it (use the tool to create any materials you need). Set any export settings you want then use File > Export mesh... to save the scene as a file.

Capture2.PNG


So if you're curious what work goes into the 3D assets or want to tweak an existing animation ... you can take a look.
(Yamana daimyo and Dyson sphere models in Maya)
1Capture.PNG Capture.PNG

Note: I only have UE4, HoI4 and Stellaris to test this with, if anyone gets some bad results trying to load meshes or animations feel free to post here so I can take a look into the problem.


Now that mesh export is working in Maya I am going to ignore animation export for now and focus on finishing the Blender version of this tool. Happily much of the code I've written is not Maya specific, so it will progress fairly quickly.
Blender.PNG

UPDATE 2020:

Both Blender and Maya are now fully supported (export & import of mesh and animations)
Click
here to download the latest version.
Click
here to view the wiki docs.
 
Last edited:
  • 4Like
Reactions:
Really cool, great work! Does it import joint and locator information then as well from the .mesh file, and how does it work if you would export it with our exporter?
 
Really cool, great work! Does it import joint and locator information then as well from the .mesh file, and how does it work if you would export it with our exporter?

Thanks! :D Yes it also imports joints and locators, sets them up to be parented correctly etc and skins meshes to the skeleton.

It does work pretty well with your exporter too - so If you import something you can export it back out again and get a working file. There are some minor differences but from what I can tell those are just due to the fact that I don't merge vertices or objects when importing (whereas that is an option when you export).

I'm working on my own scripted version of the exporter now so that people with different Maya versions (or Maya LT) could use it.
 
@OskarPotocki

You either need to have the tool within the Maya scripts folder ("C:\Users\user.name\Documents\maya\scripts\io_pdx_mesh") or have your Maya preferences setup to load scripts from a custom location.

I think there may have been an issue with the original zip I uploaded, so please download from the original post again. It should be fine now, thanks for pointing that out.
 
Last edited:
Okay, sorry, that was my bad. I got it working, and I must say it works way better than the Clausewitz import/export tool. If I am right, your tool will allow me to import a mesh, edit it and then export it as a mesh straight way, right? Now it's just a matter of waiting for the export part to work. Good job man!
 
This looks really interesting, I'm trying to test it, but...

I seem to be having difficulty getting this to work, I'm currently using Maya 2016 (I also have 2017, as I thought the official exporter would work with that, it doesn't), and i've unzipped the .zip file into my documents\maya\scripts folder, and ran that command, but when i did, i got this error "# Error: ImportError: file <maya console> line 1: No module named io_pdx_mesh"

Any advice?
 
@Grim_T_Reaper

That error means Maya can't find the module correctly, so it's probably just extracted to a deeper folder path.
Check in your Maya scripts directory, you should have the following folder:
".../maya/scripts/io_pdx_mesh"

Inside that folder should be the script files, like "__init__.py" and "licence.txt" etc.

I suspect that when you unzipped it might have gone into a folder like ".../maya/scripts/io_pdx_mesh/io_pdx_mesh/..."

Let me know if that works!
 
That worked :D

I had it installed in the wrong directory (in the /maya/2016/scripts/ folder) but i got it sorted now, and the import works great, tested it with a few models, including a dyson sphere and random sections from the mammal battleship (including the skeleton frame)

It seems there's no real difference between the scale of a model in maya and the scale ingame.

But at least i can finally see how models are really put to gether.

Here's a render from maya:
 

Attachments

  • mesh_import_test.jpg
    mesh_import_test.jpg
    1 MB · Views: 230
I've posted an update to the tool (attached in the OP) which fixes some problems with mesh importing and allows you to import animations from the game into the Maya scene.

This is pretty simple, but you need to have the correct skeleton loaded before you import an animation (otherwise there will be nothing to animate!).
Let me know if this is useful.
I'm still working on my own exporter and have started a Blender version of the tool too. :D
 
@ross-g So I just tested it with the German model but it didn't work with the USA infantry. Thta's probably because the US is the only country that doesn't use the german animations. But since you don't own the game you can probably not do anything about that. Does maybe someone else know how to fix that?
 
I've posted an update to the tool (attached in the OP) which fixes some problems with mesh importing and allows you to import animations from the game into the Maya scene.

This is pretty simple, but you need to have the correct skeleton loaded before you import an animation (otherwise there will be nothing to animate!).
Let me know if this is useful.
I'm still working on my own exporter and have started a Blender version of the tool too. :D

Yes, please, please, get a blender version going. A blender version would be really great!