Adding new 3D models to Panzercorps 2

A forum to discuss custom scenarios, campaigns and modding in general.

Moderator: Panzer Corps 2 Moderators

Post Reply
fadedPanzerFuhrer
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 1
Joined: Thu May 10, 2018 3:27 am

Adding new 3D models to Panzercorps 2

Post by fadedPanzerFuhrer »

Hi All,

I've been interested in adding new 3D models for units to Panzercorps II, and I was having difficulties making my Panzercorps 2 install see new uasset files containing the 3D models. I couldn't find another topic related to this, so I wanted to ask, is Panzercorps 2 setup so that adding new 3D models to the game is even possible, or are all the 3D models in the game baked into binaries or something? I feel like it should be possible given the new units that were added in Axis Operations, but I can't figure it out.

Thanks!
Kerensky
Content Designer
Content Designer
Posts: 8649
Joined: Wed Jan 12, 2011 2:12 am

Re: Adding new 3D models to Panzercorps 2

Post by Kerensky »

I'm hoping opening the game to modding will go a long way to help in this regard... we'll just have to see I guess.
jeannot le lapin
1st Lieutenant - 15 cm sFH 18
1st Lieutenant - 15 cm sFH 18
Posts: 828
Joined: Sun Dec 10, 2017 3:29 pm

Re: Adding new 3D models to Panzercorps 2

Post by jeannot le lapin »

We already have a plethora of official 3D models and there will be more to come... What we need would be new user made scenarios before new models. We must not put the plough before the oxen.
Stormchaser
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 263
Joined: Mon Sep 07, 2020 1:38 am

Re: Adding new 3D models to Panzercorps 2

Post by Stormchaser »

jeannot le lapin wrote: Sat Nov 28, 2020 6:30 am We already have a plethora of official 3D models and there will be more to come... What we need would be new user made scenarios before new models. We must not put the plough before the oxen.
But what if you wanted to make some Japan vs US Scenarios? I remember there being a distinct lack of Japanese Units in the editor last I checked, so having proper Japanese Unit Models would be needed.
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: Adding new 3D models to Panzercorps 2

Post by Ezequiel1996 »

jeannot le lapin wrote: Sat Nov 28, 2020 6:30 am We already have a plethora of official 3D models and there will be more to come... What we need would be new user made scenarios before new models. We must not put the plough before the oxen.
mind if i ask you what models? im working on a side project to cover all fall Weiss and all years of the war, in a in depth grand campaign, separate from the grand campaign's dlcs of pzc1, and it would be really useful having more units and models to add to the battles as enemys and as rewards.
LuminousLizard
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Sat Feb 27, 2021 11:00 pm

Re: Adding new 3D models to Panzercorps 2

Post by LuminousLizard »

I would also like to add new units to Panzer Corps 2, because I would expand the game into the cold war era. A little as a hobby activity, not professional for now :oops: .

The .uasset files cannot be opened independently as far as I have tried.

But the game folder includes the project file for the Unreal Editor 4. I tried to open it, but since I have another UE4 version, he would like to convert the project to my editor version. But this failes, the "source" folder could not be found ... because we have the compiled version I think. I don't know if it's possible with the right UE4 version which the developers use .... or it isn't possible, because UE4 needs more things, but which only the developers have.
Patrick Ward
Slitherine
Slitherine
Posts: 1221
Joined: Thu Sep 04, 2014 2:49 pm
Location: A small island in the Outer Hebrides.

Re: Adding new 3D models to Panzercorps 2

Post by Patrick Ward »

Until the mod workshop is fully functional and modding support officially announced, there's not much I'm allowed to tell you. I have to leave that to the developers.

But if you have the Unreal editor ( unless its a dev only feature, you can download and install multiple versions of the editor eg. We currently use 4.26.1, but the game release is in an early version, maybe 4.21.2 ) you might be able look at the uasset files and get an idea of how the meshes need to be arranged and named. They start as simple .fbx files and Unreal converts them on import. The models are simple, the texture not so much as they don't conform to standard PBR setups. Kind of a mashup of PBR and old school blinn/phong.

P
............................

Pat a Pixel Pusher

............................
LuminousLizard
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Sat Feb 27, 2021 11:00 pm

Re: Adding new 3D models to Panzercorps 2

Post by LuminousLizard »

Thanks for the answer,

I tried it with the current version 4.26.1 as well as with 4.24.3 because this version (4.24) is specified in the "PanzerCorps2.uproject" file, but both doesn't work for me.
I wanted to tried the 4.21 as you said, but with this version I have another problem :roll: . I'm using Linux and compile UE4 from Epic's official github repository, but this version will not compile :x .

The rest should be able to handle, I have planed to build the objects with Blender (I have at least some experience with that), export it to .fbx and import it into UE to add it to the game. I'll try around a bit more in the next few days, otherwise I have to wait until an official modding tool.

LuminousLizard
LuminousLizard
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Sat Feb 27, 2021 11:00 pm

Re: Adding new 3D models to Panzercorps 2

Post by LuminousLizard »

I have fixed some errors related to UE4. But for me it's not possible to open the game with UE4, because the .uproject file requires the "PanzerModer" plugin (which is available inside the game folder), but this plugin refers to a module named "PanzerModEditor", which isn't delivered with the game.
Patrick Ward
Slitherine
Slitherine
Posts: 1221
Joined: Thu Sep 04, 2014 2:49 pm
Location: A small island in the Outer Hebrides.

Re: Adding new 3D models to Panzercorps 2

Post by Patrick Ward »

Ah ok. Then all I can suggest is you wait until the mod manager support is finished. Wish I could give you an ETA but we've learned the hard way never to do that. :)

P
............................

Pat a Pixel Pusher

............................
LuminousLizard
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Sat Feb 27, 2021 11:00 pm

Re: Adding new 3D models to Panzercorps 2

Post by LuminousLizard »

First possibility to modify existing and adding assets .... with some problems !!!

Current possibilities:
  • Modifying unit models
  • Modifying hero pictures (tested by KaiP)
  • Flags can be modified
  • Textures (e.g. ground textures) can be modified


Difficulties and problems:
  • Modified units lose combat animations (maybe can be linked)
  • No working solution for adding new additional units, textures, flags and so on (for units the game crashes if the model is loaded)

  1. Extracting assets:
    Extracting existing models is possible with "UEViewer / Umodel". It's a small program by Gildor which can extract unreal assets to .pskx (models), .pska (animations) and .tga (pictures e.g. colormap, textures) files.
    Link: https://www.gildor.org/en/projects/umodel

    The following command extract e.g. all assets of the PantherG:

    Code: Select all

    umodel -game=ue4.24 -path=<PathToAssetFolder>PantherG -export *.uasset
  2. Modifying assets:
    You can load the .pskx files into Blender by using the following plugin (https://github.com/Befzz/blender3d_import_psk_psa).
    Once installed, you can load the .pskx files via "File" > "Import" and manipulate these as you like.

    Finished models must be exported ("File" > "Export") as .fbx file.

    Pictures like .tga files can be modified e.g. with Gimp.

  3. Import modified assets into UE4:
    You need an Unreal Editor (I used 4.24, current release should also work).

    Create a blank game project. Inside the content browser create a folder structure like the structure of PzC2 (it's easier to keep the overview).
    E.g. for the modified PantherG model create

    Code: Select all

    <ProjectFolder>/Content/Graphics/Units/DE/PantherG
    Inside this folder import all .fbx files of the model via the UE4 content browser.

    Remove the additional material provided by Blender. Simple delete it .... the program will ask you if he should remove all dependencies to the models, that's ok.

  4. Link multiple assets to one model:
    If you have a model with multiple assets, e.g. tanks, than you must link the parts to the body (otherwise only the body is displayed ingame, example show below as problem no. 1).
    Open the body part (double click on it), add a socket, assign a part to the socket and place it on the right position to the body respectively to the other parts.
    Color and alpha maps do not have to be linked.

  5. Cooking assets:
    Go to "File" and click "Save current" to save all assets and changes.
    Then go to "File" and click "Cook content for Linux" ("Cook content for Windows" for windows user).
    Now the UE4 converts all assets to .uasset, .uexp and .ubulk files.

  6. Adding modified assets to the game:
    The "cooked" assets can be found inside you UE4 project folder fro windows user under

    Code: Select all

    <ProjectFolder>/Saved/Cooked/WindowsNoEditor/<ProjectName>...
    and for linux user under

    Code: Select all

    <ProjectFolder>/Saved/Cooked/LinuxNoEditor/<ProjectName>...
    Copy the assets and add it to your mod folder or simply replaced the existing assets in the PzC2 install folder.
Problems

  1. FIXED !!! The model isn't show correct in the game. Only the body is visible. Btw. the second antenna on the back of the Panther is added by me (modifying works).
    https://imgur.com/a/AQQwWFe

  2. If I add a new unit with an own new model, the game crashed as soon as the model is loaded (e.g. inside the purchase menu). E.g I have created a folder "Content/Graphics/Units/DE/PantherTest" with new asset files called "PanterTest_Body.uasset" (and so on) and I modified the units.csv, by adding a new line for a new unit called "PantherTest" and link it with the new model. I think the new (additional) model must be "registered" somewhere ! Has someone an idea ???

    Code: Select all

    PantherTest,"NSLOCTEXT('units','PantherTest','Panther Test')","NSLOCTEXT('units','PantherTest_full','Panzer V Ausf. Test Panther')",Tank,Hard,Tracks,22,TRUE,FALSE,26,TRUE,FALSE,0,TRUE,FALSE,1,TRUE,FALSE,25,14,4,10,9,2,0,60,5,180,(Overrun),PantherTest,(DE),HeavyVehicle,740,7,17.03.1944 - 01.01.1946,
Last edited by LuminousLizard on Sun Mar 07, 2021 8:44 am, edited 8 times in total.
LuminousLizard
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Sat Feb 27, 2021 11:00 pm

Re: Adding new 3D models to Panzercorps 2

Post by LuminousLizard »

Problem No. 1 is fixed ! :D
You must add sockets to the body asset and attach the other parts in UE4. I update the documentation.
Post Reply

Return to “Panzer Corps 2 Scenario Design”