Maniphest T68110

2.80 Cycles CPU and GPU Different and Wrong Results
Closed, Archived

Assigned To
Brecht Van Lommel (brecht)
Authored By
Blender_Bug
Aug 2 2019, 9:09 AM
Tags
  • BF Blender
Subscribers
Blender_Bug
Brecht Van Lommel (brecht)
Lance Phan (ssendam)

Description

System Information
Operating system: Ubuntu 18.04.2 LTS
Graphics card: GeForce GTX 1060 3GB/PCIe/SSE2

Blender Version
Broken:
version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: f6cb5f54494e, type: Release
build date: 2019-07-29, 17:17:04

Worked:
version: 2.79 (sub 0), branch: master, commit date: 2018-03-22 14:10, hash: f4dc9f9d68b, type: Release
build date: 2018-03-22, 14:39:03

Short description of error
Blender 2.80 Cycles gives wrong results of rendering while Eevee gives correct ones. Moreover, CPU and GPU rendering provide different results (both wrong).

Exact steps for others to reproduce the error
Render the attached file in Blender 2.80 Cycles.

Related Objects

Mentioned Here
rBf4dc9f9d68bd: Fix T54360: FFMPEG bitrate not editable for all codecs
rBf6cb5f54494e: Version bump to 2.80 final release

Event Timeline

Blender_Bug created this task.Aug 2 2019, 9:09 AM
Lance Phan (ssendam) added a subscriber: Lance Phan (ssendam).Aug 2 2019, 1:08 PM

1 is not really 1, it's 1.0000000001 or something, so when you compare if it's greater than 1, you end up with 1 as a result.
It's precision problem, I found these 2 nodes to be the cause of it.


Since the stripes are in 0.25 steps, you can multiply it by 4, then floor it and compare if it's greater than 4. That makes the result look correct on Eevee, Cycles GPU and CPU are consistent but still incorrect, maybe there is another precision problem somewhere else.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Unknown Status.EditedAug 2 2019, 1:11 PM
Brecht Van Lommel (brecht) claimed this task.
Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).

I'm afraid there is not a lot we can do to make this math exactly the same on the CPU and GPU, it's not considered a bug.

For builtin textures like checkerboard we use values like 1.00001 as threshold to avoid this, but with custom math in nodes there is no way to handle this without severe performance impact, since we wouldn't be able to use native instructions.

Blender_Bug added a comment.Aug 2 2019, 11:13 PM
In T68110#743377, @Brecht Van Lommel (brecht) wrote:

I'm afraid there is not a lot we can do to make this math exactly the same on the CPU and GPU, it's not considered a bug.

For builtin textures like checkerboard we use values like 1.00001 as threshold to avoid this, but with custom math in nodes there is no way to handle this without severe performance impact, since we wouldn't be able to use native instructions.

So, Blender Cycles prior to 2.80, Blender Cycles 2.80 CPU, and Blender Cycles 2.80 GPU behave like three different render engines (at least, when it comes to math). It's a pity then :(