ross-g

Captain
44 Badges
Apr 23, 2016
421
535
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Shadowrun Returns
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV
  • Cities: Skylines
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
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:
  • 3Like
Reactions:

K-vald

Animation/VFX
38 Badges
Jan 23, 2012
2.049
306
  • Hearts of Iron II: Armageddon
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Supreme Ruler: Cold War
  • Supreme Ruler 2020
  • Sword of the Stars II
  • Sword of the Stars
  • Sengoku
  • Semper Fi
  • Victoria: Revolutions
  • Pirates of Black Cove
  • Penumbra - Black Plague
  • Naval War: Arctic Circle
  • March of the Eagles
  • Majesty 2 Collection
  • Majesty 2
  • Leviathan: Warships
  • Cities in Motion
  • Crusader Kings II
  • Commander: Conquest of the Americas
  • Darkest Hour
  • East India Company Collection
  • Europa Universalis III Complete
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Impire
  • Arsenal of Democracy
  • Magicka
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Holy Knight (pre-order)
  • Stellaris Sign-up
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
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?
 

ross-g

Captain
44 Badges
Apr 23, 2016
421
535
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Shadowrun Returns
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV
  • Cities: Skylines
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
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.
 

ross-g

Captain
44 Badges
Apr 23, 2016
421
535
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Shadowrun Returns
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV
  • Cities: Skylines
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
@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:

OskarPotocki

Recruit
28 Badges
Apr 12, 2017
4
0
  • Stellaris
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Mass Transit
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Magicka: Wizard Wars Founder Wizard
  • Cities: Skylines
  • Europa Universalis IV
  • Crusader Kings II
  • Pillars of Eternity
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!
 

Grim_T_Reaper

Private
13 Badges
Apr 20, 2017
10
0
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
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?
 

ross-g

Captain
44 Badges
Apr 23, 2016
421
535
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Shadowrun Returns
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV
  • Cities: Skylines
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
@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!
 

Grim_T_Reaper

Private
13 Badges
Apr 20, 2017
10
0
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
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

ross-g

Captain
44 Badges
Apr 23, 2016
421
535
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Shadowrun Returns
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV
  • Cities: Skylines
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
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
 

Maria.Mueller

Sergeant
16 Badges
Sep 18, 2016
78
0
  • Victoria: Revolutions
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II
  • Europa Universalis IV
  • Victoria 2
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
@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?
 

StarryWisdom

Private
57 Badges
May 3, 2016
11
0
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines Industries
  • Cities: Skylines - Green Cities
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders: Planetfall Sign Up
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Hearts of Iron IV: Colonel
  • Stellaris: Necroids
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Age of Wonders III
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome - Magna Graecia
  • Cities: Skylines - Mass Transit
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!