Bypassing 8 EditableMesh limit on client?

Wanting to know if there’s any tricks to bypass the 8 EditableMesh limit on client? I want to be able to create hundreds on a whim from the client. They’d be very identical (a rectangle, 6 faces) and I’d wanna just duplicate that rectangle segment and apply changes to it (size/position/faces) but atm I have to create a new editable mesh each iteration

local mesh = AssetService:CreateEditableMesh()

-- add all the faces

local meshPart = AssetService:CreateMeshPartAsync(Content.fromObject(mesh),{ CollisionFidelity=Enum.CollisionFidelity.Box })

This reaches limits way too quickly on client tho. And since server/client replication doesn’t work yet, that’s not viable.

Or am I best to wait for server/client replication to be supported? Cause ideally that’s what I want (client draws a mesh, goes to server, server generates) this way replication is super simple (vs having to client > server > all clients)

Why can’t you just create multiple faces on one editable mesh? You can always edit them after creating them.

Because I don’t think that’s possible??

I can create 100s easily

for i = 1, 100 do
	local meshPart = AssetService:CreateMeshPartAsync(
		Content.fromObject(mesh),
		{ CollisionFidelity = Enum.CollisionFidelity.Box }
	)
	meshPart.CFrame += Vector3.new(i * 5, 7, 0)
	meshPart.Anchored = true

	meshPart.Parent = workspace
end

but to my knowledge there’s no way to edit each individual mesh parts faces?

EDIT
Managed to find way to “create” an EditableMesh 100+ times, but I can’t do anything to it?

local NewEditableMesh = AssetService:CreateEditableMeshAsync(Content.fromObject(OriginalEditableMesh))

-- Choose a random face to remove
local FaceToRemove = FacesToRemove[math.random(1, #FacesToRemove)]
NewEditableMesh:RemoveFace(FaceToRemove )

EditableMesh is fixed-size, adding or removing elements is not allowed in-experience
Idk if this a limitation in studio

It seems like you are supposed to set FixedSize to false when creating the mesh.

AssetService:CreateEditableMeshAsync(Content.fromObject(OriginalEditableMesh), {FixedSize = false})

Doing that goes back to my old problem of the 8 cap

Failed to create EditableMesh that was requested due to reaching memory budget limits.

you could always create N rectangles per mesh, and dynamically move vertices and faces

i did something similar but in the opposite direction when making 2k and 4k EditableImages

for example, if you disable FixedSize, you can use one mesh to store every single shape

that not possible as far as i know.
You can use Wedges or mesh with only 1 poly to simulate that hevewer

I’m pretty sure that’s the entire point of editable meshes. You should check the documentation: Documentation link. (Specifically :SetPosition)

there no way to edit them tho. I know its in their name, but either it isn’t something released, or it’s just limited to the 8 atm too

Where are you getting the information about a limit of 8 EditableMesh per client? Afaik there isn’t a hard limit but instead any call to create an EditableMesh or EditableImage could return nil depending on if the available editable memory budget of the device is exhausted.

What’s your use case for creating “hundreds” of simple EditableMesh anyways? There may be another approach that doesn’t require memory-expensive EditableMesh allocation while achieving the same effect.

8 because thats as many as the memory will allow. If I create a 9th one it stops. Even if I wait a minute and try making a 9th one, it wont work.

Reason for this is allowing player customisation. I want players to be able to build using these, and they need to edit and change in an instant, and to allow them to create more than 8 in a single session

What exactly are the players building using these EditableMesh? What are they able to modify? What’s stopping you from using a single EditableMesh? You said they’d likely only have 6 faces (assuming 12 tris) - A single EditableMesh can support 60,000 vertices and 20,000 tris.

Walls. Each wall segment needs to be an individual mesh to support individual textures on each wall segment. These segments needs to adjust as walls around get added/removed. Like remove end faces if interesecting a wall, extend/trim faces to so they connect to other segments/etc.

Actually sounds like a perfect reason to use a single mesh. For the texture, you can just modify the UV position of the faces with SetFaceUVs.

Please check the documentation, it shows how to edit them right there. You most definitely can edit them.

You can’t do differing textures on faces. And I can’t do 1 single mesh, because each mesh part needs not only their size changed, but also their faces lengths changed too. It’s not a static mesh. If that was the case I’d just use parts. But Im using Meshes because I need to be editing mesh faces on each individual mesh

Show in the documentation where I can edit the mesh and create more than 8 meshes in a single play session on the client?

I’m not saying you can create more than 8 meshes - this is the bottleneck I’m attempting to help you get around. Documentation for EditableMesh clearly states:

Editable assets are currently expensive for memory usage. To minimize its impact on client performance, EditableMesh has strict client-side memory budgets

While it’s true that you can have only 1 texture applied to an EditableMesh (via the TextureContent property), efficiently creating an image asset which contains the texture data for multiple “textures” is possible - you may even consider using an EditableImage as the texture, allowing for runtime modification. Using either method and by modifying UV coords of faces on an EditableMesh, you can create the appearance of multiple textures on a single mesh.