April 18th, 2023 Livestream Q&A: Indestructible trees, why?

April 18th, 2023 Livestream

Q&A: Indestructible trees, why?


This question was possibly duplicated with a more recent answer: February 13th, 2024 Livestream Q&A: Are there going to be any more destructible items on the map? https://www.youtube.com/watch?v=wK-DRyFtyTI

Suggested Wiki Reference Code <ref name="yt-5NBgetrxtpw,3486.688669,3902.541813">[https://youtube.com/embed/5NBgetrxtpw?autoplay=1&start=3486&end=3903 YouTube - April 18th, 2023 Livestream - Q&A: Indestructible trees, why?]</ref>



what was the thing we were talking about before we started doing this [ __ ], well I actually have another question which is sort of relevant to this or a thing to yeah I'm going to talk about, so one other thing that, people run into is indestructible some trees are indestructible right yeah that should be, now is the system for that the same system that it has been for many years that- I made, where you have to, apply the destructible type to certain foliage types right and and so that so the way the way that and it's a weird system and it really is it doesn't really make sense why it needs to be this way, unless you Dive Right In but the way the the way that this works is because these foliage assets are they're all like grouped into one thing and and so so they're it's very hard to physically test what tree is in front of me and you have to do it within the the instance it's kind of weird, and and so the only way to make trees destructible is on their individual foliage types you can see here there's like little bushes, there's like red bamboo trees there's green trees you need to go in each one of those asset types, and you you can apply certain, like, what what are you like settings tags yeah Collision tag kind of thing whatever like certain like objects markers to them basically one of them is whether or not they can be destructive destructible parameters parameters is the work I'm looking for thank you, and and you can also apply like whether or not it can be picked up things like that and so whenever you come across like certain type of tree that should be should be able to be cut down but but it can't be it's because it's missing that tag and again like as you can see there's so many different types of foliage and I think it's not even we can't necessarily just apply it to each different type of foliage because different areas use different collections of foliage and you need to apply them individually to those or something like that so it's very easy to to miss like one thing here and there and then you get one area with one type of tree that can't be cut down anymore, yeah yeah and it's also something like if it's an asset that we're not sure we're gonna keep or if it's an asset that might be used in different areas then we probably don't really change the parameters until we're very certain like how it's going to be used and where it's going to be used and it's kind of, like, probably a big pass that will do kind of once we've wrapped up most of our biomes where we go over all of the assets and make sure all the settings are correct and all the collisions correct and all that kind of stuff so, okay here's a good follow-up question and here why aren't all trees cuttable by default and that that makes perfect logical sense but the way that these foliages work under the hood, intuitively it is how you think but but, like actually in the implementation in Unreal Engine how it works it does that doesn't make sense like because Unreal Engine doesn't know what a tree is there's just foliage right and foliage can be rocks in in terms of unreal how Unreal Engine considers things a foliage can be anything so there's no there's no way to define what is a tree what isn't a tree all we can do is apply foliages to how like palette and paintbrush and then tell Unreal Engine which ones are destructible trees and which ones are collectible bushes or whatever after the fact there's no way to really Define what isn't isn't a tree beforehand so like even though that like yes that makes sense and we wish it was that easy that's just simply not how it works under the hood and so we we can't consider it that way, yeah because one also one important fact to this as well is how the foliage Works in our game compared to how they work in a real engine because the foliage system that we have in satisfactory is isn't like is a custom solution and we've made for satisfactory because the thing you mentioned Jace where like when I click on this it it highlights all the bushes right because this is a big instance so when we render the foliage we don't render like one thing at a time we bulk them together and send like the data to the dpu we like render all this stuff which also means that each individual tree is not actually where it is no there's no object there like we can see this tree is at this location in the on the map but there is no game object of this plant that doesn't exist it's that's a hard thing to wrap your head around but that's how it works yeah for optimization reasons, and in our game you can walk up to this specific Bush and pick that specific instance up and we have had to make a system and I we've remade that system three times now, for various I've had to go of it you've had a go of it right yes, and and now in up to date there's going to be a new version of that folder system as well, where we sort of detect like which footage did you pick up and the reason why we've made it reworked it so many times is because of multiplayer because, we need to be able to tell from the server like which which Bush did you pick up the problem is that all these instances are not deterministic on client and host, they don't have like a like this specific Bush doesn't have the same ID on host and certain clients, so we have had made to make a system that kind of like figures out which bush is which Bush and then the added problem you mentioned where like you also need to be like when you're looking at the bush so we can highlight the bush that's another problem and not the entire instance of all the bushes exactly because in default in real engine if I want to highlight this particular Bush here it highlights the entire instant bulk that's why we used to have that issue way back when especially on multiplayer where people like, on client I can't pick up bushes and trees and I can understand from a player's perspective like this is like a basic thing why can't I just pick up this tree and it's like actually it's really not that basic it's like a complete pain in the ass it's like one of the most complex distance we have in the game yeah yeah it's like such a small part in the overall game really and the benefit of like dealing with this kind of stuff is that it's very performant but yeah after it because it makes all these assumptions to become more performant it also means that it's, harder to work with because it makes certain assumptions that things work a specific way when and then we go against that yeah because I think I wonder if I can do this, I want to Nuke the planet exactly I can't remember what the command is, whatever ignore that yeah so so, yeah the foolish system is is kind of custom made for our game, and, that's that's also one of the reasons why it's it's a bit tricky for us to just we can't replace it with nanite because it's our own folder system it doesn't go with the way epic has made it, cool there were something else on