Converting an image into vertex colors.....

Does anyone know of a script out there that will take a UV-mapped (game) texture and convert it to vertex colors? Let me explain why I want this: I have exported a landscape mesh from my favorite landscape modelling program and I’ve exported a top-view render of the mesh to use as a texture map. All well and good, except that the texture map is over 12MB. :o All I really wanted the texture map for was so that I could get the basic colors for the different parts of the landscape. But now I want to convert those colors into vertex colors so that I can:

a) loose the 12MB texture file, and
b) apply my own rockface texture to the mesh, which would be shaded by the vertex colors.

So does anyone know of a python script I can use to do this? Or can anyone suggest another method?

Cheers,
Keith. 8)

well the only way i can see it happening is if you had a vertex for each and every pixel of the image, then you’d need a script to go through the image and get the color settigns fo each pixel and apply it to the corrosponding vertex… big job.

macblender

Blender can do it by it self, first set up the UV map, create a material and make it shadless, give it a texture of the UV image and set it to map with UV co-ord. Press the vertcol button in the edit buttons window and delete the material from the object. that should work. but you nedd a LOT of vertices for the image to show up well. this works for me. Let me know if it works for you.

Thanks kane I’ll give that a try. What exactly is the vertcol button supposed to do then? I thought it just made the material use the vertex colors instead of its own color??

It’s quite a dense mesh, and like I said I only want to get the basic colors from the texture, so there shouldn’t be a problem with accuracy.

Cheers,
Keith.

The vertex color button in the MATERIAL BUTTONS does that

the [add] vertex color button in the EDIT BUTTONS adds (creates) vertex colors to the faces, from the textured and lit color at the verticies.

Oh that button! Cool! 8) I’ve been using that to turn lighting into vertex colors but I didn’t know it worked with textures as well! :smiley:

It’s nice to be askin questions instead of answering them for a change. :slight_smile:

Keith. 8)