LuxCoreRender / BlendLuxCore

Blender Integration for LuxCore
GNU General Public License v3.0
733 stars 92 forks source link

Random black objects with GPU rendering #648

Open AndreasReschGGL opened 3 years ago

AndreasReschGGL commented 3 years ago

OS: Windows 10 - GTX 1060 or GTX 970 Ti Blender version: 2.91/2.92 LuxCore version: 2.5 RC1

When using the GPU (either one of those above), random objects turn black. It seems to dependent on the viewing angle as well. This isn't linked to specific objects or materials. It occurred in several completely different scenes. So it's not the fault of the specific object. The problem isn't there in CPU rendering.

Here's a screenshot of one of those objects. It's a clone of the objects next to it. It's black viewed from the camera angle. When I orbit around the object, pats of it become visible and when I rotate it even further, it seems to be fine.

Theverat commented 3 years ago

It sounds like there could be overlapping faces responsible for this. Can you upload the problematic object?

AndreasReschGGL commented 3 years ago

There are no overlapping polygons there. It's an instance of the the object right next to it, which renders fine. It's there all alone and even if I move it up, it stays black. It also renders fine with CPU. This seems to be GPU related.

Unfortunately I can't provide this scene for copyright reasons. But it also happened in simpler scenes. Whenever I stumble over this issue in a simpler scene, I will upload it.

Theverat commented 3 years ago

Can you delete everything but this object and upload just that? Or would this also be problematic?

AndreasReschGGL commented 3 years ago

I've sent you a link via PM through the forum. The object in there is isolated and still shows the issue.

Theverat commented 3 years ago

Using the OpenCL backend, I can reproduce the problem, when zooming out far away from the object. Getting closer, the problem disappears. It does not happen at all on the CUDA backend.

GPU: RTX 2080.

To me it looks like a floating point precision problem. Check the possible solutions suggested here: There are dark triangular artifacts on my model, and I already checked for duplicate faces

AndreasReschGGL commented 3 years ago

It happens both on OpenCL as well as CUDA here - it's fine with CPU rendering. But I run GTX cards and haven't got any RTX cards to test. From your suggestion list, raising the epsilon value by 100 to 0.001 helped. Does this have to do with the fact that I use a Unit Scale of 0.01 in Blender overall? Should I also raise the Epsilon Max value by 100. I still wonder why only two objects in the center of the scene are affected while all the other ones render fine. That makes this epsilon value quite "mystical" for me.

Theverat commented 3 years ago

Your scene does not contain an object where the problem doesn't show, so I can't compare them. It might have to do with their position, or wether they are instanced or not (local coordinate system vs. global one affecting floating point precision).

The unit scale is ignored by BlendLuxCore and should not affect the result (unless Blender does something in recent versions that I don't know about).

AndreasReschGGL commented 3 years ago

You can quickly test this with the scene you already have. Just instance the object (ALT-D) and move it left or right. It will look fine, while the original still stays black.