Eevee: Normal maps in tangent space on animated character is slooow #60613

Closed
opened 2019-01-18 08:53:51 +01:00 by Pelle Johnsen · 18 comments

System Information
Operating system: Windows 10 (64bit)
Graphics card: Nvidia GTX 970M, driver 417.71
CPU: Intel I7-6700HQ
Ram: 16GB

Blender Version
Broken: blender-2.80.0-git.ad707115d5bc-windows64 (2019-01-17 10:44)

Short description of error
When using normal map node in tangent space on a skinned character, animation playback becomes very slow (~15FPS). Maybe tangents aren't cached properlyand calculated every frame?

Exact steps for others to reproduce the error
I can't share the specific .blend, but here is info:

  • Mesh has 15K tris
  • Normal map is 2048x2048
  • Armature has about 50 vertex groups (it's from mixamo)

Screenshot with tangent space:
normal_map_tangent.png

And in object space:
normal_map_object.png

**System Information** Operating system: Windows 10 (64bit) Graphics card: Nvidia GTX 970M, driver 417.71 CPU: Intel I7-6700HQ Ram: 16GB **Blender Version** Broken: blender-2.80.0-git.ad707115d5bc-windows64 (2019-01-17 10:44) **Short description of error** When using normal map node in tangent space on a skinned character, animation playback becomes very slow (~15FPS). Maybe tangents aren't cached properlyand calculated every frame? **Exact steps for others to reproduce the error** I can't share the specific .blend, but here is info: - Mesh has 15K tris - Normal map is 2048x2048 - Armature has about 50 vertex groups (it's from mixamo) Screenshot with tangent space: ![normal_map_tangent.png](https://archive.blender.org/developer/F6325483/normal_map_tangent.png) And in object space: ![normal_map_object.png](https://archive.blender.org/developer/F6325494/normal_map_object.png)
Author

Added subscriber: @pjoeNone

Added subscriber: @pjoeNone

#72168 was marked as duplicate of this issue

#72168 was marked as duplicate of this issue
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Please try to create a new .blend file that shows the issue. Without it, it is much harder for us to verify the issue and fix it.

Please try to create a new .blend file that shows the issue. Without it, it is much harder for us to verify the issue and fix it.
Author

I've managed to create a simple file showing the issue. Sorry for the rather weird animation :)

My best guess is that for some reason tangents are re-calculated on every frame (which gets slow with this poly count).

Is skinning normally done on CPU or GPU in Eevee?

slow_normal_map.blend

I've managed to create a simple file showing the issue. Sorry for the rather weird animation :) My best guess is that for some reason tangents are re-calculated on every frame (which gets slow with this poly count). Is skinning normally done on CPU or GPU in Eevee? [slow_normal_map.blend](https://archive.blender.org/developer/F6354776/slow_normal_map.blend)
Clément Foucault was assigned by Jacques Lucke 2019-01-21 11:08:53 +01:00
Member

Added subscriber: @fclem

Added subscriber: @fclem
Member

Thanks, the performance difference is very noticeable indeed.
Not sure if this is a bug. I'll let @fclem decide.

Thanks, the performance difference is very noticeable indeed. Not sure if this is a bug. I'll let @fclem decide.

Everything about skinning is done on CPU.

Using normal map recomputes the tangent space every time the mesh is updated (because normals are updated).
If the slowdown was less noticeable in 2.79 I would consider it a performance regression.

Everything about skinning is done on CPU. Using normal map recomputes the tangent space every time the mesh is updated (because normals are updated). If the slowdown was less noticeable in 2.79 I would consider it a performance regression.
Author

FWIW: It seems equally slow in 2.79

slow_normal_map_2.79.blend

This is a pity as this is not a good UX for working with game characters with this level of detail (which isn't that high by today's game standards)

FWIW: It seems equally slow in 2.79 [slow_normal_map_2.79.blend](https://archive.blender.org/developer/F6355339/slow_normal_map_2.79.blend) This is a pity as this is not a good UX for working with game characters with this level of detail (which isn't that high by today's game standards)

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

This could definitely be optimized, but it's outside the scope of the bug tracker.

This could definitely be optimized, but it's outside the scope of the bug tracker.

Added subscriber: @Zuorion-4

Added subscriber: @Zuorion-4

In #60613#603368, @fclem wrote:
Everything about skinning is done on CPU.

@fclem
pcanback posted node group on BlenderArtists that is workaround for that bug
https://blenderartists.org/t/way-faster-normal-map-node-for-realtime-animation-playback-with-tangent-space-normals/
i've tested it on my model and playback fps went from 20 to solid 60 fps without visual difference.

> In #60613#603368, @fclem wrote: > Everything about skinning is done on CPU. @fclem **pcanback** posted node group on BlenderArtists that is workaround for that bug https://blenderartists.org/t/way-faster-normal-map-node-for-realtime-animation-playback-with-tangent-space-normals/ i've tested it on my model and playback fps went from 20 to solid 60 fps without visual difference.

The tangent space the nodetree computes is not the mikktspace TBN and it changes the final aspect. I am not really inclined to include this, unless there is a way to derived the mikktspace inside shader code.

The tangent space the nodetree computes is not the mikktspace TBN and it changes the final aspect. I am not really inclined to include this, unless there is a way to derived the mikktspace inside shader code.
Member

Added subscribers: @MLSpence, @lichtwerk

Added subscribers: @MLSpence, @lichtwerk

Added subscriber: @JacobMerrill-1

Added subscriber: @JacobMerrill-1

what about porting skinning to a vertex transform feedback shader?

(and tangent space normals?)
https://github.com/tcoppex/aer-engine/blob/master/demos/aura/data/shaders/Skinning.glsl

what about porting skinning to a vertex transform feedback shader? (and tangent space normals?) https://github.com/tcoppex/aer-engine/blob/master/demos/aura/data/shaders/Skinning.glsl
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
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
8 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#60613
No description provided.