Here's the deal, I have to do alot of vertex color light bakes and through various plugs-ins and whatnot I sometimes end up with an editable mesh with vertex colors on it. When I convert the mesh to an edit poly I get random vertices turning rainbow colors and other visual bugs.
Anyone know why this happens and how to prevent it?
Replies
Bad point/edge conversion i suspect.
What if you make all edges of your mesh visible before converting ?
*edit*: Granted, you COULD try exporting the vert colors with the OBJ and reimport. Who knows, maybe it'll fix it.
FicWill: interesting but that still seems to be an over-complicated alternative to painting out the rainbow verts manually. also, I don't know how to script in max :P
By making edges visible, i meant triangulate the mesh, with Surface Properties>Visible in edit mesh modifer, at edges level.
Now if you don't want your edit poly to be triangulated, you can propably select just the "invisible egdes" (found a script by Bobo which make that on scriptspot), make them "visible", convert to poly, delete the egdes (which could be maxscripted) edit : well no, deleting the diagonal edges in edit poly fucks the vertex color too. Thank you Autodesk !
double edit : got it, ok, haha, wtf !
I don't know if this will work for you but :
the vertex color seams to work like UV. You can display them in the unwrap by switching to "vertex color channel" When you delete an edge (or convert from mesh to poly i presume), the vertices goes funky because everything is weirdly split.
SO, select your vertex colored mesh, apply an unwrap, switch channel to "vertex color channel", select all the "UVs" and do a "weld selected". Weld twice if needed. Convert to poly. win !
You can totally edit vertex color like uvs, doing symmetry and stuf,f that's pretty fun.
I tried on a teapot and some turbosmoothed extruded box, but i hope it works on complex objects too. My concern is, doest it export correctly when the vertices are welded ? You can still break them afterwards though.
The triangulate thing surely work too anyway.
edit : made some tests, and a mesh can handle different color on 2 triangles separated by an invisible edge. An edit poly can't, if you don't triangulate manually.
In this case, if you don't triangulate the poly, there will be differences.
When you unwrap a mesh, you see the invisible edges in the uvs. You can split a face along an invisible edge. When you convert to a poly, and apply an unwrap, you see the invisbile edges cuts don't exist. As the triangles are all split in mesh, max tries to reconstruct ngons when you convert to poly and it makes some twists. That explains the differences. Logical once you know vertex color works like UV's.
So the ultimate solution is to triangulate, else the weld trick is the best approach afaik but may not completely work. Remapping a vertex color as FicWill suggest would be tricky as a vertex can have a different vertex color value by adjacent face, like a vetex can have multiple uv's.
ok that's it, i couldn't let Autodesk win