Adding a Scene Line Art Grease Pencil object is 20X slower in 3.0 vs 2.93 #90695

Closed
opened 2021-08-16 03:14:17 +02:00 by Chipp Walters · 8 comments

System Information
Operating system: Win 10
Graphics card: RTX 3900
Processor 11th Gen Intel(R) Core(TM) i9-11900KF @ 3.50GHz, 3504 Mhz, 8 Core(s), 16 Logical Processor(s)
Installed Physical Memory (RAM) 64.0 GB

Blender Version
Broken: 3.0.0 Alpha Date: 2021-08-14 Hash: d 5 2 6 1 e 9 7 3 b 5 6 Branch: master
Worked: 2.93.0 Date: 2021-06-02 Hash: 84da05a8b06

Short description of error
Adding a Scene Line Art Grease Pencil object is 20X slower in 3.0 vs 2.93

Exact steps for others to reproduce the error
Did the same for both versions of Blender:

  1. Opened attached scene file (simplified but has a many faces)
  2. Shift-A > Grease Pencil > Scene Line Art
  3. Waited for the Line Art to be rendered.

In 2.93 on my (fast) system it rendered in 17 seconds
In the latest master release of 3.0, it renders in 5 min 32 seconds

Note: edited this report to compress the file and change the name of the file.

blender-line-art-bug.blend

**System Information** Operating system: Win 10 Graphics card: RTX 3900 Processor 11th Gen Intel(R) Core(TM) i9-11900KF @ 3.50GHz, 3504 Mhz, 8 Core(s), 16 Logical Processor(s) Installed Physical Memory (RAM) 64.0 GB **Blender Version** Broken: 3.0.0 Alpha Date: 2021-08-14 Hash: d 5 2 6 1 e 9 7 3 b 5 6 Branch: master Worked: 2.93.0 Date: 2021-06-02 Hash: 84da05a8b06 **Short description of error** Adding a Scene Line Art Grease Pencil object is 20X slower in 3.0 vs 2.93 **Exact steps for others to reproduce the error** Did the same for both versions of Blender: 1. Opened attached scene file (simplified but has a many faces) 2. Shift-A > Grease Pencil > Scene Line Art 3. Waited for the Line Art to be rendered. In 2.93 on my (fast) system it rendered in 17 seconds In the latest master release of 3.0, it renders in 5 min 32 seconds Note: edited this report to compress the file and change the name of the file. [blender-line-art-bug.blend](https://archive.blender.org/developer/F10283455/blender-line-art-bug.blend)
Author

Added subscriber: @chippwalters

Added subscriber: @chippwalters

Added subscribers: @ChengduLittleA, @antoniov

Added subscribers: @ChengduLittleA, @antoniov

@ChengduLittleA Could you take a look?

@ChengduLittleA Could you take a look?
Member

sure... let me check.

sure... let me check.
Member

图片.png

After a fix, now runs fine now somewhere near 25s on my surface, should be close to your 2.93 performance on your machine. I'll attach a patch here shortly.

图片.png

Note that in the model there are some hugely unnecessarily dense structures in some portions of the image. This will slow down line art no matter what algorithm it chooses. I modified a value there in line art so it has better tolerance to this kind of situations (close to 2.93's), but because line art does not work by ray tracing, so once there are hundreds and thousands of triangles piling up in the exact same position in the image, it's not gonna work that well. As a general rule, models (especially mechanical ones) doesn't need triangles to be this dense.

A more optimized algorithm is been developed right now, so hopefully this problem can be better handled in upcoming releases. So this fix is more like a temporary thing where we make line art still usable for such mesh structures before "real" 3.0 release.

![图片.png](https://archive.blender.org/developer/F10285853/图片.png) After a fix, now runs fine now somewhere near 25s on my surface, should be close to your 2.93 performance on your machine. I'll attach a patch here shortly. ![图片.png](https://archive.blender.org/developer/F10285856/图片.png) Note that in the model there are some hugely unnecessarily dense structures in some portions of the image. This will slow down line art no matter what algorithm it chooses. I modified a value there in line art so it has better tolerance to this kind of situations (close to 2.93's), but because line art does not work by ray tracing, so once there are hundreds and thousands of triangles piling up in the exact same position in the image, it's not gonna work that well. As a general rule, models (especially mechanical ones) doesn't need triangles to be this dense. A more optimized algorithm is been developed right now, so hopefully this problem can be better handled in upcoming releases. So this fix is more like a temporary thing where we make line art still usable for such mesh structures before "real" 3.0 release.
Author

Thanks for the fix, Yiming. I know about the density issue and the time required to create the different LINE ART objects. I was just pointing out the huge discrepancy in calculation time between the two versions.

Thanks for the fix, Yiming. I know about the density issue and the time required to create the different LINE ART objects. I was just pointing out the huge discrepancy in calculation time between the two versions.

This issue was referenced by f41beca977

This issue was referenced by f41beca97787d017a437a63cc0da2ce991522dea
Member

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

Changed status from 'Needs Triage' to: 'Resolved'
YimingWu self-assigned this 2021-08-18 06:47:33 +02:00
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#90695
No description provided.