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

1codemaster

Sergeant
18 Badges
Jun 4, 2016
55
2
  • Hearts of Iron IV: La Resistance
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Pillars of Eternity
  • Cities: Skylines
  • Stellaris - Path to Destruction bundle
  • Stellaris
Hello all,
I've just recently finished a very large guide (but it does have pictures) of my workflow from start to finish of a 100% new 3D asset for a paradox game. It is focused on HOI4, as that is my current project, but it should and will work with other paradox games! I know maya has a lot written on it, but there is not a lot on the paradox's scripting for gfcx/entities and almost nothing on a complete workflow coming from blender.

In the future, I plan to add a section on particle effects as well!

Enjoy: https://docs.google.com/document/d/17knnrF_RzaVFo_s66360m7rCypSH6yMTymA8B0jpTog/edit?usp=sharing
2018-07-18_02-21-15.gif

jxhF29q

jxhF29q.gifv
 
  • 2Like
Reactions:
Hi,

I have done some work in Maya, but the trial ran out. I am trying some stuff with blender, but always get weird results with the skeleton. Here is a modification of the HoI4 generic light tank to make an APC version. The model looks fine until you apply the animation, then it goes all wonky. I have read through your tutorial, but seem to not really understand what I am doing wrong. I am uploading the imported MESH file. Thanks for any help!
 

Attachments

  • generic_tank_light_modified_apc.rar
    59,9 KB · Views: 51
  • generic_tank_light_modified_apc_blender.rar
    80,1 KB · Views: 43
Unfortunately, Blender uses an XZY coordinate system, while most other applications use an XYZ. Because of this, all bones will export with their "roll" wrong, or the direction the bone is pointing. Animations are stored as rotations based on each bone's parent, so if we switch the Z and Y axis..... bad things happen. Unfortunately there is no work around for this ( you can't really switch the bone roll, because blender defaults the normal ray as Z, this is unchangeable to my knowledge). I would remake the default rig, and reanimate it. Sorry

P.S. I've updated the guide with a more in depth section on this issue.
 
Last edited:
Hello, thank you for this guide, I will try it for modding animated stellaris portraits.
 
Hello, I appear to be stuck. I made a simple square (2d plane) mesh in Blender, rigged it to wiggle slightly in a simple animation. uv unwrapped it. Exported it as a .dae file; loaded it via the Jorodox app, exported the .mesh and .anim files, and confirmed in Jorodox that my animation/mesh and textures seem to all have worked.

But in stellaris when I try to load the new portrait it looks like this:
https://i.imgur.com/veNchLC.jpg

I suspect maybe a shader issue, I notice that none of the shader choices in the dropdown appear to be for Stellaris, what do I need to do to try to use "PdoxPortrait" or however it is correctly typed? Do I need to find the shader file in GFX/FX/ or does it just "know" if I type it in by hand?
 
Most of the shaders in the game are in a folder called "shader" and you can find the major ones in individual files. for special shaders you MUST declare them in the .gfx construction under the mesh settings block. You can just use shader = "MyFavoriteShader" Some shaders might have special requirements or textures, and I have not messed with stellaris portraits. I'd also try adjusting the scale and intensity of the animation. If you can, convert the .mesh and .anim from the game back into .dae and import into blender. That might give more insight
 
Hi 1codemaster, thanks for responding. So to clarify:

In my gfx file, I would declare a shader like this:
Code:
objectTypes = {
    pdxmesh = {
        name = "portrait_homunculus_1_test"
        file = "gfx/models/portraits/homunculus/homunculus_01_portrait.mesh"
        animation = { id = "idle"    type = "homunculus_01_portrait_bored_animation" }
        scale = 1.0

      meshsettings = {
          name = "jorodoxShape"
          index = 0
          texture_diffuse = "protectron_diffuse.dds"
          texture_normal = "protectron_normal.dds"
          texture_specular = "protectron_specular.dds"
          shader = PdxMeshAdvanced
      }
    }
}

in "meshsettings", is "name" important? What does "name" refer to?

For the shader line, you said for special shaders, what is a special shader. One I make myself? A paradox shader like pdxPortraitStandard that isn't on the list?

You imply that this wouldn't be need for non-special shaders, which are those? PdxMeshStandard?

Edit to add: You said the shaders are in the "shader" folder but I can't find it for Stellaris, I see a bunch of files with the .shader extension in gfx/FX is this it?
 
Putting in PdxMeshPortrait got rid of some weird highlighting, my image is still distorted but at least I can now make it out, which I suppose it progress, importing the .dae into blender shows no change, my suspicion might be something weird with the bones or something else?

Edit: No idea what I did but now nothing is showing at all.

Edit: YAY!!!! I think I figured it out. I think somehow my mesh from Blender using Jorodox just ends up with backwards UVs (or backwards normals) hence why it wasn't showing up. Begs the question as to what I did to originally so that it showed up originally but who knows at this point.

Using PdxMeshPortrait in Jorodox seems to have fixed the weight highlighting issues from earlier.

I now import my Blender .cae file into Maya using the other Maya Exporter/Importer; rebind the skeleton, inspect/double check my textures, flip the uvs/normals and then reexport it and it works!

This is just the start but now I have a workthrough figured out for animated portraits. Thanks!

Additional Edit:
So going back to this, so while exporting my mesh via Jorodox, and then importing it into Maya with the other Paradox Maya Mesh Exporter/Importer, and then reexporting it with some adjustments "works" ideally I'd like a 100% blender workflow assuming the issues are related to some mistake I made in Blender.

I played around with rotation and normals and I managed to recreate the messed up and distorted issue from earlier, where it takes up most of the right side of the "room".

Importing the .dae file back into Blender reveals nothing obviously wrong. Importing it into Maya doesn't reveal any issues either other than that the mesh might be backwards but that doesn't explain the size discrepancy.

Fake Edit: As I was writing this, somehow everything now works and I don't need to use Maya at all? I'll have to examine this further. I think the key might have been selecting all my scene mesh objects and then exporting as a .dae and maybe also flipping my normals? Weird.
 
Last edited:
1codemaster that is a very comprehensive tutorial, well detailed, well written and greatly appreciated by many people. I've been into modelling/CGI since 2005 and I know a well written piece when I read one.
I think you should look into particles.
Particles are one of the most fun parts of 3d/CGI. On the whole particles are nothing more than points in space that carry attributes, but they are soooo flexible and can do a multitude of tasks.
For example, particles can be used for fire, smoke, create tornadoes, create glue bonds for dynamic fracturing, pass attributes from them to other geometry based on distance, deform geometry like cloth the list is endless....so is learning about them and what they can do xD

Oh did I mention that you can create a complex animation with them, then advect fluids based on their position and velocity information? Creating really outstanding animations that without particles would be impossible to achieve!

I really enjoy looking into other people's workflows, so will be interesting if you create something.

Good job, keep up the great work!
 
Last edited:
I don't think there is any use for particles as they are used in CGI (as physics simulating objects) in paradox games. The animations you can create are limited by a few rules that totally mess with the idea of using them, like only using bones, no direct mesh deformation (which is how i mostly have used them). Cloth geometry you definitely can do: I'd use the "cheaters" way of doing it, basically, use some vertices in a large 2x3 pattern for a flag for example. simulate that mesh with physics, then bind a bone to each of those vertices (in blender i use hooks). After than you can just weight paint a much higher resolution object and you have ghetto cloth with bone-based animation. This is how a lot of games do it, as most cloth simulations are extremely intense for high-poly objects.

Particles in the paradox games are basically just billboards and attributes on time-curves. You can access the particle editor by setting Stellaris, Hoi4, and EU4's launch option to -editor (only this one). just wait for it to fully load before alt-tabbing (it goes non-responsive before it loads for me). Then you can type particle my_favorite_particle to load one and change attributes. I've added a bunch of unique particles to Old World Blues already, but making a guide would be a lot of work, detailing what every option does ha ha
 
Hi, I need some help. Everything is working fine except the model is backwards. I tried to rotate it by 180 degrees, but it didn't change. Is there a simple solution to this?
 
Hi, I need some help. Everything is working fine except the model is backwards. I tried to rotate it by 180 degrees, but it didn't change. Is there a simple solution to this?
Have you applied the model rot, location, scale? if you haven't then it won't be changed just press ctrl+a in object mode with selected model and in the "t" menu lower panel there will be toolbox with the option which transformations should be applied to the model.
 
Have you applied the model rot, location, scale? if you haven't then it won't be changed just press ctrl+a in object mode with selected model and in the "t" menu lower panel there will be toolbox with the option which transformations should be applied to the model.
I did that and it didn't seem to do anything. It seems like regardless of how i rotate it, when I convert it into a mesh with Jorodox, it has the same rotation. I've tried rotating just the mesh, just the animation, and rotating both and nothing changed.
 
Make sure you remove the armature modifier and remove the parent from mesh to armature. then apply loc,rot,scale on both, the option is in the bottom of the viewport, under the pop-up menus
 
Hello Codemaster, thank you for your indepth tutorial, it's helped me complete about 50% of my submod for HOI4. I've figured out how to replace infantry weapons, like rifles and stuff. However I've run into a wall when it comes to changing the infantry skin to my custom skin. And when I say skin I mean a full mesh replacement of the original, not a simple retexture.

What I've tried is I first import my un-rigged mesh into Maya, rig it over the skeleton/bones of a vanilla model, apply shader, and export. It exports successfully however in game the model is a stretched out abomination that covers the entire screen.

I did read your last section of the guide "Exporting a model with a vanilla rig taken from the game." But I'm not using blender, I'm importing my mesh into Maya without any bones and then rigging it, does that "bone-roll" effect apply no matter what?

-Sorry for the long rant, I'm not new to this kinda stuff, but I am new to using Maya, and I've just been trying to figure this out for almost a month now.