Maniphest T48728

vertex colors not shown in texture mode
Closed, Resolved

Assigned To
Sergey Sharybin (sergey)
Authored By
Ivan Cappiello (icappiello)
Jun 24 2016, 1:10 PM
Tags
  • BF Blender
Subscribers
Alex (SpectreFirst)
Bastien Montagne (mont29)
Campbell Barton (campbellbarton)
Francesco Siddi (fsiddi)
Ivan Cappiello (icappiello)
Sergey Sharybin (sergey)

Description

System Information
Operating system and graphics card

Blender Version
Broken: 2.77 a8898d3,
Worked: 2.76b

vertex colors are not displayed in texture mode when viewport is set on multitexture .

open the attached .blend file with both blender versions to reproduce the error

Revisions and Commits

rB Blender

Related Objects

Mentioned Here
rBb27322e71ee4: Curve: utility to evaluate entire curve
rB4b0aeaf327d3: Fix T48757: Broken in D1120 normal baking
rB03f846ea12ba: Ignore vertex color when doing texture paint
rBa8898d310544: Correct assert

Event Timeline

Ivan Cappiello (icappiello) created this task.Jun 24 2016, 1:10 PM
Ivan Cappiello (icappiello) raised the priority of this task from to 90.
Ivan Cappiello (icappiello) updated the task description.
Ivan Cappiello (icappiello) added a project: BF Blender.
Ivan Cappiello (icappiello) edited a custom field.
Ivan Cappiello (icappiello) added a subscriber: Francesco Siddi (fsiddi).
Ivan Cappiello (icappiello) added a subscriber: Ivan Cappiello (icappiello).
Alex (SpectreFirst) added a subscriber: Alex (SpectreFirst).Jun 24 2016, 2:04 PM

I can confirm that for BI and Cycles in Textured mode (compared to 2.76b):

  • Blender Internal: vertex colors are not showing in Object, Sculpt and Vertex Paint modes, but are shown in Edit Mode.
  • Cycles: Vertex colors are not showing in Object, Sculpt and Edit Modes, but are shown in Vertex Paint mode with proper gradients. I have noticed that in Material view vertex colors look differrently from other modes (sRGB space?) This heavily affects gradients from vertex to vertex, making them very pale.

Haven't noticed anything suspicious in the console so far.

Bastien Montagne (mont29) changed the task status from Unknown Status to Unknown Status.Jun 24 2016, 3:02 PM
Bastien Montagne (mont29) claimed this task.
Bastien Montagne (mont29) added subscribers: Campbell Barton (campbellbarton), Bastien Montagne (mont29).

@Alex (SpectreFirst) not sure what you are saying here (vertex colors are not showing in Object, Sculpt and Vertex Paint modes seriously?), please do not add confusion to reports, your comments sound more like another issue not directly related to originally reported one.

@Ivan Cappiello (icappiello) This 'feature' was purposely removed from master a few weeks ago (by @Campbell Barton (campbellbarton) iirc) - it did not really make sense to systematically show vcol in texture paint mode, and was actually often annoying. You can still see those if you enable vcols in your material and switch to material preview mode.

Alex (SpectreFirst) added a comment.Jun 24 2016, 3:59 PM

Sorry if I wasn't clear enough, but that's what I see when I'm switching interaction modes in Textured viewport shading. Probably should have added pictures in the first place. The planes on these pictures are the same object in different modes.


Provided test file behave the same as my tests so I thought that I should add which modes display vertex colors and which ones don't. If this information is not useful anymore then you can just ignore it, but I honestly don't see any particular harm in my observations as well. Vertex color gradients are indeed a different issue, but I'm not sure if this is worth creating a separate report because I'm not sure if this is an actual issue or not.

Ivan Cappiello (icappiello) added a comment.EditedJun 24 2016, 4:13 PM
In T48728#379369, @Bastien Montagne (mont29) wrote:

This 'feature' was purposely removed from master a few weeks ago (by @Campbell Barton (campbellbarton) iirc) - it did not really make sense to systematically show vcol in texture paint mode, and was actually often annoying.

@Bastien Montagne (mont29) it doesn't make sense for me now since texture applied to uvs without material are instead correctly displayed. Vertex colors have no different use in that case but are displayed as a blank white shadeless object (not very useful at all).

In T48728#379369, @Bastien Montagne (mont29) wrote:

You can still see those if you enable vcols in your material and switch to material preview mode.

@Bastien Montagne (mont29) yeah, i could, but in a complex scene where lots materials are linked, you are suggesting to let blender viewport compute all of them (affecting severely the performance) when the only thing i have to see are the vertex colors. I don't think it's very handy. And i can't honestly see the benefit of removing this feature and make textures and vcols (both used to color the object) behave differently in the viewport.

Campbell Barton (campbellbarton) changed the task status from Unknown Status to Unknown Status.Jun 27 2016, 11:29 AM
Campbell Barton (campbellbarton) claimed this task.
Bastien Montagne (mont29) added a subscriber: Sergey Sharybin (sergey).Jun 27 2016, 11:47 AM

Actually, was @Sergey Sharybin (sergey) 's commit, rB03f846ea.

Sergey Sharybin (sergey) claimed this task.Jun 28 2016, 12:09 PM
Sergey Sharybin (sergey) added a comment.Jun 28 2016, 12:11 PM

If it's really supposed to show vertex color in textured view simplest way to go would be to add DM_DRAW_USE_COLORS to flags in draw_mesh_textured_old() in cases when object is not in texture paint mode.

But my question is: is it indeed supposed to always use vertex color in texture view?

Sergey Sharybin (sergey) lowered the priority of this task from 90 to Normal.Jun 28 2016, 12:11 PM
Ivan Cappiello (icappiello) added a comment.EditedJun 28 2016, 12:28 PM
In T48728#379802, @Sergey Sharybin (sergey) wrote:

But my question is: is it indeed supposed to always use vertex color in texture view?

@Sergey Sharybin (sergey), my point is: if you are using vertex colors to color your object, then they have to be shown in texture mode just as you would expect using a texture to color the object.
No material is required to show a texture, and no material should be needed to show the vcols.
If you are not using vertex colors, no harm could be done because they would not be shown anyway.
This is also rhe way it was always used in the blender viewport.
If the removal is so important, then at least a flag in the view 3D has to be present to show them. Again, my point is: what's the benefit of remiving it from the viewport itself breaking existing workflow when the problem is only affecting the texture paint mode?

Alex (SpectreFirst) added a comment.Jun 28 2016, 3:07 PM

I'm not sure if I understood the question correctly, but as far as I can understand, it boils down to what to display in Object and Sculpt modes when Diffuse color, image texture and vertex colors are presented.

I did some tests in 2.77a in Textured Solid Object mode and it work like this:

  • Material's Diffuse color when no image or vertex colors are presented
  • Vertex colors when image is not directly assigned to faces in Edit Mode
  • Image multiplied by vertex colors when image is directly assigned to faces in Edit Mode
  • Image multiplied by vertex colors in Vertex Paint mode when image is directly assigned to faces in Edit Mode
  • Image in Texture Paint mode which is multiplied by vertex colors when "Face selection masking for painting" is turned on.

I can understand how it can cause problems so maybe it would be possible to do this:

  • Material's Diffuse color when no image or vertex colors are presented
  • Vertex colors only when image is not directly assigned to faces in Edit Mode
  • Image only when image is directly assigned to faces in Edit Mode
  • Only vertex colors in Vertex Paint mode
  • Only image in Texture Paint mode regardless of "Face selection masking for painting" option.

This is obviously not an ideal solution and can be counterintuitive, but at least it will separate image and vertex colors and we won't lose the ability to see vertex colors in Textured Solid modes. I'm not sure if that makes sense so this is just my thoughts.

Sergey Sharybin (sergey) changed the task status from Unknown Status to Resolved by committing rB2f532c78445a: Fix T48728: Vertex colors not shown in texture mode.Jun 29 2016, 10:09 AM
Sergey Sharybin (sergey) added a commit: rB2f532c78445a: Fix T48728: Vertex colors not shown in texture mode.
Alex (SpectreFirst) added a comment.Jun 30 2016, 10:06 AM

I've just tested the latest build 9d5661c and it looks like the problem wasn't solved completely: object's diffuse color is now updating properly, but both diffuse color and vertex colors are only shown when object is actively selected. If many objects are selected, only the active one will display colors properly, others will show plain gray.

  1. Create a Cube and add material with Diffuse color or paint some vertices in vertex paint mode.
  2. Switch to Texture shading and add another primitive or select another object (for example default lamp or camera) and object will turn gray.
Sergey Sharybin (sergey) changed the task status from Resolved to Unknown Status.Jun 30 2016, 11:09 AM
Sergey Sharybin (sergey) changed the task status from Unknown Status to Resolved by committing rB260da0cd9159: Fix T48728, part 2: Vertex colors not shown in texture mode.Jun 30 2016, 11:21 AM
Sergey Sharybin (sergey) added a commit: rB260da0cd9159: Fix T48728, part 2: Vertex colors not shown in texture mode.
Alex (SpectreFirst) added a comment.Jul 1 2016, 1:24 PM

Tested 4b0aeaf and most combinations of modes work normally except strange behaviour in Sculpting mode which doesn't update material’s diffuse color properly:

  1. Set some vivid color to default Cube's material diffuse color and turn Textured Solid mode.
  2. If you switch to Sculpting mode right away, diffuse color will remain, but if you switch to Edit Mode and then to Sculpt mode, in Sculpt mode object’s color will become gray. Switching to Object mode and then back to Sculpt mode will bring diffuse color back.
  3. I have also noticed that if you'll try to change diffuse color while in Sculpt mode, it will not update just like in previous versions.
Alex (SpectreFirst) added a comment.Jul 4 2016, 1:38 PM

Just in case my previous report was lost in a traffic: tested b27322e and Diffuse color in Sculpting mode is still not updating properly in BI Textured Solid mode. Not a big problem perhaps, but can be quite annoying because you have to switch back and forth between Sculpt and Object mode to see Diffuse color update.

Sergey Sharybin (sergey) added a comment.Jul 4 2016, 1:48 PM

@Alex (SpectreFirst), this is why it is important to create mew reports instead of re-summoning old ones. So please go ahead and submit a new report with the steps and probably .blend file.