2
$\begingroup$

I have an .obj of a model that was polypainted (vertex painted) in ZBrush. I would like to import it into Blender and see the vertex painting in the 3D Viewport. Instructions for doing this in Blender Render and Cycles would be appreciated.

I have already discovered how to export a .wrl file from ZBrush and import it into Blender following the following workflow: -Export the model from ZBrush via Zplugin>3D Print Exporter>VRML. -Enable “Import-Export: Web3D X3D/VRML2” plugin. -Import the .wrl file, set Shading Mode to GLSL, enable Textured Solid and set the 3D Viewport to Solid shade mode. This can also be accomplished with the ZBrush PLY import-export plugin.

I would like to know (if it is even possible) what the workflow is for doing this with an .obj file so that I can see the vertex colors like I can see them when opening the .obj in TopoGun or 3D-Coat. In either of those programs I don't have to set up materials or nodework (if it were possible) in order to make vertex painting visible and so that is what I am seeking here, just as it works with a .wrl file but using an obj.

$\endgroup$
  • $\begingroup$ I clarified my answer. I checked out the link but didn't find an answer to my specific question there. $\endgroup$ – Bryson Jack Jun 5 '15 at 21:07
2
$\begingroup$

june 2015:

Vertex Colors are not part of the .obj file type specification - see section on Geometric Vertex.

However some programs use an unofficial extended format for inter-change and add r,g,b information on the same line as the vertex coordinates.

# standard format (v: x y z)
v 1.0 1.2 0.3 

# extended format (v: x y z r g b)
v 1.0 1.2 0.3 0.5 0.2 0.2

Blender's .obj importer ignores everything after the x y z, therefore at this moment vertex colors are not parsed in any form.


If there was a color map (vertex colours) associated with the mesh, you'd see it listed in

  • menu: Properties -> tab: Data -> subheading: Vertex Colors

If there's nothing there then there's nothing to show.

$\endgroup$
  • $\begingroup$ Blender isn't the only software with this inability. ZBrush hasn't implemented it yet either and vertex colors don't import even with it's own exported polypainted .obj files. Thanks for your time to confirm it isn't possible yet. At least .wrl and .ply files work. $\endgroup$ – Bryson Jack Jun 6 '15 at 14:44
  • $\begingroup$ The obj importer is written in python and without too much effort could be customized to read and write the extended .obj format, i'd be tempted to do it myself but i'd need a zip of a couple of representative obj/mtl files to validate import and export.. so if you're game..let me know. $\endgroup$ – zeffii Jun 6 '15 at 17:57
  • $\begingroup$ So sorry for the delay...here is an object you can experiment with..dl.dropboxusercontent.com/u/6647893/Forum_Help/… $\endgroup$ – Bryson Jack Jun 10 '15 at 23:14
  • $\begingroup$ important thing you need to know about vertex colours in blender is they are per face per vertex, eg: when a vertex is shared by multiple faces (say..4) we have 4 color values for that vertex. This leads to a problem when exporting, because the vertex colours in the extend obj format are stored per vertex, meaning that a vertex color will be less flexible in the export. If that didn't make sense, here an image: $\endgroup$ – zeffii Jun 11 '15 at 7:56
  • $\begingroup$ In the end this means while Blender allows abrupt changes in colour due to vertex colour being mapped to a face, the same can't be translated back into the .obj format without having a lot of duplicated geometry. $\endgroup$ – zeffii Jun 11 '15 at 8:09
0
$\begingroup$

It is worth noting for future readers that vertex colors are supported in PLY import/export. See @Ravachol's answer (in GameDev) for details.

$\endgroup$

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.