2
$\begingroup$

I'm trying to get Blender to export .ply files with vertex colors and triangular faces.

First, I assign my model a material, and change its diffuse color. Then, in edit mode, with my whole model selected, I press Ctrl+T to triangulate the faces. Then, I go to Export > Stanford (.ply), and making sure include vertex colors is selected, I export it.

However, when I look at the file, it has no color data, and the faces are not triangles (The faces consist of a seemingly random number of indices each).

Am I doing anything wrong? I've tried searching quite a bit but can't seem to find anything. Thanks

$\endgroup$
2
$\begingroup$

A few things here:

The diffuse color you assigned isn't part of the Vertex Color content, they are distinct from eachother. If you want to give a single colour to all faces, then go to Vertex Paint mode and masking mode, select all faces, then pick a colour from the colour-wheel and press Shift + K . That will set the vertex colour for all faces. and Save.

enter image description here

For triangulation, you might have to make a duplicate of your model and triangulate, then press save, then export. Else I think the exporter will export the mesh's data from the most recent saved state (that wasn't triangulated yet).

$\endgroup$
  • $\begingroup$ Thank you. I got the color working just fine now, but i still can't get it to export triangular faces, even when I triangulate it, save it, close it, open and then export it. $\endgroup$ – Robo11 May 23 '15 at 19:12
  • $\begingroup$ you can test the geometry generated by blenders .ply exporter by reimporting it (File->Import .ply ) . To me it looks like it triangulates just fine, perhaps your importer program is auto "quading" ? What version of Blender? if not 2.74, get it anyway. $\endgroup$ – zeffii May 23 '15 at 19:19
  • 1
    $\begingroup$ you can open the .ply file in a text editor to see exactly what kind of data it contains. some lines are x, y, z, r, g, b and others are the indices..(line is prefixed with the number of vertices to follow) .. $\endgroup$ – zeffii May 23 '15 at 19:24
  • $\begingroup$ Ok, it was working fine. Was just reading the file wrong. Thank you vary much, you saved me quite a lot of work. $\endgroup$ – Robo11 May 23 '15 at 19:29
  • $\begingroup$ @zeffii I just tried using dynamic paint to transfer to vertex color from texture, but when I exported to .ply, all the RBG colors are (255,255,255). $\endgroup$ – June Wang Sep 24 at 19:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.