LuxCoreRender / BlendLuxCore

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

normal maps causing artifacting when rendering with AMD GPUS #530

Open matthewv1998 opened 4 years ago

matthewv1998 commented 4 years ago

.blend file: https://drive.google.com/drive/folders/1Je1OBKPKipFnuLeqkOxHXWcDbH_EaCnj?usp=sharing Included in the drive is the full model and the "testing" model which is where the images come from

UPDATE upon further testing, it is normal maps causing crashing issues. https://cdn.discordapp.com/attachments/476435792613605386/740846578268504105/video0.mov

File seen in video included is images and multires mesh where normal came from https://drive.google.com/file/d/1UoyvAec7gcEWPqGsxpWRbYG94DZLxt-c/view?usp=sharing

upon adding normal maps of any file format, it may cause a system to black out. additional update

I just acquired a RX 580, it does not experience the same black screening as my vega cards. However, mesh still appears completely black in viewport and normal render. Further additional behavior. It seems to be around the normal map color or something. As even the triplanar normal mapping produces a black mesh. (in viewport ONLY)

ADDITIONAL UPDATES. There may be a work around for this but i havent figured it out yet, however i have managed to get renderable results with normal maps half functional, with likely more diagnosable artifacting.

it seems having a material, one say matte, and another having the cycles material, rendering in cycles and then rendering in luxcore, seems to produce some desirable result.

Stacking onto this, disabling the adaptive samplerer, enabling random samples, out of core seems to produce the best results. random cache friendly tiled path fuck up

no adpaptive

something to note, upon the start of gpu rendering, glass does look normal for a very brief moment before looking weird and cloudy. https://drive.google.com/file/d/1MIG9CfmRXCshg6wTmQ922-dEF2bLx86L/view?usp=sharing

light tracing borked

enabling light tracing does produce a wild result

Screenshots or rendered images: 2.3 normals working normals

broken nomrals

it should be noted that cycles normals tend to handle better, however enabling light tracing will break the scene cycles vs lux cycles vs lux light tracing

Error message from Blender console:

OS: windows AND linux ubuntu 18.04 Blender version: 2.83.3 LuxCore version: 2.4

sys specs. ryzen 9 3900x 128gb of ram 2x vega 56 amd drivers used 20.7.1 windows 20.4.2 windows 20.Q2.1 pro drivers 19.50 linux ubuntu drivers.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/92195742-normal-maps-causing-artifacting-when-rendering-with-amd-gpus?utm_campaign=plugin&utm_content=tracker%2F80143047&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F80143047&utm_medium=issues&utm_source=github).
Dade916 commented 4 years ago

An application can not, even intentionally, cause a system hardlocks (especially on Linux). This is clearly a driver crash (or an hardware problem) as shown in your video.

v2.4 GPU kernels are far more complex and large of v2.3 because they are compiled only once and it looks like AMD driver goes ballistic in your case.

The only hope to fix this problem is to change driver version (newer or older). You may be lucky and find a version that works.

Here, your test scene works fine with:

matthewv1998 commented 4 years ago

An application can not, even intentionally, cause a system hardlocks (especially on Linux). This is clearly a driver crash (or an hardware problem) as shown in your video.

v2.4 GPU kernels are far more complex and large of v2.3 because they are compiled only once and it looks like AMD driver goes ballistic in your case.

The only hope to fix this problem is to change driver version (newer or older). You may be lucky and find a version that works.

Here, your test scene works fine with:

  • Intel OpenCL CPU
  • NVIDIA OpenCL
  • NVIDIA CUDA
  • NVIDIA CUDA+Optix

Yes, its a AMD specific bug, but its not machine specific. I went back 6 more drivers off of this and None of them work. I have had 4 people on AMD, COMPLETELY separate systems having issues.Even without hardlocks i get grey normal maps, seen in the fox, i had salt and pepper shakers have a similar flaw. A radeon vii, A radeon pro duo (dual wx 7100s) A rx 580 And vega 56s have had issues with 2.4 and beyond. Hardware with known stable drivers.

This is not just drivers. Throwing all scenes back into 2.3 or using raw sculpts for rendering is completely stanle 2.4 on. If it helps, plugging 3d mapping into some noise into bump can cause similar issues. Showing a garbled mess before usually a system crash

Dade916 commented 4 years ago

Yes, its a AMD specific bug, but its not machine specific. I went back 6 more drivers off of this and None of them work. I have had 4 people on AMD, COMPLETELY separate systems having issues.

The AMD OpenCL drivers have been, more or less, broken for the last 10 years. I have worked around their bugs for years.

Even if I wanted to waste my time trying to work around their new bugs, I don't have an AMD GPU anymore so I can not.

This is not just drivers.

This is statement is based on what ? The code works fine with:

Doesn't work with:

Occam's razor suggests that the problem is in AMD OpenCL drivers.

matthewv1998 commented 4 years ago

well, even if it was a hot fix, i'd be appreciated, but, isnt it kinda hard to validate your program if you dont have hardware from all teams? even if its cheap gpu. and the reason i say its not drivers, is the fact ive gone through 8 separate AMD drivers and none have fixed it. 18.5.1 18.9.3 19.11.3 19.12.2 20.3.1 20.4.2 20.Q2.1 pro drivers 20.7.1 Its not a hardware issue, as i just got done doing a 6 hour animation test within lux

i'm not gonna sit and say the drivers are any good (navi has shown otherwise). its just rather annoying having to use raw sculpts because a basic feature doesn't work. but a band aid patch would be nice before vulkan comes.

matthewv1998 commented 4 years ago

I just acquired a rx 580, black mesh still remains, however, the crash outs are gone. It is experimentable like this.

matthewv1998 commented 4 years ago

the above issue has been expanded with further experimentation. i hope this helps narrow down what is causing issues

djtutorials commented 3 years ago

Hi- I just posted a topic on this as well for Windows. The issue is present in 2.4 but not in 2.3. Normal maps are causing hard crashes in Blender even when using a small normal map. CPU rendering has no issues. GPU causes the crash.

I am using Radeon VII setup.

djtutorials commented 3 years ago

Also- if you simply uncheck the "Normal" check box, the texture will function so it isn't anything to do specifically with the bump node. image

djtutorials commented 3 years ago

Please disregard last statement- it appears that the viewport had been set to CPU and that's why it was working correctly.

ghost commented 3 years ago

My objects become black if I plug an image node set as "Normal Map" into the "Bump" input of the "Disney" shader.

I'm using Blender 2.83.10 and my AMD drivers are 20.11.1. I'll test newer Blender and driver versions.

Theverat commented 3 years ago

My objects become black if I plug an image node set as "Normal Map" into the "Bump" input of the "Disney" shader.

I'm using Blender 2.83.10 and my AMD drivers are 20.11.1. I'll test newer Blender and driver versions.

Please provide a testscene.