Regression: DrawViewportMeshes/Wires Requires Bounding Box Method

Hello McNeelies,

As part of testing our BIG pipelines in Rhino 8 I’ve noticed a minor, but quite annoying, regression related to drawing stuff by implementing the DrawViewportMeshes and DrawViewportWires methods in GhPython. When drawing stuff with nothing else in the display pipeline (i.e. existing in the Rhino file or elsewhere being rendered by Grasshopper) a GhPython component will draw stuff just fint without implementing the get_ClippingBox method, and one can use the ZEA Rhino command to zoom extend all to the geometry being drawn. In Rhino 8 this is not longer the case:




00_DrawViewportWiresMeshes.gh (10.6 KB)

System Info Rhino 7

Rhino 7 SR38 2024-12-3 (Rhino 7, 7.38.24338.17001, Git hash:master @ 97e36efa02d7f71638988290bb2d190fcf1b18c5)
License type: Commercial, build 2024-12-03
License details: Cloud Zoo

Windows 11 (10.0.26100 SR0.0) or greater (Physical RAM: 32Gb)

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Hybrid graphics configuration.
Primary display: Intel(R) Iris(R) Xe Graphics (Intel) Memory: 2GB, Driver date: 9-13-2024 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
Primary OpenGL: NVIDIA RTX 2000 Ada Generation Laptop GPU (NVidia) Memory: 8GB, Driver date: 9-2-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 553.05
> Integrated accelerated graphics device (shares primary device ports)
- Video pass-through to primary display device

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 8x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 9-2-2024
Driver Version: 31.0.15.5305
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8188 MB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 7\Plug-ins\Commands.rhp “Commands” 7.38.24338.17001
C:\Program Files\Rhino 7\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 7\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.38.24338.17001
C:\Program Files\Rhino 7\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.38.24338.17001
C:\Program Files\Rhino 7\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 7\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 7\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 7.38.24338.17001
C:\Program Files\Rhino 7\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.38.24338.17001
C:\Program Files\Rhino 7\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 7.38.24338.17001
C:\Program Files\Rhino 7\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.38.24338.17001
C:\Program Files\Rhino 7\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 7\Plug-ins\Displacement.rhp “Displacement”

System Info Rhino 8

Rhino 8 SR18 2025-3-31 (Rhino 8, 8.18.25090.15001, Git hash:master @ 66cc90ff9a04d80914b43ff389aea604f2dc324b)
License type: Commercial, build 2025-03-31
License details: Cloud Zoo

Windows 11 (10.0.26100 SR0.0) or greater (Physical RAM: 32GB)
.NET Framework 4.8.9290.0

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Hybrid graphics configuration.
Primary display: Intel(R) Iris(R) Xe Graphics (Intel) Memory: 2GB, Driver date: 9-13-2024 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
Primary OpenGL: NVIDIA RTX 2000 Ada Generation Laptop GPU (NVidia) Memory: 8GB, Driver date: 9-2-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 553.05
> Integrated accelerated graphics device (shares primary device ports)
- Video pass-through to primary display device

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
GPU Tessellation is: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 8x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 9-2-2024
Driver Version: 31.0.15.5305
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8188 MB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.18.25090.15001
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.18.25090.15001
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.18.25090.15001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.18.25090.15001
C:\Program Files\Rhino 8\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 8.18.25090.15001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.18.25090.15001
C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 8.18.25090.15001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.18.25090.15001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”

Of course one can just implement the get_ClippingBox method to solve the problem. But it would be great if one didn’t have to (i.e. to reduce complexity/code).

Thanks and best,

Anders

Bump..

Bumpy Bump.

1 Like


my guess:
all the display stuff is performance sensitive and some functionality / approach relies on GPU stuff like OpenGL (windows) and /or Metal (mac).
i think it totally makes sense to let the developer decide where and when the Boundingbox is calculated, optional needs updates and so on. it s the developer / the component that hold s all nescessary information, like boudingbox and geometry, … and wether it needs updating or not.

I think its a correct design decision from a performance point of view - to skip drawing components, that do not provide a valid Boundingbox and therefor do not implement the IGH_PreviewObject Interface correctly.

… of course it would be nice if some magic in the background would allow more laziness and less boilerplate code…

just came across this because of the other topic:

kind regards -tom

It’s not that drawing is being skipped per se. Here’s an example of a current project file running in V7 vs V9. Where’s the latter still draws stuff, but with “wrong” bounding boxes (excuse the horrible compression, had a hard time getting the capture below 20MB):

I’m not asking for magic. I’d just prefer if things worked like they do in Rhino 7. So I can type less code and my current/old pipelines wouldn’t need to be updated with bounding box methods all over the place to work in Rhino 8/9. That seems reasonable to me :man_shrugging:

sorry if i can not help you with your wish.
maybe @nathanletwory can explain the changes from v7 to v8 or at least point to the right person.

1 Like

Probably one of @kike , @AndyPayne, @dale or @jeff

2 Likes