As a Roblox Developer that focuses on realistic & expansive maps, we are heavily restrained by the lack of terrain customization.
There are currently 23 default terrain materials on Roblox. We are able to edit 21 of these materials, but not create entirely new ones.
Some of these are even completely useless, such as “WoodPlanks” & “Bricks”, due to being stuck in an un-editable & inconvenient voxel-shape.
We would normally use five to 10 unique materials for each biome of our map, and that quickly adds up between multiple biomes, meaning we have to make sure our materials can work with various different biomes, leading to less diversity. Due to this, many of the biomes feel the same, due to re-used terrain materials.
In the picture above, we are for example using the same dirt texture that is used all across the map. We don’t have more material “slots” to diversify the material for each biome. Additionally, the sand texture that is used, is the same one employed on the beach.
This eventually means we cannot make large maps, with both deserts, jungles, mountains & tundra, since each biome requires a plethora of unique textures to look appropriate. We are forced to keep everything similar for each individual map.
In the picture above, I have created a realistic rendition of a Giant Sequoia Forest. It is using a fully custom set of terrain materials. These materials are unique to Sequoia Forests. They cannot be re-used for other biomes & that’s where the problem lies. We simply cannot create enough biome diversity on Roblox as it currently stands, with the limitations at hand.
With this level of detail, we’d be able to have a grand total of three unique biomes pr. map knowing the current material limitations. That’s to say the least, not a lot.
So, my question is mainly this:
Why can we create infinite materials for meshes, but not for terrain, which is arguably just as important?
Frustrated with this once again. It’s extremely inconvenient to make grass in different biomes colored differently, only option right now is to tween as players move between biomes.
WHY ISN’T THIS A THING??? IT DOESN’T MAKE SENSE???
Currently making an open world game and just over 2 biomes in i can already tell im gonna hit my limit soon, roblox really needs to show more support for larger open world games
Because, every voxel has to store the terrain type. More possible terrain types is more bits per voxel, and for really big maps with a lot of possible terrain types, this could be prohibitively expensive memory-wise.
I don’t think so, currently there are 23 terrain materials, you can fit 32 with 5-bits. So without creating memory problems you could store 10 more materials. bumping it up to 8-bit would allow for 256 materials while only requiring ~60% more memory.
I seriously doubt this is the reason they’re doing this
This is a really interesting question and it gets down to some pretty specific details as to how terrain rendering typically works.
For rendering efficiency it’s crucial that draw calls and more importantly GPU state switching are kept to a minimum, if you render each material individually then you could have infinite materials, but then you’d have to do a draw call per material per chunk and you’d be making all kinds of changes to render state which is way too slow, so in rendering terrain Roblox uses a method that’s pretty common, store all the textures for terrain onto texture atlases, and now you can render each terrain chunk in one draw call with no changes to render state. There’s a catch though, there’s now a limit to how many textures can be used to render the terrain, and that limit is based on the size of the textures and the size of the atlases.
So, to save a lot of long winded explanation, there’s 21 editable terrain materials (because water is handled elsewhere) and each of them can have up to 3 faces, so 63 textures, terrain textures are 512x512 so 63 of them (mipmapped) needs a roughly 8K texture atlas, on mobile they’re probably downscaled to fit onto a 4K texture atlas instead. Going larger than this is not exactly feasible due to compatibility reasons.
The problem is that very rarely do people ever actually use all the faces for their terrain, it would be much better if Roblox let us define completely custom materials, and like how CollisionGroups have a counter for how many groups we can use, have a counter for how many textures we could use, so up to 64 custom materials (in theory). As far as rendering goes this would have no downsides whatsoever and would significantly improve the developer experience of using Smooth Terrain. I’m glossing over things like memory usage and there are some alternative methods to enable even higher material counts but those come at the cost of performance and are generally much harder to implement so I’ve left them out.
For the time being though, one trick you can use is to swap out materials at runtime, say you have two different grass variants, put them in ReplicatedStorage, now as the player traverses your world you can parent either of them in/out of MaterialService based on where they are, this works but when you do this the Terrain textures will go blank for a brief moment (I’m guessing due to recomputing the texture packing), but if you used loading screens for your game or some other distraction then this method would enable you to have effectively infinite materials. (Though still only 21 on screen at once.)
Not a great workaround, but probably one of the few we can use. I don’t understand why the materials need to be so limited. The painful way I do it is by changing terrain colors on renderstepped depending on player position, allowing smooth transitions, but distinctive biomes next to each other are still impossible.
They gave us “custom” terrain materials, but we can’t customize if we want grass details on top, or the way the terrain itself looks, grass being smooth; rocks being rocky; planks being cubes.
I’d be well off with 21 materials if we could JUST customize these few properties.
Or let us have multiple different colored materials of the same type. I’m sure it would not be that resource intensive to allow us to have “infinite” different colors of the 21 base terrain types.
I feel relatively simple changes like would be, while still limiting, sufficient and easy to implement for the moment.