Cycles: Watertight rendering produces artifacts on a huge plane #43865

Closed
opened 2015-03-02 21:20:17 +01:00 by Lukas Stockner · 32 comments
Member

System Information
Linux Mint 17
Intel i7-4500U (using AVX2 instruction set)

Blender Version
Broken: Current master (d2b6c6fd9b, if I remember correctly it appeared in f770bc4757
Worked: 2.73a release

When rendering the default scene with a huge plane added, there are artifacts in the top right area.

Exact steps for others to reproduce the error
Either:

  • Start Blender with the default scene
  • Switch to Cycles
  • Add a plane
  • Scale by 500
  • Hit F12
    Or:
    Render this file: watertight_artifact.blend

Expected (2.73a): noerr.png
Received (master): Err.png

**System Information** Linux Mint 17 Intel i7-4500U (using AVX2 instruction set) **Blender Version** Broken: Current master (d2b6c6fd9b, if I remember correctly it appeared in f770bc4757 Worked: 2.73a release When rendering the default scene with a huge plane added, there are artifacts in the top right area. **Exact steps for others to reproduce the error** Either: - Start Blender with the default scene - Switch to Cycles - Add a plane - Scale by 500 - Hit F12 Or: Render this file: [watertight_artifact.blend](https://archive.blender.org/developer/F146789/watertight_artifact.blend) Expected (2.73a): ![noerr.png](https://archive.blender.org/developer/F146790/noerr.png) Received (master): ![Err.png](https://archive.blender.org/developer/F146792/Err.png)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Sergey Sharybin was assigned by Lukas Stockner 2015-03-02 21:20:17 +01:00
Author
Member

Added subscriber: @LukasStockner

Added subscriber: @LukasStockner

#53192 was marked as duplicate of this issue

#53192 was marked as duplicate of this issue

#46509 was marked as duplicate of this issue

#46509 was marked as duplicate of this issue

#44207 was marked as duplicate of this issue

#44207 was marked as duplicate of this issue

Just a quick update. It's some nasty precision issues, need to re-formulate some equations there at least, not totally trivial tho and not totally sure it's really solvable for all circumstances. Need some more time on that.

Just a quick update. It's some nasty precision issues, need to re-formulate some equations there at least, not totally trivial tho and not totally sure it's really solvable for all circumstances. Need some more time on that.

This issue was referenced by 9489205c5c

This issue was referenced by 9489205c5c0b9b432d02be4a3d0d15fc62ee6cb9

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 9489205c5c.

Closed by commit 9489205c5c.

This issue was referenced by dce16d57dc

This issue was referenced by dce16d57dc928ead124dcde1d241727c4f2bbc24

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Need to re-open.

Original fix caused really noticeable speed regression. I didn't notice it before committing because was having abort() statement in the fallback code which basically optimized out majority of the code. Without that statement the assembly code looks totally different. Seems somewhat related on optimized our dir from the callstack and so.

For a short time it's better to have production scenes rendering as fast as possible, plane could be subdivided anyway. Will look into alternative solutions now.

Idea could be to push ray a bit more forward on bounce from the huge triangle.

P.S. If someone can see how Woop code could be refactored it'll be also cool. So far i can't really get rid of basically cubical order of magnitutde of intermediate variables which kills precision in one cases or another ones.

Need to re-open. Original fix caused really noticeable speed regression. I didn't notice it before committing because was having `abort()` statement in the fallback code which basically optimized out majority of the code. Without that statement the assembly code looks totally different. Seems somewhat related on optimized our `dir` from the callstack and so. For a short time it's better to have production scenes rendering as fast as possible, plane could be subdivided anyway. Will look into alternative solutions now. Idea could be to push ray a bit more forward on bounce from the huge triangle. P.S. If someone can see how Woop code could be refactored it'll be also cool. So far i can't really get rid of basically cubical order of magnitutde of intermediate variables which kills precision in one cases or another ones.

This issue was referenced by 86b862ecc9

This issue was referenced by 86b862ecc90783750aec59e474cfa6973acbafef

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 86b862ecc9.

Closed by commit 86b862ecc9.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Bummer, stupid phabricator scanned the tag and saw the commit from v2.74-rc2 tag and decided to close the report :S

Bummer, stupid phabricator scanned the tag and saw the commit from v2.74-rc2 tag and decided to close the report :S

This issue was referenced by blender/cycles@84b962ea82

This issue was referenced by blender/cycles@84b962ea82112b008fe2c8a178e2734a025b0bb3

This issue was referenced by blender/cycles@2541f5c8f8

This issue was referenced by blender/cycles@2541f5c8f825c517f2d0742149693b8be0750b19

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit blender/cycles@84b962ea82.

Closed by commit blender/cycles@84b962ea82.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Added subscriber: @pafurijaz-4

Added subscriber: @pafurijaz-4

Added subscriber: @Harvester

Added subscriber: @Harvester

Hi Sergey, I'm not sure this could be of any help but, just for curiosity I tested this bug in Blender 2.76 RC1, Windows 64bit, zipped, and it's still there but I found that subdividing once the huge plane it seems to fix the problem, as you can see below.
T43865_plane_not_subdivided.jpg
Plane not subdivided

T43865_plane_subdivided_one_time.jpg
Plane subdivided one time

Hi Sergey, I'm not sure this could be of any help but, just for curiosity I tested this bug in Blender 2.76 RC1, Windows 64bit, zipped, and it's still there but I found that subdividing once the huge plane it seems to fix the problem, as you can see below. ![T43865_plane_not_subdivided.jpg](https://archive.blender.org/developer/F236889/T43865_plane_not_subdivided.jpg) Plane not subdivided ![T43865_plane_subdivided_one_time.jpg](https://archive.blender.org/developer/F236891/T43865_plane_subdivided_one_time.jpg) Plane subdivided one time

Added subscribers: @mont29, @ManuelMarino

Added subscribers: @mont29, @ManuelMarino

Developer note:

While those two reports seems different -- one of them is caused by rather huge plane and other is caused by a small stretched triangles they're in fact quite the same from the math point of view. There are some instabilities in sign of determinant happening in the watertight intersection we're using.

I've talked to Sven about the huge triangle case and it's not really solvable. Any of the intersection algorithm will be affected by this problem in one way or another.

But the cases like F245475 we'd really better resolve, they aren't so crazy setup at all. Now, something like D1212 will help with cases like huge plane, but it's not really helping with the stretched triangles apparently. We might also switch to pleucker intersection test, but that was somewhat slower last time i've been experimenting with it.

Developer note: While those two reports seems different -- one of them is caused by rather huge plane and other is caused by a small stretched triangles they're in fact quite the same from the math point of view. There are some instabilities in sign of determinant happening in the watertight intersection we're using. I've talked to Sven about the huge triangle case and it's not really solvable. Any of the intersection algorithm will be affected by this problem in one way or another. But the cases like [F245475](https://archive.blender.org/developer/F245475/cycles_bug_black_faces.blend) we'd really better resolve, they aren't so crazy setup at all. Now, something like [D1212](https://archive.blender.org/developer/D1212) will help with cases like huge plane, but it's not really helping with the stretched triangles apparently. We might also switch to pleucker intersection test, but that was somewhat slower last time i've been experimenting with it.

Added subscriber: @MohamedSakr

Added subscriber: @MohamedSakr

hey Sergey, what about recursive splitting to this triangle? "depending on triangle size" , this would solve everything in the preprocess stage

hey Sergey, what about recursive splitting to this triangle? "depending on triangle size" , this would solve everything in the preprocess stage

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

While it's kind of a regression, new behavior is more predictable for artists because only needs some extra subdivisions to made. Such cases will always be an issue for intersections, some formulas might work, some might not. There's a patch which implements Pluecker D1574 and seems to solve the issue. Would need to run some performance tests and maybe we'll just have to switch to a new intersection algorithm.

In any case, wouldn't really consider it a bug. Thanks for the report anyway.

While it's kind of a regression, new behavior is more predictable for artists because only needs some extra subdivisions to made. Such cases will always be an issue for intersections, some formulas might work, some might not. There's a patch which implements Pluecker [D1574](https://archive.blender.org/developer/D1574) and seems to solve the issue. Would need to run some performance tests and maybe we'll just have to switch to a new intersection algorithm. In any case, wouldn't really consider it a bug. Thanks for the report anyway.

Added subscribers: @KaiKostack-3, @zeauro

Added subscribers: @KaiKostack-3, @zeauro
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#43865
No description provided.