Hi there, a new Update is out with a new feature: Convert TSStatic Assets to forest items You can load a zipped map and then convert your static assets placed in the scene tree to forest items. After selecting a level your scene tree is shown in the tool to select the items or folders you want to convert. Only assets with an identical scale on all axis and an existing rotation matrix will be converted.
It works quite well. But the big question is why you should convert your static assets from the scene tree to forest items nowadays. I just examined Johnson Valley. It has around 16.000 assets in the scenetree and only "real" forestitems like trees and bushes. It still has a good performance even in the editor. See this discussion: https://www.beamng.com/threads/converting-placed-meshes-to-forest-items.86837 Maybe I coded it for the trash... I just converted Johnson Valley with my tool and perhaps I do a performance comparison on it.
I was interested for a WIP map where I could convert ~1000 objects into forest items. It would work well since out of the 1000 instances there are less than a dozen meshes used. My first thought though was if those were all part of theForest it would be nice to use the delete\paint brush to handle any future changes. I did take a look at that post. And you make a good point in the comment above, there probably isnt really a need to convert statics into forest items performance wise. Either way its still the same old static mesh whether its in the scenetree or part of theForest. Regardless, still a cool tool.
You are right. The performance between the two is almost exactly the same, although the difference between the two could have gotten larger or smaller with the updates. When I first made that thread I was making an assumption off of a really of forum post that showed forest items were better. Nowadays, the forest tool is better if you want to manage a large number of randomly placed/sized/selected meshes. The only thing to look out for with the forest tool is that it is fairly easy to overlap meshes and not notice it since there isn't really a way to check how many meshes you have selected. It is still fairly niche, but I think a good tool would be one that could get the location data of the meshes on a map and identify those of the same type that share coordinates or are very close to sharing them. For instance, on that post, a user identified an instance of several copies of one mesh in one spot on West Coast, USA.
Hi Alex, You already know I'm a fan of the tool, but I tried to reduce my Somerset map today and it killed some of the textures. I wondered if I did something wrong. Could you try it at your end at some point? (apologies if that is a big ask). It broke the normals on the construction machinery, and I wonder if that is because of how I copied them across originally.
I'm glad that you ask! I need input like that in order to make my tool better. I would like to debug the problem. Should I use the actual version from repo or do you want to send me a copy of your current project status? Today I have some time to do it.
Great. Thanks! The version I used is here: https://drive.google.com/drive/folders/1dmfUR5J1caJMf6EO6B6_o9PiVW6mHE-b
Just downloaded it. You can delete it. I do check now. --- Post updated --- I just did a quick check. You have some duplicated materials in your project. They have the same name but different paths. One of the duplicates point to your project the other to the westcoast level. For my tool at the moment the first one wins. It thinks it has to use the westcoast one and deletes the other one out of your level. I have to write a validation for that. You should delete the wrong duplicates. For analyzing those problems Visual Studio code is your friend. just search for the material name or the texture name and you find the problem quickly.
I suspected it might have been an issue at my end. Good to know! Thanks for checking. For future maps, I will use the tool at the outset, that will help a lot.
I'm pretty sure BeamNG handles duplicate materials like my tool. Either the first or the last one wins. You are sure that you have copied the material but the one out of the vanilla level is taken and after a new BeamNG release your textures might be broken. Duplicate materials are a bad thing Best! Alex --- Post updated --- I did a small cleanup test with your level and the shrinker works. Almost nothing in the log anymore.
I thought about that problem with duplicate materials and came to the conclusion that I have to solve it. The whole reason for that tool is that you can copy stuff like mad to your map and later delete it out if not needed. I did some coding today which deletes out the duplicate materials from the material.json which most probably dont't work: Most obvious keepers are materials with exisitng texture files in your custom map. If no duplicate material has texture files in your project, no duplicate material is deleted. There is only one problem I have with your map. My tool deletes a couple of textures in Somerset which are related to decals. My tool searches for usages of materials. The usage of decal instances is normally found in main.decals.json. Yours is empty. For example: The decal sawdust_d makes problems in the logfile. But if I search for sawdust in your project it is defined as decal but never used. Neither as decal nor materialwise in an asset. A nice thing would be if you could test my new version with your project and visually check if the decals are really missing somewhere in Somerset and then you could give me a hint. On the other hand you can just untick the files mentioned in the log in my tool and you should be fine. Cheers! Alex
Such a legend. I'll take a look. It might not be too soon because of work, but as soon as I can. Thanks!
New Version is out: What's Changed - Scanning of facilities - Scanning of Minimap in info.json - Exclude files like depthmap and heightmap from root - Repair of corrupted jsonfiles or jsonfiles with duplicate keys while reading or when the tool has to modify a file - Seperate logging of warnings which help you to repair your jsonfiles. - Optional Cleanup of working directory when closing the Application. Even if you don't want to use any functionality of that tool it makes really sense to go to the Map Shrinker and start analyzing your level. A lot of stuff is logged and helps you to make your map better! --- Post updated --- Today I must agree with you. There was an error which popped up when source and target files are in different folders using asset copy. I fixed that. Additionally the tool now asks to cleanup folders when you close the application. Shame on me
New Update is online. It seems that version 0.30 is a bit more strict checking duplicate mods in your mods folder which leads to an error if you have the same mod_info folder in two different mods. My tool now deletes the mod_info folder in the copy of a renamed map. If you decide to upload your renamed map to the official repo the mod_info folder is generated new anyway.
I did a small update on the tool: Version 1.0.7 (2024-01-06) - Parse json with two commas (empty property) -> west_coast_usa\facilities\dealerships.facilities.json - Write dedicated logfiles for errors and warnings - Vanilla level selector in mapshrinker (for easier testing on my side) Version 1.0.8 (2024-01-06) - Check if material files linked to vanilla map files exist in vanilla map If you use materials with a link to a vanilla map without copying the textures to your mod level and BeamNG gets updated you can see in the logfile MaterialFilesNotFound.txt if a file might be deleted in the vanilla map after analyzing your level in the map shrink feature. If you have problems with the tool you can send the now written errorlog to me. Best! Alex
It rendered my map to game crash. It ran fine before shrinking. I don't know why - didn't investigate till yet. No alarm at all but something isn't tough enough...