Huge performance drop with Eevee under certain conditions #64458

Closed
opened 2019-05-10 22:29:47 +02:00 by lucas veber · 14 comments

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.67

Blender Version
Broken: version: 2.80 (sub 59), branch: Unknown, commit date: Unknown Unknown, hash: rBUnknown
Worked: (optional)

Short description of error
Eevee is very slow under unexpected conditions.

Exact steps for others to reproduce the error
In the attached scene, rendering with Eevee is slow (press spacebar to playback and see the fps in the top left corner).
Open this blend and switch to render mode. It contains 5 coconut trees only.
coconuts.blend

Weirdly, by doing one of the following operation listed below, the fps suddenly jumps from 4fps to 40-60fps.

  1. Unplug the "Normal Map" node on the right from the "Diffuse BSDF" node next to it.
  2. Remove the "coconut_trunk" material slot from the active object, the palms. Note this material is useless, it's not assigned to any faces. However it seems it's still evaluated in the loop, causing important slowdown.
  3. Remove the "Wave" modifier from all palms objects.
**System Information** Operating system: Windows-10-10.0.17134 64 Bits Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.67 **Blender Version** Broken: version: 2.80 (sub 59), branch: Unknown, commit date: Unknown Unknown, hash: `rBUnknown` Worked: (optional) **Short description of error** Eevee is very slow under unexpected conditions. **Exact steps for others to reproduce the error** In the attached scene, rendering with Eevee is slow (press spacebar to playback and see the fps in the top left corner). Open this blend and switch to render mode. It contains 5 coconut trees only. [coconuts.blend](https://archive.blender.org/developer/F7026135/coconuts.blend) Weirdly, by doing one of the following operation listed below, the fps suddenly jumps from 4fps to 40-60fps. 1. Unplug the "Normal Map" node on the right from the "Diffuse BSDF" node next to it. 2. Remove the "coconut_trunk" material slot from the active object, the palms. Note this material is useless, it's not assigned to any faces. However it seems it's still evaluated in the loop, causing important slowdown. 3. Remove the "Wave" modifier from all palms objects.
Author

Added subscriber: @LucasVeber

Added subscriber: @LucasVeber
Member

Added subscriber: @nacioss

Added subscriber: @nacioss
Member

Yeah, i can reproduce the issue

Yeah, i can reproduce the issue

Added subscriber: @Phigon

Added subscriber: @Phigon

The Normal Map has a performance leak on dense meshes, and leaks even if said mesh, does not have the material with it assigned to anything.

I increased my fps (with my scene) in eevee from 3 fps to around 30 fps, by muting the normal map node from their materials.
There were no textures in it, it was just there to make adding a texture faster if I needed to.

The Normal Map has a performance leak on dense meshes, and leaks even if said mesh, does not have the material with it assigned to anything. I increased my fps *(with my scene)* in eevee from **3 fps** to around **30 fps**, by muting the normal map node from their materials. There were no textures in it, it was just there to make adding a texture faster if I needed to.
Clément Foucault was assigned by Sebastian Parborg 2019-06-11 15:41:51 +02:00

Added subscriber: @TheOldBen

Added subscriber: @TheOldBen

As a temporary workaround, we use a script to mute the normal nodes, which gives regular viewport performance and another to un-mute the nodes later for rendering:

Mute Nodes:

import bpy
for mat in bpy.data.materials:
    mat_node = mat.node_tree.nodes
    for node in mat_node:
        if isinstance(node, bpy.types.ShaderNodeNormalMap):
            node.mute = True

Un-Mute Nodes

import bpy
for mat in bpy.data.materials:
    mat_node = mat.node_tree.nodes
    for node in mat_node:
        if isinstance(node, bpy.types.ShaderNodeNormalMap):
            node.mute = False
As a temporary workaround, we use a script to mute the normal nodes, which gives regular viewport performance and another to un-mute the nodes later for rendering: Mute Nodes: ``` import bpy for mat in bpy.data.materials: mat_node = mat.node_tree.nodes for node in mat_node: if isinstance(node, bpy.types.ShaderNodeNormalMap): node.mute = True ``` Un-Mute Nodes ``` import bpy for mat in bpy.data.materials: mat_node = mat.node_tree.nodes for node in mat_node: if isinstance(node, bpy.types.ShaderNodeNormalMap): node.mute = False ```

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

This is because we recalculate the tangent space if the mesh changes. There is no workaround because normalmaps uses it. Realtime engines assume the tangents do not change and use GPU skinning, 2 things we cannot do in a program in blender (at least without special cases that are going to tangle everything).

This is because we recalculate the tangent space if the mesh changes. There is no workaround because normalmaps uses it. Realtime engines assume the tangents do not change and use GPU skinning, 2 things we cannot do in a program in blender (at least without special cases that are going to tangle everything).

Made an add-on that does the toggling, aptly named: Toggle Normal Maps
https://github.com/theoldben/ToggleNormalMaps

Made an add-on that does the toggling, aptly named: Toggle Normal Maps https://github.com/theoldben/ToggleNormalMaps
Author

In #64458#752624, @TheOldBen wrote:
Made an add-on that does the toggling, aptly named: Toggle Normal Maps
https://github.com/theoldben/ToggleNormalMaps

Thanks for sharing!

Realtime engines assume the tangents do not change and use GPU skinning

@fclem Are there any plans for such optimizations? Would be a game changer, even if it's scheduled for Blender 3.0. Thanks for your work!

> In #64458#752624, @TheOldBen wrote: > Made an add-on that does the toggling, aptly named: Toggle Normal Maps > https://github.com/theoldben/ToggleNormalMaps Thanks for sharing! > Realtime engines assume the tangents do not change and use GPU skinning @fclem Are there any plans for such optimizations? Would be a game changer, even if it's scheduled for Blender 3.0. Thanks for your work!

There has been an alternate solution suggested here:
https://blenderartists.org/t/way-faster-normal-map-node-for-realtime-animation-playback-with-tangent-space-normals/1175379/3

We made an addon to replace Normal Map Nodes with the above-mentioned setup and return them back to normal with a toggle button for render time.
This add-on is available free of charge here:
https://github.com/theoldben/BlenderNormalGroups

Node_Toggle_Interface.gif

There has been an alternate solution suggested here: https://blenderartists.org/t/way-faster-normal-map-node-for-realtime-animation-playback-with-tangent-space-normals/1175379/3 We made an addon to replace Normal Map Nodes with the above-mentioned setup and return them back to normal with a toggle button for render time. This add-on is available free of charge here: https://github.com/theoldben/BlenderNormalGroups ![Node_Toggle_Interface.gif](https://archive.blender.org/developer/F8148259/Node_Toggle_Interface.gif)
Author

Thanks a lot for mentioning it, this is more than welcome! Will make happy thousand of users.

Thanks a lot for mentioning it, this is more than welcome! Will make happy thousand of users.

Has this been addressed in some way in Blender 3,6 so we dont have to toggle this, even with this very nice add-on?

Has this been addressed in some way in Blender 3,6 so we dont have to toggle this, even with this very nice add-on?
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
6 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#64458
No description provided.