Saturday, October 8, 2022
HomeGame Developmentefficiency - Blender exported mannequin is giving higher FPS than creating the...

efficiency – Blender exported mannequin is giving higher FPS than creating the meshes in Unity


I’m experimenting with Hex grid layouts and testing essentially the most environment friendly approach of constructing a hex map.

I attempted 2 issues:

  1. Construct my very own hex mesh utilizing 6 triangles and seven vertices
  2. Use blender to create a Hex and import it

For 1. The mesh renderer I created is connected to an object prefab and I instantiate one for every Hex in my grid. 2 is sort of related however I imported the .fbx mannequin from blender and I created a prefab from it. Then instantiate one per hex in my grid.

Query: Why is the Blender strategy giving me higher efficiency then once I create the meshes myself?

After I use the primary strategy with the meshes I created, I am getting round 44FPS

44 FPS for created Mesh

However once I use the Blender strategy I get round 60 FPS

60 FPS for Blender model

Data on how I am creating my meshes.
I create 7 vertices, Marked on this screenshot from 0 to six
WireFrame of my Hex

Then my triangles shall be:

Listing<int> triangles = new Listing<int>() {
            0, 2, 1,
            0, 3, 2,
            0, 4, 3,
            0, 5, 4,
            0, 6, 5,
            0, 1, 6,
        };


 //Create the Mesh
 m_mesh = new Mesh();
 m_mesh.title = "Hex";
 m_mesh.vertices = vertices.ToArray();
 m_mesh.triangles = triangles.ToArray();
 m_mesh.uv = uvs.ToArray();
 m_mesh.RecalculateNormals();

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments