Imapaint_pick_uv

Is there any way to get the UVs relative to the original mesh in that function?

When a subdivision surface modifier is applied to an object in paint mode, the color information of the texture is incorrectly picked up by the eyedropper when the level is non-zero.

For flat objects, the UVs are not severely distorted, but for geometrically shaped models, the UVs are very severely distorted.

That’s why we want to colorize based on the original mesh, not the evaluated mesh.

The function is in the paint_utils.cc file, and the problem occurs inside the paint_sample_color() function.

Blender version is 4.2 alpha

If color picking on a subdivision surface fails, I don’t think sampling the original mesh is the right solution. It is to fix the sampling on the subdivision surface.

I don’t see why UVs being distorted relative to the original mesh should be a problem. As far as texture painting is concerned you should be painting on the subdivided mesh, the original mesh does not matter.

Me also same thought too. but I need to do right now. I don’t want waste to turn subdivision mod off every time to pick color. So I have to add that subd mod bcoz that’s paint mode so suck for edge painting… do not fill end of edge when it have very low polygon. You can try that. that’s why I have to use the subd mod to paint… hoo…

Is here don’t support a GIF or youtube? it’s hard to explain for what caused problem from the paint mode on the edge of surface low polygon…

Do you know about the “mloop” and what structure has replaced from the “mloop”? and “mpoly” too?

MLoop was a struct for mesh face corners. They are now separate corner_vert and corner_edge arrays. MPoly is a face, they’re now accessed with Mesh::faces(). There’s more documentation in the code around there and here: Mesh - Blender Developer Documentation


Didn’t look much into the issue in this thread now, but maybe it’s related to #117338 - Regression: Texture Painting: Subdiv modifier breaks texture color sampling - blender - Blender Projects?

2 Likes

Thank you so much HooglyBoogly.