Page MenuHome

Huge performance drop with Eevee under certain conditions
Closed, ArchivedPublic

Description

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.

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.

Details

Type
Bug

Event Timeline

lucas veber (lucky3) updated the task description. (Show Details)

Yeah, i can reproduce the issue

Ovionis (Phigon) added a comment.EditedMay 15 2019, 12:10 AM

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.

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.

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

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).