Importing a list of vertices in to blender

Viewed 55

I have a list of vertices in a file in the following format, where each line contains the x, y and z coordinates of a vertex.

0.2 0.2 -0.5
0.7 0.8 -0.2
0.8 0.1 -0.8

How can I import this in to Blender without writing my own tool to convert to a file format like Wavefront .obj? Or is there a tool which could do this for me?

1 Answers

To get a valid file in .obj format, each line (vertex) needs to include v before the coordinates.

One easy way to do this is to use sed, for example this command, given that your current file is file.txt

sed 's/^/v /' file.txt  > new-file.obj

After this, you should be able to import the file in Blender as a Wavefront obj.

Related