How does the program decide what indices to assign to vertices? If you create a primitive, are the indices generated randomly, or by some base primitive setting? If you extrude new vertices, will they be the next number in sequence?

What happens when you join two objects together that have the same indices used? Which points get reassigned, and by what logic? Can anything be done to control which get re-assigned?

Are there any ways to recalculate, re-assign, or copy vertex indices?


4 Answers 4


How does the program decide what indices to assign to vertices?

  • new vertexes are appended to the end of the vertex list
  • duplicating vertexes adds them also to the end and their order is maintained
  • .. list too long..

It would be very time consuming to analyze every mesh operation/modifier and how it handles vertex indices and make a list for you (it will be like the above though in most cases if not in all). Instead you can reverse engineer this yourself:

Type bpy.app.debug = True into the Python Console

This will enable super top secret mode with next option available in Properties panel:

enter image description here

Now you can see the indices and how they change for what you are interested in:

enter image description here

Can anything be done to control which get re-assigned?

Nope, blender handles it internally.

Are there any ways to recalculate, re-assign, or copy vertex indices?

Sure, with python you can do anything to meshes, you can reorder the vertices. Just by building a new mesh with different vertex order from old one and then switching them.

  • 1
    $\begingroup$ Is there a way to change the indices colors as well? The dark blue on a dark background is sometimes bad to read. $\endgroup$ Mar 23, 2018 at 7:18
  • 1
    $\begingroup$ @BrunoBieri Yes, you can go to UserPrefs > Themes > 3D View and change the Face Angle Text Color which these numbers use. $\endgroup$ Mar 23, 2018 at 8:58
  • 1
    $\begingroup$ It seems this has been moved to another place in Blender 2.8. Any ideas where I could find it? $\endgroup$
    – Bauxite
    Apr 9, 2020 at 12:24
  • 2
    $\begingroup$ For Blender 2.8+ see blender.stackexchange.com/a/158495/1363 $\endgroup$
    – CodeManX
    Jul 17, 2020 at 16:14

Jerryno did a great job of explaining mesh indexes in his answer, so I will focus on:

Are there any ways to recalculate, re-assign, or copy vertex indices?


First let me clarify that there are more then just vertex indexes, faces and edges have indexes as well, but for the rest of this answer I will refer to just vertex indexes.

The simplest way to reorder the vertex indexes is with the Sort Mesh Elements tool, accessible from the 3D view header Mesh > Sort Elements. All the option in the dropdown menu run the same tool, and can be changed like any other operator by pressing F6 or in the Operator Properties section of the tool shelf.

menu item

If you want to do anything beyond reordering the indexes, that will require python.

  • $\begingroup$ ...so, you select the mesh that has the "wrong" order, and a similar mesh with the target order, and do Edit (vertices) -> Mesh -> Sort Elements -> Selected? $\endgroup$ May 1, 2020 at 23:36
  • $\begingroup$ no it does not copy some other mesh's vertices' ids. To quote the manual "Selected Move all selected elements to the beginning (or end, if Reverse enabled), without affecting their relative orders. Warning: This option will also affect unselected elements’ indices!" AKA not what you want it to do. "Selected" simply renumbers the selected vertices so that they are at the beginning (or end with reverse enabled) of the indices. $\endgroup$
    – David
    May 3, 2020 at 2:07

You can also sort mesh elements with Python, using the bmesh module:

import bpy
import bmesh
import random

ob = bpy.context.object
assert ob.type == "MESH"
me = ob.data

bm = bmesh.from_edit_mesh(me)
new_order = list(range(len(bm.verts)))

for i, v in zip(new_order, bm.verts):
    v.index = i

print("shuffled indices:")
for v in bm.verts:

print("update index()")    

print("indices returned to original order:")
for v in bm.verts:

print("shuffling again, followed by a sort:")
for i, v in zip(new_order, bm.verts):
    v.index = i

for v in bm.verts:


It's important to call sort() after assigning new indices to actually apply the new order. After that, indices will be ordered 0..n, but if you check the indices drawn in viewport, then you'll see that they changed.

  • $\begingroup$ Will this re-order to 0..1..2..3..4..5..n incrementally? Some game engine don't accept face indices and just programatically generate it incrementally on run-time. $\endgroup$
    – majidarif
    May 17, 2017 at 17:51
  • $\begingroup$ Not sure what you mean by incrementally... If you export from Blender after sorting, the indices should be in that order. I don't think that holes (e.g. 0, 2, 3, ...) are allowed in Blender. $\endgroup$
    – CodeManX
    May 18, 2017 at 15:47
  • $\begingroup$ I asked a question about that here. Can you check? :) blender.stackexchange.com/questions/79805/re-arranging-vertices $\endgroup$
    – majidarif
    May 18, 2017 at 16:21
  • $\begingroup$ @CoDEmanX Its a nice script that shuffles the verices. What do i need to change to sort the list from smallest to biggest? i tried sorted(new_order) but did not worked $\endgroup$
    – DGRL
    Dec 30, 2019 at 11:17
  • $\begingroup$ @DGRL Smallest to biggest what? $\endgroup$
    – CodeManX
    Dec 31, 2019 at 12:40

For whoever will find this helpful, here is how to display vertex indices in 'Blender 2.80':

  1. In Preferences - Interface - Display, check 'Developer Extras'.

    enter image description here

  2. In the 3D View - Overlays, there should now be a 'Developer' section, check its "Indices" box - see screenshot below:

    enter image description here

  • $\begingroup$ thanks for the answer. I am able to do Step 1, but how do you do Step 2? I do not see an option for "3D View" to click. $\endgroup$ Apr 22, 2020 at 23:26
  • $\begingroup$ I just added a screenshot, hope that helps. $\endgroup$
    – Animik
    Apr 24, 2020 at 9:56
  • $\begingroup$ Also, don't forget to check "Text info" in the same panel, for some reason it is unchecked by default (on my end at least) $\endgroup$
    – Gorgious
    Apr 24, 2020 at 10:04
  • $\begingroup$ Thanks! (I am using Blender 2.8+ but hopefully the interface is similar -- let me check!) $\endgroup$ Apr 24, 2020 at 15:56
  • 1
    $\begingroup$ Is it possible to change the font, size and color of the index overlay? It's very difficult to read. $\endgroup$ Sep 30, 2020 at 16:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .