0
$\begingroup$

I have built some kind of random shape generator which in realtime alters the shape of a cube with 60 vertices. However I've noticed that the vertices aren't in any specific order (or are they?) so that getting them is a real pain in the *ss.

The order for the top row for example is:

top_left = [23, 40, 48]
top_middle = [20, 37]
top_right = [24, 36, 43]

But it would make sense if they'd be ordered from 0 to 8...?

Do I miss something or what is the system of blender applying order to the vertices of a given shape?

I'd like to skip the step of assigning all the single vertices to a variable by hand, but therefore I'd need to know how the vertices are ordered in a mesh...

$\endgroup$
  • $\begingroup$ How are vertex indices determined? may be of help. $\endgroup$ – David Sep 23 '15 at 15:27
  • $\begingroup$ Hm thanks, seems like a good start. However, how do I know what number a vertex has by looking at the indicies of an edge? $\endgroup$ – Sputi Sep 23 '15 at 16:55
  • $\begingroup$ or differently: ist there a way to move indicies around by bge python rather than moving every single vertex? $\endgroup$ – Sputi Sep 23 '15 at 16:57
  • $\begingroup$ using armatures and shapekeys are common ways to move parts of a mesh. $\endgroup$ – sambler Sep 23 '15 at 17:35
  • $\begingroup$ Well that's not an option for what I want to do... I have trouble to explain this because english isn't my first language. But what would I do if I have a cube and I want to pull one edge (containing 3 vertices) say x + 1 by python? My solution is to get all the three vertices from that edge and assign a new value to them. Or is there an easier way? Without having to get all three vertices first (which are in some strange order I have to figure out firs and formoust)? Can I do something with the Indicies? $\endgroup$ – Sputi Sep 23 '15 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.