• Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

ross-g

Captain
42 Badges
Apr 23, 2016
403
531
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris: Lithoids
  • Stellaris: Digital Anniversary Edition
  • 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: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 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:
  • 1Like
Reactions:

K-vald

Animation/VFX
38 Badges
Jan 23, 2012
2.049
304
  • 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
42 Badges
Apr 23, 2016
403
531
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris: Lithoids
  • Stellaris: Digital Anniversary Edition
  • 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: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 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.
 

OskarPotocki

Recruit
25 Badges
Apr 12, 2017
4
0
  • Stellaris
  • Stellaris: Synthetic Dawn
  • Stellaris: Leviathans Story Pack
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • 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
  • Crusader Kings II
  • Pillars of Eternity
I can't get the script to run. I keep getting such a message:
# Error: ImportError: file D:\Github\io_pdx_mesh\pdx_maya\maya_import_export.py line 18: cannot import name pdx_data
Running Maya 2016, hope this helps.
 

ross-g

Captain
42 Badges
Apr 23, 2016
403
531
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris: Lithoids
  • Stellaris: Digital Anniversary Edition
  • 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: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 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
25 Badges
Apr 12, 2017
4
0
  • Stellaris
  • Stellaris: Synthetic Dawn
  • Stellaris: Leviathans Story Pack
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • 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
  • 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
Apr 20, 2017
10
0
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
42 Badges
Apr 23, 2016
403
531
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris: Lithoids
  • Stellaris: Digital Anniversary Edition
  • 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: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 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
Apr 20, 2017
10
0
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

ross-g

Captain
42 Badges
Apr 23, 2016
403
531
  • 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
  • Europa Universalis IV: Rights of Man
  • Stellaris: Lithoids
  • Stellaris: Digital Anniversary Edition
  • 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: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 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
15 Badges
Sep 18, 2016
78
0
  • Victoria: Revolutions
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II
  • 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
@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
41 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
  • Age of Wonders III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall Sign Up
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Pillars of Eternity
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Sword of Islam
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
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!