Mesh Parts – Importing Models
Mesh Parts – Importing Models
This article summarizes how to upload meshes to Roblox from models created in Autodesk Maya, Blender, etc.
The easiest way to upload meshes is through the Import button at the bottom of the Game Explorer window (View tab → Game Explorer).
Upon completion, this will create one or more mesh assets in the Meshes tree:
If you import a file with multiple meshes, Studio will import them as separate meshes:
- If any child mesh contains more than 5000 polygons, the parent mesh will be rejected.
- If a parent mesh contains more than 50 child meshes, all children meshes will be rejected.
To insert a mesh into your game, right-click the object and select Insert. Alternatively, if the mesh contains location data, you may preserve it upon insertion by selecting Insert with location.
This will insert a
MeshPart instance with your mesh applied:
A mesh file can define a path to a texture for a mesh. If this is set and the path is valid, the texture will automatically be applied when the mesh is inserted.
If the texture is not inserted automatically, one can be applied to a
MeshPart by setting its
MeshPart/TextureID|TextureID, either in Studio or at run time through a script.
To apply a mesh texture in Studio:
- Select the
MeshPartobject within the game editor view or Explorer hierarchy.
- In the Properties window, click on its TextureID field.
In the context popup window, the texture can be applied in various ways:
- Select any image (texture) that you previously uploaded.
- Upload a new texture by scrolling to the bottom of the popup and clicking Add Image….
- If you know the Roblox asset ID for the texture, for instance
rbxassetid://0123456789, you can paste it into the URL field at the top of the popup.
MeshPart|MeshParts have a CollisionFidelity property. This setting determines how closely the visual representation of the object matches the physical bounds of the object. See
MeshPart/CollisionFidelity|CollisionFidelity for more information.
Level of Detail
By default, meshes will always be shown in precise fidelity, no matter how far they are from the game camera. This improves their appearance when viewed from any distance, but if a place has a large number of detailed meshes, it may reduce overall game
To dynamically control a mesh part’s level of detail, change its
enum/RenderFidelity|RenderFidelity property to Automatic. This will cause the mesh to be rendered at a different level of detail depending on its distance from the camera:
|Distance From Camera||Render Fidelity|
|Less than 250 studs||Highest|
|500 or more studs||Lowest|
With mesh importation, certain issues can occur. Most of these are caused by a misunderstanding of what Roblox allows on importation. The following are some common issues and an overview on how to fix them.
|Import Issues With Complex Multi-Mesh FBX Files||Complex .fbx multi-mesh files may not import correctly, causing unexpected mesh positions or rotations. One workaround is to use the Wavefront (.obj) format instead. If you're exporting from Blender, make sure each mesh is exported as a group:
|Model Contains Rigging or Animation Data||Studio does not currently support animation or rigging data importation. If your mesh is reliant on an initial transformation based on animation/rigging data, it will not be preserved and your mesh may look incorrect. To fix this, remove the animation/rigging nodes and upload the mesh again.|
|Extremely Large FBX Files Exported From Blender||Blender may apply a scaling factor when exporting a mesh as an .fbx file, depending on its settings. This may result in oversized meshes when importing into Studio. There are at least two ways to prevent Blender from applying the scaling factor:
|Out of Bound UVs||UVs map the location of the texture to a position on the mesh. UVs outside the bounds of the texture are drawn as if they're still within the texture, resulting in a tiled texture. This can be fixed by remapping the mesh with UVs inside the bounds of zero and one.|