Angular Camera - missing objects from render

Project:YafaRay
Component:YafaRay Core
Category:bug report
Priority:normal
Assigned:David Bluecame
Status:ready to commit
Description

Hello David,
I have a new problem to undergo.
I have problems to build a 360 VR rendering with YafaRay because the angular camera to different results, despite the same settings !!!
I send two XML files the same scene, the same camera position but different direction.
As you'll notice the results are different one is good and one is bad !!!
I think it's a YafaRay BUG, because I could not find any logical explanation for it !!!
Expect from you about the problem.
with estimates
John

AttachmentSize
AngularMap_Good.jpg235.98 KB
AngularMap_Bud.jpg217.28 KB
Angular Camera_Good_XML.zip20.57 KB
Angular Camera_Bud_XML.zip20.57 KB

Comments

#1

Assigned to:Anonymous» David Bluecame
Status:active» needs more infos

Hello, John.

Please I need more details about this problem. What exactly is wrong and how would you expect it to be rendered correctly?

Thanks and best regards.

#2

Hello David

I already sent all the necessary documentation, the problem as you can see is that in one case I get a spherical rendering to 360 ° and in other cases to 180 ° without any logical explanation, just run with the passed parameters should always be a rendering spherical 360 °!!!

Greetings

john

#3

Status:needs more infos» active

I see what you mean. I will take a look at it.

#4

Title:BUG Angular Camera in Yafaray???» Angular Camera - missing objects from render
Status:active» ready to commit

I think I've found the problem and hopefully fixed it. The change to the code is here: https://github.com/YafaRay/Core/commit/e22bffc775e995e7e5e830eb8cb8d71a4...

I believe this was caused by an incorrect default clipping calculation. When no clipping is specified, YafaRay sets a far clipping distance of -1.0, so all rays generated in front of the camera will never be clipped. However, in angular cameras there are also rays generated behind the camera, so when they hit the Clip -1 in the back, it does not render any more objects and shows the background instead, which is wrong.

I've attached an example with the camera positioned so the rays in the back just hit the default -1 clipping so you can see partly the background mixed with the red wall behind the camera, which is incorrect:

 

With the fix, the image is correctly rendered:

 

This fix will be available in the next version, however if you cannot wait, there is a workaround that you can use with the existing "buggy" version.

As the problem happens with the default FarClip calculation which is set to -1, you can just set it manually to a very large value. It's not ideal, but it could help.

For example:

* For Blender users, in the Camera settings enable Use Clipping. Set Start=0 and End=1000000000 (or any other very big value).

* For XML interface users (as you, John ;-), add the line <farClip fval="-1.0e38" />  to the camera settings section, for example::

   <type sval = "angular" />
   <farClip fval="-1.0e38" />
</camera>

Those settings will override the default automatic calculation and hopefully solve the problem for now until the new version is released. When the new version is released those workarounds will not be needed anymore.

I hope this helps. Best regards.

AttachmentSize
camera180.zip 182.8 KB
angular_wrong_render.png 62.84 KB
angular_fixed_render.png 57.22 KB

#5

Big David,

Now I'll try your solution and let you know !!!

Bye, see you soon

john ACCA Software

#6

Hello david,

I tried your solution works great !!

Thank you and good day.

John