Windows 11 (10.0.22621 SR0.0) or greater (Physical RAM: 1.3e+02Gb)
.NET Framework 4.8.9181.0
Computer platform: DESKTOP
Hybrid graphics configuration.
Primary display: NVIDIA Quadro RTX 4000 (NVidia) Memory: 8GB, Driver date: 9-12-2023 (M-D-Y).
> Accelerated graphics device with 4 adapter port(s)
- Windows Main Display attached to adapter port 0
- Secondary monitor attached to adapter port 1
Primary OpenGL: NVIDIA A40 (NVidia) Memory: 48GB, Driver date: 9-12-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.42
> Accelerated graphics device with 4 adapter port(s)
- There are no monitors attached to this 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: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High
Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 9-12-2023
Driver Version: 31.0.15.3742
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 49140 MB
I find the command “'_ViewCaptureToFile” is utterly useless for V8, this can be amplified by adding 2x or 3x resolution scaling to the capture settings, examples below are between viewport screencaps and '_ViewCaptureToFile exports.
Note: I have the model placed at World’s Origin and I’m running it on Nvidia A40 GPU with 48GB of VRAM
Another Issue is the rendering of Ambient Shadows especially with custom viewports that combines outlines with Shadows, here is an example of Monochrome Display Mode
I agree ViewCaptureToFile has problems. Also the available options are not equally available when used via dialog box and command line. I made a post about this here:
Another determental setting is the Camera Based Clipping bubble seems to contribute to this issue (especially with the views that contains Ambient Occlusion)
This is likely a dialogbox that reads the current loaded viewports and do the below:
1- SetRedrawOff
2- Switch to the selected viewport.
3- Capture it.
4- SetRedrawOn
I closed all the open viewports and I left only with my active viewport as an option.
I would prefer it to be independent from the viewports. Have it create the desired view without actually displaying it. Like I mentioned in the linked post. Though I guess this might be a pretty big change to how it works internally.
To isolate the issues I’m seeing, The First issue is related to Print Width of the objects. It seems that the ViewCaptureToFile, unexpectedly thickens the lines in proportion to their print width, this behavior is not expected especially when I have the print preview off, and even when it is turned on it doesn’t match the desired display output. Test.3dm (115.3 KB)
The Second Issue
Shadows in certain viewports, are completely ignored when the viewport is captured with x2 or x3 scale, likely this is caused by a memory limit or something:
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{4D00C0D1-9434-4EB6-8078-8697A560334F}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller.get_CoreWebView2()
at Microsoft.Web.WebView2.Core.CoreWebView2Controller.get_CoreWebView2()
at Microsoft.Web.WebView2.Wpf.WebView2.Uninitialize(Boolean browserCrashed)
at Microsoft.Web.WebView2.Wpf.WebView2.Dispose(Boolean disposing)
at System.Windows.Interop.HwndHost.Finalize()
[END ERROR]
this is unfortunate that I didn’t see your thread over there, maybe I didn’t use the right pormpts in my search to get the relevant topic which was yours.
I notice this issue happening frequently and my concern that these undesirable behaviors are lingering in V8 while working completely fine in V7.
When I hover over the images it shows 1527x953 for the “viewport screenshot” and 1404x950 for the “ViewCaptureToFile” image. After clicking on the “**Output from ViewCaptureToFile” image and then the blue"original image" icon with text at the bottom I get a downscaled 1404x950 version and not the original image. Strange.