Maniphest T93123

Massive lag when enabling Viewport Shading -> Color -> Vertex and using Sculpt Vertex Colors
Closed, Resolved

Assigned To
Kévin Dietrich (kevindietrich)
Authored By
Steffen Hartmann (Harti)
Nov 16 2021, 12:15 PM
Tags
  • BF Blender
  • Sculpt, Paint & Texture
  • EEVEE & Viewport
Subscribers
Kévin Dietrich (kevindietrich)
Philipp Oeser (lichtwerk)
Steffen Hartmann (Harti)

Description

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.47

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-15 21:08, hash: rB7e42ae7c1af0
Worked: blender-3.0.0-alpha+master from 2021-10-25
Worked: 2.93.8
Caused by rB03013d19d167: Eevee: support accessing custom mesh attributes

Short description of error
Massive lag and terrible viewport navigation (zoom, pan, rotate) performance when

  • sculpt vertex color is used on a high polygon mesh (4 or more million) and
  • if you enable Viewport Shading -> Color -> Vertex in one 3D viewport
  • have another viewport with another Color shading method make this particularly apparent

Note: Just enabling it once totally bricks that object - using other color modes afterwards (like Object or Random) doesn't help. Deleting the broken objects reverts the performance problems.

Exact steps for others to reproduce the error
from factory startup:

  • make sure experimental sculpt vertex colors are used:
bpy.context.preferences.experimental.use_sculpt_vertex_colors = True

  • open .blend
  • navigate in both viewports (esp.the right one) and notice massive lags

Original report
Exact steps for others to reproduce the error
edit: only happens when you use these config files

  • open a new scene and add a sphere
  • use subdivision surface modifier with 10 levels on the default cube and apply it (viewport navigation like zoom, pan and rotate should be smooth at this point)
  • go to sculpt mode and use the sculpt vertex paint brush (don't enable vertex under "viewport shading -> color" yet)
  • leave sculpt mode and go to edit mode for example, viewport performance is still normal and smooth but now enable vertex under "viewport shading -> color"

Now you've got terrible zooming performance and initial lag whenever you rotate or pan the viewport. Feel free to choose object or material or any other color mode in the viewport shading menu - it won't help. You need to delete the object to restore viewport performance.

Revisions and Commits

rB Blender

Related Objects

Mentioned In
D12587: Move Sculpt Colors From Experimental
Mentioned Here
rB7e42ae7c1af0: Cleanup: Typo in comments
rB03013d19d167: Eevee: support accessing custom mesh attributes
rB622e6f05f1b5: Fix T92750: sculpt vertex colors missing in object mode
rB3e75f70acd7d: Geometry Nodes: Remove repeated instance attribute names in search

Event Timeline

Steffen Hartmann (Harti) created this task.Nov 16 2021, 12:15 PM
Steffen Hartmann (Harti) added projects: Sculpt, Paint & Texture, EEVEE & Viewport.
Steffen Hartmann (Harti) updated the task description.Nov 16 2021, 12:19 PM
Steffen Hartmann (Harti) updated the task description.Nov 16 2021, 12:21 PM
Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from User.Nov 18 2021, 3:36 PM
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

Not seeing a performance hit here

Operating system: Linux-5.13.0-0.rc6.45.fc35.x86_64-x86_64-with-glibc2.34.9000 64 Bits
Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.31

This could be related:

  • rB03013d19d167: Eevee: support accessing custom mesh attributes
  • rB622e6f05f1b5: Fix T92750: sculpt vertex colors missing in object mode

Could you check a fresh build again with this file (or provide one that truly shows this)?

Steffen Hartmann (Harti) added a comment.EditedNov 18 2021, 7:55 PM

@Philipp Oeser (lichtwerk)

I've downloaded the file, opened it with the latest 3.1 alpha for windows and switched to "vertex".

The problem occured right away. Zooming, panning and rotating in the viewport results in massive lags.

edit: It's hard to show the bug - you have to "feel" it. But here is a video
I zoom in and out at the same speed but once i switch to vertex it looks and feels like the fps drop (more jumpy and less responsive). Pan and rotate result in a short pause before it actually performs the movement.

GPU driver, CPU chipset, Bios and Windows are up to date.

Philipp Oeser (lichtwerk) changed the task status from Needs Information from User to Needs Triage.Nov 19 2021, 8:49 AM
Steffen Hartmann (Harti) added a comment.EditedNov 28 2021, 5:52 PM

The bug doesn't happen when i use a fresh blender 3.1 nightly and don't importing my 3.0 settings. I'll do more research and might be able to give more details soon.

Steffen Hartmann (Harti) added a comment.Nov 28 2021, 6:47 PM

Ok it seems my 3.0 configs are the problem here.

Steffen Hartmann (Harti) updated the task description.Nov 28 2021, 6:51 PM
Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from User.Feb 9 2022, 2:51 PM

Looks like this is caused by Preferences > Naviagtion > Orbit & Pan > Auto Depth.
This is known to take a performance hit in certain scenarios.

Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-15 21:08, hash: rB7e42ae7c1af0
Worked: blender-3.0.0-alpha+master from 2021-10-25

Now it would be good to check these again:

  • does it work in current builds if you have Preferences > Naviagtion > Orbit & Pan > Auto Depth OFF?
  • was it possibly broken in 3.0.0-alpha+master from 2021-10-25, too if you have Preferences > Naviagtion > Orbit & Pan > Auto Depth ON?
Steffen Hartmann (Harti) added a comment.EditedFeb 13 2022, 4:43 PM
In T93123#1304824, @Philipp Oeser (lichtwerk) wrote:

Looks like this is caused by Preferences > Naviagtion > Orbit & Pan > Auto Depth.
This is known to take a performance hit in certain scenarios.

@Philipp Oeser (lichtwerk)
It's exactly this - when i disable auto depth the viewport performance is back to normal.
edit: Not totally back to normal though. It is still laggy and not useable but better in some way.


Auto Depth disabled and sometimes a better viewport peformance but as you can see totally laggy when trying to work with that plane (and everything else). Deleting the sculpt vertex layers of the head sculpt totally elimates all the performance hits.

But what does Sculpt vertex Color trigger to have such a bad performance with (and without) auto depth enabled. Strange.

edit: I'm using a recent 3.2.0 Alpha right now.

Steffen Hartmann (Harti) mentioned this in D12587: Move Sculpt Colors From Experimental.Feb 16 2022, 4:52 PM
Philipp Oeser (lichtwerk) changed the task status from Needs Information from User to Needs Triage.Feb 17 2022, 10:42 AM
Steffen Hartmann (Harti) updated the task description.Feb 17 2022, 4:34 PM
Steffen Hartmann (Harti) added a comment.EditedFeb 17 2022, 4:40 PM

Reminder the problem only occurs when i import/load the config files from my previous Blender version. When i delete userpref.blend or start with a fresh Blender version the bug doesn't happen at all.

I linked the probably faulty config files in the initial comment above.

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from User.Feb 25 2022, 9:53 AM

Sorry, when loading your config and disabling Auto Depth I cannot spot an issue/lag with T93123.blend.
Do you really have a difference there compared to a default config?

If this is just noticable in another file, please provide this.

Steffen Hartmann (Harti) added a comment.Feb 25 2022, 11:02 AM

Latest version of Blender 3.2, Auto Depth disabled. Once i switch all viewports to vertex color the lag is gone.
Enabling just another color option brings back lags and Blender is unusable again. Enabling Auto Depth results in major lags independent from the color shading option - as known.

Philipp Oeser (lichtwerk) changed the task status from Needs Information from User to Confirmed.Feb 25 2022, 11:34 AM

OKi, can confirm now, with the two viewports (also that it worked better in rB3e75f70acd7d, also that it is not a problem with regular vertex colors).
Will update the task description accordingly (and try to check when this broke).

Philipp Oeser (lichtwerk) added a comment.Feb 25 2022, 11:40 AM

Btw.: this "two-viewport-issue" seems to be independent of the config, I can repro that with Factory Defaults + experimental sculpt vertex colors, so will leave the config out of the report to not complicate things

Philipp Oeser (lichtwerk) renamed this task from Massive lag when enabling Viewport Shading -> Color -> Vertex and using Sculpt Vertex Color on a high poly mesh. to Massive lag when enabling Viewport Shading -> Color -> Vertex and using Sculpt Vertex Colors.Feb 25 2022, 12:31 PM
Philipp Oeser (lichtwerk) triaged this task as High priority.
Philipp Oeser (lichtwerk) updated the task description.
Philipp Oeser (lichtwerk) added a subscriber: Kévin Dietrich (kevindietrich).
Kévin Dietrich (kevindietrich) closed this task as Resolved by committing rBa911f075d7aa: Fix T93123: viewport lags with custom attributes.Feb 25 2022, 10:04 PM
Kévin Dietrich (kevindietrich) claimed this task.
Kévin Dietrich (kevindietrich) added a commit: rBa911f075d7aa: Fix T93123: viewport lags with custom attributes.