So, I’ve been wondering about how in the world adopt me and bloxburg load in water that can only be made with the terrain tool. But to my knowledge, you can’t generate or degenerate terrain assets. Or can you? So, any answers?
Some loose examples of terrain manipulation:
terrain:WriteVoxel()
terrain:FillCube()
terrain:FillRegion()
WriteVoxel() requires two 3D arrays and a region, the arrays are a materials array and an occupancies array.
FillRegion requires a region and a material.
FillCube requires a CFrame, a Vector3 size, and a material.
Any regions used with the terrain system must be ran through ExpandToGrid(4) or they will NOT work. The 4 is the resolution used, it’s hard coded to only accept 4 right now.
example,
terrainEx = Region3.New(Pos1, Pos2)
terrainEx = terrainEx:ExpandToGrid(4)
These might not be accurate w.r.t. syntax because I’m in the middle of a Zoom meeting. I have been working extensively with terrain for the past few months. Check my profile for a demo video of an older planet generator. I have made a new one that runs way, way faster, though. The quickest method I’ve found is to use WriteVoxel but it is a complicated method. FillCube is easy and a lot more forgiving but depending on how you use it, it will call FillCube many times vs WriteVoxel ONCE, and calling it many times has the server ping raise beyond considerably (9000ms) for about half a minute or so, which IMO is probably acceptable during stage loading.
Ok. Makes sense. Thanks for at least an example.
I’d assume they use the Streaming API - manually “loading” and “unloading”, which is just creating new terrain, seems inefficient and expensive.
Roblox’s Streaming API does not handle unloading though, which is really annoying and ruins half the point of even using a streaming API.