GPencil: Multiple lattices reduces FPS #89349

Closed
opened 2021-06-22 04:17:09 +02:00 by raylee · 22 comments

System Information
Operating system:Windows 10
Graphics card:RTX6000
CPU:intel xeon platinum 8179m

Blender Version
Broken: 2.93

Short description of error
When version 2.93 is updated, you can add multiple lattices to the same Greasepencil, you have a new one problem
Adding multiple lattices to the same Greasepencil reduces the frame rate to 3 fps
CPU utilization is very poor,mainly focused on the use of a single

Step to Reproduce the error

  • Open .blend file
  • Select lattice then enter edit mode
  • Select vertices and move them with key G
  • Notice the FPS value
  • In object mode either add or remove lattice modifiers
  • repeat steps 2-3
  • Check the FPS value

Test File:

#89349.blend

QQ截图20210622100256.jpg

QQ截图20210622100238.jpg

Short video:
#89349.gif

**System Information** Operating system:Windows 10 Graphics card:RTX6000 CPU:intel xeon platinum 8179m **Blender Version** Broken: 2.93 **Short description of error** When version 2.93 is updated, you can add multiple lattices to the same Greasepencil, you have a new one problem Adding multiple lattices to the same Greasepencil reduces the frame rate to 3 fps CPU utilization is very poor,mainly focused on the use of a single **Step to Reproduce the error** - Open .blend file - Select lattice then enter edit mode - Select vertices and move them with key `G` - Notice the FPS value - In object mode either add or remove lattice modifiers - repeat steps 2-3 - Check the FPS value Test File: [#89349.blend](https://archive.blender.org/developer/F10208021/T89349.blend) ![QQ截图20210622100256.jpg](https://archive.blender.org/developer/F10187307/QQ截图20210622100256.jpg) ![QQ截图20210622100238.jpg](https://archive.blender.org/developer/F10187306/QQ截图20210622100238.jpg) Short video: ![#89349.gif](https://archive.blender.org/developer/F10208550/T89349.gif)
Author

Added subscriber: @RayLee

Added subscriber: @RayLee
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Adding multiple lattice modifier drops the FPS almost to 6-12.

Confirming the report but Grease pencil module team can answer this in better way.


System Information

Graphics card : AMD Radeon(TM) 535 ATI Technologies .
Blender version: 2.93 LTS```
Adding multiple lattice modifier drops the FPS almost to 6-12. Confirming the report but `Grease pencil` module team can answer this in better way. --- **System Information** ```Operating system : Windows-10-10.0.18362-SP0 64 Bits Graphics card : AMD Radeon(TM) 535 ATI Technologies . Blender version: 2.93 LTS```

Added subscriber: @antoniov

Added subscriber: @antoniov

@RayLee Could you provide a simple test file to profile where is the bottleneck?

@RayLee Could you provide a simple test file to profile where is the bottleneck?
Antonio Vazquez changed title from 【Greasepencil】Multiple lattices cause Cottonwood to GPencil: Multiple lattices reduces FPS 2021-06-22 16:21:08 +02:00

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'
Member

Hi @antoniov , initially I confirmed the ticket, now unsure if there is actual fall in FPS.

Could you provide a simple test

Tried with default 2d animation scene.

From my observation: FPS increased when adding Lattice modifier in stack but FPS reduces when I stopped to add them (I think its obvious)

Hi @antoniov , initially I confirmed the ticket, now unsure if there is actual fall in FPS. >Could you provide a simple test Tried with default 2d animation scene. From my observation: FPS increased when adding Lattice modifier in stack but FPS reduces when I stopped to add them (I think its obvious)

@PratikPB2123 the point in your comment is From my observation... I have tested in my PC and I don't see anything, so maybe my example is not the best or I'm doing something different, this is the reason I would like to have a test file.

You can understand that for us is a time consuming task to prepare a test file for each bug report, so if you provide a test file we can go to the problem itself, instead to try to reproduce it first creating a test file.

Thanks for your understanding.

@PratikPB2123 the point in your comment is `From my observation`... I have tested in my PC and I don't see anything, so maybe my example is not the best or I'm doing something different, this is the reason I would like to have a test file. You can understand that for us is a time consuming task to prepare a test file for each bug report, so if you provide a test file we can go to the problem itself, instead to try to reproduce it first creating a test file. Thanks for your understanding.
Member

@antoniov , sorry to keep you on wait. Attaching the file. (Also updating the task description)

is a time consuming task to prepare a test file for each bug report

Yes, I understand.

#89349.blend

@antoniov , sorry to keep you on wait. Attaching the file. (Also updating the task description) > is a time consuming task to prepare a test file for each bug report Yes, I understand. [#89349.blend](https://archive.blender.org/developer/F10208021/T89349.blend)

Thanks @PratikPB2123 for the file. I will do a profile test to see what is going on.

Thanks @PratikPB2123 for the file. I will do a profile test to see what is going on.

In the first test with your file, I don't see anything below 21 FPS (only in one frame) and later keeps 25 FPS all the time. I have a i9-9900K CPU with NVIDIA RTX2080 TI using Windows 10.

Could you record a small video with the exact steps you do?...maybe you do something in a different way than me and this is the reason.

Also, have you tested in a different PC with different hardware setup?

About threading, the modifiers evaluation is done in a single thread because need to do sequential, so don't see a way to make it multithread.

In the first test with your file, I don't see anything below 21 FPS (only in one frame) and later keeps 25 FPS all the time. I have a i9-9900K CPU with NVIDIA RTX2080 TI using Windows 10. Could you record a small video with the exact steps you do?...maybe you do something in a different way than me and this is the reason. Also, have you tested in a different PC with different hardware setup? About threading, the modifiers evaluation is done in a single thread because need to do sequential, so don't see a way to make it multithread.

Second test with your file. I'm able to get sustained 40 FPS

Second test with your file. I'm able to get sustained 40 FPS
Member

Could you record a small video with the exact steps you do?

Uploaded the video

have you tested in a different PC with different hardware setup?

Not yet. I will check with other laptop on weekend

>Could you record a small video with the exact steps you do? Uploaded the video >have you tested in a different PC with different hardware setup? Not yet. I will check with other laptop on weekend

Looking at your video I see why I could not reproduce, we were looking at different things. The modifiers are optimized to keep fast FPS playing animation.

In you video you are editing the data and you are looking at the FPS of the viewport refresh. In this case, the system precalculate a lot of things every time you edit a point. This is done to get fast play, but the cost is the edition is slower.

Every time you edit the stroke, the internal geometry of several things of the stroke is calculated and saved to use later and this is what you get. Also, this is not related to modifiers only, modifiers just add more complexity to the calculation.

I have tested in my system and I don't notice any lag editting the lattice, but I did not made a measure with a tool. Of course edit with lattice modifiers is slower, but this is normal and don't make edit unusable.

I don't know what we can do here to improve speed because the problem is if we delay updates in edit, the play speed will be worst.

Looking at your video I see why I could not reproduce, we were looking at different things. The modifiers are optimized to keep fast FPS playing animation. In you video you are editing the data and you are looking at the FPS of the viewport refresh. In this case, the system precalculate a lot of things every time you edit a point. This is done to get fast play, but the cost is the edition is slower. Every time you edit the stroke, the internal geometry of several things of the stroke is calculated and saved to use later and this is what you get. Also, this is not related to modifiers only, modifiers just add more complexity to the calculation. I have tested in my system and I don't notice any lag editting the lattice, but I did not made a measure with a tool. Of course edit with lattice modifiers is slower, but this is normal and don't make edit unusable. I don't know what we can do here to improve speed because the problem is if we delay updates in edit, the play speed will be worst.
Author

In #89349#1180793, @antoniov wrote:
@RayLee Could you provide a simple test file to profile where is the bottleneck?

@antoniov I’m sorry I didn’t get the message until now. Here’s an interesting question: 1. When I have a character that has 10 lattices, FPS is very low.

  1. When I split the characters into different GP, adding lattices to different GP, they did well.

Also, I don’t know if you’ve noticed, but the CPU only uses a single thread, and the utilization is very low.

Check out the video for details
https://youtu.be/RmgKGsnJlXA

> In #89349#1180793, @antoniov wrote: > @RayLee Could you provide a simple test file to profile where is the bottleneck? @antoniov I’m sorry I didn’t get the message until now. Here’s an interesting question: 1. When I have a character that has 10 lattices, FPS is very low. 2. When I split the characters into different GP, adding lattices to different GP, they did well. Also, I don’t know if you’ve noticed, but the **CPU only uses a single thread, and the utilization is very low.** Check out the video for details https://youtu.be/RmgKGsnJlXA
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

Thx for the report!

Reading all this makes me think this is more of a request for performance improvement than a real bug.
Even if we run into a suboptimal, non-linear scaling of performance with multiple lattices or seeing the fact that multithreading is not utilized well, the tracker would still be the wrong place to handle this I think.
Unless there is something obviously wrong @antoniov? Usually this would be closed due to the following policy (but will let @antoniov decide):

Thanks for the report. While we do continue to work on improving performance in general, potential performance improvements are not handled as bug reports.
To improve performance, consider using less complex geometry, simpler shaders and smaller textures.
Thx for the report! Reading all this makes me think this is more of a request for performance improvement than a real bug. Even if we run into a suboptimal, non-linear scaling of performance with multiple lattices or seeing the fact that multithreading is not utilized well, the tracker would still be the wrong place to handle this I think. Unless there is something obviously wrong @antoniov? Usually this would be closed due to the following policy (but will let @antoniov decide): ``` Thanks for the report. While we do continue to work on improving performance in general, potential performance improvements are not handled as bug reports. To improve performance, consider using less complex geometry, simpler shaders and smaller textures. ```

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

We can close it because this is a feature request..not a bug.

We can close it because this is a feature request..not a bug.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#89349
No description provided.