ISSUES with ViewCaptureToFile - Camera or Shadows creating a horizontal shadow across the image

So i’m trying to export some images through ViewCaptureToFile, but I’m having this issue where something is creating a weird shadow horizontally across the image. Also i’m working in Isometric, so the camera and projection might have something to do with it… See example below!



Here are my Render view settings, I’ve tried turning on and off everything and something seems to help!




I have a feeling it has to do something with the camera, but I’m unsure what and I’ve even tried orientating the camera to the objects origin except it doesn’t help. I’ve not ever had this problem before, for some reason its now appeared. I’ve been working this way for a while now and it’s strange why i’ve only just come across this issue now and i can’t seem to anything online that can help…

Please someone help :frowning:

Hi @Josj,

My first impression was that your error might be related to the image size being bigger then the viewport, but i can’t reproduce this on my machine, even with your exact settings.

From your Video Hardware & Drive Information I can see your graphics card driver is almost 2 years old. A good start would be updating to the newest version. Also you might additionally run the _SystemInfo command and post the result here, it will give even more info on your specific configuration.

I’ve updated my drivers and it doesn’t seem to make a difference, but here is my System Information if that helps. Honestly unsure to why it’s happening as it doesn’t seem to do it at one angle. (See example below)

A few questions:

  • How far is the model from the origin?
  • is your ground plane ON?

The ground plane is not on and model is relatively close to the origin

That is not the output of the _SystemInfo command.
Please post the output you get when typing _SystemInfo into the Rhino Command line

  • Did you try different display modes? Is this happening in all of them or just some?
  • Is this happening at non-custom resolutions? e.g. resolution set to Viewport?
  • If your file is not proprietary, uploading it here, as well as your modified displaymode you use for the capture will also help narrow doen the cause of the problem

Here’s my Rhino System Information:

Rhino 6 SR22 2020-1-28 (Rhino 6, 6.22.20028.13281, Git hash:master @ 379871ece695dc096e83826f08b429db8ca2e7f5)
License type: Evaluation, build 2020-01-28
License details: Stand-Alone
Expires on: 2020-05-05

Windows 10.0 SR0.0 or greater (Physical RAM: 16Gb)
Machine name: BABYBLUE

Hybrid graphics system.
Primary display: Intel® HD Graphics 5500 (Intel) Memory: 1GB, Driver date: 8-16-2018 (M-D-Y).
Primary OpenGL: NVIDIA GeForce 940M (NVidia) Memory: 2GB, Driver date: 3-17-2020 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 445.75

Secondary graphics devices.
USB3.0 External Graphics Device (Unknown) Memory: 0MB, Driver date: 1-17-2020 (M-D-Y).

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On

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

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 3-17-2020
Driver Version: 26.21.14.4575
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 2 GB

Rhino plugins
C:\Program Files\Rhino 6\Plug-ins\SolidTools.rhp “SolidTools”
C:\Program Files\Rhino 6\Plug-ins\Commands.rhp “Commands” 6.22.20028.13281
C:\Program Files\Rhino 6\Plug-ins\WebBrowser.rhp “WebBrowser”
C:\Program Files\Rhino 6\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 6\Plug-ins\RhinoScript.rhp “RhinoScript”
C:\Program Files\Rhino 6\Plug-ins\RhinoLabsTools.rhp “Rhino Labs Tools”
C:\Program Files\Rhino 6\Plug-ins\IdleProcessor.rhp “IdleProcessor”
C:\Program Files\Rhino 6\Plug-ins\RhinoRender.rhp “Rhino Render”
C:\Program Files\Rhino 6\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 6.22.20028.13281
C:\Program Files\Rhino 6\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 6\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 6\Plug-ins\Alerter.rhp “Alerter”
C:\Program Files\Rhino 6\Plug-ins\RhinoCycles.rhp “RhinoCycles” 6.22.20028.13281
C:\Program Files\Rhino 6\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 6.22.20028.13281
C:\Program Files\Rhino 6\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 6\Plug-ins\Displacement.rhp “Displacement”

This only seemed to happen in the render view, but I have inserted the file into another file and it is not replicating the same issue.

Still not sure why this is happening though, but the resolution does stop the visual glitch and only seems to change the placement of it.

Your render view is non-standard as indicated by it’s blue text color, does resetting it back to default solve your problem? then we would know where to look

Also it seems your Intel driver is a bit old (~2 years) maybe updating that can help,
also this seems fishy:

Secondary graphics devices.
USB3.0 External Graphics Device (Unknown) Memory: 0MB, Driver date: 1-17-2020 (M-D-Y).

Maybe @pascal has some additional ideas?

Hello - if you have not tried yet, please toggle the ground plane on and off - does that make a difference?

-Pascal

Hi @Josj,

Please send me the exact file so that all I need to do is ViewCaptureToFile. You can send the file privately through here: https://www.rhino3d.com/upload?to=david.eranen@mcneel.com

-David

Hi Pascal - I’m also experiencing the same issue on both my PC and work laptop, when I try to export the image at a larger scale (for higher resolution). Tried what you suggested but didn’t change anything.

Switching on the setting below from Arctic Display setting seem to do the trick
image

Is this Error solved? I’m experiencing same error. I’m extracting images by grasshopper python component. But result has same problem with this.

def captureAllNamedViews():
    rendered_guid = Rhino.Display.DisplayModeDescription.RenderedId
    rendered_display_mode = Rhino.Display.DisplayModeDescription.GetDisplayMode(rendered_guid)
    
    for i, viewInfo in enumerate(Rhino.RhinoDoc.ActiveDoc.NamedViews):
                
        # create new viewCapture object
        viewCapture = Rhino.Display.ViewCapture()
        name = viewInfo.Name
        rhinoView = Rhino.RhinoDoc.ActiveDoc.Views.Add(name, Rhino.Display.DefinedViewportProjection.Top, viewInfo.Viewport.ScreenPort, True)
        Rhino.RhinoDoc.ActiveDoc.NamedViews.Restore(i, rhinoView.ActiveViewport)
        
        rhinoView.ActiveViewport.DisplayMode = rendered_display_mode
        viewCapture.Width = rhinoView.Size.Width
        viewCapture.Height = rhinoView.Size.Height
        bitmap = rhinoView.CaptureToBitmap(rendered_display_mode)
        
        if bitmap:
            filename =  str(i)+ ".png"
            bitmap.Save(filename);
        rhinoView.Close()```

When I ran this code I saw some window created and gone in a second.
And the window was drawn on Rhino window. I found that intersection between the blinking window and the cross point of 4 division window of Rhino and the cross pattern on the image is just the same position.
All the cross patterns are on the same position in images that I created by this code.
Is this have any relationship with the divided Rhino window and the process of RhinoView.CaptureToBitmap()?

Hey McNeel and @pascal! Is this fixed yet, or identifed how to fix it?? This is a very obnoxious problem that we’ve had for a while… basically make the “ViewCapture” commands useless in rendered view. Please help!

Hi Sean -

Please run the Rhino SystemInfo command and copy-paste the result here.
Apart from that, we’ll need a small sample 3dm file with which we can try to reproduce the issue.
-wim

For me it resolves if you change the view angle slightly.

If someone can still reproduce this issue in Rhino 8.7 (Service Release Candidate 7), then please let me know.