Normal map shading comes out wrong in model editor

Willkommen in der Transport Fever Community

Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.

 

Die Registrierung und Nutzung ist selbstverständlich kostenlos.

 

Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.

Das Team der Transport-Fever Community


  • When I apply the normal map to my model in the model editor it comes out looking like this:


    Different parts of the model have stark differences in shading, similar to how it comes out in blender when 'non colour' is not enabled in the normal map node. Is there any way to fix this in the model editor?

  • This looks like this effect:


    It occurs at a certain angle to the sun:


    Roughly speaking, the light only grazes the affected areas.


    Edit: My original answer was a bit short, please try this:


    It's the light/shadow calculation, your texture rather less.

    Einmal editiert, zuletzt von Relozu ()

  • Is your normal file a dds file and are you sure you normal file uses the right compression? It should be 3Dc for nomal map. See at the bottom of this page: LINK: TpF2 Wiki DDS-Files

    This has to be done when exporting the normal file. In the model editor you can check and change material settings. At the moment I use this settings for nomals:


    I tried exporting it again as a 3Dc but it still comes out with weird shading, (originally had it as a .tga file).


    I have made sure all the settings are the same as you showed, also this view should highlight that it is a actually a shading problem and not just the game's normal lighting effects.


  • originally had it as a .tga file

    Do you mean the .tga format shows the same effect or is the .tga file working correctly?


    Have you checked that the normals are all pointing in the right direction (check blender or activate the "..render normals.." in the model editor options)?

    Are you using a metall_gloss_ao map already. Maybe you could remove this just to be sure the normal map is the problem.

    Can you make a screenshot of your nomal map file or upload it here (especially looking a the front it looks like an extrem ao)?

  • Do you mean the .tga format shows the same effect or is the .tga file working correctly?


    Have you checked that the normals are all pointing in the right direction (check blender or activate the "..render normals.." in the model editor options)?

    Are you using a metall_gloss_ao map already. Maybe you could remove this just to be sure the normal map is the problem.

    Can you make a screenshot of your nomal map file or upload it here (especially looking a the front it looks like an extrem ao)?

    The .tga format showed the same effect, the first image I showed was using a .tga file.


    Here is a screenshot from blender, as you can see all the normals are facing the right way



    I have changed out the metal gloss map and it did not change anything. I cant seem to remove it because I am using the PHYS_TRANSPARENT_NORMAL_MAP and metal gloss is included in this and there arent any settings which disable this feature.


    Here is the normal map I am pretty sure there is nothing wrong with it but I could be wrong:


  • I have had such an effect a few times when the normal map hit a snag during export and ended up in the editor corrupted. You likely know this effect when You export a texture file while the model receiving it is open in the model editor with the auto reload function active: sometimes, the model ends up all black or with otherwise bugged up textures.


    If Your normal map was saved under a wrong subformat, it would likely cause a crash of the model editor, so this is likely not the case here.


    Do try the following:


    - Check to see if the .mtl calls for the right normal map in the correct directory.

    - Then, either close the model editor, load a model NOT using the normal map or disable "Auto Update". All of these actions will take the model editor out of the equation here.

    - And this done, re-export the normal map from Your picture editor.


    Now open Your model again in the model editor. It may well be that it now looks much better.

  • RedEagle Yesterday I edited my answer, did you see that? So is the angle of the light the problem or something else?


    Edit: Ok, I think now I have understood your problem exactly... my mistake.

    Some areas are displayed too dark, regardless of the shadows...

    A screenshot with a different angle of the light would then probably be interesting anyway, but probably the problem still exists. Then I still have to think about it, at the moment I can only think of smoothed parts for such effects.

    2 Mal editiert, zuletzt von Relozu ()

  • Thx for the additional information. You are right. It looks all good. Lets hope DH-106 suggestion helps as I am running out of ideas.


    Just one think you may can check. In the screenshot in your post #4 we see the path to the normal .dds-file is "models/vehicle/train..." But the .mtl file is located in "fbx_Import/...". To follow your folder structure I would have expected "vehicle/train...". This must not be an error as the paths can be used as you like but maybe worth a check if the file structure of your mod (.mdl, .mtl) really points to the correct files/paths.

  • I have unfortunately exported it multiple times in both .tga and .dds formats however it is not fixing the issue. Would the way you export it from blender be an issue? Are you supposed to just straight export as .fbx or do you need to export as .obj first and then reimport and then export that as .fbx?


    This is what it looks like in blender, with the colour space set to sRGB:



    As you can see the pattern of distorted shading is exactly the same as it is in the model editor. However I can just set the colour space to non colour and it fixes but there is nothing I can do in the model editor. Is it more likely that this is a blender issue do you think?

  • I have never had such an issue in Blender, but this is at least partially due to my models taking a completely different route to the game than what You outlined there. I build in Blender 2.79, export via the old TPF1 exporter, write the animations by hand, transfer to 2 and finally paint the model using the model viewer/editor. So my expertise with newer Blender versions is rather limited, I don´t use those colour space functions You mentioned.


    The normal map You showed above does not seem faulty at first glance, and since You have succeeded in getting paint on the model via a presumably .tga file, there is most likely no RLE compression involved either. And if the results are the same with .tga and .dds, a wrong .dds subformat is probably no issue either.


    One thing that sometimes causes odd shadings, not connected with normal maps though, is the smoothing function. Blender is rather robust when it comes to smoothing sharp angles, this tends to cause weird shadows around cutouts, doors and the like. So smoothing is best used together with the edge split. Could that be worthy of further examination here?

  • Is use the direct fbx export (based on this guide: LINK: steam / fbx export) without any problems (2.79 and partly 2.92). But I don't use nodes nor colour/texture settings out of blender at all. I only assign different material names with dummy textures. All the assignments/settings for the final TPF2 textures/materials I do in the model editor or manually in the .mdl, .mtl files.


    So the cause for this effect maybe can be found in this blender colour/texture information that maybe are included in the fbx export out of blender (just a guess as I don't have experience with the way you work in blender and we can't see any errors with your model)? Could it be worth a try to export without all the texture/colour settings and do the rest in the model editor?

BlueBrixx