Hello! So I’ve been developing a game that has polygonal terrain (which I think looks really cool), but the problem is, that the only way I could get it to work is via wedges, and that causes a lot of lag (duh)
And so I was wondering if there was any way to streamline the loading to fix this issue?
I know that there’s ContentService with PreloadAsync() however no matter what I do, even if I do exactly what other people have told other people to do, it just doesn’t work.
The game also lags when walking to certain areas, which I assume is caused by the game loading in more of the map, which is also problematic.
I tried adding a render distance script but that didn’t do anything as the wedges were still being loaded in memory despite being invisible.
Here’s a couple of things to note that may be useful:
The map is preset and is not procedural, however it was made in blender using geo nodes.
The map consists of ~150,000 wedges (which obviously the game doesn’t like)
Here are some video examples of what the issue is:
So, one thing that you could try is combining the whole map into multiple MeshParts.
If you have a mesh, you could simplify it in programs like Blender, which could significantly reduce triangle count.
The only drawback to this approach is that streaming and occlusion won’t work if you only have one part, so you should try to get a balance and split the map into multiple meshes, opening up the possibility for map expansion if the meshes align with each other.
Yeah I thought of that, however I’m worried due to the fact that mesh’s collision isn’t accurate to it’s visual geometry, that I would have to split the terrain in to dozens of chunks in order to have the collision look correct.
I can try it though I guess
That seems to have worked way better. I think I need to chunk it up more as rn I only have 16 chunks and the collision is still slightly off but if I chunk it up more it should be better.
One other question though, is do you know an easy way to texture it? rn I have a script that I can execute to edit the colors, however if it’s a mesh I can’t do that, so do you know a way I can easily texture it?
You may just have to create the textures in Blender. With a SurfaceAppearance, you can change the textures during runtime, with additional features such as metallic/rough appearances and possibly emission in the future.
In Blender, you can select a face by pressing 3, and then use the texturing tool to draw on it. Though, you might want to isolate the face, and I have no idea how to do that.