Shadow Terminator problem

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Shadow Terminator problem

Post by Dade »

lacilaci wrote: Sat Aug 10, 2019 6:26 pm So do we know why are these dark patches and how to fix that?

I wonder how is it that other renderers don't suffer from this. Maybe some dirty tricks to limit normals or bump strenght?
Just put a value of 10 (or whatever other huge value) in Cycles bump node strength and you will get some really dark rendering too.
Support LuxCoreRender project with salts and bounties
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: Shadow Terminator problem

Post by provisory »

lacilaci wrote: Sat Aug 10, 2019 6:26 pm So do we know why are these dark patches and how to fix that?

I wonder how is it that other renderers don't suffer from this. Maybe some dirty tricks to limit normals or bump strenght?
I made some tests today, and found that in your case the noise from the jpeg artifacts causes issues.

You shouldn't use jpeg for bump mapping.
Your dirtmap.jpg looked like crap with displacement modifier too (on a highly subdivided plane).
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

I remember trying different values on cycles and it never looked as wrong as in luxcore, but I might try do some comparisons tomorrow.
I made some tests today, and found that in your case the noise from the jpeg artifacts causes issues.


Your dirtmap.jpg looked like crap with displacement modifier too (on a highly subdivided plane).
well that's all nice, but how come cycles doesn't look as wrong if that's the case?

You shouldn't use jpeg for bump mapping.
I don't even know how to respond to that amazing advice...
kintuX
Posts: 809
Joined: Wed Jan 10, 2018 2:37 am

Re: Shadow Terminator problem

Post by kintuX »

Dade wrote: Sat Aug 10, 2019 6:14 pm
kintuX wrote: Sat Aug 10, 2019 4:54 pm
Dade wrote: Sat Aug 10, 2019 3:38 pm I decoupled the UV scale and strength, so changing the UV scale doesn't affect bump mapping strength anymore.
Terminator tamed :D Looks nice.

But is it known that Caustics & Bump don't work well together?
The "taming" is currently limited to DIFFUSE and GLOSSY materials: https://github.com/LuxCoreRender/LuxCor ... f.cpp#L243

I haven't yet tried how it works with SPECULAR materials.
Yes, i've noticed that nothing is happening with the glass. But slowly we're getting there 8-)
Yet now, with low poly geo shading, i see different issues will start to occur... like: "What is that edge darkening doing here?" (on the red cone)
Answer: Add edges. ;)
TerminatorBumpsLuxCore2.2b3_CPU_001.jpg


PS
Further info about the "render not stopping" bug:
- Also happens with Azure latest build.
- It's exclusive to OCL.
- Depends on the render size and how long you render before stopping.
With smaller size and shorter halt time more renders can be done before it freezes.
- And on rare occasion, water can get darker.

Steps to reproduce:
1. Press Render.
2. Let it render for more than 30s then Cancel (Esc).
3. Freeze

Blend file:
FreezeBugLC223.blend
(913.38 KiB) Downloaded 157 times
Nvidia GTX 1070, Driver 430.86, on W10
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

Ok, so here we go last attempt:

cycles no bump:
cycles_nobump.jpg
luxcore no bump:
lux_nobump.jpg
close, and both look correct right? No problem here.

now bump map, this time I have used procedural and tried to match bump intensities so that visibly both surfaces look bumpy in a similar way.

luxcore bump mapping:
lux_bump.jpg
cycles bump mapping:
cycles_bump.jpg
Can you see why this is a big problem for me? Can you see the unrealistic black outline all over the luxcore scene? And this is super weak bump mapping effect.

scene:
bumpproblemscene_procedural.blend
(4.45 MiB) Downloaded 149 times
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

kintuX wrote: Sat Aug 10, 2019 9:39 pm
Dade wrote: Sat Aug 10, 2019 6:14 pm
kintuX wrote: Sat Aug 10, 2019 4:54 pm

Terminator tamed :D Looks nice.

But is it known that Caustics & Bump don't work well together?
The "taming" is currently limited to DIFFUSE and GLOSSY materials: https://github.com/LuxCoreRender/LuxCor ... f.cpp#L243

I haven't yet tried how it works with SPECULAR materials.
Yes, i've noticed that nothing is happening with the glass. But slowly we're getting there 8-)
Yet now, with low poly geo shading, i see different issues will start to occur... like: "What is that edge darkening doing here?" (on the red cone)
Answer: Add edges. ;)

TerminatorBumpsLuxCore2.2b3_CPU_001.jpg



PS
Further info about the "render not stopping" bug:
- Also happens with Azure latest build.
- It's exclusive to OCL.
- Depends on the render size and how long you render before stopping.
With smaller size and shorter halt time more renders can be done before it freezes.
- And on rare occasion, water can get darker.

Steps to reproduce:
1. Press Render.
2. Let it render for more than 30s then Cancel (Esc).
3. Freeze

Blend file: FreezeBugLC223.blend

Nvidia GTX 1070, Driver 430.86, on W10
this problem is related to caustic cache I complained about it a week ago here: viewtopic.php?f=4&t=1271

if you disable the caustic cache everything works ok
User avatar
FarbigeWelt
Donor
Donor
Posts: 1046
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Shadow Terminator problem

Post by FarbigeWelt »

lacilaci wrote: Sun Aug 11, 2019 6:35 am Ok, so here we go last attempt:

cycles no bump:
cycles_nobump.jpg
luxcore no bump:
lux_nobump.jpg

close, and both look correct right? No problem here.

now bump map, this time I have used procedural and tried to match bump intensities so that visibly both surfaces look bumpy in a similar way.

luxcore bump mapping:
lux_bump.jpg

cycles bump mapping:
cycles_bump.jpg

Can you see why this is a big problem for me? Can you see the unrealistic black outline all over the luxcore scene? And this is super weak bump mapping effect.

scene:
bumpproblemscene_procedural.blend
In my opinion Cycles bumped image looks wrong. If you add bump then you get brighter and darker areas compared to original. For axample if the bump is made from an equal distributed half sphere array there is a shadow and a sun part and parts with shades between them. If render is clamped to some max brightness sun parts may have the same brightness as original picture but shadow parts are darker than original picture. The bumped image gets overall darker than the original picture. If brightness is not limited bumped and original image should have similar overall brightness.
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

FarbigeWelt wrote: Sun Aug 11, 2019 8:53 am
lacilaci wrote: Sun Aug 11, 2019 6:35 am Ok, so here we go last attempt:

cycles no bump:
cycles_nobump.jpg
luxcore no bump:
lux_nobump.jpg

close, and both look correct right? No problem here.

now bump map, this time I have used procedural and tried to match bump intensities so that visibly both surfaces look bumpy in a similar way.

luxcore bump mapping:
lux_bump.jpg

cycles bump mapping:
cycles_bump.jpg

Can you see why this is a big problem for me? Can you see the unrealistic black outline all over the luxcore scene? And this is super weak bump mapping effect.

scene:
bumpproblemscene_procedural.blend
In my opinion Cycles bumped image looks wrong. If you add bump then you get brighter and darker areas compared to original. For axample if the bump is made from an equal distributed half sphere array there is a shadow and a sun part and parts with shades between them. If render is clamped to some max brightness sun parts may have the same brightness as original picture but shadow parts are darker than original picture. The bumped image gets overall darker than the original picture. If brightness is not limited bumped and original image should have similar overall brightness.
Maybe, maybe technically there is something wrong on bump mapping of cycles too, I have no idea and there are times where I really don't like how it behaves on some materials. But take a look at the pictures and tell me the luxcore image looks actually realistic.

Do I need to start making comparisons to photography? Or do you maybe have a white bumpy/rough surface in reality that turns black at glancing angles? If you stand next to a white painted rough surface wall does it turn black? Paint a ball with white paint and put it outside and tell me it turns black at grazing angles.

Even if this is not technically a bug it needs a treatment just as shadow terminator needed it.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

here is some corona material with strong bump

0caba458093749.59ef676318070.jpg
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: Shadow Terminator problem

Post by provisory »

After some comparisons I think again, that something is not perfect with LuxCore bump mapping.

Left side is highly subdivided and has displacement modifier with the bump texture.
Right side is low poly and has bump mapping with the same bump texture.

Cycles:
bump-test3-cycles.jpg

LuxCore after shadow terminator taming:
bump-test3-luxcore_new.jpg

LuxCore before it:
bump-test3-luxcore_old.jpg
Attachments
bump-test3.blend
(2.55 MiB) Downloaded 130 times
Post Reply