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

Spacemike

Sergeant
17 Badges
Feb 1, 2018
56
0
  • Stellaris
  • Stellaris: Federations
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Cities: Skylines
  • Stellaris: Synthetic Dawn
Recently I've been trying to export a 3d model into stellaris with multiple textures and animations, however, I have ran into an issue where I can't seem to export the model correctly and have the textures still work. if I use a single material and apply that to all the meshes in the model, the animations will work correctly, however I will be unable to apply the textures to the parts of the mesh due to the fact that it merged all the meshes into a single mesh, and thus, only has one texture slot. Also, if I look at the model with the JoroDox Tool I will see that there is one object and only one mesh under that object.
single mesh.PNG

On the other hand, if I tick the "skip merge" box or use multiple textures and apply the shader attribute to each one, it will instead have multiple objects, with one mesh and a skeleton under each one, but this breaks the animations and none of them will play.
multiple objects.PNG

However, if I look at models other mods use I can see that there will only be one object in that .mesh file, with multiple meshes and a single skeleton underneath that object, however, I have not been able to figure out how to do this, as everything I have tried so far has either not affected the mesh at all, split the mesh into multiple objects and broke the animations, or not exported the model at all. I have tried looking around but to little avail, as no one else seems to have had this issue or tried using multiple textures and animations at the same time, so if anyone has any clue how to do this I would greatly appreciate it if you could please tell me what I am doing wrong!
 
Here's the maya file and the textures, I left the materials I made in the scene, but I wasn't sure how to get the models to merge correctly.

Also, do you know if it is possible play multiple animations at once/add them together? Like, having a little bit of rotation or slight movements to make the ship feel more alive that adds or is added to the main animation that plays?
 
Last edited:
do you have to set a general material or such that has the shader applied to all the meshes or make all the meshes be underneath a null group or such with that material applied to it? I know there exists things like that in other 3d modeling software, but I have yet to find out through google and messing about with the program if it is possible to do that, and I have no clue what the size limits are for textures, so later on this might become an even bigger issue for me, especially since not all of the textures seem to mesh properly at times and seem to bleed over onto objects they shouldn't be.
 
Alright I've found some potential issues that you could fix for your model to work better!

When you're using the Paradox exporter you have to use the animation attribute on the root joint, which you do. However you need to separate the animations either by a new animation or by the attribute "none" to close an animation (you can add this by selecting the root joint and then go to Modify > Edit attribute.). You can also use different materials for different meshes, you need to set the PdxMeshShip shader on each of them.
When skinning the mesh you have to bind the skin to the root joint (highest in hierarchy) to each of the meshes, then paint the skin weights for each mesh to use the desired weights for each joint. For your model it's probably going to be 0 on every joint and 1 on the correct joint for that mesh.

Modeling pointers:
1. Textures are way too big for the level of detail on the model. Compare with the texture resolution of our battleships for example. If you will add much more detail to the texture then it might be reasonable to keep them at 2048x2048.
2. Use much more texture tiling.
3. Use plating details in normal map, this includes indents and edges.
 
Thanks! I was using the wiki tutorial on animated meshes for how i set up the animations, which stated that you needed an animation titled "idle" to seperate each one, but using none helps a good deal as it actually allows me to export an idle animation! Also, for anyone else that reads this, you have to restart maya/reopen the scene in order for the attribute you edited to refresh, at least, that's what i have to do.

And, that is what i was doing before, i removed the shader because i didn't want the maya exporter to try to export them when nothing used those materials. And, binding them all to root seemed to help a little bit! Instead of having one object for each mesh, there is now one for each texture. That does mean though that the animation still doesn't export correctly. I did notice that the root bone as well as a few other bones would not appear in the weight editor tool. I was able to fix this by unchecking "remove unused joints" in the maya bind settings, but after doing this maya became completely unstable! Every time i tried to change what frame the animation was on or try to play the animation, maya would instantly crash! Noy only that, but when i try to export the animations, maya just freezes up and won't export the animations! Ans, in the .mesh file that is exported, there is still that issue where there is multiple objects with multiple and thus, duplicate skeletons!

And, i am aware of the massive size of the textures, despite most of them being just a single color, i was more focused on just getting the textures to work at the same time as the animations, so fixing their size would be decently easy, but i was running into an issue where the textures wouldn't line up with the model's edges right and colors would bleed over the edges, so my solution was just to make the textures larger, as they are still only 4MB at most and i can always adjust their size later on. I was also using Gimp and paint.net to export my textures and normal maps, so i'll have to go back through and see if they even have those options.

I have also attached the maya file where i rigged the meshes with all joints/bones, including unused ones, that causes maya to crash often. I'm not sure what i did wrong or why simply including something that isn't used would cause maya to crash.

EDIT: Removed zip files to not clutter up the forums and use unneeded space.
 
Last edited:
I took another look and I got it to work in game, albeit with some shading/texture errors.

If that is what the wiki tutorial says then it's wrong and I'll take a look at it. You need to use "none" or another animation, then it will not be any space between animations. You don't have to restart the application after editing an attriute, although I don't know how the student version of Maya works in that regard.

Maya crashed because of a GPU animation evaluation bug in Maya 2016, you can fix it by going to Windows > Settings/Preferences > Preferences > Animation and at the top set Evaluation Mode to "Serial" and check "GPU Override".

Try out if that works for you!

PS: You have to set up the .asset- and .gfx-files to make it work in game, but since I already did that when trying I attached my files so you don't have to do it from scratch. :)
 

Attachments

  • mahe_orion_core.rar
    510 bytes · Views: 33
Thanks! I thought it was what the wiki said, it seems to say none now, so i'm not sure if you fixed it or someone else caught it after I looked at it or simply misread That seems to have stopped Maya from crashing, and it now exports the animations and plays them correctly while keeping the textures! although, I am seeing a bit of texture issues at certain angles, so i'll have to look back at the textures and see if I can fix the normal maps, It probably has something to do with the odd mesh of the object, I do wish though that I could export the correct normal map from the 3d modeling engine itself, as it exports it as a more advanced normal map that has colors for the various position vectors instead of just the rounding, which obviously doesn't work right. I'll probably also need to make a specular map or such later on to help with the intense brightness the sides experience as well as add a bit of glow and a metallic appearance to the white metal. Do you have any idea why the game engine might render the lighting on some of the polygons strangely while in the actual 3d modeling engine of like maya and such displays the lighting perfectly? (here is a few screenshots I took, the first one shows the strange lighting glitches while the second one shows that those issues seem to only be at that one specific angle, as everywhere else seems fine, I also attached my files on the actual entity of the ship, it does use a few of LEX's amazing sounds, but that shouldn't have any effect on the lighting or such, although if you do have LEX installed like me you should be able to here them, later on I will try adding sounds of my own or finding a stock sound that suits it, but I was more focused on getting the model to animate before the sounds.)

Thanks for the tip! I already was a bit familiar with the .gfx and .asset files through my stumbling about in the game files as well as several mods such as LEX, but the actually exporting of an animated ship was something I couldn't really find a lot of information on.

Also, is there anyway to add animations together? such as a slow turning of the ship combined with all the other animations of the shield opening and closing, but with the slow turning being a completely separate animation that only influences the main_ship bone?
 

Attachments

  • 20180220110807_1.jpg
    20180220110807_1.jpg
    296,8 KB · Views: 45
  • 20180220110838_1.jpg
    20180220110838_1.jpg
    373,8 KB · Views: 36
Last edited:
Good that it works better, I'm afraid I don't know why it might render it the way it does, but look over the model and see if you can optimize it a little when it comes to vertex count and edge loop flow (they are a little everywhere and in strange angles right now).

You can't use several animations affecting the same bones, unfortunately, the only to do something like that is to have a separate mesh/entity with its own animations which you can attach your ship to and sync the animations, but that's very advanced, just try to get your model to look and animate correctly right now I'd say. :)
 
Indeed! and, ah, ok, I'll try, but the odd thing is that the actual places that need to have the vertexes cleaned up and tweaked are not near the flat surfaces of the panels, which is the most confusing part for me. Could it happen to have anything to do with the fact that the exporter says "Error! Mesh contains broken normals, tangents and/or bitangents." when exporting? I've tried tweaking the meshes a bit and messing about with it, but it doesn't seem to help much, although, then again, I made the model in a separate 3d modeling program, so I have to export the model back into maya and retexture and re-rig it, due to my complete lack of knowledge on how to use maya, if this keeps up I will try simply separating the white metal from the blue glow and making them separate meshes (and making the textures even smaller, as they would only have to contain the basic color that each mesh uses). The blue is supposed to glow anyway, so you shouldn't be able to notice any random lighting glitches easily. Another thing I noticed is that the issue only happens at border-line pitch black, when the polygon is almost perpendicular to the center of the solar system, so it might have something to do with small decimal issues and the fact that the model seems to lack shadows, which combines to create that unusual lighting bug, I will keep messing about and trying to find the source of the issue and fix it.

EDIT: I seemed to have been able to fix the issue by using maya's mesh cleanup tool, as for some reason there were some "Non-Manifold geometry" in the mesh, which was causing those broken lighting issues, now I just need to fix the normal map so that this doesn't happen XD
20180221163057_1.jpg 20180221163100_1.jpg
 
Last edited:
So I managed to fix the lighting issues on the side by making the normal texture just a single color with alpha and removing all the edges from it, however, the 2.0 seems to have broken the lighting for the "shields" on the front of this and I've tried to fix it but I have had no luck so far, any idea what the 2.0 did that I need to change in order to fix this? I tried re-exporting it, but it seemed to have no effect.
20180227001430_1.jpg 20180226193624_1.jpg 20180226193628_1.jpg 20180226193626_1.jpg 20180226193623_1.jpg 20180226193244_1.jpg 20180226193627_1.jpg

I also noticed the vanilla gateways didn't animate properly, with their portal disks being frozen in place, but when you spawn their pdx mesh their animation plays just fine.
 
Alrighty, i'll keep trying, but I have absolutely no clue what caused it, especially since the lighting seems to be fine when viewed in the JoroDox Tool, however, I do notice that in the JoroDox Tool, the shields actually do animate, but nothing else does (in the game itself all the animations work fine, probably not as efficient as they could be, but they work fine enough), so i'm not sure if it has something to do with that fact, or if somewhere I messed up a setting or something, I will keep trying though.

And, alrighty! I saw that the portal wasn't animating, and I knew already that a lot of other megastructure mods and such seem to have similar issues, so I just wanted to make sure you guys knew so that you could fix it after all the major bugs, as I didn't see anyone else mention it.

EDIT: Found it, somewhere along the lines, the mesh that I exported changed, and it changed the names of the Shapes a bit, so instead of being called Core_Shield_06Shape like it was before, it somehow changed itself to Core_Shield_01Shape and removed a different one of my shapes, so.... no clue how that happened, but the normal map works fine now. (I'll leave this here in case anyone else has this issue, as it is quite easy to overlook if you reuse your .gfx and .asset files instead of generating a new one every time)
 
Last edited:
I also tried adding a glow to the blue lines of the ship, but they turned red, which I am guessing is because of the fact that the Blue channel in the normal map links to EmissiveR, but EmissiveGB is ignored based on what it says on the wiki, but I know that other objects have glows other than red. I also looked around on the forums and I found this article that says that "Usually the emissive... is handled by the blue channel on the normal map but picks the illuminating color from the diffuse" however, that's obviously not happening in my case for some reason, as the glowing parts just straight up turn red.
https://forum.paradoxplaza.com/forum/index.php?goto/post&id=22512468#post-22512468

(ignore the odd reflections, I was experimenting around with a specular map when I took this screen shot, which did give me the idea later on to make a 'dark' version of this crystal core thing. I also attached the files of the diffuse/color map, the normal map, the mesh, and my .gfx and .asset files if you want to take a look at them)
 
Last edited:
that is possible, but there has to be a way to manually set the glow color, otherwise the gateway lights and every other glow would just be the player color, and I know that is not the case. Just look at gateways for example, they have a white glow. Also, I thought you needed to use the specular map to set colors to the player's country's colors?
 
Last edited:
that is possible, but there has to be a way to manually set the glow color, otherwise the gateway lights and every other glow would just be the player color, and I know that is not the case. Just look at gateways for example, they have a white glow. Also, I thought you needed to use the specular map to set colors to the player's country's colors?

Only owned fleets get the empire colour, gateways etc are neutral.
The Emissive mask comes from Normal map blue channel, but the Emissive colour comes from the Diffuse map multiplied by the Empire primary colour. If you want to make a player ship with emissives that aren't the same as the empire colour then you'd need to make a variant of the PdxMeshShip shader.

Have a look in gfx/FX/pdxmesh.shader
Look at lines 1113-1247
The emissive recolour to empire colour is done on line 1169
 
Only owned fleets get the empire colour, gateways etc are neutral.
The Emissive mask comes from Normal map blue channel, but the Emissive colour comes from the Diffuse map multiplied by the Empire primary colour. If you want to make a player ship with emissives that aren't the same as the empire colour then you'd need to make a variant of the PdxMeshShip shader.

Have a look in gfx/FX/pdxmesh.shader
Look at lines 1113-1247
The emissive recolour to empire colour is done on line 1169

True, although, I found that an easier solution is to simply add the line " graphical_culture = "fallen_empire_03" " into the code that spawns the ship, or changing my gfxculture through the console, this is because the fallen empire color is white, meaning it that it sets the glow color to white, which then allows the blue of the diffuse texture to take over and become visible.
 
Anyone have any idea as to how to make a bone be an attachment point or why a static attachment point created using like
locator = { name = "locatior_name" position = { 0 0 -11.25 } rotation = { 0 0 0 }}
wouldn't work for weapon positions? Also, I've been using the technosphere's animation coding to run my leviathan's animations, but they only seem to refresh when i go into galatic view and then come back into solar system view, despite using the same code for it.

I also attached the .gfx and .asset file i am using along with the .mesh files and the animations.

EDIT: There is no errors popping up in the error debug file, the locator just doesn't seem to keep any kind of a position, always reverting back to position (0,0,0) for where weapons fire from.

In my weapons file i set the position of the weapons using:

entity = "mahe_orion_core_hull_entity"

component_slot = {
name = "EXTRA_LARGE_01"
slot_size = extra_large
slot_type = weapon
locatorname = "crystal_joint"
}
 

Attachments

  • model files.zip
    453,4 KB · Views: 24
Last edited:
that is possible, but there has to be a way to manually set the glow color, otherwise the gateway lights and every other glow would just be the player color, and I know that is not the case. Just look at gateways for example, they have a white glow. Also, I thought you needed to use the specular map to set colors to the player's country's colors?

Hey Guys !! I thought I'd chime in here... I was running into the same issue that you had.

Emissive Layer (blue channel in normal.dds) is tied to player primary flag color.

To remove that, you have to edit your common/graphical_culture file. See vanilla file below. The (ship_color=yes) is the line of code that tells the emmissive layer to use the primary flag color. =no or remove it completely.... makes the emissive layer emit a neutral white light color. Which can then be used to light up the texture color in diffuse.dds.


humanoid_01 = {
randomized = { host_has_dlc = "Humanoids Species Pack" }
selectable = { local_has_dlc = "Humanoids Species Pack" }
#############################################################
ship_color = yes
#############################################################
fallback = mammalian_01
ship_lighting = {
cam_light_1_dir = { 0.6 -0.2 0.1 }
cam_light_2_dir = { -0.4 0.0 0.0 }
cam_light_3_dir = { 0.4 -1.0 -0.1 }

#cam_light_1_dir = { 1.0 0.0 0.5 }
#cam_light_2_dir = { -0.5 -0.2 0.0 }
#cam_light_3_dir = { 0.4 -1.0 0.0 }

intensity_near = 1.0
intensity_far = 5.0
near_value = 100
far_value = 4000
rim_start_near = 0.5
rim_stop_near = 0.99
rim_start_far = 0.3
rim_stop_far = 0.99
#rim_start_far = 1.5
#rim_stop_far = 2.0
ambient_near = 0.1
ambient_far = 0.0
}
}



Hope this helps :) - Side note... I'm trying to export models from maya 2016 using the PDX exporter.... any suggestion which animation type to use in maya?

Cheers,
Kelstr