I do some rendering in blender(cycles). I render with the help of cycles nodes .exr images, where in each pixel instead of rgba-channels I store xyzObjectIndex-channels. Everything works fine up to several pixels.enter image description here

For example, on the image above you can see visualization of the object ids. Each pixel has information onto which object it looks now. You can see that blender failed to recognize building in one blue pixel, blender suggested that this part of the building is the sky and has rendered sky there.

As I can see this happens for degenerate triangles, triangles which are almost in parallel to the ray, which is shoot from pixel. It means that blender(cycles) raytracing algorithm fails to detect correct triangle when shooting ray.

Material setup: enter image description here enter image description here This nodes help me to render .exr image, where instead of RGB I have XYZ - 3D position of the surface seen by pixel and instead of alpha - Object Index. Rendered image is correct up to a few pixels.

Geometry of the mesh: As far as I know my mesh consists from triangles.

Rendering machine: I use SVM.

Samples: one ray.

How to avoid this problem?

P.S.: Also noticed that function ray_triangle_intersect() in file "\cycles\util\util_math_intersect.h" returns sometimes wrong barycentric coordinates (u + v > 1, which is wrong), hence it renders incorrect 3D position for current pixel. Wrong barycentric coordinates are there due to fact that in line 182 (const float inv_den = 1.0f / den;) they have division by zero.

  • 3
    $\begingroup$ In order for someone to help, please provide more information such as the geometry of the meshes involved, material set up, anything else relevant to your scene - currently all we have to go on is the results of your render. This would make it hard for anyone to replicate your problem. It would also help if you could provide a simplifiedand self-contained .blend (with any images ‘packed’) that exhibits the problem. $\endgroup$ – Rich Sedman Apr 23 '18 at 8:29
  • $\begingroup$ Question is partially answered at developer.blender website $\endgroup$ – Shurup4ik May 2 '18 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.