• 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.
Hi, where are the names of shaders defined? In gfx/FX/ the filenames don't in particular match up with the names of shaders people use in .gfx files.
 
I meant like, where do we know the names of shaders, some shaders like "PdxMeshPortrait" how do I know this exists, other than someone randomly telling me? Is there a list of all shaders available somewhere?
 
I meant like, where do we know the names of shaders, some shaders like "PdxMeshPortrait" how do I know this exists, other than someone randomly telling me? Is there a list of all shaders available somewhere?
I don't think we have, but it's a great idea, I added a task to my todo list to publish the shaders for the various projects on the Wiki and here on the forums!
 
Any plans on updating the plugin to Maya 2019? I use that for work and prefer not to have to install an older copy. I'm assuming with the release of Impreator: Rome we might see an update, since it's been widely advertised how mod-friendly it will be? :)

EDIT:

On a side-note, does the Photoshop script work alright for everyone else? Using Photoshop CC 2018, I've changed the directory for the export to my modding folders in the text file, I've set up a texture with 3 layers (one for diffuse, one for spec, one for normal) and the export dialogue box comes up fine. My issue is that no matter where I choose to export to, the files export wherever the current PSD file was saved (the desktop in my case) and all that comes out is the asset file and 3 TGA's that are exactly the same as the 3 layers. Not only this but I've selected to export DDS ad it doesn't appear. IS this a compatibility issue with CC 2018 perhaps?
 
Last edited:
For Stellaris Portrait mesh; for the Hair Mesh, Clothes Mesh, and base Body Mesh; are these separate meshes to be exported as a .dae file to be converted to .mesh; or can they be "joined" and be one mesh? So far I have only gotten Selectors to work with them as separate meshes.

However, I am using Blender (maya is incomprehensible to me, and also not free; so my student trial will eventually time out and then I can't use it anymore). When I export the .dae file with three meshes (Hair, Body, Clothes) that are Rigged to a single armature; Jorodox shows it as having *three* embedded animations (one for each mesh); making the .anim file broken when exported with Jorodox, or seems to only exports a partial animation.

If I could export my Three Meshes as a *single* mesh, and then still have it work with Selectors that would be most useful.

So far I have a meshsettings code block in the .gfx file for each material/mesh but it doesn't seem to work if it is just one mesh; but does work if multiple meshes; but then I have my problem where I can't get the animations to work because each rigged mesh appears to include its own "AnimationController" in the .dae file.
 
I haven't used Blender so I can't say for sure how it works there, but in Maya they should be three separate meshes that are then exported with our Maya exporter tool to one .mesh file. All of them are, as you say, rigged to one skeleton with one set of animations. They can then have their own meshsettings and such in the .gfx file.
It sounds like Jorodox might have an issue with several meshes, whereas some might have different materials perhaps?

If you do have them as one mesh that could still work with the meshsettings, they would just have their own index, however I'm not sure how it would be with the render order in the game as that is taken from the order in the Outliner in Maya (and I've heard that it works similarly in Blender, although it's more of a hassle to move the meshes around there).
 
Thanks @K-vald ! I have made much progress and can almost release my mod!

I have one question. For the PdxMeshPortraitHair shader, I notice it seems to have seams and this only seems to affect the meshes attached with the hair shader. If I was to best describe it, it is as though my bones randomly decided to twist or bend in the wrong way, but I observe this behavior only with my Hair bones.

Edit to add: It seems to *really* resemble the problem where your mesh "shrinks" due to weight painting issues that ticking Preserve Volume is supposed to fix. Ticking Off Preserve Volume from my Modifier presents me with something similar in Blender, I'll try applying my armature modifier.

Edit 2: I think I figured out the "why", I think when Blender exports a Collada file for some reason the vertices aren't joined together, so if the vertices are being skinned at different "rates" of speed I end up with tearing. This also explains some minor "flickering" I've been having otherwise because every triangle is on it's own. That is quite unfortunate.
 
Last edited:
Hmm, I can't answer specifically about Blender but you can get similar results in Maya if you for example have deformer history or change the vertex count (as in removing for example) after skinning the mesh. Maya re-assigns the vertex IDs to some extent and you'll get skinning issues.

But it sounds, from your edits, that it might be more of a Blender save/export issue. That's unfortunate indeed. I saw you've been writing with @ross-g to try out that exporter and hopefully that might work, otherwise the only thing I can come to think of is to export all the meshes separately and then attach them with the attach = { } command in the Stellaris asset file.
 
Hmm, I can't answer specifically about Blender but you can get similar results in Maya if you for example have deformer history or change the vertex count (as in removing for example) after skinning the mesh. Maya re-assigns the vertex IDs to some extent and you'll get skinning issues.

But it sounds, from your edits, that it might be more of a Blender save/export issue. That's unfortunate indeed. I saw you've been writing with @ross-g to try out that exporter and hopefully that might work, otherwise the only thing I can come to think of is to export all the meshes separately and then attach them with the attach = { } command in the Stellaris asset file.

I'm afraid I don't quite understand what exporting meshes separately would do. Suppose I have a plane and this is my hair mesh and it is composed of 60 vertices; the problem is that most of those vertices instead of joining together at the tri corners; for most of the triangles making up the mesh the verices are separate but occupying the same space. So in Blender where I have 60 vertices in the collada file it's like 120-180 vertices (it's a little random, sometimes a region of a mesh but be unaffected, sometimes two triangles are fine and form a triangulated square just fine). Basically it's as though Blender is just refusing to export the triangle indices to collada entirely or only semi randomly.

Currently I'm exporting my textures in preparation for release but after that is done I'll be testing my changes to the skinning. I redid some weights for the hair meshes and I'll see if that helps; I'll do a test export/reimport with a cube to see if that too suffers the same issue, and then after that give ross's import/exporter a try. The problem is the first time I used it, it didn't really work for me but maybe I did something wrong.
 
Alright, yea maybe it doesn't matter then, I was thinking if that worked for your other meshes but not the hair when exported together but it would work on its own. But if that doesn't work either it won't help much. Hope that you can get ross's tool to work for you, seems to be the best bet if the re-skin/re-weight turns out to not work either. :(
 
I mean the issue also occurs with the other meshes; it is just much less noticeable. There is a slight "flicker" with the other meshes which is a result of the same problem, but the animations don't pull the vertices apart as far so it was something I initially dismissed as a texture or rendering issue with the engine and not something wrong with the mesh itself. Now I am pretty sure its because the Blender collada export just straight up shatters my mesh into individual triangles and such; which is particularly visible with hair (because of bad weight paintings) but more subtly with the body meshes.

Redoing the weights and then limiting weights to max 4 bones and then renormalizing them improved it but still present if I look closely presumably because it didn't fix the underlying issue but bandaged the symptoms.

I have unfortunately a different issue with Ross-g's exporter that if solved fix all my issues (the mesh destruction doesn't occur, animations look fine, etc) but the PdxMeshPortrait shader isn't appearing with his plugin. (Clothes and Hair work though, so I got an "Invisible Man" situation!) So I am hopefuly I stumble upon a fix with more testing.
 
I have unfortunately a different issue with Ross-g's exporter that if solved fix all my issues (the mesh destruction doesn't occur, animations look fine, etc) but the PdxMeshPortrait shader isn't appearing with his plugin. (Clothes and Hair work though, so I got an "Invisible Man" situation!) So I am hopefuly I stumble upon a fix with more testing.

If you can't fix it but those other shaders work you could just put one of those on the body mesh and then overwrite the shader in the .gfx file in meshsettings with the correct mesh instead. So it will have the "wrong" shader in the .mesh file but when read in the game it will have the right one.
 
If you can't fix it but those other shaders work you could just put one of those on the body mesh and then overwrite the shader in the .gfx file in meshsettings with the correct mesh instead. So it will have the "wrong" shader in the .mesh file but when read in the game it will have the right one.

As I recently posted in the Pdx Import/Exporter thread I was able with 1Codemaster's help to narrow down and solve the issue! Apparently the Jorodox and Ross-g exporters export the mesh (or the armature) in different ways; such that while my UVs were correct for the .dae export (UVs facing +Y global axis) for Ross's exporter they need to be -Y for PdxMeshPortrait. PdxMeshPortraitClothes and PdxMeshPortraitHair appear to be UV independent (can face either way) which is why the Clothes and Hair shaders worked but not PdxMeshPortrait.

I do have a followup question that I asked you on reddit, and I have some more info regarding; regarding animation states.

In the default file, say one of the human ones, you have what appears to be two states and four animations:
Code:
default_state = "idle"
{ name="idle" anim="idle1"...... next_state="idle"}
{ name="idle" anim="idle2"...... next_state="idle"}
{ name="sad" anim="sad1"...... next_state="sad"}
{ name="sad" anim="sad2"...... next_state="sad"}

It seems like based on testing, that the "sad" states never actually fire. Logically this would make sense to me as if the default state is idle, and its next state is idle, then of course when would it ever reach a sad state? Is this expected? I didn't thoroughly test it yet with just a single idle and a single sad with sad's chance set to 200 or something but it seemed like the case last night that I never saw any of the sad animation states.
 
Great to hear that you got it figured out in the end! :)

I haven't checked Reddit yet but I can answer here instead! You are correct in your assumption that the "sad" states never fire. They are legacy states and only a few portraits still have them there. The chance wouldn't matter since the portraits will be in the "idle" state from default and when they end it will be put again in an "idle" state (next_state = idle) so the "sad" states will never be used regardless of chance.
 
Great to hear that you got it figured out in the end! :)

I haven't checked Reddit yet but I can answer here instead! You are correct in your assumption that the "sad" states never fire. They are legacy states and only a few portraits still have them there. The chance wouldn't matter since the portraits will be in the "idle" state from default and when they end it will be put again in an "idle" state (next_state = idle) so the "sad" states will never be used regardless of chance.


Thanks for clarifying! IIRC though "sad states" appear in literally every gfx file though.

I notice that apparently stellaris has a 50 joint limit, I had a model with 57 and needed to cut this down; I assume this is a constant literal buried in some source file somewhere, could this be set to 100 or 1000 next patch? I like to go all out with bones when animating/rigging. :)
 
could this be set to 100 or 1000 next patch? I like to go all out with bones when animating/rigging.

This is ... legitimately insane. Why on earth do you need more than 50 for a 2d portrait?
Modern 3d, cinematic quality, real-time characters barely go over 800 bones. There is no reason you need to for portraits.

Have you tried finessing the skinning of your mesh to the skeleton rather than adding more bones?