1. Stuck or having problems creating your mod?
  2. GPU Fatal Error? Intel HD Graphics 620/630 Crashes? Help us solve them!
    Dismiss Notice

Unsolved Where materials are saved now?

Discussion in 'Mod Support' started by fufsgfen, Nov 14, 2019.

  1. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    7,078
    It is bit odd, I had main.materials.json as I put object to game, but I wanted to change something in material settings inside the Blender and then wanted to re-import object.

    Change did not happen, so I delete main.materials.json, I clear cache, but still old materials are in my object.

    There is no new main.materials.json created.

    There are nothing in folder that would tell anything about materials, yet in game object has old materials.

    Even I did empty whole folder and exported object from Blender to folder old materials show up.

    With materials.cs it was clear, take out the file and new one was made, but now removing file just removes the file and materials still are there.

    Clearing folder completely and exporting object with new filename seems to be only reliable way to get material changes done in Blender to get read by the game.
    Problem is that I will end up to building351 very quickly this way and about thousand test folders, so would need better way to dump anything from previous import.

    Also new format is awfully sensitive about missing commas at end of lines, which might be also good thing :p
     
  2. FLyInG 2 YoUr SoUL

    FLyInG 2 YoUr SoUL
    Expand Collapse

    Joined:
    May 31, 2016
    Messages:
    4,944
    I believe they go in /vehicles/*vehiclename*/ like presets generated ingame.
     
  3. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    7,078
    Oh, I forgot to specify that object in question is object for a map:
    upload_2019-11-14_12-1-55.png
     
    • Informative Informative x 1
  4. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    13,588
    To clarify: Blender material settings and Game material settings are two different thing.
    Collada has the ability to port some basic information, like color or texture (sometimes), but usually that's it.
    If you need to do changes to your material look, you have to do that in the game editor.


    If you already had a material file (be it .CS or the new .JSON), the game will save any changes you do in the game editor there*

    *remember that anything you save in the editor is saved in a mirror/copy inside your userfolder. For level stuff, you should look into your userfolder/level/yourLevelName folder
     
  5. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    7,078
    Textures are bit complex to me, so I use just simple colors and mostly flat shading, also I find it easiest to just put everything on gridmap so that update of BeamNG erases all I put there :D:
    upload_2019-11-14_16-18-12.png
    This path as I have relocated userfolder via launcher D:\beamNG_documents_017\levels\gridmap\art\meshes\playmat_test
    I put each object to their own folders inside that folder so I get new materials file created for each and don't need to edit materials file manually, then I can copy paste new materials to other object folders if needed or just delete contents of folder and re-export collada.

    Anyway, if I delete .json from .dae file's folder, somehow my materials are still loaded despite exiting level and reloading level, cache was clear too.

    That was so confusing, but good old delete all, clear cache, restart game and re-export from Blender seems to work best with my limitations.

    With my low level of skill I can get almost all material settings that I need with Collada, only for windows I had to add lines for transparency.

    I did try to add texture trough ingame editor, but that became such mess that I stay clear of ingame material editor, that editor and me just can't find common ground, but typing into notepad luckily works if I need a texture.
     
  6. Miss Kobayashi

    Miss Kobayashi
    Expand Collapse

    Joined:
    Sep 2, 2017
    Messages:
    101
    for now im using the cs file instead of JSON for skinning
     
  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