Bump Mapping has been broken since Aug 2018 #62889

Closed
opened 2019-03-24 04:41:31 +01:00 by marc dion · 9 comments

System Information
Operating system: Windows 10 Home (with current updates)
Graphics card: GTX 1070

Blender Version
Broken: HASH: f86c965d7f DATE: August 8th, 2018 Version: v2.79.6
Worked: HASH: b85be88655 DATE: July 16, 2018 Version: v2.79.5

Short description of error

Bump mapping is broken for Cycles. For the example provide, an .exr height map set to Non-Color Data is plugged into the Height input of the Bump node with the Normal output of the Bump node plugged into the Normal input of the Diffuse BSDF node.

Exact steps for others to reproduce the error
Open the attached .blend and activate the Cycles render engine.

Here's the .blend bumpMapBroken.blend

Here's the node setup that is used for all of the attached images. 0 - Nodes.png

This next image shows the last version that I can identify where bump-mapping still works. (2.79.5 HASH# b85be88655) 3 - 2.79.5.png

Next we have a version where bump-mapping is badly broken. (2.79.6 HASH# f86c965d7f) 4 - 2.79.6.png

The final image shows the current state for bump-mapping for both 2.79.7 HASH# d7cecc2ba3) and 2.8 as of March 23. It's still noticeably broken but the error is not as obviously as it was before. 5 - 2.79.7.png

For reference, a render where bump-mapping still functions correctly. Ignore the notes about noise, it's unrelated and irrelevant. (Official 2.79b HASH# f4dc9f9d68 ) 1 - 2.79b.png

**System Information** Operating system: Windows 10 Home (with current updates) Graphics card: GTX 1070 **Blender Version** Broken: HASH: f86c965d7f2 DATE: August 8th, 2018 Version: v2.79.6 Worked: HASH: b85be88655c DATE: July 16, 2018 Version: v2.79.5 **Short description of error** Bump mapping is broken for Cycles. For the example provide, an .exr height map set to Non-Color Data is plugged into the Height input of the Bump node with the Normal output of the Bump node plugged into the Normal input of the Diffuse BSDF node. **Exact steps for others to reproduce the error** Open the attached .blend and activate the Cycles render engine. Here's the .blend [bumpMapBroken.blend](https://archive.blender.org/developer/F6874055/bumpMapBroken.blend) Here's the node setup that is used for all of the attached images. ![0 - Nodes.png](https://archive.blender.org/developer/F6873997/0_-_Nodes.png) This next image shows the last version that I can identify where bump-mapping still works. (2.79.5 HASH# b85be88655c) ![3 - 2.79.5.png](https://archive.blender.org/developer/F6874011/3_-_2.79.5.png) Next we have a version where bump-mapping is badly broken. (2.79.6 HASH# f86c965d7f2) ![4 - 2.79.6.png](https://archive.blender.org/developer/F6874021/4_-_2.79.6.png) The final image shows the current state for bump-mapping for both 2.79.7 HASH# d7cecc2ba3f6) and 2.8 as of March 23. It's still noticeably broken but the error is not as obviously as it was before. ![5 - 2.79.7.png](https://archive.blender.org/developer/F6874030/5_-_2.79.7.png) For reference, a render where bump-mapping still functions correctly. Ignore the notes about noise, it's unrelated and irrelevant. (Official 2.79b HASH# f4dc9f9d68b ) ![1 - 2.79b.png](https://archive.blender.org/developer/F6874002/1_-_2.79b.png)
Author

Added subscriber: @MarcClintDion

Added subscriber: @MarcClintDion

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2019-03-24 13:45:13 +01:00

We changed bump mapping to avoid certain types of black artifacts, and this is such a case.

If you have a white skydome above a plane, bump mapping is not supposed to add darkening. Light is coming from all direction, so no matter which way the normal points it's still supposed to be lit.

We changed bump mapping to avoid certain types of black artifacts, and this is such a case. If you have a white skydome above a plane, bump mapping is not supposed to add darkening. Light is coming from all direction, so no matter which way the normal points it's still supposed to be lit.
Author

I should have tested this further before saying anything, the torus just looked so wrong but I think that's because I was using a model that had a depth that was far too dramatic for bump/normals.

I built a quick model that's more appropriate for bump/normal mapping and the results are actually fantastic. The weird toon lines that used to show up are gone and there is now a view-dependent highlighting that gives a substantial illusion of depth. I fully retract my complaint. I'm sorry for wasting your time.

(i)The old code with the weird toon line and flat highlighting old.png

(ii) The new code new.png

I should have tested this further before saying anything, the torus just looked so wrong but I think that's because I was using a model that had a depth that was far too dramatic for bump/normals. I built a quick model that's more appropriate for bump/normal mapping and the results are actually fantastic. The weird toon lines that used to show up are gone and there is now a view-dependent highlighting that gives a substantial illusion of depth. I fully retract my complaint. I'm sorry for wasting your time. (i)The old code with the weird toon line and flat highlighting ![old.png](https://archive.blender.org/developer/F6876759/old.png) (ii) The new code ![new.png](https://archive.blender.org/developer/F6876770/new.png)
Author

This comment was removed by @MarcClintDion

*This comment was removed by @MarcClintDion*
Author

Here's the shader setup I used to create the height map in case anyone working on code wants to bust out custom height-maps for testing purposes. There's a .blend file as well. Any model baked into the height map must simply have the material applied that is named "height" then press f12 for standand camera rendering. There does not seem to be much benefit to rendering more than 8 samples for Emission. That's enough to get perfect anti-aliasing at moderate resolutions. The saved image should be saved as either 16-bit per channel png/tif or some floating point image like exr/hdr.

Screenshot (2005).png

The following is the original image for the node setup for anti-aliased, orthographic camera baking that I pilfered from BlenderArtists.org eons ago. I forget who configured it. Feel free to claim it here if it's you.

CYCLES_DEPTH.jpg

FYI. The height value used in the Bump node matches the height for the model that is captured in the height map. In this case, the model is 0.1 units along the z-axis and the bump node of the rendered height map also has a value of 0.1 for it's height. It works well if they match.

draft_1.blend

Here's the shader setup I used to create the height map in case anyone working on code wants to bust out custom height-maps for testing purposes. There's a .blend file as well. Any model baked into the height map must simply have the material applied that is named "height" then press f12 for standand camera rendering. There does not seem to be much benefit to rendering more than 8 samples for Emission. That's enough to get perfect anti-aliasing at moderate resolutions. The saved image should be saved as either 16-bit per channel png/tif or some floating point image like exr/hdr. ![Screenshot (2005).png](https://archive.blender.org/developer/F6879835/Screenshot__2005_.png) The following is the original image for the node setup for anti-aliased, orthographic camera baking that I pilfered from BlenderArtists.org eons ago. I forget who configured it. Feel free to claim it here if it's you. ![CYCLES_DEPTH.jpg](https://archive.blender.org/developer/F6879839/CYCLES_DEPTH.jpg) FYI. The height value used in the Bump node matches the height for the model that is captured in the height map. In this case, the model is 0.1 units along the z-axis and the bump node of the rendered height map also has a value of 0.1 for it's height. It works well if they match. [draft_1.blend](https://archive.blender.org/developer/F6879859/draft_1.blend)
Author

This comment was removed by @MarcClintDion

*This comment was removed by @MarcClintDion*

The ground truth is displacement, we have tests to compare how close they are.

The ground truth is displacement, we have tests to compare how close they are.
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
2 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#62889
No description provided.