Terminator problem

Project:YafaRay
Component:YafaRay Core
Category:task
Priority:normal
Assigned:David Bluecame
Status:closed
Description

I would be good to have a bias setting, like in the old YafRay or in Blender, to avoid the terminator problem with round surfaces and point light types. Example render attached

 

AttachmentSize
terminator.png52.94 KB

Comments

#1

Version:<none>»

Problem still happening in Yafaray 0.1.2 beta2

#2

Version:»
Assigned to:Anonymous» David Bluecame
Status:active» ready to commit

Hello,

I'm not marking this as a duplicate because, although this problem is caused by the same issue affecting the issue here: http://www.yafaray.org/node/585 it's not the same effect. In any case the solution would be the same (enabling the new feature custom shadow bias and adjusting the value acordingly)

Normal shadow bias and terminator artifact:

Normal shadow bias and terminator artifact

 

Very big shadow bias, terminator correct but other shadow artifacts appear. Solution: increase sphere poly density and reduce the shadow bias again to a value closer to the default 0.0005

Very big shadow bias, terminator correct but other shadow artifacts appear

However, be very careful as increasing the Shadow Bias will cause other artifacts in the image. This example is a bit extreme (low poly sphere and a big custom bias). In real life examples you should increase the poly density in the sphere and (only if needed) increase just a bit the shadow bias but not too much to avoid artifacts.

I've sent pull requests to expose the Shadow Bias to the user, so the user can fix these problems with black dots in the scenes where they happen.

https://github.com/YafaRay/Core/pull/77
https://github.com/YafaRay/Blender-Exporter/pull/22

With this change, I can render this image correctly if I increase the Shadow Bias from the default value (0.0005) to, for example. 0.005. This also changes automatically the minimum ray distance (1/10th of the shadow bias)

For more information and images, please see:

http://www.yafaray.org/community/forum/viewtopic.php?p=31057#p31057

 

EDIT: finally the decision has been not to expose this parameter to the user. For the other problems (black dots) we need to find a way to do an automatic bias calculation. For the terminator problem here, no need for automatic bias calculation, just increase the poly count with a subdivision surface for example.

AttachmentSize
Example ball - default bias - shadow terminator block artifacts.png 243.29 KB
Example ball - higher custom bias - shadow terminator good but another shadow artifact.png 257.83 KB

#3

Status:ready to commit» needs work

After discussing it with DarkTide, this needs more work. Instead of a temporary solution exposing the shadow bias parameter we will look for an automatic shadow bias calculation depending on the scene.

#4

Status:needs work» by design

Rendering the same scene with Cycles it has the same problem with the terminator in low-poly objects defined as "smooth".

It seems that it happens in ray tracers in general, and the solution is to increase the mesh density. See, for example:

http://blender.stackexchange.com/questions/1998/cycles-shadows-on-smooth...

https://developer.blender.org/T37814

So, for now I'm closing this particular issue as "by design" unless we find a way to solve this in the code, but not a priority for the moment as the solution (increase mesh density) is the typical solution for these problems.

#5

#6

Status:by design» closed

Closed -- issue solved or clarified for 2 weeks with no activity.

#7

Status:closed» ready to commit

Eventually I've created a new beta4 with a "hybrid" solution for Self Shadowing and Terminator problems:

http://www.yafaray.org/community/forum/viewtopic.php?f=12&t=5100#p31177

The advanced parameters are at the very bottom of the Render settings panel. This way in normal scenes you can just have the Shadow Bias and Min Ray Dist in automatic, but if you have any issues with black dots (Self shadowing) or terminator problems you can tweak manually those parameters.

However, I want to remind that for terminator problems the recommended solution is to subdivide the surfaces, not to change those parameters.

#8

Workaround for this problem available in YafaRay-E (Experimental) v1.0.0, using the indications explained above.

 

For more information, see:  http://www.yafaray.org/community/forum/viewtopic.php?f=12&t=5117

 

If you still have this issue with the new version please let us know.

#9

Status:ready to commit» fixed

#10

Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.