Page MenuHome

Undo of the first stroke after entering sculpt mode for 2.8 models is lagging
Closed, ResolvedPublic

Description

System Information
Operating system: Darwin-19.0.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel Iris OpenGL Engine Intel Inc. 4.1 INTEL-14.2.16

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-15, hash: rBc25a910e4ec0

Short description of error
I can't draw by any brush without lag if I open 2.8 files with different sculpted models. Lag is noticeable after the first undo after a brush stroke.

Lagging may be incredibly huge and sculpting in 2.8 in comparison with 2.81 is like jet. If I'm trying to sculpt from scratch something in 2.81, it seems to have no problems like these.

My models from 2.8 are high-poly so this is the reason maybe.

Exact steps for others to reproduce the error
Open high poly mesh in sculpt mode (few million polygons), make one stroke and then undo. Lag is noticeable.

[Developer note: it may only work in 2.8 specific files, still pending file from reporter]

Event Timeline

Konstantin (bokoa) updated the task description. (Show Details)
Konstantin (bokoa) updated the task description. (Show Details)

Does it happen when switching brushes and brush size? This is known issue. May be fixed in today builds https://developer.blender.org/T71434

This comment was removed by Konstantin (bokoa).
Konstantin (bokoa) added a comment.EditedNov 14 2019, 12:54 PM

Does it happen when switching brushes and brush size? This is known issue. May be fixed in today builds https://developer.blender.org/T71434

Yeah, of course, it happens when switching brush, changing its size, strength or detail also. Forgot about it.

Dalai Felinto (dfelinto) closed this task as Resolved.Thu, Nov 14, 11:47 PM
Dalai Felinto (dfelinto) claimed this task.

Thanks for the report, but as mentioned above, please try the latest daily build: https://builder.blender.org/download/

If the problem persists, please let us know so we can re-open the report. Don't forget to mention the specific version you tested again.
At least the changing size is supposed to be fixed already.

Konstantin (bokoa) added a comment.EditedFri, Nov 15, 12:19 PM

Thanks for the report, but as mentioned above, please try the latest daily build: https://builder.blender.org/download/
If the problem persists, please let us know so we can re-open the report. Don't forget to mention the specific version you tested again.
At least the changing size is supposed to be fixed already.

Well, I was testing 2.81 Beta November 15, 00:52:41 - c25a910e4ec0 today, and should to say the lagging is gone almost completely - I can switch brushes, change size and detail without lags, but it still appears when zoomed quite close to high-poly mesh then I'm trying to turn on dyntopo and it starts lagging quite much until I zoom out and zoom in scrolling the mouse hard. In 2.8 projects that lagged are work fine.

Konstantin (bokoa) added a comment.EditedFri, Nov 15, 1:32 PM

Thanks for the report, but as mentioned above, please try the latest daily build: https://builder.blender.org/download/
If the problem persists, please let us know so we can re-open the report. Don't forget to mention the specific version you tested again.
At least the changing size is supposed to be fixed already.

Ah, just noticed that after undo operation impossible to do anything with brushes, it's super lagging.

Dalai Felinto (dfelinto) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.
Dalai Felinto (dfelinto) edited projects, added BF Blender (2.81); removed BF Blender.

By doing anything with brushes you mean, to edit them? Or to scupt?

Also not clear, if you start the sculpt from scratch in the latest Blender do you still have the problem? Or only if you start in 2.80 and bring to 2.81?

And we need a file to test things.

And another question, you do not have the problem in 2.80 right (please double-check)? Only in the latest Blender.

Konstantin (bokoa) added a comment.EditedFri, Nov 15, 2:25 PM

By doing anything with brushes you mean, to edit them? Or to scupt?
Also not clear, if you start the sculpt from scratch in the latest Blender do you still have the problem? Or only if you start in 2.80 and bring to 2.81?

Very hard to size brush, draw, switch etc after undo operation, after switching from edit mode to sculpt mode. Now I will try to attach the file

And we need a file to test things.
And another question, you do not have the problem in 2.80 right (please double-check)? Only in the latest Blender.

Yes. Only in the latest Blender

I mentioned it in https://developer.blender.org/T71434 : Undo of the first stroke after entering sculpt mode is lagging
Exact steps for others to reproduce the error:
Open high poly mesh in sculpt mode (few million polygons), make one stroke and then undo. Lag is noticable

I think this bug should be renamed to "Undo of the first stroke after entering sculpt mode of high poly mesh is lagging" to not be confusing

Konstantin (bokoa) added a comment.EditedFri, Nov 15, 2:52 PM

By doing anything with brushes you mean, to edit them? Or to scupt?
Also not clear, if you start the sculpt from scratch in the latest Blender do you still have the problem? Or only if you start in 2.80 and bring to 2.81?

Can't upload at the moment, but It's a human body sculpted fully in 2.8, then a litttle bit in 2.81 with dyntopo only. Project consists only of two meshes it's body and hair. It's really high-poly. I just cant find something similar that lagging like this ralative the issues with brush, switching modes, save and undo operations I mentioned, all other projects 2.8 made seems to be have no problems. In previous build I was testing yesterday all sculpts 2.8 made were really laggy.

@Leha (leha) ok we still need a file to test, so waiting for it

@Leha (leha) also, does it happen with files created from scratch in the latest 2.81?

Dalai Felinto (dfelinto) renamed this task from Laggy sculpting in 2.81 with 2.8 models to Undo of the first stroke after entering sculpt mode for 2.8 models is lagging.Fri, Nov 15, 3:08 PM
Dalai Felinto (dfelinto) updated the task description. (Show Details)
Konstantin (bokoa) added a comment.EditedFri, Nov 15, 3:09 PM

@Leha (leha) also, does it happen with files created from scratch in the latest 2.81?

I was trying to create something complicated from scratch with union of many meshes today to reproduce, and don't see nothing cause troubles.

Konstantin (bokoa) added a comment.EditedFri, Nov 15, 3:11 PM

By doing anything with brushes you mean, to edit them? Or to scupt?
Also not clear, if you start the sculpt from scratch in the latest Blender do you still have the problem? Or only if you start in 2.80 and bring to 2.81?

file with the problem is here!

Alright, I will test shortly. @Leha (leha) do you have the same problem? If so what is your OS / graphic card / driver?

I was trying to create something complicated from scratch with union of many meshes today to reproduce, and don't see nothing cause troubles.

@Konstantin (bokoa) ok, so for now we assume it only happens with files from 2.80. I guess the same for 2.79? It must have been a default option that changed since. @Pablo Dobarro (pablodp606) any clues?

Leha (leha) added a comment.EditedFri, Nov 15, 3:34 PM

@Dalai Felinto (dfelinto) Yes it happens with files created from scratch in latest 2.81 builds.

Exact steps for others to reproduce the error:

  1. Open Blender. Select default cube
  2. Ctrl + 5 to subdivide default cube
  3. Apply subdivision modifier
  4. Ctrl + 4 to subdivde mesh again and get 1.5 million polygons (high poly mesh)
  5. Apply subdivision modifier again
  6. Switch to sulpt mode
  7. Make one stroke
  8. Undo
  9. Notice lag (depends on performance of your system)

It is caused by PBVH rebuilds as mentioned in https://developer.blender.org/T71434

Konstantin (bokoa) added a comment.EditedFri, Nov 15, 3:36 PM

Alright, I will test shortly. @Leha (leha) do you have the same problem? If so what is your OS / graphic card / driver?

I was trying to create something complicated from scratch with union of many meshes today to reproduce, and don't see nothing cause troubles.

@Konstantin (bokoa) ok, so for now we assume it only happens with files from 2.80. I guess the same for 2.79? It must have been a default option that changed since. @Pablo Dobarro (pablodp606) any clues?

I see it as either only some 2.8 files or high-poly models trouble . Trying to find something from 2.79 to check..

For the records, I cannot reproduce it here:

Operating system: Linux-5.3.0-23-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 960M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.26

Konstantin (bokoa) added a comment.EditedFri, Nov 15, 5:05 PM

I've tested with 3 2.79 models, not noticed the problem

Konstantin (bokoa) added a comment.EditedFri, Nov 15, 6:12 PM

this is a 2.79 model thats behavior exactly as I sent above my model produces

apply mirror modifier
apply subdivision modifier to 3
sculpt it
result - lagging

2.8 has no such big lags with that model also, just a little bit relative to my computer performance, absolutely comfortly to work

Recorded this video that shows how to reproduce lagging of undo. Lag happens only when undoing first brush stroke. This is just a default cube subdivided few times to get 6 million polygons. File size is 860 MB so I don't think it's a good idea to upload it.
In 2.80 there was no such a lag.

Campbell Barton (campbellbarton) raised the priority of this task from Needs Information from User to Confirmed, Medium.Mon, Nov 18, 9:20 AM

While I cant redo the lag (or at least not much lag), It's reading the global undo state which would be the cause.

Checking on a fix.

Konstantin (bokoa) added a comment.EditedTue, Nov 19, 3:14 PM

Guys, I sculpted today from scratch almost same sized high-poly mesh like a human body in 2.81 and can say for sure that the reason is not just an undo stroke operation. When size reaches about 200 k verts and 200k faces it starts to lagging while making brush strokes. My project file in which I noticed the lags for first time was about 60 mb made in 2.8, but new file is 60 mb also, made in 2.81, they are very similar and both lagging in 2.81 but not in 2.8. I think this is an important information for you to fix this in future probably. Thanks!

@Konstantin (bokoa) please make a new bug report with details of how to redo.