• 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

BanjoJohn

Private
6 Badges
Feb 7, 2018
18
0
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Tyranny: Archon Edition
  • BATTLETECH
  • Crusader Kings II
The guide has all the necessary steps, can you be more specific as to your issue??
I had not seen your guide yet, will read it and see if that helps. Although I have updated to blender 2.8, so I might need to get 2.79 again.

Hmm, but in 2.8 its saying.. update to 2.8x is required... is that for the plugin itself? hmm
 
Last edited:

rewinged

First Lieutenant
86 Badges
Apr 13, 2011
269
201
32
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Pre-order
  • Sengoku
  • Semper Fi
  • Europa Universalis IV: Cossacks
  • Imperator: Rome
  • Europa Universalis: Rome
  • War of the Roses
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis III Complete
  • Crusader Kings II: Conclave
  • Europa Universalis 4: Emperor
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Tyranny - Bastards Wound
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV
  • Age of Wonders III
  • Tyranny - Tales from the Tiers
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Prison Architect
  • Europa Universalis III Complete
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
@ross-g
Hey mate, I've also said this on the Imperator modding coop as well as just submitted as an issue on the github but I'll psot here too as I'm not sure where you check more frequently.

This is in regards to the Maya plugin
It seems that the vert order of meshes changes on import/export. If I import a vanilla blendshape mesh, export it, then import it again, the vertex ordering is slightly off. It seems like the vert ordering still follows the same quads but in a different ordering around each quad. It makes blendshapes impossible to do as any UV seams or mesh edges end up being offset creating holes. It would be super handy if you could look into this as a lot of clothing/hair/beard stuff in portraits require blendshapes for them to fit on different sized base meshes, such as fat faces.

On another note, I saw your post about adding support for other animation FPS? That might be handy for blendspaces too as some have anims which won't load in as it brings up an error saying 'unsupported animation speed 18fps'.

Thanks heaps for these tools and I really hope you can work out how to fix the vertex ordering thing, it'll really open up what's possible in portrait modding for Imperator and potentially other future paradox titles if they use the same system. Cheers!
 

ross-g

Captain
43 Badges
Apr 23, 2016
415
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
  • Europa Universalis IV: Rights of Man
  • Stellaris: Federations
  • 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: Lithoids
  • Stellaris: Galaxy Edition
  • 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
  • Hearts of Iron IV: Cadet
  • 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 have put up the latest release for download, so now Blender 2.8 is supported. (all older versions are no longer supported)
https://github.com/ross-g/io_pdx_mesh/releases

Lots of changes, fixes and improvements!
  • Blender 2.8 is now supported by default, older versions are now unsupported.

  • Included presets for Imperator shaders, updated other presets.

  • Remembers the folder for your last import/export action.

  • Checks for new releases of the tool and displays a download button for the latest update.

  • Mesh export has been optimised, it is now 25%-40% faster to process and save.

  • And lots of bugfixes for: importing skeletal models (Stellaris portraits), tangent export for mirrored UVs, blendhsape compatible mesh export (Imperator portraits).
 

BanjoJohn

Private
6 Badges
Feb 7, 2018
18
0
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Tyranny: Archon Edition
  • BATTLETECH
  • Crusader Kings II
Got the updated version for blender 2.8, slowly figuring out how it works. but very cool! I've figured out how to import/export meshes, but editing materials is still something I haven't figured out. But I'm also generally not that good with materials.
 

Felinis

Private
8 Badges
Dec 30, 2019
23
0
www.youtube.com
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
I just submitted a bug report on github for your tool.
I worked file exporting a Stellaris .mesh file to Blender 2.82, but it failed with an animation file.
 

Swiss Army Knife

Recruit
16 Badges
May 16, 2016
3
0
  • Crusader Kings II
  • Crusader Kings II: Sons of Abraham
  • Hearts of Iron III
  • Lead and Gold
  • Magicka
  • Teleglitch: Die More Edition
  • Victoria 2
  • War of the Roses
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Prison Architect
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
This is probably an easy fix that I've overlooked but I'm a complete noob when it comes to 3D modeling and I can't figure out what I'm screwing up. I created a bunch of new clothes for the default human body, however the mesh and UV map for vanilla's clothes is super tight. (even some of the vanilla clothes are clipped in places because of it). So I made the mesh wider and got the UV sorted. Everything looks good in Maya, seems to export fine, but in-game it looks like this. Order's all wrong on the meshes with the eye backplate rendering first, clothes don't render at all.

WhatAmIDoing.jpg

Only thing I changed in the original mesh was the clothes plane and it's UV, as well as changing their material's default texture in Maya so I could see what I was doing. I'm using Maya 2020, I can post the various .gfx/asset/etc. files if need be.
 

Swiss Army Knife

Recruit
16 Badges
May 16, 2016
3
0
  • Crusader Kings II
  • Crusader Kings II: Sons of Abraham
  • Hearts of Iron III
  • Lead and Gold
  • Magicka
  • Teleglitch: Die More Edition
  • Victoria 2
  • War of the Roses
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Prison Architect
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
@Swiss Army Knife
In the UI, go to Tools then Set mesh order and then drag and drop your meshes into the order you want them to render.

View attachment 554957

If you don't have that option then you are using an old version of the tool and should update.

Current LATEST version is 0.7

Damn yeah I was using an outdated version, thanks for the image and link. But now I'm getting an error on export: Mesh export failed! Maya Node does not exist (or is not unique):: u'None'

Is that something with the PDX materials I'm missing/screwing up? I didn't touch the materials other than to change the .dds and I'm in Maya 2020.

Edit: Yeah I'm stumped. Tried googling and got nowhere, tried everything I could think of in terms of fiddling with the file itself. Tried importing a fresh vanilla portrait and just extracting that to the desktop, same error. So it's something with Maya and the Jan. 24 version of the tool. Are there required files or thirdparty tools I missed?
 
Last edited:

ErrorSpace

Recruit
12 Badges
May 3, 2020
1
0
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • 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
@ross-g so I tried to import the models into Maya 2020 and it shows me this

import io_pdx_mesh;reload(io_pdx_mesh)
[io_pdx_mesh] INFO: Running from maya.exe
[io_pdx_mesh] INFO: D:\maya1\scripts\io_pdx_mesh
# Traceback (most recent call last):
# File "D:/maya1/scripts\io_pdx_mesh\__init__.py", line 96, in <module>
# from .pdx_maya import maya_ui
# File "D:/maya1/scripts\io_pdx_mesh\pdx_maya\maya_ui.py", line 17, in <module>
# import pymel.core as pmc
# File "D:\Autodesk\Maya\Maya2020\Python\lib\site-packages\pymel\core\__init__.py", line 7, in <module>
# import pymel.internal.startup as _startup
# File "D:\Autodesk\Maya\Maya2020\Python\lib\site-packages\pymel\internal\__init__.py", line 4, in <module>
# from plogging import getLogger
# File "D:\Autodesk\Maya\Maya2020\Python\lib\site-packages\pymel\internal\plogging.py", line 184, in <module>
# pymelLogFileConfig(getLogConfigFile())
# File "D:\Autodesk\Maya\Maya2020\Python\lib\site-packages\pymel\internal\plogging.py", line 133, in pymelLogFileConfig
# handlers = logging.config._install_handlers(cp, formatters)
# File "D:\Autodesk\Maya\Maya2020\bin\python27.zip\logging\config.py", line 163, in _install_handlers
# h = klass(*args)
# File "D:\Autodesk\Maya\Maya2020\bin\python27.zip\logging\__init__.py", line 905, in __init__
# StreamHandler.__init__(self, self._open())
# File "D:\Autodesk\Maya\Maya2020\bin\python27.zip\logging\__init__.py", line 935, in _open
# stream = open(self.baseFilename, self.mode)
# IOError: [Errno 22] invalid mode ('w') or filename: 'C:\\Users\\Username\\OneDrive\\??\\pymel.log'
# Error: IOError: file D:/maya1/scripts\io_pdx_mesh\__init__.py line 102: 22 #

How do I fix this?
 

ross-g

Captain
43 Badges
Apr 23, 2016
415
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
  • Europa Universalis IV: Rights of Man
  • Stellaris: Federations
  • 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: Lithoids
  • Stellaris: Galaxy Edition
  • 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
  • Hearts of Iron IV: Cadet
  • 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
@ErrorSpace
Firstly - I like the forum name, very appropriate for the problems you're having! :D

The problem you've posted isn't actually anything that's crashing in my code, but rather in a component of Maya called PyMEL. It seems to believe that your home user folder is 'C:\\Users\\Username\\OneDrive\\??\\
So unless your username on the PC is literally "Username" I would suggest that there may be something broken in your Maya install or user setup.

You can patch this issue yourself, however it's a bit technical:
  1. Make sure you quit Maya first.
  2. Find the "pymel.conf" file (normally somewhere under a subfolder of the Maya install directory)
  3. Edit the conf file in a text editor
  4. Find the section that starts with the line
    [handler_fileHandler]
  5. In this section, find the line that says
    args=(os.path.expanduser('~/pymel.log'), 'w')
  6. Change this line to
    args=(os.path.join(os.environ['ProgramData'], 'pymel.log'), 'w')
Good luck!
 

goodhere

Recruit
7 Badges
May 29, 2020
3
0
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
great job!
It is running normally, in addition, can I use this tool to convert my obj file to mesh?
 

Footloose

Sergeant
34 Badges
May 18, 2016
60
0
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Supreme Ruler: Cold War
  • Victoria 2: A House Divided
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings III
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Steel Division: Normandy 44 -  Back to Hell
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Steel Division: Normandy 44
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis IV: Third Rome
  • Stellaris
  • Europa Universalis IV: Cossacks
Hey all :)
I have a little problem here.
Running this script on Blender 2.8.

It seems (as far as I can tell) to import the models correctly.
I can not say if the export works, cause my test model (just acube to test maximum polycount)
crashes the game. Everytime I zoom in and a unit with this model should be displayed, the game crashes.

So, I just made a cube and exported it with the tool. The result is a .mesh file.
Then I gave it the name "GER_infantry". I just copied an existing one, so there should be no fgx file necessary as
it just replaces an existing 3d model.

So, the game crashes when one of those models appears. After this I outcommented the animation
lines in the entities file (with a # in front of the line), as my cube has no animation. Still the same problem.

Any ideas?

Kind regards
Toby
 

ross-g

Captain
43 Badges
Apr 23, 2016
415
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
  • Europa Universalis IV: Rights of Man
  • Stellaris: Federations
  • 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: Lithoids
  • Stellaris: Galaxy Edition
  • 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
  • Hearts of Iron IV: Cadet
  • 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
It seems (as far as I can tell) to import the models correctly.
I can not say if the export works, cause my test model (just acube to test maximum polycount)
crashes the game. Everytime I zoom in and a unit with this model should be displayed, the game crashes.

So, I just made a cube and exported it with the tool. The result is a .mesh file.
Then I gave it the name "GER_infantry". I just copied an existing one, so there should be no fgx file necessary as
it just replaces an existing 3d model.

So, the game crashes when one of those models appears. After this I outcommented the animation
lines in the entities file (with a # in front of the line), as my cube has no animation. Still the same problem.

If you are just testing and want to get a cube into game as practice, then I would suggest you start by importing one of the static buildings from HoI4. (by static I mean non-animated... so not a spinning radar dish or similar) Create your cube and apply to that cube the same material that is used on the building, then export the mesh file and setup the mod so that your file over-writes the vanilla game file.

Two things to be aware of:
- materials are important, if you simply make a cube and don't give it a PDX material then it won't export and you end up with an empty mesh file.
- animation is important, if you overwrite a unit mesh then the game will expect your file to have a skeleton that matches the unit skeleton.
- the importer does work :) if you want to check exactly what you have just exported out... try importing it back in. But bear in mind that on export your mesh will be split / merged for game use, it should look the same but might be constructed differently.
 

Footloose

Sergeant
34 Badges
May 18, 2016
60
0
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Supreme Ruler: Cold War
  • Victoria 2: A House Divided
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings III
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Steel Division: Normandy 44 -  Back to Hell
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Steel Division: Normandy 44
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis IV: Third Rome
  • Stellaris
  • Europa Universalis IV: Cossacks
okay, I got a test cube working with just 6 Faces.
I also want to test a highpolyone for some performance statitics but either the mesh is not shown correctly
or theblender tool can not export the file (just nothing happens, no error code).
So is there a maximum amount of geometry?