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

By default currently when you make a mesh the normals will be smooth. Making a smoothing operation would also be possible, but there isn’t a current plan to create that function. How would you want it to behave, and what is your use case for it? Thanks!

1 Like

shade smooth and auto smooth end up looking very different, and some of my models depend on this (for example auto smooth helps hide the split vertices on the seams of my model shown below)



also, will there be any support for ordered vertices? i was kinda let down when i realised blendshapes were not possible

5 Likes

We don’t have plans to add shade auto smooth to the API, but I think it should be possible to do in lua, I’ll take a shot at it after I finish my current chunk of work (may be a week or two)

6 Likes

Is there any way the finished api will return data organized in a more efficient way?

For example, I have a system that performs many repeated operations using vertex positions & other stuff. What I do is have a table set up like this: { [VertexID]:VertexPosition }
This means it is much faster to grab a vertex position because now I can just use the table rather than a function. The issue with this is that I have to go through all vertices (Mesh:GetVertices) and grab their position (Mesh:GetPosition) initially to set up that table, which is very slow, but the result pays off because it runs much faster afterwards.

What I’m asking is if we can get a function like :GetVertices except it’s already laid out like I described above. Which would allow you to do code like this much more efficiently than before:

for VertexID, VertexPosition in Mesh:GetPositions() do
--stuff
end

--and also grab vertex positions by doing Positions[VertexID] which is much faster

This is only an issue because doing (:GetPosition) in a loop through all vertices in lua can take a very long time for what it is. Also just doing it repeatedly.

2 Likes

any plans for allowing users to modify other properties in surfaceAppearences such as normal maps and roughness maps with editable images? I don’t like the idea of being limited to only colormaps

7 Likes

Im having a problem with editable meshes

could be because you didnt UV Unwrap the mesh after creating it, try setting the meshes material as smoothplastic. Or it could be because the mesh doesnt have a texture in the textureID property, so it creates a grid like pattern on the mesh. you can try adding a blank or invisible texture (would suggesting using a surfaceApperance.

Gotcha ill try it out and see how it gos

I have just tried changing it to smoothplastic and adding a clear.png

its just not working

Also what do you mean by uv wrap

if switching the material didnt work, then changing its UV is poinless, im out of ideas for what it could be

Keep in mind i use :ColorVertex so theres color so it has to be a studio bug

Imma try to reinstall studio it might be a bug or corrupted file

how are you changing the vertex color, are you prepicking the colors like this; color3.new(1,1,1) or are you doing something like this; color3.new(variable,variable,variable)

Vertex color dosent contribute to this cause even if i dont change it it still happens but it used Color3.fromHex() cause im making real world terrain generation useing a backend

and you can assume how laggy this is so i need it to be a editable mesh

and when i dont input anything in texture it looks the squares look big

but right when i put like rbxassetid://5


this happens

1 Like

I honestly have no idea, I doubt this will help but you can still try.
set the vertex UV to all be the same values; editableMesh:SetUV(vertexID, vector2.new(0.5,0.5))

it does not do anything should i post this in bug reports

1 Like

i found the culprit its the MeshPart


but there no way to remove it even with texture

Thanks for the report.

If you set the Mesh ID on the MeshPart to some valid Mesh ID, does it still show a checkerboard on your landscape?