Page MenuHome

Modulo node making unexpected/inconsistent behaviour
Closed, ResolvedPublic

Description

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 :

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

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 :

Event Timeline

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

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.

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

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

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