XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Editable poly - Get / Set vertex color

01-27-2004, 06:56 PM

I need to export vertex colors of an editable poly from MAX6 to the same editable poly in MAX5. I have to use MAX5 because of a plugin not ported in MAX6, but i use max6 to vertex paint the editable poly because of the new vertex paint tool.

First, i did it for an editable mesh. In MAX6 I write all the vertex color to a file and in MAX 5 I read the file and set the vertex colors

the file looks like this :
233.0 0.0 0.0
230.14 0.171833 2.46703
230.14 0.171833 2.46703

--export vertex color from MAX6
file = openFile "C:\\vertex_color.txt" mode:"w"
for i in 1 to $.numverts do
format "% % %\n" (getVertColor $ i).r (getVertColor $ i).g (getVertColor $ i).b to: file
close file

--import -vertex color in MAX5
file = openFile "C:\\vertex_color.txt" mode:"r"
i = 1
while not eof file do
r = readValue file
g = readValue file
b = readValue file
c = color r g b
setVertColor $ i c
i += 1
close file

But their is a problem : Vertex Paint in Max6 works on EditablePoly. It means that before exporting i have to collapse the editablemesh and vertex paint. When collapsing it create an Editablepoly. So i convert this to EditableMesh to run my script.
But i cannot be sure that the vertex order stay the same from my first editable mesh in max5 during the differents conversion...

Thats why i need to do all my stuff not on an editablemesh, but on an editablepoly (in max5 and 6)
But i can't find how to get the vertex colors of the editable poly.

So if anyone knows how to do that ... Maybe an exporter from max6 to max5 with no lost of data (vertex color, UV, ...) allready exist ? thanks...

CGTalk Moderation
01-17-2006, 08:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.