Modulo node making unexpected/inconsistent behaviour #67623

Closed
opened 2019-07-24 23:29:23 +02:00 by Nicolas · 13 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia GeForce GTX 1060 Version 419.35

Blender Version
Broken: 2.80 Release Candidate 2 (downloaded today, no more information on the splash screen)

Short description of error
In the shader editor, the modulo operations returns sometimes a negative number after taking zero as parameter (each vertex of the wall has a Y coordinate of 0). This seems to happen on random pixels : sometimes the number returned by the modulo seems to be equal to 0, and sometimes to -1. The result depends on the point of view.

Screenshot with this modulo operator :
withModulo.JPG

Screenshot without the modulo : here the behaviour is normal so the problem comes from the modulo.
withoutModulo.JPG

I think that the modulo should always return the same value on the entire wall since it has one single Y coordinate (return 0 if I am right).

Exact steps for others to reproduce the error
Go into render mode. Move the viewpoint and test values on the "greater than" node.
Blender file :
bug.blend

**System Information** Operating system: Windows 10 Graphics card: Nvidia GeForce GTX 1060 Version 419.35 **Blender Version** Broken: 2.80 Release Candidate 2 (downloaded today, no more information on the splash screen) **Short description of error** In the shader editor, the modulo operations returns sometimes a negative number after taking zero as parameter (each vertex of the wall has a Y coordinate of 0). This seems to happen on random pixels : sometimes the number returned by the modulo seems to be equal to 0, and sometimes to -1. The result depends on the point of view. Screenshot with this modulo operator : ![withModulo.JPG](https://archive.blender.org/developer/F7627122/withModulo.JPG) Screenshot without the modulo : here the behaviour is normal so the problem comes from the modulo. ![withoutModulo.JPG](https://archive.blender.org/developer/F7627124/withoutModulo.JPG) I think that the modulo should always return the same value on the entire wall since it has one single Y coordinate (return 0 if I am right). **Exact steps for others to reproduce the error** Go into render mode. Move the viewpoint and test values on the "greater than" node. Blender file : [bug.blend](https://archive.blender.org/developer/F7627150/bug.blend)
Author

Added subscriber: @Acrolyph

Added subscriber: @Acrolyph

Added subscriber: @ssendam

Added subscriber: @ssendam

It seem too be a problem with precision. The vertices are perfectly on the yz plane but the faces are slightly incorrect, some parts are above while some other parts are below the yz plane which result in a weird render. If you move the vertices 0.001 unit along the y axis, it will solve the problem.
And it seem to happen only to Eevee

It seem too be a problem with precision. The vertices are perfectly on the yz plane but the faces are slightly incorrect, some parts are above while some other parts are below the yz plane which result in a weird render. If you move the vertices 0.001 unit along the y axis, it will solve the problem. And it seem to happen only to Eevee

Added subscribers: @fclem, @ZedDB

Added subscribers: @fclem, @ZedDB
Clément Foucault was assigned by Sebastian Parborg 2019-08-05 14:20:02 +02:00

@fclem is this a bug or a limitation with eevee?

@fclem is this a bug or a limitation with eevee?

This issue was referenced by 3e27dd5b55

This issue was referenced by 3e27dd5b553e83c9d6358f5a93597c86a2bf3cb1

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Added subscriber: @kostex

Added subscriber: @kostex
Member

Hey Clement,

Just compiled including this commit on OSX, but rendering a scene makes building BVH extremely slow??
One commit earlier and things are fine.
On Linux (Ubuntu 18.04LTS) your commit does not show slowdown.. any ideas?

Thanks,
Roel

Hey Clement, Just compiled including this commit on OSX, but rendering a scene makes building BVH extremely slow?? One commit earlier and things are fine. On Linux (Ubuntu 18.04LTS) your commit does not show slowdown.. any ideas? Thanks, Roel

This has nothing to do with the BVH. It does not even touch cycles code.

This has nothing to do with the BVH. It does not even touch cycles code.
Member

That what's made me type a lot of question marks..
Maybe you could think of (another) reason why this happens..
It's just the difference in this commit with the previous one that slow things down..

but we'll see if there are more or new tasks arise in the coming days stating the same.
Thanks,
Roel

That what's made me type a lot of question marks.. Maybe you could think of (another) reason why this happens.. It's just the difference in this commit with the previous one that slow things down.. but we'll see if there are more or new tasks arise in the coming days stating the same. Thanks, Roel

@kostex I would suggest to double check by reverting only my commit to see if that comes from it. But I highly doubt.

@kostex I would suggest to double check by reverting only my commit to see if that comes from it. But I highly doubt.
Member

I did just that before I commented at all..

I've did some further investigation, and it seems that the scene I was testing it on had Subdivision Surface with adaptive sampling on.
When I disable adaptive, the scene renders like normal speed.
Does this ring any bell maybe in combination with this commit?

Again, only on osx

I did just that before I commented at all.. I've did some further investigation, and it seems that the scene I was testing it on had Subdivision Surface with adaptive sampling on. When I disable adaptive, the scene renders like normal speed. Does this ring any bell maybe in combination with this commit? Again, only on osx
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#67623
No description provided.