A few things I learned about this process:
First, you need an "adult" Roblox account to make "mesh objects" in Roblox Studio. I guess they are afraid of the kinds of meshes kids might upload? Weird.
Second, you can import .obj files into Roblox Studio, but I suggest the following workflow in Mesh Lab to do some processing on the mesh so it works well in Roblox Studio.
1) Load the .obj file into MeshLab
2) Roblox Studio has a limit of 10,000 faces on MeshParts:
So if you have more than 10,000 faces in your mesh, in MeshLab use "Filters/Remeshing, Simplification and Reconstruction/Simplification: Quadratic Edge Collapse Decimation" to reduce the number of faces:
You can target for 10,000 faces, but if you end up with more faces than 10,000 after the decimation, you may need to set a slightly lower target like 9,900:
3) SculptrVR exports .obj meshes with vertex colors. However, Roblox Studio expects a mesh to have a texture image file instead. So you need to create the texture file from the .obj file you obtained from SculptrVR. There are two steps to do this. First use "Filters/Texture/Parameterization: Trivial Per-Triangle":
What is "Parameterization"? It maps the space of the 3D triangular mesh onto a flat, 2D surface. The best explanation I've seen is from this slide from a Tel Aviv University presentation:
You must then name the texture file:
The texture file is a .png. It will look like a lot of colored triangles:
5) Now export the processed .obj file from Mesh Lab, and make sure that it references the texture file:
6) Now go into Roblox Studio. Right click or Command-I to insert an Object:
And insert a "MeshPart":
Select the generic MeshPart you inserted
Then go to the Properties/MeshId and choose the .obj file you exported from MeshLab:
You will get a couple of warnings, you can choose to say yes or no:
And at the end of that, Roblox Studio should import your .obj mesh and automatically load up the texture file as well:
There you go!
No comments:
Post a Comment