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

Caseter6

Sergeant
42 Badges
Jun 11, 2015
61
58
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • Impire
  • Hearts of Iron III
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • Cities: Skylines
  • War of the Roses
  • Victoria 2
  • Cities: Skylines Deluxe Edition
  • Hearts of Iron IV: La Resistance
So I am working on a mod and as part of it I need to add a custom ship model so I got to work with Maya and everything seemed fine when setting it up and exporting with no errors at all but once the exporter loaded and competed I noticed this issue in the game with the textures:

6U5DdFU.png


Any help in fixing this would be much appreciated.
 
Where are these options suppose to be? I applied a phong material as the wiki guide says to and that guide makes no mention of PdxMeshShip or PdxMeshTerra.
You can find them if you select your phong shader in the hypershader, go to the channel box, at the bottom of the attribute list there should be an attribute named "shader" if you have added it through the exporter. There you should have a drop down menu of different shader options. These however may not correspond with the game that you are exporting to so you may need to change them to whatever is appropriate for the game you are modding.

To change them select the phong shader, go to Modify > Edit attribute... > select "shader" in the upper list and change/add a new string to the lower list. Then you may add "PdxMeshShip" or "PdxMeshTerra" there. Then you go back to the channel box and select the newly added/changed shader attribute and export it.
 
  • 1
Reactions:
You need to click on phong shader in hypershade, bring up the export tool, click on add attribute and if you did it right you will see under extra attributes in phong shader the name pdxmeshship
 
You can find them if you select your phong shader in the hypershader, go to the channel box, at the bottom of the attribute list there should be an attribute named "shader" if you have added it through the exporter. There you should have a drop down menu of different shader options. These however may not correspond with the game that you are exporting to so you may need to change them to whatever is appropriate for the game you are modding.

To change them select the phong shader, go to Modify > Edit attribute... > select "shader" in the upper list and change/add a new string to the lower list. Then you may add "PdxMeshShip" or "PdxMeshTerra" there. Then you go back to the channel box and select the newly added/changed shader attribute and export it.

You need to click on phong shader in hypershade, bring up the export tool, click on add attribute and if you did it right you will see under extra attributes in phong shader the name pdxmeshship

I have added that and now in the exporter preview the model is completely black and barely visible, I can tell it is there but no textures are showing properly its just pure black.

Here is a picture (even know you can't see much but the shape of the ship can be made out):

cruWyA9.png
 
Last edited:
You can find them if you select your phong shader in the hypershader, go to the channel box, at the bottom of the attribute list there should be an attribute named "shader" if you have added it through the exporter. There you should have a drop down menu of different shader options. These however may not correspond with the game that you are exporting to so you may need to change them to whatever is appropriate for the game you are modding.

To change them select the phong shader, go to Modify > Edit attribute... > select "shader" in the upper list and change/add a new string to the lower list. Then you may add "PdxMeshShip" or "PdxMeshTerra" there. Then you go back to the channel box and select the newly added/changed shader attribute and export it.

So I have fixed the ship mostly now and since my post yesterday I have got it working in-game without errors however I have an odd shadow issue with the ships not reflecting light properly so do you have any idea what could cause the issue or how to fix it in the following picture?:

fwBLC2L.jpg
 
Let me start off by saying,I don't have Stellaris yet but I am following the mods and how they are done etc.

I took a look at your scene file really quick and i already replicate your in game issue within maya.
Your normals seem to be the issue. What's causing the issue I'm not sure. If i reverse the Bump Depth i get the opposite effect where the previously unshadowed areas become dark and the dark show up correctly.

How did you create the normal map?
 
Let me start off by saying,I don't have Stellaris yet but I am following the mods and how they are done etc.

I took a look at your scene file really quick and i already replicate your in game issue within maya.
Your normals seem to be the issue. What's causing the issue I'm not sure. If i reverse the Bump Depth i get the opposite effect where the previously unshadowed areas become dark and the dark show up correctly.

How did you create the normal map?
I desaturated the texture then changed the color levels.
 
Oh. I don't have access to Maya at the moment but if i understood what you did correctly then maybe your normals are the issue.
What you did is not the correct way to create normal maps.
Desaturating the image was (partly, depends on the situation) correct, but the colour level change is where you went all wrong.

Normal maps can be created one of several ways. Easiest is photoshop but it is quicker done with actions. Google "bump map to normal photoshop".
Maya can also create normal maps, but that would not work in here as your model is too low poly. (You need a higher density mesh with all the details and a low poly to transfer said details as a normal map)

Desaturation is used to create bump maps, where a 50% gray is base level white is up and black is down.
I remember your textures, i assumed you used layer effects to create the bevels on the panels etc. That is also wrong (sorry)
Bevel in photoshop or similar software creates natural highlights/shadows to show height/depth, when you desaturate the image you will get white and black edges around your panels/details which will not work correctly as a bump map (and converts just as badly into a normal map). Just convert all those large panels into solid shapes. Keep in mind that the closer it is to white the more up it will seem and closer to black the lower it will seem.

Best practice is to remember to keep your Diffuse texture maps as just colour information with no highlights etc. Use bump/normals and specular maps to deal with the rest.

Sorry if this is way to much info, and it might not even be the real culprit. But your normal maps were definatly created wrong.

Edit - I'm also really bad at explanations...
 
Oh. I don't have access to Maya at the moment but if i understood what you did correctly then maybe your normals are the issue.
What you did is not the correct way to create normal maps.
Desaturating the image was (partly, depends on the situation) correct, but the colour level change is where you went all wrong.

Normal maps can be created one of several ways. Easiest is photoshop but it is quicker done with actions. Google "bump map to normal photoshop".
Maya can also create normal maps, but that would not work in here as your model is too low poly. (You need a higher density mesh with all the details and a low poly to transfer said details as a normal map)

Desaturation is used to create bump maps, where a 50% gray is base level white is up and black is down.
I remember your textures, i assumed you used layer effects to create the bevels on the panels etc. That is also wrong (sorry)
Bevel in photoshop or similar software creates natural highlights/shadows to show height/depth, when you desaturate the image you will get white and black edges around your panels/details which will not work correctly as a bump map (and converts just as badly into a normal map). Just convert all those large panels into solid shapes. Keep in mind that the closer it is to white the more up it will seem and closer to black the lower it will seem.

Best practice is to remember to keep your Diffuse texture maps as just colour information with no highlights etc. Use bump/normals and specular maps to deal with the rest.

Sorry if this is way to much info, and it might not even be the real culprit. But your normal maps were definatly created wrong.

Edit - I'm also really bad at explanations...

Sorry for not responding earlier but I had been busy IRL recently. I have made changes according to what you say is the correct way and prior to exporting the textures in photoshop the layers look like this (cropped image from Photoshop ignore the grey backgrounds):

Diffuse: https://i.gyazo.com/c735dbd23b2135eed31f7ebeb530d0ad.png

Normal: https://i.gyazo.com/0ba9521ac860191f537449ef0fe63f95.jpg

Specular: https://i.gyazo.com/b90f19998334fd16e3064b6570722dfc.png

However once I use the exporter tool to export the DDS (script one from here) it looks completely different:

Diffuse: https://i.gyazo.com/249c4b4b3020456c23844848f2171b89.png

Normal: https://i.gyazo.com/6e812b31653fa7c91662dd8a1f875a82.png

Specular: https://i.gyazo.com/9f16db444c05edc15236fb7708a55f0b.png

And the shadow issues are still the same, any ideas what to do?
 
However once I use the exporter tool to export the DDS (script one from here) it looks completely different:

What you see in maya it's correct. This is because you have 3 (up to 5 ) maps combined in 3 dds files and besides the diffuse maps, every channel in normal/specular is used to store different informations

For example the xxx_normal.dds file contains also the "emissive" map information. Because you probably didn't create an emissive map in photoshop (neithed do I, it's not required to have thing working & good looking ) those information are not stored so the "yellowish" aspect of the dds.

Besides this, you have to play (struggle) a lot with photoshop to have the correct specular layer. (some parts are very dark: no reflection at all? A ship is made of metal so it should not be completely opaque. Also what shader are you using?)

You can just launch the stellaris previer, if you only change dds, and want to check the results. You don't have to re-export all the stuff.
 
Last edited:
About specular maps:

1. convert the specular map to greyscale: colors are misleading
2. in the specular maps dark=opaque light=polished, keep this in mind. For example cotton = dark specular map , polished chrome= light specular map
3. you could selective change luminosity in different parts of the texture (if you know where it will be applied) or generally avoid too dark / too light
4. a dark texture with a dark specular map means something dark and very opaque. On the opposite , light+light means clear and very polished: a good start is to take the inverse of the diffuse texture, to balance the two things
5. yes, create a good specular map can be a PitA ...
 
Last edited: