Introducing in-experience Mesh & Image APIs [Studio Beta]

Why is the SetVertexColor deprecated? Is there a new function to change the color of the editable meshes?

image

Yes, sorry for the confusing changes. We will have a message about the new methods soon, still finishing up documentation for the new methods.

7 Likes

So with trust and safety issues, would using a LOT of EditableImages be a problem?
I have a border system that is rendered using them, but i need a large grid of them to make it work. These are generated in game, and are never uploaded however.

My concern is an automated moderation system that could potentially delete some of the auto generated borders, will this be a problem?

Example:

1 Like

The new :SetFaceColors method is less performant than its predecessor (:SetVertexColor). I’m pretty sure this is due to it requiring a table of colors. it would be better if the method accepted colors as a vararg (faceId: number, ...: Color3) or as 3 seperate arguments (faceId: number, colorId1: Color3, colorId2: Color3, colorId3: Color3).

I have a terrain generator which uses EditableMesh and when I use the new :SetFaceColors method it generates in .8 seconds - but with the old/current :SetVertexColor method it generates in .5 seconds.

2 Likes

I agree, I would also wish they would do this with methods that take Vector3s as inputs as well, but maybe they are forced to follow this format. Either way, requiring tables/objects for inputs will never be as performant as straight data, especially in a non-compiled language like Lua.

When I say with Vector3s here, I just mean separate the X, Y and Z so you don’t have to create a new object every time.

Doesn’t :SetFaceColors Change The colours for the triangle and :SetVertexColor the colour of one Vertex?

Btw, when I try to use some functions for the editablemesh like: :RemoveFace() or :GetFaceVertices() I get this error:
image

Is that just because the api is not finished yet or is it a mistake on my end?

Could we get even a very rough ETA as to when editable meshes / images will be available in live experiences?

Sorry for the confusion. RemoveFace and GetFaceVertices are not yet available. For now, RemoveTriangle and GetTriangleVertices can be used instead.

1 Like

Will we ever get the option to do Raycasts with workspace:Raycast?

There seems to be an issue with editablemesh where at certain angles of the camera the entire mesh disappears, especially with more detailed systems. I’ve seen others experience a similar issue. I fixed mine temporarily by restarting studio. The frequency of the issue seems very random and sporadic?

1 Like

make sure the editable mesh is fully inside the meshpart its parented to, like if the meshpart is one stud big and the editable mesh is 200 it disappears when the meshpart its inside of goes off screen i think

local localPosition = VertexPosition - Vector3.new(meshpartposX, meshpartposY, meshpartposZ)
			
EditableMesh:AddVertex(
     Vector3.new(
localPosition.X / meshpartsizeX, 
localPosition.Y / meshpartsizeY,
localPosition.Z / meshpartsizeZ)
)
1 Like

Thanks for this report.

We’re currently working on an issue that might be the same thing - during the frame where the EditableMesh is initially created, the bounding box of the EditableMesh is used for culling. But if vertices are added or moved in later frames, the bounding box used for culling isn’t properly updated

1 Like

quick question, why is editablemesh allowed in the client of studio but not on the client outside of studio?

i could understand the issues with editableimage being available in-game, but editablemesh doesn’t really seem like it could be problematic.

Been getting this error despite having the beta feature enabled

image

When can we expect to see documentation for the various APIs?

SurfaceAppearance normalmap doesnt seem to work, haven’t tried roughness or metal but colormap does work

1 Like

Any chance EditableImage can be used as a generic image asset? Possibly getting a unique ID that can be applied anywhere that accepts assetID? That way we can generate PBR textures and skyboxes in game without having to upload as a decal

I believe this is the closest answer we’ve gotten so far, which seems to be in the desired direction.

1 Like