Mesh Asset: Difference between revisions

From Pummel Party Mod Documentation
Jump to navigation Jump to search
mNo edit summary
(Added more content)
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]]. Then a [[Material Asset]] is used to place the texture on the mesh.
 
==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.
 


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

Revision as of 22:42, 15 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. Then a Material Asset is used to place the texture on the mesh.

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.