I'm not familar with obj-files. A while ago I read the posted document without interest in coloring, only by the way I saw something about vertex Colors.
It seems, that it is used in connection with textures. Nevertheless I painted a face of a cube in Meshlab. I can't decide if there is a difference in the structure of both files.
Test.obj -> Export from MoI
Test2.obj -> Import Meshlab - painting -Export
Hi Stefan, from what I can see those .obj files with vertex colors are not adhering to the .obj spec, they're using a custom variant.
Basically they're not "official" .obj files since they are putting in extra stuff that's not mentioned in the spec. It's possible that could cause problems with programs that are expecting that the contents of the file should follow what the spec says. But I guess that's why it's something that you have to specifically turn on.
Hi Karsten, thanks for posting the file. So yes your test2.obj file doesn't adhere to the spec you linked to above - according to the spec a "v" line specifying a geometric vertex can have x y z and optionally a w value for curves.
Your test2.obj file has x y z r g b values for each vertex, but that isn't mentioned anywhere in the spec.
It seems to be a variant that's used by several programs though.
yes, i agree. In Shade for example i can tell the program wich "spec" i can use
by telling it ZBrush or 3DCoat. Other scentific software i have used uses vertex
colors for example in other formats and when converting those meshes i can
use them in Meshlab too as .obj with vertex colors. So maybe Meshlab is the
proper software to handle vertex colors.
So it looks like SketchFab does support this type of individual vertex color model data too, so I guess they were saying you could use that to make color gradients if you wanted to. I had thought maybe they meant use simple materials and not texture maps.
Back to the original question from keith:
> Are the colours produced by Moi Vertex Colours?
The answer is no - colors coming from MoI are material colors which are assigned to entire faces, not individual vertex colors.
Edges are not a part of an .obj file or many other formats.
So it had then to convert the edge colors to vertex colors
and what purpose should this serve? Vertex colors are used
for example for painting models and with MoI you can't paint meshes.
A better idea maybe would be to improve the random colors script,
so that it would allow to select color ranges or gradients.
Here are two examples:
The blobby cube was colorized with Wings3D and Jotero's Kitten
was colorized in Shade 3D with a color gradient script. Both techniques
uses faces (or in case of MoI patches, or imported .obj faces into MoI)
like the random color script for MoI.
Hi Stefan
My example was based upon very limited understanding, that the vertex colors are a property of the exported mesh, in unknown export format.
From Polygon mesh - Wikipedia:
"It is also possible for meshes to contain other such vertex attribute information such as colour, tangent vectors, weight ..... "
So the question is, can MoI geometry database contain colour information for the vertices, which could be exported in some format? http://moi3d.com/forum/index.php?webtag=MOI&msg=8201.7
...but after the boolean calculation is completed MoI will decompose objects into manifold volumes and only put manifold objects into its own geometry database.
But the Grasshopper link, with it's examples, looks very interesting!
Thanks for providing the link!
I wonder however what export formats Rhino/Grasshopper uses
to save the edges? I know from Surface Evolver that Evolver files
uses edges to describe a model. The coloring of vertices, like shown
there, is possible with .obj and others.