Hey, I just saw your reply. Sorry for the delay. That wasn’t exactly what I was advising, but I’m glad it worked out.
Personally, I feel like you’re going too complicated. In my opinion, this is a really simple problem. I know I’ve already recommended for you to use my original (after reformatting it of course, it’s horrible otherwise) raycast solution (because of how easy and efficient it is), but I just want to push on that a bit more.
Anyways, if you still want to use ReadVoxels, this is what I meant:
is there a solution to this yet? i was making a terrain serializer earlier today, and i really need to find the terrain real size, because i figured out all of the usual methods are stuck at this mark:
Depends on what you consider a solution. I’ve found a method, although it’s a bit hacky, but it works somewhat well and it’s really efficient. NovelDev’s solution takes a bit longer (I believe it was around 20 seconds).
You can check out my idea here:
That’s what I meant when I said it only worked somewhat well. OP’s solution is a lot more accurate but takes a lot more time (20s vs 1s). You should check out some of the other ideas posted on the thread though. There’s a few with which you can greatly reduce the amount of time and make it more accurate (eg. workspace:GetBoundingBox() is not capturing all of the terrain in the game - #21 by Cxsnls)
yeah i get it, considering the terrain size is 32000 and lets say each chunk is 600, 600, 600 and its a huge amount of data being passed, its pretty ineffective, also im not sure if you can agree, but i was making a terrain into string serializer, and its going pretty good except the performance and space it takes to store the data, i was planning to post it in community resources but its just awful, do you think you might help? or not feeling like it.
I think it would help. Personally I’ve made a Terrain Serializer (or something similar) myself until I realized it was not going to finish reading all the cells for 2 hours. I decided to let it go anyways and see what it happened. It gave me a blue screen of death because my computer ran out of memory (I’m very serious). I think it’s a good idea to post it anyway to prevent others from going down the same rabbit hole.
yeah i am actually saving some space by using an open source string compressor, still does not work really good, it takes like 20 minutes to serialize 3000, 1000, 3000 voxels, around ~2600 chunks of 120,000 characters, so yeah i guess i can make it open source, will post a link here for anyone who wants to check.
Also, for reference, for other people who are planning on doing something similar in the future, the more memory you use, the slower it gets. So use less memory to make it A LOT quicker.
For anyone who’s looking for a terrain into string encoder, feel free to look here, its MAX-Optimized to compress huge amounts of data chunks, and read as much terrain as possible, in an interval of 20 mins: