Clipping plane shadow behavior & bug

I wanted to create a nice section graphic using Raytraced View. When using the Clipping Plane a fundamental question arose regarding shadows and some bugs.

Here I have modeled a few boxes:

when they are cut with a ClippingPlane they look the following way in RenderedView, which makes sense to me.

However, this is how they look in RaytracedView - look at the shadows, they are caused by the box parts which are actually cut.

Now, when I save this image with ScreenCaptureToFile I get the follwing image again (!?!??!):

How this command was even able to remove the shadows, without rendering again is a mystery to me…

When the scene is rendered, I get this:

  • wrong shadows
  • wrong section color - not the one defined in RaytracedView settings, or where should I change the clipping plane render settings for a Render?

Furthermore, the wrong fills (black instead of red) are also appearing in the viewport of RaytracedView, only when the ScreenCaptureToFile command is invoked, does the section get the actual color again and the viewport shows the colors correctly afterwards.

@nathanletwory

Rhino 8 SR17 2025-2-12 (Rhino 8, 8.17.25043.10002, Git hash:master @ 384a84c165ff11e0681af87e076dd465f8a325d5)
License type: Educational, build 2025-02-12
License details: Cloud Zoo

Apple macOS Version 15.3 (Build 24D60) (Physical RAM: 16GB)
Mac Model Identifier: MacBookPro18,1
Language: en
.NET 7.0.0

Metal GPU Family Apple 7
Metal GPU Family Common 3
Metal GPU Family Mac 2
Graphics processors
  Apple M1 Pro
    Color LCD (2056 x 1329 @ 120.00Hz)
GPU Vendor: Apple

USB devices
  None

Bluetooth devices
  None

Third party kernel extensions
  None

Third party plugins
  /usr/lib/swift/libswiftCore.dylib
  /usr/lib/swift/libswiftObjectiveC.dylib
  /usr/lib/swift/libswiftCoreFoundation.dylib
  /usr/lib/swift/libswiftDarwin.dylib
  /usr/lib/swift/libswiftDispatch.dylib
  /usr/lib/swift/libswiftIOKit.dylib
  /usr/lib/swift/libswiftSystem.dylib
  /usr/lib/swift/libswiftXPC.dylib
  /usr/lib/swift/libswift_Builtin_float.dylib
  /usr/lib/swift/libswift_Concurrency.dylib
  /usr/lib/swift/libswift_StringProcessing.dylib
  /usr/lib/swift/libswift_errno.dylib
  /usr/lib/swift/libswift_math.dylib
  /usr/lib/swift/libswift_signal.dylib
  /usr/lib/swift/libswift_stdio.dylib
  /usr/lib/swift/libswift_time.dylib
  /usr/lib/swift/libswiftos.dylib
  /usr/lib/swift/libswiftsys_time.dylib
  /usr/lib/swift/libswiftunistd.dylib
  /usr/lib/swift/libswiftDistributed.dylib
  /usr/lib/swift/libswiftObservation.dylib
  /usr/lib/swift/libswiftMetal.dylib
  /usr/lib/swift/libswiftOSLog.dylib
  /usr/lib/swift/libswiftQuartzCore.dylib
  /usr/lib/swift/libswiftUniformTypeIdentifiers.dylib
  /usr/lib/swift/libswiftsimd.dylib
  /usr/lib/swift/libswiftRegexBuilder.dylib
  /usr/lib/swift/libswift_RegexParser.dylib
  /usr/lib/swift/libswiftCryptoTokenKit.dylib
  /usr/lib/swift/libswiftAVFoundation.dylib
  /usr/lib/swift/libswiftCoreAudio.dylib
  /usr/lib/swift/libswiftCoreLocation.dylib
  /usr/lib/swift/libswiftCoreMIDI.dylib
  /usr/lib/swift/libswiftCoreMedia.dylib
  /usr/lib/swift/libswiftCoreImage.dylib
  /usr/lib/swift/libswiftAccelerate.dylib
  /usr/lib/swift/libswiftMLCompute.dylib
  /usr/lib/swift/libswiftSynchronization.dylib
  /usr/lib/swift/libswiftCompression.dylib
  /usr/lib/swift/libswiftFileProvider.dylib
  /usr/lib/swift/libswiftCoreGraphics.dylib
  /usr/lib/swift/libswiftFoundation.dylib
  /usr/lib/swift/libswiftSwiftOnoneSupport.dylib
  /Library/Frameworks/3DconnexionClient.framework/Versions/A/3DconnexionClient
  /usr/lib/usd/libusd_ms.dylib
  /usr/lib/swift/libswiftIntents.dylib
  /usr/lib/swift/libswiftSafariServices.dylib
  /usr/lib/swift/libswiftSpatial.dylib
  /usr/lib/swift/libswiftWebKit.dylib
  /usr/lib/swift/libswiftAppleArchive.dylib
  /usr/lib/swift/libswiftDataDetection.dylib
  /usr/lib/swift/libswiftNaturalLanguage.dylib
  /usr/lib/swift/libswiftDemangle.dylib
  /usr/lib/swift/libswiftVideoToolbox.dylib
  /usr/lib/swift/libswiftGameplayKit.dylib
  /usr/lib/swift/libswiftSpriteKit.dylib
  /usr/lib/swift/libswiftPassKit.dylib
  /usr/lib/swift/libswiftGLKit.dylib
  /usr/lib/swift/libswiftMetalKit.dylib
  /usr/lib/swift/libswiftModelIO.dylib
  /usr/lib/swift/libswiftSceneKit.dylib
  /usr/lib/swift/libswiftMapKit.dylib
  /usr/lib/log/liblog_network.dylib


Rhino plugins that do not ship with Rhino
  /Users/rudolfneumerkel/Library/Application Support/McNeel/Rhinoceros/packages/8.0/Grasshopper2/2.0.9040-wip.38379+b5994c78bcff7d30070103a97d764f79221247af/Grasshopper2Plugin.rhp	"Grasshopper2"	2.0.9040.38379

Rhino plugins that ship with Rhino
  /Applications/Rhino 8.app/Contents/Frameworks/RhMaterialEditor.framework	"Renderer Development Kit"	8.17.25043.1002
  /Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/Commands.rhp	"Commands"	8.17.25043.10002
  /Applications/Rhino 8.app/Contents/PlugIns/NamedSnapshots.rhp	"Snapshots"	8.17.25043.1002
  /Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RhinoCodePlugin.rhp	"RhinoCodePlugin"	8.17.25043.10002
  /Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RDK_EtoUI.rhp	"RDK_EtoUI"	8.17.25043.10002
  /Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/MeshCommands.rhp	"MeshCommands"	8.17.25043.10002
  /Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RhinoRenderCycles.rhp	"Rhino Render"	8.17.25043.10002
  /Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RhinoCycles.rhp	"RhinoCycles"	8.17.25043.10002
  /Applications/Rhino 8.app/Contents/PlugIns/SectionTools.rhp	"SectionTools"	8.17.25043.1002
  /Applications/Rhino 8.app/Contents/PlugIns/Displacement.rhp	"Displacement"	8.17.25043.1002
  /Applications/Rhino 8.app/Contents/PlugIns/PanelingTools.rhp	"PanelingTools"	8.17.25043.1002
  /Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RhinoDLR_Python.rhp	"IronPython"	8.17.25043.10002
  /Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/GrasshopperPlugin.rhp	"Grasshopper"	8.17.25043.10002


Also: Would it be possible to implement the macOS native trackpad gestures (panning and zooming) to the Render interface? Currently, it is very cumbersome to navigate in a rendered image.
A panning option for the mouse would be great as well

A 3dm file to check with would be great, then I don’t have to guess what’s all in the scene.

FYI Raytraced doesn’t trace clipping plane fills - that is done by Rhino display pipeline. The black you’re seeing is the insides of the boxes: no light is there, so it renders black. Also, shadows are maintained, light can’t pass where there in reality is geometry.

clippingPlaneShading.3dm (2.8 MB)

so the clipping plaen shadow behavior is as expected?

Yes. If you move the clipping plane further into the slabs you’ll start seeing the same dark shadow also in the stack of shorter slabs. That is because now you see parts that you can’t see with the geometry in place. But shadows still cast for geometry that is clipped:

Likewise reflections still reflect geometry that is clipped, and lights that are behind the clipping plane also still shine their light. Next two renders of a hollow box containing a yellow-ish sphere, a red-ish box and one point light. Outside there is still one large box. Environment is set to blue which is also the skylight. The hollow and large boxes are just with default material, except for one of the insides which has been given a highly reflective metal as mirror. You can see the sphere mirrorred, even though it is otherwise clipped. The opposite wall has also been given the red-ish material. From the top view you can see how the camera is oriented. Also, the clipping plane is selected.

The first shot is with the point light enabled

The second shot is with the point light disabled

As you can see from the second shot the inside of the box is completely black: because there is no light.

With regards to the fill in the Render window this is enabled with the Surface edges and isocurves post effect. Unfortunately there is currently no fine-grained control so you’ll get the curves and edges no matter what. There is a youtrack item for getting better control in the render window post effect. Again, curves, hatches, edges, etc is not drawn by Raytraced / Rhino Render - they are post effects.