1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.32 Bug Reporting thread
    Solutions and more information may already be available.

Materials not saving

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by HighDef, Sep 6, 2018.

  1. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    ...So now, I was playing Mount-coo or whatever, B25Mitch's new map, loaded up both wet and dry. After maybe an hour, I loaded up Douglas Rally (My map) and the textures work. I don't know why, but I'm guessing it's a specific map that's messing up the gate texture...
     
  2. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    798
    Yeah that damn gate texture kept resetting on me too, I've ended up making my own. Very frustrating when you have the gate model, textures, AND materials.cs in one directory and yet it still reverts somehow!
     
    • Informative Informative x 1
  3. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    Hi there !

    Maybe a stupid question, but with all the missing materials that anyone encounter all the time... At least it will maybe help someone else ;3

    Anyway, did you try to write the exact path in the material.cs ?

    So you go from this

    singleton Material(douglas_rally_start_finish)
    {
    mapTo = "race_rally_start_finish";
    diffuseMap[0] = "race_rally_start_finish_d.dds";

    normalMap[0] = "race_rally_start_finish_n.dds";
    specularPower[0] = "1";
    pixelSpecular[0] = "1";
    diffuseColor[0] = "0.992157 0.992157 0.992157 1";
    specularStrength[0] = "0.588235";
    materialTag0 = "beamng";
    materialTag1 = "Race";
    materialTag1 = "rally";
    };


    to this

    diffuseMap[0] = "levels/your_map/art/exact_folder/race_rally_start_finish_d.dds";
    normalMap[0] = "levels/your_map/art/exact_folder/race_rally_start_finish_n.dds";


    (with all the other lines OC)

    Cause I've found a lot of these textures without their paths and putting them correctly totally fixed all my missing materials.

    Also, double-check in-game just after if your game didnt replace your "race_rally_start_finish" by a random "race_rally_start_finish_mat(0)" that will not work, and if yes then re-replace it by your good one before saving, exiting, saving changes in notepad and relaunching the level :3

    I hope it will help :3

    Bonus tip : change one of the material tags for your missing materials, put your nickname instead or the name of your map, so you will find them even faster in-game to make quick fixes if needed :3
     
    #23 TarTi, Mar 2, 2019
    Last edited: Mar 2, 2019
  4. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    I might have tried this before, but something else might have been wrong. Nothing bad for trying again.

    @TarTi Nope, like I guessed. The "race_rally_start_finish" is used on the banners, not the actual metal poles or whatever they are. There's nothing in the files, or in mat.cs that maps these, nor any errors pertaining to the poles. Also, doing that apparently causes the banners to go no mat.

    screenshot_2019-03-02_14-59-59.jpg

    Forgot to put /shapes/ there, so the textures should be good for the banners. Still no idea about the pole.
     
    #24 Danny Werewolf, Mar 2, 2019
    Last edited: Mar 2, 2019
  5. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
  6. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    Oh, I didn't seen your post update sorry..

    Here is my version of the same gate where I can also modify the banneers textures by editing their .dds in IrfanView, that were also displaying "No Material" instead before :

    BeamIssue2.png

    As you can see, the path for my banneers is in shapes/race/

    Can I see your path and your code if it's still not working ? :3

    EDIT

    Just seen that in my screen my "italy_bld_trim_metal" was not working anymore, was looking good everywhere except obviously on my buildings and my boats. Had to check in the shape editor, "mat" tab (bottom right of the screen) to find the "unampped" material as I said in my tutorial.

    I replaced it by the exact same finally, saved the changes, quit my level, save changes in notepad and check into it if the changes were good and it worked. But it looks like I touched too much stuff while doing my tuto or random bug that can happen sometimes...
     
    #26 TarTi, Mar 2, 2019
    Last edited: Mar 2, 2019
  7. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    The path that's in Material.cs? And what do you mean by the code? Nor do I understand Material Editor :/
     
    #27 Danny Werewolf, Mar 2, 2019
    Last edited: Mar 2, 2019
  8. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    In the editor, I will pick the name of my wrong material using the Material Editor (F4). Sometimes, everything looks good here. So you can come back on Level Editor (F1) and then click on the tiny 3D cube-shapped button in the object information panel on the right or in the main menu

    BeamIssue21.png

    Then in the Object Editor, check the "Mat" tab in bottom right of the menus and get the name of the unmapped mat

    BeamIssue22.png

    After that leave your game, go to Notepad++ and open the concerned Material.cs (you have the path directory in the Level and the Material Editors to know where to search). You can now verify if the Material have the good path to their different textures (here, just a diffuse and a normal maps)

    BeamIssue24.png

    Then, save changes in Notepad and go back to your level. If the texture is still not there, check again the object and be sure the game didnt replaced it by a incorrect "clone" from nowhere (like with "_mat(0)" at the end of the correct Material) and if its the case, re-replace it by the good one, same name than the object face using it.

    BeamIssue23.png

    Don't forget to hit the tiny save button, save level, click "resave everything" and close your level. Notepad will recognize changes, apply them by reloading the page (the "code" i was talking about).

    Check at the bottom of the reloaded modified material.cs file, You should see the material we just edited. If everything looks good here, it should be okay next time and times.

    Also, i just seen that you werent talking about the banneers anymore but the pole ? So what it is ? the "metalplates" in the game ? or the "concreteleaks" detail ? Cause in your screen except for the banneers everything's looking good ?

    Sorry to miss some details of your issue, I'm so trying hard to post asap and don't make language mistakes that I can misunderstand what you're talking about :/
     
    #28 TarTi, Mar 2, 2019
    Last edited: Mar 3, 2019
    • Like Like x 1
  9. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    Sorry about that. In the post above, that was when I tried doing

    diffuseMap[0] = "levels/rallystage/art/shapes/misc/race_rally_start_finish_d.dds";

    normalMap[0] = "levels/rallystage/art/shapes/misc/race_rally_start_finish_n.dds";"

    But those two things are for the banners, that got me a bit confused. The part that goes no-texture after playing some other maps before loading up my map (Douglas Rally) is ind_metalplates, the texture for the poles. The banners are always fine, as they somehow map to the correct spot.

    I do have some forest items, like the dead and chopped douglas_fir trees, where the ends show no texture. But I'll go ahead and fiddle with that some time.

    Here's my mat.cs for misc, where the gate is. Might help.
     

    Attached Files:

  10. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    Ahah yea, I just rode the whole topic again to be sure and finally understood your issue.

    You should take a look to my tutorial, at the end, on the screens, I had made a tip for beginners in Materials about different textures for one material to don't be confused anymore ;3

    So first, here is my conclusion about the rallygate :

    The banneers needs the correct Material to work correctly, with the good path and all the stuff, the pole is different and isnt asking for textures, it just needs a blank Material and a color. You can put textures on it but there is already a Material associated to it and maybe some others, so if you don't want to modify also the .dae files, you just have to let it without any Material.cs information and just give it the blank texture it wants with the color YOU want (but this will change the color for any other object will use this blank textures Material).

    Images :

    BeamIssue25.png
    BeamIssue26.png
    BeamIssue27.png

    And now, let's check your Material.cs :

    BeamIssue28.png

    You have a lot of incomplete or inexistant paths for your different textures, and that make them works correctly one time out of ten, cause the game try hard to find them.

    For your Misc Material.cs, almost all of your texture paths should be "levels/rallystage/art/shapes/misc/texture.dds". It's not supposed to be let blank like these lines :

    singleton Material(race_wood)
    {
    mapTo = "race_wood";
    diffuseMap[0] = "wood_d.dds";

    Check if you have the "wood_d.dds" in your Misc folder, and if yes, your line have to be :

    singleton Material(race_wood)
    {
    mapTo = "race_wood";
    diffuseMap[0] = "levels/rallystage/art/shapes/misc/wood_d.dds";

    Complete all the paths following my tuto and a lot of things should be better, and you will better understand how a game displays cool textures :3
     
    #30 TarTi, Mar 3, 2019
    Last edited: Mar 3, 2019
    • Informative Informative x 1
  11. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    Edited file. Btw, does it matter which way the slashes go? I went ahead and make them backwards because why not. Seems to work in other places anyway.

    I'll go ahead and check all the Mat.cs's I can find.
     

    Attached Files:

  12. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    Aaaaah your file looks nice now :3

    I'm still surprised that all your stuff is in /misc/ when it's in /race/ for me, but it's probably not from the same level, so.. why not. Just per curiousity, which level are you from ? :3

    Yup, you have to check any .dds line of any material.cs using some of them ^w^'

    After that, you'll be able to -if you want to, of course- modify the .dae (and the .dds if you're also graphist) and make your own textures for your own materials in parts of your even-more-custom-made-world :3

    Oh and for the slashes, I don't know, never tried, don't really want to ahah, my map is just fixed :p

    Also, I still have one Material issue sometimes, isolate cases, still not sure it's not my fault, so.. I'll look at it. It concerns Concrete_Sidewalk and another Metal-looking Material as I told above.

    Hope all your materials will soon go back to normal °w°

    EDIT : re-rode your new version of Material, you missed the container ones and you're good :3

    singleton Material(container_01_a_containers_01_a)
    {
    mapTo = "containers_01_a";
    diffuseColor[0] = "0.996078 0.992157 0.992157 1";
    doubleSided = "0";
    translucentBlendOp = "None";
    diffuseMap[0] = "path/here/please/owo/containers_01_a_d.dds";
    normalMap[0] = "path/here/please/owo/containers_01_a_n.dds";
    specularMap[0] = "path/here/please/owo/containers_01_a_s.dds";
    };


    Lines 186 to 192 ;3

    I cant fix it for you, cause the path can be different as earlier ;3
     
    #32 TarTi, Mar 3, 2019
    Last edited: Mar 3, 2019
    • Informative Informative x 1
  13. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    Right. I finished changing all the mat.cs paths and stuff. Hopefully I didn't miss a slash somewhere, corrected that multiple times lol. Thanks for the help!
     
  14. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    Ahah niiiice i'm glad for you :D Everything's working fine ? :3
     
  15. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    ...Uhh...I think I did a bad...
    screenshot_2019-03-02_21-13-32.jpg
    It's autumn now.
     

    Attached Files:

  16. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    Oh, I see, it's probably my fault, I should be more precise I guess..

    If none of your materials were showing a complete path BUT working in-game in one material.cs, so let it as before, and this the case for roads and trees, like I said in my tutorial > https://www.beamng.com/threads/sharing-my-no-material-solution.61222/

    So sorry i didn't repeated it to be sure, but yea, I also seen that roads were showing the good path but were staying "unmapped_mat" like this :

    singleton Material(Road_01_tracks_large_decal_01)
    {
    mapTo = "unmapped_mat";
    diffuseMap[0] = "levels/bzh_archipel/art/From_Italy/road/road-01_tracks_large_decal_01.dds";
    useAnisotropic[0] = "1";
    castShadows = "0";
    translucent = "1";
    translucentZWrite = "1";
    materialTag0 = "beamng";
    materialTag1 = "decal";
    materialTag2 = "RoadAndPath";
    specularPower[0] = "14";
    normalMap[0] = "levels/bzh_archipel/art/From_Italy/decals/flat_n.dds";
    };


    so your road will be good again ; and for the trees, that's weird, I have this for mines

    singleton Material(cork_oak_trunk)
    {
    mapTo = "cork_oak_trunk";
    normalMap[0] = "levels/bzh_archipel/art/From_Italy/shapes/trees/trees_italy/cork_oak_trunk_n.dds";
    specularPower[0] = "1";
    pixelSpecular[0] = "0";
    specularMap[0] = "levels/bzh_archipel/art/From_Italy/shapes/trees/trees_italy/cork_oak_trunk_s.dds";
    doubleSided = "0";
    alphaTest = "0";
    alphaRef = "85";
    materialTag0 = "beamng";
    materialTag2 = "Natural";
    materialTag1 = "vegetation";
    colorMap[0] = "levels/bzh_archipel/art/From_Italy/shapes/trees/trees_italy/cork_oak_trunk_d.dds";
    useAnisotropic[0] = "1";
    detailScale[0] = "0.200000003 0.200000003";
    detailNormalMap[0] = "levels/bzh_archipel/art/From_Italy/shapes/trees/trees_italy/cork_oak_trunk_n.dds";
    };


    So try to get your previous code or just copy the material.cs from the map you're coming from and replace the No Material one with it.

    I can see that you put your name into these file names, did you also modified the targeted file name ? Cause if not, this is your issue.

    It won't be autumn on your map anymore, don't worry about it >:3

    Yknow what ? Just zip your level folder and send it to me ;3 I'll check that
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice