Face selection masking is available in the 3D header when in 'Vertex Paint' mode:
Because this works on faces you will only be able to paint vertices that make up a face, individual vertices or edges won't be filled.
Select the vertices you want to paint on in edit mode.
Change to 'Vertex Paint' mode.
Enable 'Face selection masking' in the 3D header. There ...
One way you can do this is with the mask modifier:
Add a vertex group of the vertices you want to paint on (or the area you don't want to paint on, whichever is easier)
Add a mask modifier and toggle the invert option if you selected the vertices you don't want to paint on.
Paint, then disable/delete the mask modifier when you are done.
You can bake Vertex colors to a texure.
Starting from a vertex color layer as in the picture below
you must unwrap your model (which may consist of one or multiple meshes) and create a new image to bake onto ("untitled" in my case)
Than go in the Bake panel of the Render tab and set Bake mode to Vertex color.
When the process is completed you should see ...
It's not as full-featured as the script you've posted, but I've come up with a very simple Bake-UV-to-Vertex-Colors script:
# Lookup the image by name. Easier than trying to figure out which one is
# currently active
image = bpy.data.images[image_name]
width = image.size
height = image.size[...
Answering my own question here. Looks like if I use Collada exporter the colors are correct. So they must use linear color space. Maybe it is more of a responsibility of the export plugin to set the color space used than Blender.
In Weight Paint Mode you can set Weight by pressing Shift + K.
Toggle Vertex Selection Masking to select the vertices
Set the Weight (use @joshsanfelici technique to copy vertex value)
Press Shift + K to set weight
You can achieve this using Texture Paint and a carefully crafted UV map with each face taking up the space of only one pixel. This will mean that the entire face relates to a single pixel in the image texture and is therefore painted a single consistent color. The UV map and the associated image can be created with a script.
Open a Text window, click New, ...
Adjacent faces can have different plain colors, and a vertex can have a different color for each face it participates to.
In 2.79, it's possible to select the faces in Vertex Paint mode, and use 'Set Vertex Colors' (Header > Paint menu or Shift-K).
Likely the integration in Blender of a separate script that was used before.
To view colors in ...
Go to Edit Mode and select what you want to Polygroup.
Go to Object Data tab and click plus next to Vertex Group then assign with your selection active and name if you like.
On obj export make sure the Polygroup box is checked.
ZBrush doesn't use smoothing like Blender does you need to subdivide to make it look smooth.
Vertex painting is much more limited. Your mesh's resolution is the upper boundary to the texture detail you can have, since essentially you only have one color per vertex (this color can be a compound of several colors for each edge loop that a vertex is on, but it sums up to just one RGB value).
UV textures enable you to map a 2D image to your 3D mesh. ...
Similar to the answer to Smoothing vertex_colors values this can be achieved by assigning the 'fixed color' vertices to a Vertex Group and using a script to 'smear' the color from those vertices over the rest of the mesh.
You could use the script in the linked answer but for ease of use I have packaged it into an add-on which is avialable for download from ...
You must set vcol with loop index, not vertex index, because those are loop data (i.e. one color per face corner):
current_obj = bpy.context.active_object
mesh = current_obj.data
vcol_layer = mesh.vertex_colors.active
vcol_layer = mesh.vertex_colors.new()
for poly in mesh.polygons:
Having such problems with mask created by Vertex Paint:
First check whether there are double vertices (W >
Recalculate normals with Ctrl + N. The result
is better but still weird, something like:
Continue using Vertex Paint, simply drawing over these gaps and
smoothing boundaries and it's done.
I think that is not possible to configure the vertex paint brush with the options provided by Blender at this time (2.75a) without scripting yourself the tool you need.
The vertex brush simply cannot "see" the face, probably because it's normal is not facing the brush projection enough...or something like that...
I'm not a coder as you might have guessed, ...
That looks to me like you have a few overlapping faces. The give-away is that there's some shimmering (called "z-fighting") going on between unpainted white vertices and the yellow verts.
With Vertex Painting you can limit the faces using a Mask. Any unmasked faces will receive no vertex paint instructions.
This masking mode lets you right click faces to ...
If you used bpy.ops.screen.screenshot(ctx, filepath=destination, full=False) in the correct context it would save a screenshot of what you see in the viewport, but render.render() isn't the same as doing a screenshot.
I think you're getting something like this?
You need to set up a material to pipe the Vertex Color Layer to the material diffuse colour. ...
Thank you @Mr Zak, you got me pointed in the right direction. Going through the first links github, I found this... https://github.com/varkenvarken/blenderaddons/blob/master/connectedvertexcolors%20.py … It adds an option to fill each piece of the object with a random color while in vertex paint mode. Thanks!
I'm aware I'm necroin' a 8 month post, but I'd like to aid any others who happen to come across this post in desperation for a solution.
It took a whole day of investigating and cross-referencing, but another Blender user back in 2010 managed this effect rather well.
Now, the barely readable 480p is not very helpful for those ...
Okay I think I may have found the issue? Where you have an Add node I think you really want a Multiply node, as follows:
And the render looks more like this:
Which seems more like your reference photo I would say.
If you run into this problem again, I suggest using the glTF exporter in Blender. The spec requires it to export the vertex colors in linear space. There was a time when this was not working properly, but I have verified that Blender 2.8 Beta appears to be doing the right thing.
If you look at the image below, these pumpkins are both the same model, ...
Look at the loop vert.
Using a method similar to Applying per-vertex colors to new Bmesh
from random import uniform
context = bpy.context
mesh = context.object.data
bm = bmesh.new()
color_layer = bm.loops.layers.color.new("color")
red = (1, 0, 0, 1)
black = (0, 0, 0, 1)
for face in bm.faces:
for loop in face....
Yes, you can select vertex while in paint mode. Just switch to the select tool and change selection mode to vertex. Also note that if you select vertex in edit mode and then switch to paint mode, the selection is preserved and edit mode has better ways to make selections than paint mode does.
With your selection just set the colour you want and use the ...
A material defines basic properties to be applied to the entire surface of an object. A texture is used to add variety to the material.
For example a material defines a simple blue colour for the cube. The same colour is used over the entire surface, with variation due to lighting.
Adding a texture can then add some variety to the colour. In this example I ...
With Blender Render engine selected and a regular old non-node-based material, go to the material properties and check Vertex Color Paint. This will make the diffuse color of the mesh equal to the diffuse color of the material times the diffuse intensity of the material times the diffuse texture of the material times the vertex color.
After you're done you ...
A transparent shader converts the brightness of the input image to transparency. There is no such thing as "grey scale of a transparent shader", because the transparent shader only absorbs light (based on the color and value of it's input). To get a white feedback of the shader (independently of the background), you need to use a shader, which reflects the ...
Try switch 'Show Zero Weights' to none ...at least to get rid of the black.
I think 'Clean' might be confusing the issue...
I can't see your brush settings but I paint with auto - normalize on, and find 'Smooth' the most useful of the Weight Tools for fixing.
The manual itself is also full of good info.
Set Vertex Colors (ShiftK) would do the trick.
Painting whole model in one color
In Vertex paint mode select a color and press ShiftK
Painting a part of a model in one color
In Edit mode select what needs to be painted with Limit selection to visible button unchecked.
In Vertex Paint mode press Face selection masking for painting button, select color ...
The only workaround I found is to use the Weights to Vertex Colors addon . It's not a real solution, just a workaround, but since you can paint through the mesh in weight paint mode by unchecking "Limit Selection to Visible" , you can paint there and then convert your weights into vertex colors. But of course it converts it in greyscale (although there's an ...