ZEMAX Users' Knowledge Base - http://www.zemax.com/kb
How to Address Issues with Shaded Model Layouts and the Object Viewer
http://www.zemax.com/kb/articles/123/1/How-to-Address-Issues-with-Shaded-Model-Layouts-and-the-Object-Viewer/Page1.html
By Andrew Locke
Published on 17 August 2006
 
The Shaded Model layout, NSC Shaded Model layout and NSC Object Viewer are all graphical analysis features in ZEMAX which offer advanced graphics capabilities and striking renderings.  These features use OpenGL, which is a screen rendering technology built into all modern graphics cards. This article describes how to address occasional issues that arise due to driver or memory problems with these cards.

Introduction to the OpenGL features of ZEMAX

There are many graphical analysis features in ZEMAX. Among these features, the Shaded Model layout (sequential mode) and NSC Shaded Model layout (non-sequential mode) can be used to create some of the most visually impressive graphics that ZEMAX has to offer.

Shaded Model layout showing prism rendering

 

Shaded Model layout showing segmented mirror

In addition, the NSC Object Viewer (non-sequential mode) has the same visual appeal as a Shaded Model layout but also is an essential tool in changing face assignments for coating and scattering modeling. For information on using the Object Viewer to change face assignments, please see the Knowledge Base article “How to Add Coating and Scattering Functions to Non-Sequential Objects”.

Object Viewer window showing Newport lens mount imported from CAD

These three graphical features (Shaded Model, NSC Shaded Model and NSC Object Viewer) have one very important feature in common. They are the only graphical windows in ZEMAX which use the OpenGL standard (http://www.opengl.org/). OpenGL is an advanced application programming interface (API) for 2D and 3D graphics presentation. It is the advanced nature of OpenGL that allows Shaded Model and Object Viewer windows to have such graphical impact in ZEMAX. The rendering is performed on the graphics chip of the computer, rather than its CPU.

There are occasional issues with the driver software and memory available to the graphics chip that affect how these ZEMAX features work. The purpose of this article is to assist you in solving problems that may arise when working with the ZEMAX features which utilize OpenGL.


Memory issues with the OpenGL graphical features in ZEMAX

The graphics card of a modern computer is like a 'computer within a computer', with (often more than one) graphics processor and dedicated on-board graphics memory.When opening or updating one of the OpenGL graphics features in ZEMAX (Shaded Model, NSC Shaded Model and NSC Object Viewer), you may encounter the following error: 

Error message indicating that there is not enough video memory available

What this error is indicating is that, given the complexity of what ZEMAX is trying to draw in the Shaded Model/Object Viewer, there is not enough video memory available to render the image. The best solution is to add more memory to the graphics card, so it has enough memory to render the scene you are modeling! If that is not possible, there are a variety of methods to reduce the memory requirements.


Addressing memory issues with Shaded Model layouts (sequential mode)

For the Shaded Model layout in sequential mode, your options include:
1) Reduce the “Number of Rays” in the Shaded Model settings:

Shaded Model layout settings showing "Number of Rays" setting 
2) Reduce the number of surfaces that you are viewing in the Shaded Model settings:

 Shaded Model layout settings showing surfaces settings
3) Reduce the number of “Angular Segments” and/or “Radial segments” in the Shaded Model settings:

 Shaded Model layout settings showing segments settings
(Note:  Reducing the number of segments will effectively reduce the amount of memory required for rendering but the quality of the rendered image will be reduced as well)

4) Increase the amount of memory on your video card or install a video card with more memory.

Methods for alleviating the memory error for non-sequential OpenGL features are listed on the next page.

 


Addressing memory issues with NSC Shaded Model layouts and Object Viewer (non-sequential mode)

For the NSC Shaded Model layout and NSC Object Viewer in non-sequential mode, your options include:
1) Reduce the number of facets in the “Draw” tab of the Object Properties dialog:

"Draw" tab of NSC Object Properties dialog showing "Drawing Resolution" (i.e. facets) settings 
2) You may also want to consider hiding objects which you do not need to draw:

 "Draw" tab of NSC Object Properties dialog showing "Do Not Draw Object" check box
(Note:  Rays will still ray trace and interact with an object, even if it is not drawn)

3) Increase the amount of memory on your video card or install a video card with more memory

Also, for the NSC Shaded Model, you can also reduce the number of “Layout Rays” in the Non-Sequential Component Editor for your source object(s):

NSCE showing "# Layout Rays" column for a source object 



Updating your video card driver

If you are using one of the OpenGL graphical features (Shaded Model, NSC Shaded Model or NSC Object Viewer) and the rendering does not look correct (i.e. aliasing or artifacts in the image, for example), you should check to ensure that you have the latest version of the driver for your video card. You can start by checking with the manufacturer of your video card. The vast majority of video card manufacturers have drivers available for download on their websites.

(Please note:  ZEMAX Development Corporation cannot provide technical assistance with finding and downloading video card drivers. If you need this type of assistance, you should contact your IT administrator or computer manufacturer.)

If you have installed the latest video card driver that your video card’s manufacturer has to offer and you are still experiencing problems with the OpenGL features in ZEMAX, you can also try installing the Microsoft version of the driver for your video card using the following procedure:

-From the Start menu, right-click on Windows Update.
-Click on "Run as" and select the 'The following user:" radio button.
-Enter the "User name" and "Password" for a user with administrative access to your computer.
-On the left side of the webpage that opens up, click on "Use administrator options".
-On the Administrator Options page, in the "Update multiple operating systems" section, click on "Windows Update Catalog".
-Check the "Find hardware driver updates" check box.
-Check the "Video" box.
-Select your video card hardware manufacturer and operating system.
-Look through the drivers that are listed and find the newest one for your exact model video card.
-Download the driver and unzip it.
-Right-click on the desktop and select "Properties".
-Click on the "Settings" tab and then "Advanced".
-Click on the "Adapter" tab and then "Properties".
-Click on the "Driver" tab and then "Update Driver".
-When asked if you want to connect to Windows Update, select "No" and then click "Next".
-On the next screen, click on the radio button "Install from a list or specific location..." and then click "Next".
-Click on the "Search for the best driver in these locations" radio button.
-Check the "Include this location in the search" check box.
-Browse to where you unzipped the driver files.
-Click "Next" to install the driver.

Once the driver has been installed, restart your machine.

(Thanks to Mike Tocci for providing the procedure described above.)


Summary

This article has described the ZEMAX features which use OpenGL (Shaded Model, NSC Shaded Model and NSC Object Viewer) as well as addressed issues that may arise when using these features. In summary,

  • There are a variety of options to use less memory when using OpenGL features in ZEMAX
  • Updating the video card driver can solve rendering issues with OpenGL features
  • If the video card manufacturer’s driver does not resolve rendering issues, try a Microsoft driver