• 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.
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:
@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!
 
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).
 
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.
 
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.
 
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
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:
@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?
 
@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!
 
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
 
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.
 
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?