Mesh Asset: Difference between revisions

From Pummel Party Mod Documentation
Jump to navigation Jump to search
mNo edit summary
(Added known issues)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
A mesh asset is a 3D model that can be used by [[Mesh Renderer Component|mesh renderers]] and [[Prop Component|props]].  
A mesh asset is a 3D model that can be used by [[Mesh Renderer Component|mesh renderers]] and [[Prop Component|props]].  


Custom meshes can be imported from an .obj file (see [[Importing Models]]). Imported Mesh Assets can be viewed in the [[Asset Browser]] in the ''Custom > Props'' folder.
Custom meshes can be imported from an ''.obj'' file (see [[Importing Models]]). Imported Mesh Assets can be viewed in the [[Asset Browser]] in the ''Custom > Props'' folder.
 
To import a textured model, the mesh asset is imported separately from the [[Texture Asset]]. The texture is used with a [[Material Asset]], and this material is placed onto the mesh. See the [[Texture Asset]] page for details on this process.
 
==Import Settings==
With the Mesh selected in the asset browser, the [[Inspector Window]] shows information about the mesh.
 
{| class="wikitable"
|-
! Property !! Description
|-
|'''Tris''' || (read-only) The number of triangles in the mesh.
|-
| '''Verts''' || (read-only) The number of vertices in the mesh. Should be below 65,535.
|-
| '''Recalculate Normals''' || Use the normals stored in the model file or recalculate them on import. Tick this and click ''Apply'' to recalculate the normals on the mesh. Only required if the normals are incorrect and only needs to be done once.
|-
|}
 
==Limitations==
* Meshes should have no more than 65,535 vertices.
** Any meshes larger than this are not guaranteed to work correctly. Larger meshes may appear visually correct, but they will not work correctly with [[Mesh Collider Component]]s or a Prop's Mesh collision mode.
 
==Known Issues==
* Meshes may be imported flipped on one axis.
** As a temporary fix, you can use a free program such as [https://www.blender.org/ Blender] to flip the model across one axis.


[[Category:Assets]]
[[Category:Assets]]

Latest revision as of 03:44, 16 December 2022

A mesh asset is a 3D model that can be used by mesh renderers and props.

Custom meshes can be imported from an .obj file (see Importing Models). Imported Mesh Assets can be viewed in the Asset Browser in the Custom > Props folder.

To import a textured model, the mesh asset is imported separately from the Texture Asset. The texture is used with a Material Asset, and this material is placed onto the mesh. See the Texture Asset page for details on this process.

Import Settings

With the Mesh selected in the asset browser, the Inspector Window shows information about the mesh.

Property Description
Tris (read-only) The number of triangles in the mesh.
Verts (read-only) The number of vertices in the mesh. Should be below 65,535.
Recalculate Normals Use the normals stored in the model file or recalculate them on import. Tick this and click Apply to recalculate the normals on the mesh. Only required if the normals are incorrect and only needs to be done once.

Limitations

  • Meshes should have no more than 65,535 vertices.
    • Any meshes larger than this are not guaranteed to work correctly. Larger meshes may appear visually correct, but they will not work correctly with Mesh Collider Components or a Prop's Mesh collision mode.

Known Issues

  • Meshes may be imported flipped on one axis.
    • As a temporary fix, you can use a free program such as Blender to flip the model across one axis.