# I want to export vertex data of a simple object which include normal and color data as well as vertices coordinates as text file

I want to export vertex data of a simple objects which include normal and color information as well as vertices coordinates as text file. Similar to following example. Is it possible?

Vertex(
x: -1.0 ,
y: 1.0,
z: 1.0,
r: 1.0,
g: 0.0,
b: 0.0,
a: 1.0,
s: 0.25,
t: 0.25,
nX: 0.0,
nY: 0.0,
nZ: 1.0
)


You could use Python for exporting the exact format you asked for. (what are a, s, and t though ?) (I guess a is for alpha, but I don't think VertexColor data has an alpha channel. For s and t, I dont't know. Your question is not clear on these points).

If you accept other similar format, then you can export as PLY :

Don't forget to activate "Vertex Color" :

You get such a file :

The header explains the structure: The orange line tells you you'll first have 1966 lines desribing the vertices (what you want) with columns described in yellow.

The pink tells you that you will have 500 faces with the property in blue. You didn't ask for it though. But it seems you cannot bypass them at export time.

• Just to make it clear. s t values was about placement of texture image on vertex model at Apple' Metal. What I get from your answer is a translating function is needed to use vertices in a Swift application. OK. – Hope Nov 8 '17 at 10:46
• If I understood you well, what you call 's' and 't' are 'U' and 'V' coordinates in Blender. – Maxx Nov 8 '17 at 12:07
• PLY creates duplicate vertices. Is there an addon just to output vertex color in correct indices order. – June Wang Sep 25 '19 at 9:48