Geometry Node: Strange overhead on access to curve normals #104045
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104045
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 527.56
Blender Version
Broken: version: 3.3.2 Release Candidate, branch: master, commit date: 2022-10-26 09:55, hash:
2a7b8e78e1
Worked: (newest version of Blender that worked as expected)
Short description of error
Strange overhead on access to curve normals:
This example demonstrates the big difference in the speed of the Curve Sampling node.
It appears depending on whether the normal attribute for the curve has been precalculated in any way.
As I can guess, these are lazy normal calculations.
Exact steps for others to reproduce the error
Sample Curve
node (Normal
input).Sample Index
(for sampled normal) on some other primitive. As index use single value.Now, if you save
Normal
attrinute as named on curve before sampling, you will see x8 time difference in tree timings.Example file:
Performance5.blend
Added subscriber: @mod_moder
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Added subscriber: @Bradley_G
Performance5_original.blend
The original file from simplification reported to Iliya.
There are several problems in the node tree.
The first switch is the cause of this performance difference. If it uses "Normal", it will take less time while giving the wrong results; if it uses "Sample Curve-Normal", it will take more time. However according to 1., this node tree should never use "Normal".
Added subscriber: @HooglyBoogly
Changed status from 'Needs Developer To Reproduce' to: 'Archived'
Thanks for the report, but I don't think this is a bug. When the normals are calculated, they are cached on the curve. If you calculate them earlier, the price will be payed earlier in the node tree. There are other changes we could make to improve performance in this file, but we don't generally handle that with reports, other than specific todos.
I drew attention to this due to the fact that the wound several times. Rather, it looks like problems with locks when accessing the normal (or calculating it).
This isn't necessarily a bug report, but rather a bizarre phenomenon I find and I can't explain it at all. That's why I talked to others including Iliya before filing a report.
Regardless of reason, I don't think my questions/confusions are really being answered. and especially as an end result, the performance difference is dramatic.
One difference between my file and Iliya's file is that, I have a Switch node that should have never evaluated "Normal" in the node tree.
But somehow it's still improving the performance with a correct result, while "it end up taking more unnecessary nodes".
Changed status from 'Archived' to: 'Confirmed'
Okay, I'll keep this open for now. I don't have time to look into this much now, but D17134 might help a bit. Or the related CoW patch. Not sure.
This issue was referenced by
7f958217ad
Changed status from 'Confirmed' to: 'Resolved'