• 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.

Yamato87

Private
32 Badges
Jan 14, 2011
10
0
  • Darkest Hour
  • Cities in Motion
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV Sign-up
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Together for Victory
  • Steel Division: Normandy 44
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Leviathans Story Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Cities: Skylines - Natural Disasters
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Magicka: Wizard Wars Founder Wizard
  • Cities: Skylines
  • War of the Roses
  • Warlock: Master of the Arcane
  • Teleglitch: Die More Edition
  • Crusader Kings II
Hello,

I have a little problem when i import my model in game after using de PDX Exporter : the model with none animation is right, but with animation it's... hum let's says "What's the fuck" (the parts [head, arms] are not in the good position). It looks like zombies ...

I'll restart from the beginning. There is probably an error somewhere.

So for this example, i'll try to import an actual 3D model (german unit) and to export it (just for this example).

So i went into jorodox tool to convert the .mesh into a .dae (to be able to import it into maya)

rXDI7XZ.jpg

7L5uuBH.jpg

The first strange thing i've got is the black box which is arround the model.

So after that, i imported the .dae into maya and tried to immediately export the model.

When i open the .dae file, i've got tones of errors/warnings :

u2IBEsr.jpg


I just escaped this windows.

And then if i try to export my model, Maya will crash, so i have to remove the black-box to be able to export the model without a crash.

hkaGi7Q.jpg



After that, i went into "hypershade", the in the tab "material" i left clicked on one of the different material.

FW4GjOd.jpg


After that i went into the pdx exporter and clicked on "add shader attr." and then "export". I've got the following message :

------------------
Error getting playbackSpeed: Forcing value of 1.0
Total vertices: 2014
Total triangles: 2807
Total drawcalls: 1
Total joints: 33

mesh_0Shape:
Mesh[0]:
Max joint influences: 4
Joints: 33
Vertices: 2014
UV sets: 1
Triangles: 2807
Shader: PdxMeshHoI4
Diffuse: D:\Bibliotheque\Documents\Paradox Interactive\PdxExporter\Test\GER_infantry_diffuse.dds
Specular: D:\Bibliotheque\Documents\Paradox Interactive\PdxExporter\Test\GER_infantry_spec.dds

pdx_exporter -s 1 -fz 1 -sm 0 -svm 0 -es 0 -cga 0 -v 0 -m 1 -a 1 -b 1 -ct 0 -lp 0 -sps 15 -f asset -bd "D:/Program Files/Steam/steamapps/common/Hearts of Iron IV/" -ep "D:/Program Files/Steam/steamapps/common/Hearts of Iron IV/hoi4.exe" -d "output/"
---------------------

So then i went into the jorodox tool to see if my mesh was correctly exported. For the "none" animation it was okay but for the other animation i've got very strange "thing" appear :

makQftE.jpg


It looks like a model with the elements (head, arms...etc) which are not in the right place/position.

I changed the Mesh Shader by "PdxMeshAdvanced" and tried to select a "Normal texture" but everytime i save the mesh with the button "Save mesh changes to file" the "Normal Texture" reset to "-Other-" value.

gNA3kNa.jpg


Then i launched my game and i've got a very strange "thing" as a result :

riqy7xv.jpg


It looks like the differents parts of the mesh are mixed or the texture is not applied correctly.


So my question is : do you know where is the problem ? Did i make a mistake somewhere ?

Thanks in advance for your answer.
Yours,
 
I have the same problem, it's seems orient locators scene (xyz) are different between collada and maya, we can change Y to Z but cant invert to -Z.

Joint orient are differents, for example hip's one is on import : (30,542°;-18.014°;62,341°) but for maya it's more close for working to (-50°;40°;-80°).
But more important than all you have to put hierarchy in a certain order, otherwise you will have a porridge of soldier.

283925setup.png


33 bones, no more or animation will be stone.

i'm working on it too ;)
 
Last edited:
That would be incredibly welcome!

Could you perhaps quickly give me a pointer on how to overcome this particular issue of the imported rig being distorted or mirrored?
 
How are you importing the rig for it to become distorted? (I assume you mean the joint rotations or orient values are not correct)

Not to blow my own horn here but... have you tried this tool to import the rig correctly? (Import/Export Paradox mesh tool) :)
If that doesn't work for you then I'd really appreciate if you could upload some of the .mesh files from HoI4 that import badly, as I can then check what the tool is reading incorrectly. (I only own Stellaris and EU4, so haven't tested with other files)
 
Yes, I get similar results using both Jorodox and your tool.

Attached is the British mesh. (Doesn't have the textures so it's useless to anyone without HOI4 unless you are using it for academic purposes like this :)) I've had the same problem with every human I've tried though.

It imports with mirrored left-right, or back-to-front, I can't really tell. I suspect that is the root of the problem.
 

Attachments

  • ENG_infantry.zip
    94,8 KB · Views: 31
Ah I understand the issue now.

In the bind pose the skeleton joints should have no rotations on them (ie rotation - 0, 0, 0) and should instead be aligned via joint orientation values (so that each bone points towards it's child). If you look at the attached images, the joint orientations are all over the place in the first image while the joints all look like they are world aligned... whereas in the second image the joint orientations are all consistent and the joints look to be aligned to their children (while actually having zero rotation).
imported.PNG oriented_joints.PNG

If you import the file you can fix the skeleton, but you'll have to delete or unskin the mesh. (I assume you're going to skin your own mesh to the skeleton anyway so this shouldn't matter)

Import the file
Delete the meshes
Select the root joint, select hierarchy (to select all joints)
Modify menu > Freeze transformations (options: translate, rotate, scale)
Skeleton menu > Orient joint (options: see screenshot)
settings.PNG


I think that will work, but you may have to alter the primary and secondary axis options in the joint orientation settings. I can't test it at work unfortunately. :)


I'll make a note to change the importer tool to work properly too, once I get around to importing .anim files straight into Maya it should make the whole thing a lot easier to test as you won't need to load them in game to see errors.
 
If you followed the joint orient settings that I posted and that was the result, then I would suggest trying...
Primary - X
Secondary - Y
... instead.

@luluboss which axes have you oriented your bones along manually to get them to work?
You can view the rotation axes by selecting all your joints, then something like Display > Transform > Local rotation axes
 
Currently left and right bones import mirrored the wrong way (e.g. 'RightArm' bone is on the left), and the root bone imports facing -Z rather than +Z.

Do these things need to be fixed?
 
@SaintDaveUK @luluboss

Yeah, so I've done some testing on the EU4 unit meshes and found similar problems. I investigated and fixed those (which was interesting) and updated my Maya tool.

Attached is a (hopefully fixed) version of the "ENG_infantry" file imported into Maya. So can you try using that and let me know? You should be able to just delete the mesh, import your own and then skin to the skeleton.
 

Attachments

  • ENG_infantry skeleton.zip
    151,6 KB · Views: 32