1.5 WIP Terrain Materials Not Future Proof

Discussion in 'World Editor' started by Philipo98, Oct 27, 2021.

  1. Philipo98

    Philipo98
    Expand Collapse

    Joined:
    Jan 2, 2014
    Messages:
    47
    Hey,

    I got the following problem, I thought I've seen a post already about that, but I cannot find it.

    Is there a fix for this 1.5 Materials Problem?
    Says don't use it, I use it all the time.


    Screenshot2021-10-27180711.png

    Greets
     
    #1 Philipo98, Oct 27, 2021
    Last edited: Oct 27, 2021
  2. Blkfxx

    Blkfxx
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    70
    There used to be a save button for when you changed stuff, that's gone and now that message is there. I can only hope that means pbr support coming for terrain materials.
    If you need to change anything if has to be done manually in the json for now.
     
  3. Philipo98

    Philipo98
    Expand Collapse

    Joined:
    Jan 2, 2014
    Messages:
    47
    That's how I'm doing it right now. I just had to write a little tool to create PersistentIDs, because they caused me a lot of problems.

    So I know in any case that I am not the source of the problem. Thanks :)
    According to this, the problem will probably be fixed in the next update.
     
    • Like Like x 1
  4. geobeck

    geobeck
    Expand Collapse

    Joined:
    May 1, 2014
    Messages:
    217
    Could you post that tool? I've been changing one or two characters to create new persistent IDs, and that may be one of my terrain issues.
     
  5. Philipo98

    Philipo98
    Expand Collapse

    Joined:
    Jan 2, 2014
    Messages:
    47
    I uploaded the tool on a Webserver. Try it out, if there are any problems, contact me.
    Accessible via. Web: ng-webtools.de
     
    #5 Philipo98, Nov 2, 2021
    Last edited: Nov 5, 2021
    • Like Like x 1
  6. geobeck

    geobeck
    Expand Collapse

    Joined:
    May 1, 2014
    Messages:
    217
    Cool. Does it just generate a random hex-based number in that pattern, or is there more to it?

    At one point I started a material list with 00000001-0001-0001-0001-000000000001, 00000001-0001-0001-0001-000000000002... Should have space for about a bazillion materials.
     
  7. Philipo98

    Philipo98
    Expand Collapse

    Joined:
    Jan 2, 2014
    Messages:
    47
    Currently, the system does not check for duplicates. I wanted to scan the original game files and create an assigned persistentID database. This would at least prevent units from being generated twice.
    The probability of duplication is with MD5 2/2^128 I think that should be enough to occur extremely rarely.
    But to at least avoid collisions with the original game files a check would be beneficial.
     
    • Like Like x 1
  8. Agent_Y

    Agent_Y
    Expand Collapse

    Joined:
    Jul 10, 2020
    Messages:
    6,544
    The devs should release their own persistent ID generator instead of forcing us to do workarounds like this
     
    • Like Like x 1
  9. ltntai

    ltntai
    Expand Collapse

    Joined:
    Mar 18, 2017
    Messages:
    483
    I usually leave the ID lines empty, and let the game create a new one.
    Example: Copy wet asphalt from Automation map with the id "6a581f48-19a5-4130-8db0-f41f618ccecc" removed:

    Code:
    {
      "Asphalt_wet": {
        "internalName": "Asphalt_wet",
        "class": "TerrainMaterial",
        "persistentId": "",
        "detailDistance": 200,
        "detailMap": "levels/africantrails/art/terrains/Concrete-03-diff",
        "detailStrength": 0.400000006,
        "diffuseMap": "levels/africantrails/art/terrains/CS_TerrainAsphalt_Overlay",
        "diffuseSize": 1024,
        "isManaged": "1",
        "macroDistance": 1200,
        "macroMap": "levels/africantrails/art/terrains/Concrete-03-diff",
        "macroSize": 40,
        "macroStrength": 0.400000006
      },

    Add the material in editor and save. Game generates a new ID for it. Then delete the original ID-less material from the new .json.

    Code:
    {
      "Asphalt_wet": {
        "internalName": "Asphalt_wet",
        "class": "TerrainMaterial",
        "persistentId": "",
        "detailDistance": 200,
        "detailMap": "levels/africantrails/art/terrains/Concrete-03-diff",
        "detailStrength": 0.400000006,
        "diffuseMap": "levels/africantrails/art/terrains/CS_TerrainAsphalt_Overlay",
        "diffuseSize": 1024,
        "isManaged": "1",
        "macroDistance": 1200,
        "macroMap": "levels/africantrails/art/terrains/Concrete-03-diff",
        "macroSize": 40,
        "macroStrength": 0.400000006
      },
      "Asphalt_wet-34425eeb-24b5-4978-b7a3-3bf79948d174": {
        "internalName": "Asphalt_wet",
        "class": "TerrainMaterial",
        "persistentId": "34425eeb-24b5-4978-b7a3-3bf79948d174",
        "detailDistance": 200,
        "detailMap": "levels/africantrails/art/terrains/Concrete-03-diff",
        "detailStrength": 0.400000006,
        "diffuseMap": "levels/africantrails/art/terrains/CS_TerrainAsphalt_Overlay",
        "diffuseSize": 1024,
        "groundmodelName": "ASPHALT_WET",
        "isManaged": "1",
        "macroDistance": 1200,
        "macroMap": "levels/africantrails/art/terrains/Concrete-03-diff",
        "macroSize": 40,
        "macroStrength": 0.400000006
      },
     
    • Like Like x 1
  10. Philipo98

    Philipo98
    Expand Collapse

    Joined:
    Jan 2, 2014
    Messages:
    47
    Does this work for items.level.json Objects too?

    I damn need the Terrain Material Save Button, fast :p Then everything will be fine.
     
  11. ltntai

    ltntai
    Expand Collapse

    Joined:
    Mar 18, 2017
    Messages:
    483
    Haven't tried. Terrain materials have been the only ones that cause hassle sometimes.
     
  12. bembimbim

    bembimbim
    Expand Collapse

    Joined:
    Sep 26, 2021
    Messages:
    3
    does anyone know how to solve it?
     
    • Like Like x 1
  13. nekitu

    nekitu
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 18, 2018
    Messages:
    61
    Ideally we want that the users to not generate PIDs manually, the tools should do it. We are working towards an editing experience that will not involve the user touching the json files or other data files. This takes time because there is a lot of legacy code and file formats to be figured out into new ones.
    We will check the terrain material issue.
     
    • Like Like x 2
  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