Circular/radial bands in this hair scene (most noticeable in CPU) #48684

Closed
opened 2016-06-19 21:05:35 +02:00 by YAFU · 17 comments

System Information
Kubuntu Linux 14.04 64 bits, GTX 960 nvidia 352, i7-3770

Blender Version
Broken: 2.77a, buildbot

Short description of error
In this scene:
test file.blend

circular/radial bands appear. I do not know if they should be there, but the point is that GPU/CPU render result do not match, and the bands are most noticeable with CPU:
cpu.jpg
gpu.jpg

Exact steps for others to reproduce the error
Open the scene, configure for CPU or GPU and render.

**System Information** Kubuntu Linux 14.04 64 bits, GTX 960 nvidia 352, i7-3770 **Blender Version** Broken: 2.77a, buildbot **Short description of error** In this scene: [test file.blend](https://archive.blender.org/developer/F317710/test_file.blend) circular/radial bands appear. I do not know if they should be there, but the point is that GPU/CPU render result do not match, and the bands are most noticeable with CPU: ![cpu.jpg](https://archive.blender.org/developer/F317711/cpu.jpg) ![gpu.jpg](https://archive.blender.org/developer/F317713/gpu.jpg) **Exact steps for others to reproduce the error** Open the scene, configure for CPU or GPU and render.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @YAFU

Added subscriber: @YAFU

Added subscriber: @mib2berlin

Added subscriber: @mib2berlin

Can verify on Blender 2.77a.

Opensuse Leap 42.1 x86_64
Intel i5 3570K
RAM 16 GB
GTX 760 4 GB /Display card
GTX 670 2 GB
Driver 367.27
opencl_runtime_16.1_x64_sles_5.2.0.10002

Can verify on Blender 2.77a. Opensuse Leap 42.1 x86_64 Intel i5 3570K RAM 16 GB GTX 760 4 GB /Display card GTX 670 2 GB Driver 367.27 opencl_runtime_16.1_x64_sles_5.2.0.10002

Added subscriber: @NikoLeopold

Added subscriber: @NikoLeopold

Have no graphics card, but can confirm identical strong circular bands on i5-2557M with 4 GB RAM running Blender 2.77a on Arch Linux.

Have no graphics card, but can confirm identical strong circular bands on i5-2557M with 4 GB RAM running Blender 2.77a on Arch Linux.

Added subscriber: @Sergey

Added subscriber: @Sergey
Sergey Sharybin self-assigned this 2016-06-28 11:18:27 +02:00

Developer note: After quite some investigation nailed this down to c45c472 which happened between 2.70 and 2.71. Unfortunately, from a quick experiment with disabling SSE2 branches in current code the issue was not solved, so need to doublecheck all changed parts of non-SSE2 code in that commit. Currently looks like it's a distance cutoff which is not working very well. More investigation tomorrow.

Developer note: After quite some investigation nailed this down to c45c472 which happened between 2.70 and 2.71. Unfortunately, from a quick experiment with disabling SSE2 branches in current code the issue was not solved, so need to doublecheck all changed parts of non-SSE2 code in that commit. Currently looks like it's a distance cutoff which is not working very well. More investigation tomorrow.

Did much deeper investigation here, and unfortunately seems there's no simple solution here.

Root of the issue goes to the precision issues, which sometimes leads to a missing intersections. It kinda worked before, but some optimizations re-formulated some equations which introduced some machine precision issues. Internally it's all about td < 0.0f check. Currently in some cases it'll be really small negative value which leads to a missing intersection while old code was recording this intersection.

For non-SSE code this seems to be relatively easily worked around by going back to old equation for tc:

float tc = dot3(tdif, tdif) - (tdifz*tdifz + tdifz*tdifz*gd*gd + r1*r1 + 2*r1*tdifz*gd)

But unfortunately, i didn't find source of precision issue for SSE code, it might be a bit more tricky since it uses different math on CPU.

In any case, it's something we should look into (maybe investigate other ways of checking for intersections -- i.e. a while ago i've started playing around with 2D-projection based code similar to watertight triangle intersection, but didn't quite finish that yet). But it's not strictly speaking a bug.

Did much deeper investigation here, and unfortunately seems there's no simple solution here. Root of the issue goes to the precision issues, which sometimes leads to a missing intersections. It kinda worked before, but some optimizations re-formulated some equations which introduced some machine precision issues. Internally it's all about `td < 0.0f` check. Currently in some cases it'll be really small negative value which leads to a missing intersection while old code was recording this intersection. For non-SSE code this seems to be relatively easily worked around by going back to old equation for `tc`: ``` float tc = dot3(tdif, tdif) - (tdifz*tdifz + tdifz*tdifz*gd*gd + r1*r1 + 2*r1*tdifz*gd) ``` But unfortunately, i didn't find source of precision issue for SSE code, it might be a bit more tricky since it uses different math on CPU. In any case, it's something we should look into (maybe investigate other ways of checking for intersections -- i.e. a while ago i've started playing around with 2D-projection based code similar to watertight triangle intersection, but didn't quite finish that yet). But it's not strictly speaking a bug.

Added subscriber: @skororu

Added subscriber: @skororu

macOS 10.12.5, MacBook Air, NVIDIA GeForce 320M 256 MB
Daily build 2017-07-18 02:14, Hash: 66383ea206

With the above configuration, the CPU render looks clean with no obvious banding.

cpu_66383ea206.png

macOS 10.12.5, MacBook Air, NVIDIA GeForce 320M 256 MB Daily build 2017-07-18 02:14, Hash: 66383ea206 With the above configuration, the CPU render looks clean with no obvious banding. ![cpu_66383ea206.png](https://archive.blender.org/developer/F670936/cpu_66383ea206.png)
Author

Regarding the comment above, I'm not sure how this could be OS dependent. But I can still reproduce the problem in Linux, blender from buildbot 11a9434c2d

Regarding the comment above, I'm not sure how this could be OS dependent. But I can still reproduce the problem in Linux, blender from buildbot 11a9434c2de
Sergey Sharybin removed their assignment 2020-03-13 16:17:43 +01:00

We are switching to an entirely new (Embree based) ray intersection. It will have different intersection code for curves, hopefully which will be free from this artifact.

So under the current state of the code this is considered a known issue.

We are switching to an entirely new (Embree based) ray intersection. It will have different intersection code for curves, hopefully which will be free from this artifact. So under the current state of the code this is considered a known issue.
Member

Added subscriber: @Alaska

Added subscriber: @Alaska
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Alaska self-assigned this 2020-08-31 05:32:53 +02:00
Member

Testing with Embree shows this issue as resolved. @Sergey I'm marking this report as "resolved". Feel free to re-open it if you or others experience issues.

Testing with Embree shows this issue as resolved. @Sergey I'm marking this report as "resolved". Feel free to re-open it if you or others experience issues.

Just for the completeness: there might still be artefacts on GPU. The BVH builder is still old own implementation, as well as the node intersection. However, the hair primitive intersection has changed to match Embree.
Don't have machine with GPU handy at this moment, so can not double-check this.

There is some planned work to bring Embree builder for GPU as well, until then even if there are still artifacts there is not much we can do.

Just for the completeness: there might still be artefacts on GPU. The BVH builder is still old own implementation, as well as the node intersection. However, the hair primitive intersection has changed to match Embree. Don't have machine with GPU handy at this moment, so can not double-check this. There is some planned work to bring Embree builder for GPU as well, until then even if there are still artifacts there is not much we can do.
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#48684
No description provided.