How To generate a triangular mesh plane in Blender for Unity?
Published:
(20250129).
How To generate a triangular mesh plane in Blender for Unity?
In Unity, the default plane mesh is a 10x10 mesh (to be precisely 11x11 points). Sometimes you may need a plane mesh with more dense points, e.g., 50x50, 100x100, or even more, such that you can render a cloth plane with more details.
Here below are the steps for generating a 100x100 mesh plane in Blender and exporting it as an OBJ file which can be used in Unity.
Steps to generate OBJ file from blender.
- Open Blender in Ubuntu:
cd blender-3.0.0-linux-x64/->./blender. Ato select all.Shift+Ato selectMesh->Plane. Note, the default size of plane is 2m in Blender.- Rotate the plane if needed.
TABto Edit Mode.- Select the plane, right-click, select
Subdivide, then at the bottom left corner set thecut numbersas 99 (for obtaining a plane with 100x100 small squares). Note, limits to Max 100 cuts in Blender. - Select all vertices, then go to tab
Face->Triangulate Faces, this will generate triangular meshes on the plane. Note, Unity requires triangular mesh instead of quadrilateral mesh. - HOWEVER, the triangular mesh’s edges are not always in the same orientation. To obtain mesh edges all with the same orientation, DO NOT use the
Face->Triangulate Faces. Instead, select the plane object, go to themodifier(a wrench icon), add aTriangulate Modifier, Set Quad Method asFixed, set N-gon Method asBeauty. ClickApply.TABto check the result, and now all edges of the triangular mesh should be with the same orientation. TABto Object Mode,Ctrl+Ato select and applyAll Transforms.- Export to OBJ files: check
SectionOnly, checkGeometry/Triangulate Faces, (you can also tryKeep Vertex Order). - Then click Export.
- Done.
Import OBJ file into Unity:
- Remember to check
Read/Write, andApply. (Important! Although no Error msgs if not in Unity.). Import New Assets, then browse to find the OBJ file.- Directly putting the OBJ file into the target folder in Unity seems also ok and has the same result as via
Import New Assets.
Created on 2025-01-29.