Help with camera clipping in cycles

Hi, Please I am working on an interior Architectural visualization practice project. The room is quite small so I had to place the Camera outside the rooom to get a good field Of view (without changing the camera lens from 35mm). My intention is to change the near clipping parameter of the Camera to be able to see beyond the wall facing the Camera.

I tried it with BLENDER INTERNAL and it worked fine.



I tried the same thing with CYCLES (with the same camera clipping settings) but there seems to be some sort of error.


could someone explain why cycles camera behaves this way and any means of adjusting this camera behaviour.

NB: i am open to suggestions of other tricks to get a good camera view, however for the time being i am more interested in getting a clearer understanding of the Cycles camera clipping plane behaviour and if it can be fixed.

Thank you.

Thanks for your reply IkariShinji, it was helpful.

I believe there is an easier way to achieve this. If you go to the object tab with the wall selected, at the bottom there is a “Ray Visibility” panel. Here objects can be set to be invisible to particular ray types. By unchecking “Camera” this will make it so that the object will not be visible to the camera. Hope this helps.


i use this simple 2 lines patch for same effect

file intern/cycles/kernel/kernel_camera.h, function camera_sample_perspective()

 #ifdef __CAMERA_CLIPPING__
     /* clipping */
+#if 0
     ray->P += kernel_data.cam.nearclip*ray->D;
+#else
+    float cos_a = dot(ray->D, make_float3(cameratoworld.x.z, cameratoworld.y.z, cameratoworld.z.z));
+    ray->P += kernel_data.cam.nearclip*ray->D / cos_a;
+#endif
     ray->t = kernel_data.cam.cliplength;
 #else
     ray->t = FLT_MAX;


Thanks for your time, I tried this your suggestion, but it creates some lighting problems for objects that are very close to or touching the wall, they appear black. But it was helpful, I think I can use it in conjuction with the section plane material setup (for the objects that are appearing black)

Hi storm_st,I tried the code but I didn’t see any changes, I don’t know if I typed it correctly, here is a screenshot of what I typed


i’m really looking forward to having this method work.

Works for me. Are you sure it recompiled and you run fresh binary? just to be sure , add “print(“1”);” and check if it flood your terminal with “1”.

Thanks for your time, I tried this your suggestion, but it creates some lighting problems for objects that are very close to or touching the wall, they appear black. But it was helpful, I think I can use it in conjuction with the section plane material setup (for the objects that are appearing black)

oh yea, sorry I forgot to add that part. In the same panel uncheck the “Shadow” check box, this will give you the result below, solving your problem. Depending on how visible you want the back of the objects against the wall to be, you can also add a light source that points at the back of these objects making them more visible.