Help With Arbitrary Clipping Planes

Hello Radiance community,

I am trying to implement an arbitrary clipping surface. A simple example I have used is two boxes which are partially overlapping. I need one box to be clipped off (trying to use the bigger box as the clipping surface) so that the overlapping part of the smaller box is removed from the scene. I have used the radiance cookbook example commands and tried to achieve this but it is proving to be very challenging. Are there any other guides out there which I can refer to regarding this problem.

vwrays -fd -vf outside.vf -x 400 -y 400 \
| rtrace -w -h -fd -opd 1st.oct | rtrace -w -ab 2 \
-fdc `vwrays -d -vf outside.vf -x 400 -y 400` 2nd.oct \
clipped.hdr; ximage clipped.hdr

this is the command I have used but it doesnt seem to be working as expected. I am not sure but the files in the example also seem to be missing from the example files of the cookbook tutorial, hence cant replicate it.

Any help will be appreciated.

Thank you in advance.

Hi Daniel,

Welcome to the community!

The first part of the command:

vwrays -fd -vf outside.vf -x 400 -y 400 | rtrace -w -h -fd -opd 1st.oct

will generate sample rays starting at the intersection between the view and whatever is in 1st.oct. However, these will be the first surfaces intersected, and if you want the rays to begin after a cube stored in 1st.oct, you probably need to remove the front-facing surfaces from your cube, so the first intersections are with the desired sides.

I hope this makes sense.

Cheers,
-Greg