Mesh

:
:
A mesh is a Roblox 3D graphics format and an asset type. Meshes are used by and , which are used in accessories, gears, bundles and heads.
Uploading a file in one of the supported file formats FBX and OBJ will be converted into the Roblox mesh format that the Roblox engine can read. Users can upload mesh assets on Roblox by linking a to a local file in Roblox Studio, which will result in a mesh part.
User-created meshes were supported at release until 2008. An exploit was discovered allowing binary mesh data to be inserted into a instance, which was patched in early 2011. Roblox added support for UGC meshes on June 9, 2016.
== Format ==
Meshes are automatically converted into the Roblox file format in order to able to be used by the engine. There are eight versions of the mesh format:
*version 1.00
*version 1.01
*version 2.00
*version 3.00
*version 3.01
*version 4.00
*version 4.01
*version 5.00
===version 1.00===
version 1.00 is the original version of the format. The format is based on the following:
#First line represents a header indicating a version (in this case, must be "version 1.00").
#Second line represents a number of polygons ("num_faces").
#Third line represents a set of groups of three vertex points representing a polygon with the amount indicated by num_faces. Each vertex consists of three Vector3s:
##The position [pos_X][pos_Y][pos_Z]
##The normal vector [norm_X][norm_Y][norm_Z]
##The UV texture coordinate [tex_U][tex_V][tex_W] (tex_W is unused and should be expected to be zero)
=== Exporting ===
The Roblox Developer Wiki had a page on an Anim8or script which allows users to export meshes to the Roblox format (.mesh) in version 1.00 along with install instructions.https://web.archive.org/web/20080813222330/http://wiki.roblox.com/index.php?title=Making_Hats/Anim8or_Mesh_Exporter
== Usage ==
There are two ways a mesh can be used in a place.
;
:Allows linking content to a mesh file, which yields a physically simulated custom mesh. Unlike , MeshPart has its own collision mesh which is calculated based on the geometry, which can be changed through MeshPart.CollisionFidelity property.
;
:Has a mesh ("MeshId") and image texture ("TextureId") content properties
== Preset ==
The Roblox engine has its own set of meshes which is used by , as well as the deprecated classes and . The serves as a abstract class for mesh classes. Mesh instances must be parented to a part in order to affect its appearance.
;
:Unlike all other mesh classes, has MeshType property that specifies one of the MeshTypes, each representing a different shape. However, the FileMesh enum will use the MeshId property for custom geometry.
;
:Represents a block. Unlike , BlockMesh ignores surface textures. Bevels were also ignored but were removed.
;
:Represents a cylinder. It is distinguished from the SpecialMesh's Cylinder MeshType enum by the orientation.
== History ==
=== Legacy user meshes ===
The earliest known introduction of meshes (including user meshes) was from 2006, where Roblox implemented official support for meshes. However, in 2008, official support for user generated meshes was eventually pulled and stopped.
=== Exploit ===
Users were able to use an exploit in which they would insert binary mesh and image data into a instance, often by editing XML data. The result meshes of the exploit were widely used, most notably the fire mesh found in free models, which was used in a few popular places like Reason 2 Die. Because the use of binary meshes and images would bypass moderation since it was saved in a place/model asset instead of other asset types, the exploit was patched in early 2011 by removing support of binary data, which consequently rendered the meshes as well as images invisible. In response, many users have formed groups demanding meshes to be returned as an official feature.Return the Meshes - Group
In 2014, a user named was able to upload meshes, with some being of Sonic heads, Portal meshes, Halo meshes and even the famous SCP-173 from the SCP wiki, which was the first SCP ever made. This was later removed by an Administrator named .
=== UGC meshes ===
On June 9, 2016, player meshes were brought back into Roblox Studio. This caused a new section to be included in the Library section of the website and Roblox Studio dedicated to user-created meshes. This is the first time users can create meshes without the use of exploits. A mesh is required to be an OBJ or FBX file and have 10,000 polygons or lower to be successfully imported.https://blog.roblox.com/2016/06/uploadable-custom-meshes-come-to-roblox/
On January 1, 2019, a Bulk Import feature was added in which Roblox Studio would automatically split multi-mesh files into separate meshes.https://devforum.roblox.com/t/mesh-splitting-enabled-for-uploading-multi-mesh-files/233783 This allows complex 3D models to preserve detail without having to deliberately lower the polygon count, and prevents the issue of the UV mapping glitching if a multi-mesh model is imported as a single mesh. Before this feature, users would separate meshes in a model with a 3D editing program, import each mesh separately, and arrange the meshes manually back together in Roblox Studio.
==Trivia==
*People would usually use Blender to create their meshes, as it's easy to learn.
*On a random day, roblox changed it so only 13+ accounts can upload meshes to the library, but <13 accounts can still upload models (doesn't work in most building games due to the fact the models could break the game)
*If a SpecialMesh with a Torso/Brick type was in every part of a R6 character, the surfaces would be visible.
==Gallery==
Roblox_meshes_2008.png|thumb|A screenshot from a YouTube video showing meshes from June 4, 2008 (prior to Roblox officially removing user generated meshes).https://www.youtube.com/watch?v=vGC7yafbd-g Youtube video source, potentially unreliable.
Mesh.jpg|thumb|An example of a custom mesh.
Mesh - forced meshing - 2014.png|thumb|An example of forced meshing in 2014
Sonic_Runners_Silver_Brothers.png|thumb|Multi-mesh model imported as single mesh, compared to the same model imported in bulk
==References==
Category:Game development
Category:Asset types