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

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

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

[ad_1]

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

I attempted 2 issues:

  1. Build 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 hooked up 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.

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

When I exploit the primary strategy with the meshes I created, I’m getting round 44FPS

44 FPS for created Mesh

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

60 FPS for Blender model

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

Then my triangles might be:

List<int> triangles = new List<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();

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here