Mesh Parts

(Redirected from How to make a Mesh)

A ExplorerImageIndex73.pngMeshPart, is a physically simulated mesh that supports the upload of custom meshes with its MeshID property.
This page will explain everything you need to know about MeshParts, and how to start using them!

Adding meshes[edit]

To add a mesh, you will first need to insert a MeshPart. To do this, right click in the Workspace, select Insert Object and the select MeshPart. MeshPart0.png

This will insert a new part in the game with a simple placeholder mesh:

MeshPart1.png

To insert a mesh into a MeshPart select the MeshPart and then find the MeshID property. To insert a mesh from a file, select the insert button next to the MeshID property. This will open a file dialog where you can select a local .fbx file to import.

MeshPart2.png

Alternatively, if you know the assetID of the mesh you want to use, you can enter it into the MeshID field.

The MeshID can only be set in Studio through the property panel. This field is not writeable from a script. This is because the collision geometry of a MeshPart is calculated when a mesh is uploaded which can only be done in Studio.

You can also insert a mesh through the game explorer. To do this, first make sure your game is published. Then, in the Game Explorer panel, right click on Assets and select Add Mesh.

MeshPart3.png

After a mesh has been added to the Game Explorer, a copy of the mesh can be inserted into the game by double-clicking on it in the Game Explorer or by right clicking on it and selecting Insert.

MeshPart4.png

Textures[edit]

An fbx file can define a path to a texture for a mesh. If this is set in an fbx file that is used when uploading a mesh and the path is valid, the texture will automatically be uploaded and inserted when the mesh is inserted.

If the mesh was not inserted with a texture automatically, a custom texture can be applied to a MeshPart by setting its TextureID. Unlike the MeshID, the TextureID can be set either in Studio or at run time through a script. Like other instances that use TextureIDs, the asset id for the mesh’s texture can be set in a number of ways. Firstly, if you know the numerical id for the texture, you can set the id with the number and the prefix “rbxassetid://”:

MeshPart5.png

If your place is published you can also upload the texture to the Game Explorer. There are two ways to do this. The first is to right click on Assets in the Game Explorer and select either Add Image or Add Multiple Images

MeshPart6.png

Alternatively you can click on the TextureID field of a MeshPart’s properties and upload an image file to use through the dialog that pops up.

MeshPart7.png

Collision Geometry[edit]

Like UnionOperations, MeshParts have a CollisionFidelity. This setting determines how closely the visual representation of the object matches the physical bounds of the object. See CollisionFidelity for more information.

MeshCollisionFidelity.png

Limitations[edit]

There are several limitations on uploading meshes that one should be aware of:

  • The MeshID of a MeshPart cannot be changed at runtime with a script.
  • A mesh can have a maximum of 5000 polygons.
  • Meshes cannot be unioned with Solid Modeling.
  • Like images and sounds, all meshes will go through moderation before they are visible to other users.

See also[edit]