Embree shades hair differently from CUDA and OptiX #78152

Closed
opened 3 years ago by Alaska · 15 comments
Alaska commented 3 years ago

System Information:
Operating system: Linux-5.4.0-7634-generic-x86_64-with-debian-bullseye
Graphics card: GTX 1050Ti

Blender Version:
Broken: 2.90.0 fdfe85c616 (2020-06-22 15:41)
Worked: Prior to Embree being enabled by default. 99436acde8

Short description of error:
I've found that in some cases hair will render differently between CPU and GPU rendering. The most common difference is shadows are slightly different.
At first glance this doesn't look like much of an issue, however, if you're rendering an animation on a render farm where some frames are work on by GPUs and others on CPUs (or even doing it locally because OptiX doesn't support CPU+GPU), the difference in shadows appear as a kind of flicker in the hair.

Here's a video show casing this issue:

2020-06-23 20-25-59.mp4

This is caused by Embree as switching back to BVH2 on the CPU makes the issue disappear.

The issue seems most apparent when you have a lot of thin hairs close to each other. Also when you're using a fully opaque surface material.
At first I thought this was a noise pattern difference between CPU and GPU. However, increasing sample counts and using denoisers doesn't solve the issue.

Exact steps for others to reproduce the error:
Create some scenes with some hair. Here's two I made:

#78152 - Embree Hair 1.blend
#78152 - Embree Hair 2.blend

**System Information:** Operating system: Linux-5.4.0-7634-generic-x86_64-with-debian-bullseye Graphics card: GTX 1050Ti **Blender Version:** Broken: 2.90.0 `fdfe85c616` (2020-06-22 15:41) Worked: Prior to Embree being enabled by default. 99436acde8 **Short description of error:** I've found that in some cases hair will render differently between CPU and GPU rendering. The most common difference is shadows are slightly different. At first glance this doesn't look like much of an issue, however, if you're rendering an animation on a render farm where some frames are work on by GPUs and others on CPUs (*or even doing it locally because OptiX doesn't support CPU+GPU*), the difference in shadows appear as a kind of flicker in the hair. Here's a video show casing this issue: [2020-06-23 20-25-59.mp4](https://archive.blender.org/developer/F8638577/2020-06-23_20-25-59.mp4) This is caused by Embree as switching back to BVH2 on the CPU makes the issue disappear. The issue seems most apparent when you have a lot of thin hairs close to each other. Also when you're using a fully opaque surface material. At first I thought this was a noise pattern difference between CPU and GPU. However, increasing sample counts and using denoisers doesn't solve the issue. **Exact steps for others to reproduce the error:** Create some scenes with some hair. Here's two I made: [#78152 - Embree Hair 1.blend](https://archive.blender.org/developer/F8638599/T78152_-_Embree_Hair_1.blend) [#78152 - Embree Hair 2.blend](https://archive.blender.org/developer/F8638601/T78152_-_Embree_Hair_2.blend)
Alaska commented 3 years ago
Poster

Added subscriber: @Alaska

Added subscriber: @Alaska
Alaska commented 3 years ago
Poster

I don't know how feasible a fix for this is, but one "simple" solution jumps to mind:
Expose the "Use Embree" option to the user in a button not hidden behind a debug panel until the Embree for GPU thing is sorted.

I don't know how feasible a fix for this is, but one "simple" solution jumps to mind: Expose the "Use Embree" option to the user in a button not hidden behind a debug panel until the Embree for GPU thing is sorted.
brecht commented 3 years ago
Owner

Added subscriber: @brecht

Added subscriber: @brecht
brecht commented 3 years ago
Owner

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
brecht commented 3 years ago
Owner

Embree for GPU would not solve this most likely, I would suspect the ribbon intersection code more than the BVH traversal.

Embree for GPU would not solve this most likely, I would suspect the ribbon intersection code more than the BVH traversal.
TomG commented 3 years ago

Added subscriber: @TomG

Added subscriber: @TomG
TomG commented 3 years ago

@Alaska if you don't use Sky texture and use only sky light, do you have the same render output ?

@Alaska if you don't use Sky texture and use only sky light, do you have the same render output ?
Alaska commented 3 years ago
Poster

In #78152#968135, @TomG wrote:
@Alaska if you don't use Sky texture and use only sky light, do you have the same render output ?

Yes, the issue persists if I don't use the sky texture.

> In #78152#968135, @TomG wrote: > @Alaska if you don't use Sky texture and use only sky light, do you have the same render output ? Yes, the issue persists if I don't use the sky texture.
brecht self-assigned this 3 years ago

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Owner

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Owner

Leaving it tagged as 2.91, but lowering its priority since it won't be tackled immediately.

Leaving it tagged as 2.91, but lowering its priority since it won't be tackled immediately.
Alaska commented 2 years ago
Poster

As a side note for people experiencing this issue, changing the hair shape to 3D curve in the Render Properties panel works around this issue.

As a side note for people experiencing this issue, changing the hair shape to `3D curve` in the `Render Properties` panel works around this issue.
Collaborator

This issue was referenced by c60c30205d

This issue was referenced by c60c30205d6d2482a1ae04acd10f9bb2c8e98ec2
brecht commented 2 years ago
Owner

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
brecht closed this issue 2 years ago
Alaska commented 2 years ago
Poster

Testing with the patch seems to greatly reduced the differences between CPU rendering and GPU (CUDA). Thank you @brecht

There are still small differences, but I haven't investigated much.

Testing with the patch seems to greatly reduced the differences between CPU rendering and GPU (CUDA). Thank you @brecht There are still small differences, but I haven't investigated much.
ThomasDinges added this to the 2.91 milestone 2 days ago
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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#78152
Loading…
There is no content yet.