GSmGpE6CwX2y9JjB25B8
We use cookies on this site to enhance your user experience

Mesh Parts – Importing Models

Mesh Parts – Importing Models

Aug 29 2019, 9:16 AM PST 10 min

This article summarizes how to upload meshes to Roblox from models created in Autodesk Maya, Blender, etc.

Uploading Meshes

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:

Mesh Splitting

If you import a file with multiple meshes, Studio will import them as separate meshes:


Limitations
  • 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.

Inserting Meshes

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:

Applying Textures

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:

  1. Select the MeshPart object within the game editor view or Explorer hierarchy.
  2. 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.

Collision Geometry

Like UnionOperation|UnionOperations, 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 articles/Improving Performance|performance.

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
250-500 studs Medium
500 or more studs Lowest
Highest (12348 triangles)
Medium (5587 triangles)
Lowest (2709 triangles)

Troubleshooting

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.

Scenario Solution
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:
  • Uncheck the Objects as OBJ Objects checkbox.
  • Check the Objects as OBJ Groups checkbox.
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:
  • Export as Wavefront (.obj) instead of .fbx. Blender will not apply any scaling factor, so one unit in Blender will equal one stud in Roblox.
  • Use centimeters as the default unit instead of meters (this can be changed in the Scene properties of Blender).
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.
Tags:
  • mesh
  • modeling
  • model
  • import