Black Dots in simple scene in Ubuntu - different shape in 32bits and 64bits!

Project:YafaRay
Component:YafaRay Core
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Some additional information that may be useful to locate the origin of the infamous "black dots".

I could make a very simple scene that causes black dots. The scene is attached to this message for your reference.

Depending on your versions of Blender/Yafaray, you may need to "play" with the lamp brightness to see the image properly. The black dots are very noticeable, and there is no reason for them, as it is a very simple direct lightning scene.

I think the problem happens when the light is touching the face almost parallel with it.

To do this test, I have installed a fresh Ubuntu 12.10 Quantal (both the 32bit and the 64bit versions), then I've installed blender and yafa from the repositories with "sudo apt-get install blender yafaray-exporter"

The strange thing is that the "shape" of the black dots is different if you render it in Ubuntu 32 bits or Ubuntu 64 bits!!

I hope this scene and information can be useful to find the problem with the black dots!

Best Regards.

AttachmentSize
yafaray-black-dots2.blend_.zip67.05 KB

Comments

#1

I've found something interesting in the code.

For example, in the file Core/src/yafraycore/mcintegrator.cc

[...]
if( light->illumSample (sp, ls, lightRay) )
{
// ...shadowed...
lightRay.tmin = YAF_SHADOW_BIAS; // < better add some _smart_ self-bias value...this is bad.
[...]

That YAF_SHADOW_BIAS constant is directly impacting the amount of black dots in my examples.

To change its value, you can create a UserConfig.txt file inside the folder Core/CMakeConfig, using as a template the existing UserConfig files there. The default value for YAF_SHADOW_BIAS in that UserConfig.txt file is:

set(YAF_SHADOW_BIAS 0.0005)

If you change it, for example, to 0, and you recompile and reinstall properly Yafaray, then you get a lot more black dots in my example.

set(YAF_SHADOW_BIAS 0.0)

yafaray-black-dots3-32BIT-compiled with UserConfig.txt YAF_SHADOW_BIAS=0.0.png



However, if you use a bigger value, for example 0.01 you get a scene almost black-dot free:

set(YAF_SHADOW_BIAS 0.01)

yafaray-black-dots3-32BIT-compiled with UserConfig.txt YAF_SHADOW_BIAS=0.01.png



I'm not sure if modifying this value will solve or not all the existing black dot problems, perhaps not, but it may help. I don't know either if changing this value could cause new artifacts, like white spots in the shadows, but I think it's worth trying.

I hope this helps. Best Regards!

#2

I have submitted my suggested changes to the UserConfig.txt file in:

https://github.com/megasoft78/Core/pull/2

#3

Status:active» closed

David, what you are seeing is shadow overlaping with the geometry and those artifacts come from the same calcs as the "terminator" effect a shadow bias of 0.01 will break other scenes where the light is much less powerful and where there are much more complex objects like faces or sculptures, even fur.

The value used is the best value for the vast majority of scenes.

The way to avoid this is to find a better way to cast shadow rays, which means deep change on the rendering engine.

Just Vampires Playing To Be Mortals...
---------{--<@