• 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.
Greetings & thanks for this! I have made models of an MP44 & FG42 for HOI4, but am having trouble attaching the animation nodes for the fire & cartridge ejection. Is there some dark art to this? Feel I have got so far... but locked out at the gate.
 
Greetings & thanks for this! I have made models of an MP44 & FG42 for HOI4, but am having trouble attaching the animation nodes for the fire & cartridge ejection. Is there some dark art to this? Feel I have got so far... but locked out at the gate.

You can create locators for it. If I remember correctly you should make both of them have +Z forwards. Check the events in any other weapon for locator names.
 
You can create locators for it. If I remember correctly you should make both of them have +Z forwards. Check the events in any other weapon for locator names.

Thank you sir, got the guns in. Could I press for a second issue... feel like I am crawling, & for two days I have tried everything I know to solve this one.

What I am trying to do, is edit the German Infantry model K98 ammo pouches on the belt to be SMG mag pouches. I have no trouble with the manipulation. But when I go back in game, I get one of two results, the model is perfect, but stuck in A frame with the guns at his feet. (He has lost his skeleton) If I try to reattach the skeleton, even with saved weights map, I get vector distortions in game, the pouches stretch between the arms & torso.


I will detail my process below in case someone knows a quick 2 second command I am missing.

Import the model & export no issues using this tool.

In Maya
Select by component type
Select face components
double click mag pouch so all its faces are selected.
Under Polygons - Separate ****I suspect this is what I am doing incorrect. But I am unable to manipulate without this step?
I then edit the pouches 1 by 1
Have tried a mountain of things here to reintergrate the pouches to the model - no success.
Then reapply the phong, add the shader attribute & export using the PDX Exp.

I watched this youtube,
even frame by frame advance following all the steps, but can not fathom how he seperates the hat & reintergrates it. I can not move or edit the hat as the whole model is in one piece.
 
If your model is in the A pose and not animating, then yes it means that the skin was destroyed at some point.

If you have saved the skin, edited the mesh and then loaded that skin back onto the mesh ... well it won't work because you have probably added or removed vertices, or at very least changed UV's. (the skin weights map you mention uses UV location to re-associate skinning) This is why your added pouches are now being moved by the arm bones as well as the torso bones.

Honestly if you really want to edit the mesh, you're best off just doing a quick reskin of the model to the skeleton. If you don't know how to skin properly in Maya then search Youtube for tutorials, or try the "Geodesic Voxel" bind method with high settings for a better one click skin. If you still get skinning errors then just use the "Paint skin weights" option in Maya and click through the different bones to see which skinning influence is wrong... then paint the mesh to correct this.


You should be able to test whether your skinning works or not without loading the game, just save your work and then use the tool to import an animation like a walk or combat.
 
You have replyed me in other post:
If you've used my tool (io_pdx_mesh) to import an existing mesh, then you will have to remove the existing "shader" attribute from any imported materials before trying to add one via the PdxExport tool. Otherwise you're trying to add something to the Phong material that already exists, and my tool will not create an "enum" attribute but a "string" attribute... so you get this conflict because you are trying to use two different tools.

You can remove the existing "shader" attribute by going to "Modify > Delete Attribute" etc... then re-add the attribute using the original Paradox tool.
It should literally just be two clicks and then your export will work. :)

So, maybe phyton script should be updated to create 'enum' attribute instead of string ? because deleting and creating new material may cause loosing some details (for example with wrong hands )) ..
 
Any news on the export function? It would be great to have as I currently use Maya LT. If not Jorodox tools work for me sometimes and others I just get errors
 
Ah I'm only maybe a week or two away from being able to release an update with the exporter functional. :D

Basically the only remaining tasks are to export multiple UV sets and skinning information, so there's not much work left there but it's finding free evenings or weekends to do it in. :) I'm also working on the Blender version of the tool in parallel now, that's going quite quickly in comparison as I can actually share about half the code I've already written for the Maya tool.
 
Ah I'm only maybe a week or two away from being able to release an update with the exporter functional. :D

Basically the only remaining tasks are to export multiple UV sets and skinning information, so there's not much work left there but it's finding free evenings or weekends to do it in. :) I'm also working on the Blender version of the tool in parallel now, that's going quite quickly in comparison as I can actually share about half the code I've already written for the Maya tool.
Sounds great! Can't wait to try it out when it's done :)
 
Hello,

Because I get a 'skeleton not found error' on loading HoI 4 in the error log, I want to resolve this by adding a skeleton to a custom model I have. I tried using the 'skeleton creator' in Maya 2017 but the export fails: https://i.imgur.com/scPfYMx.jpg

[io_pdx_mesh] FAILED to export C:\Users\Dennis\Documents\Paradox Interactive\Hearts of Iron IV\mod\KR4_NL\gfx\models\units\planes\fokker_d21_cor.mesh
nt.Transform(u'QuickRigCharacter_Reference') is not in list
# Traceback (most recent call last):
# File "C:/Users/Dennis/Documents/maya/scripts\io_pdx_mesh\pdx_maya\maya_ui.py", line 498, in do_export
# self.parent.do_export_mesh()
# File "C:/Users/Dennis/Documents/maya/scripts\io_pdx_mesh\pdx_maya\maya_ui.py", line 256, in do_export_mesh
# merge_verts=export_opts.chk_merge_vtx.isChecked()
# File "C:/Users/Dennis/Documents/maya/scripts\io_pdx_mesh\pdx_maya\maya_import_export.py", line 1052, in export_meshfile
# bone_info_list = get_mesh_skeleton_info(shape)
# File "C:/Users/Dennis/Documents/maya/scripts\io_pdx_mesh\pdx_maya\maya_import_export.py", line 375, in get_mesh_skeleton_info
# bone_list['pa'] = [bones.index(bone.getParent())]
# ValueError: nt.Transform(u'QuickRigCharacter_Reference') is not in list
select -cl ;


Can this be resolved or do I need to learn how to make skeletons all by myself :p ?
 
I think I understand what you're doing, yes I can change the tool to cope but I'd need to check out your Maya scene file to be sure.

Do I understand... you have used HiK in Maya to build a skeleton for the plane? Are you actually going to animate the plane or did you create the skeleton simply because of the "skeleton not found" error? You could just add a single bone at 0, 0, 0 and skin your mesh to that if you're not going to animate anything.

Have you tried importing an existing plane from HoI4 to see what skeleton it uses? You should just be able to reuse that one if you don't want to learn make your own.
 
Yeah I do not need animation, the plane seems to fly fine on its own. I tried importing a mesh file but I was unable to see anything added to it (the skeleton and such). It is indeed to surpress that error otherwise I'll have permanent errors in the log, but also to add two 'locators' at the guns (because without them the plane fires from the belly) which I think I managed to do.

I pressed the 'Quick Rig Tool' which gave me a skeleton to the plane... thats it. I have no idea what I am doing really in Maya :p.

I have attached the maya scene file so you can take a look. Meanwhile, I am going to try what you said with a single bone.
 

Attachments

  • fokker d21.zip
    1,2 MB · Views: 26
  • fokker d21.zip
    1,2 MB · Views: 23
You have not deleted your old HiK rig from the scene, that's why you can still see "Character1_Reference" and "QuickRigCharacter..." locators being exported.

You need to actually delete it, not just set the control to "none" in the drop down menus.
Once it's deleted, make two bones, parent your gun locators underneath them and then skin each part of the mesh to the 2 bone skeleton.

Like this...
plane.PNG
 
Ahh almost there! The skeleton warnings are surpressed :D.

However, this maya noob can't find how to 'parent' the locators under the 'root'. I also now just have one bone located at the engine of plane.

Probably as a result of this, the rest of the meshes are dislocated from the body of the plane as well: https://imgur.com/a/9REwf , the windows are floating in front of the plane. All I did was what you have shown above, attaching the bone called 'root' to mesh number 1, the bodywork: https://imgur.com/a/E8x5F

This and the bone not located on position 0,0 probably causes the floating meshes, and the airplane flying around like a drunkard (it seems rotated).

Anyways, thank you so much for your help and this tool, I love how it remembers all the relevant textures and such. :)
 
You're welcome, I'm glad someone is actually using it as nobody else has replied! :)


how to 'parent' the locators under the 'root'.
Use middle mouse button and drag the locator onto the bone in the outliner. Or in the menu, Edit > Parent.

attaching the bone called 'root' to mesh number 1
You have to skin ALL of the mesh parts to the bone, I only showed doing the first one in my screenshot. This is why only the bodywork is correct ingame.
 
Hi Ross,

Been a bit since I worked on this, but I have had success. Unfortunally not the final success. All the parts of the plane are now together as it should be when flying and I thank you again for showing me how to do this stuff.

However I cannot seem to solve the 'plane flying around like a drunkard' issue. It seems something is rotated. Since it occurs after the skeleton is applied (the plane flies normally WITHOUT a skeleton), I assume I did something wrong with it again?

Would you mind taking a gander at the file again and see if you can spot something wrong?

Meanwhile I am going to skin my second model and see if the issue pops up again.
 

Attachments

  • fokker d21.zip
    654,1 KB · Views: 23