Is there a way to assign the color of a vertex based on the color of a UV image. I have an image map, I want the end result to be colored only by vertices.
I see the the MFace object has a col attribute. I’d like to assign that attribute based on the actual image color at that point.
This is the method (for me works in Blender 2.49b only):
1- In GLSL mode assign a material (F5) and a image (F6) (create UV map, assign material (Shadeless button enabled), select image with coordinates UV)
2 - (optional) subdivide the mesh as desired for best results.
3 - Assign a vertex colors pressing the ‘New’ button of Vertex color in Editing (F9).
4 - Delete the image (F6) and in the Material (F5) enable the button ‘VCol Paint’.
This is vertex colors so you can see it is ‘GLSL’, ‘Texture Face Materials’ and ‘Blender Multitexture Materials’ mode in textured or shaded shading mode.
Better late than never! It was fun popping open 2.49b. Your instructions are good, but the end result of the operations does not actually change the colors of the vertices. What I want is a way for the color of an image to be used to automatically (or via Python) change the color of a vertex so that I can then extract that value via Python. It’s all academic now, since I no longer need to do this, but if it is possible, I’m interested in learning it. For example, if I could get the color of the bitmap at a specific UV coordinate an map that to the corresponding vertex, I’d have what I need(ed).
I tested it just yesterday with success. I assure you it works. The vertex painting adjunt I did it from a grass texture. Remember: This is a blend file for 2.49 version of Blender.
xaedro, I looked at your file (in Blender 2.49b) and attempted the steps again. Note that I am not referring to vertex painting, but to the transfer of the image texture color at a particular UV coordinate to the corresponding vertex automatically (or via Python) but not by manually sampling and painting. If we are both on the same page, can you look at your steps again and see if maybe something was left out?
Wow, this is driving me nuts. I’ve tried it several more times looking at both your steps, xaedro, and kane’s. I tried on both Mac and PC using Blender 2.49b. The images I’m trying it are JPG and PNG. I must be missing some step
I’ve been doing (and not doing) those things. Here’s something strange… I opened up one of my tests (after having completely exited Blender), it has the vertex colors assigned. I tried going through the process again, but no luck. Not sure why that one worked but didn’t show it was successful until restarting Blender, nor can I figure why none of my other attempts are working.
I had continued trying it because there are times that it do not work for me.
And I think I found the reason:
Before pressing the ‘New’ button to create the colors of vertices must be in ‘solid shading mode’. Then go to ‘textured shading mode’ and (in object mode) delete the material and delete the UV layer in this order and see the results.