Navigation: Tools Commands > Preferences > Ray Buffer

 

Ray Buffer

 

Contact Us: fredsupport@photonengr.com

 

 

 

Description


This feature on the Preferences tab provides user access to Ray Buffer settings. The Ray Buffer pages files to disk in order to allow for storage and tracing of large ray sets.  The default settings have been chosen for optimum speed under most conditions. 

 

 

Navigation


This feature can be accessed by selecting Tools > Preferences from the menu, and then clicking on the Ray Buffer tab.

 

 

Controls


Control

Inputs / Description

Defaults

RAM Memory Settings

Number of frames

A frame is a block of memory that contains (up to) the number of rays specified in the "Rays per frame" setting.  The "Number of frames" setting specifies how many of these memory blocks will be reserved by FRED for storing ray information in RAM.

 

For 32-bit versions of FRED, the total number of rays allowed to be stored in RAM at any time is 5M.  The product of the Number of frames and the Rays per frame must be less than, or equal to, 5M.

 

For 64-bit versions of FRED, the number of frames allowed is restricted by the total available RAM installed on the computer in the following way.  FRED estimates the total memory usage if all rays are incoherent and unpolarized and this value is reported in the dialog.  For a fixed number of "Rays per frame", the estimated memory usage must be less than the amount of RAM installed on the system (also reported in the dialog).  When the estimated memory usage exceeds the amount of RAM installed on the system, an error message will be presented and the user will need to adjust the "Number of frames" and/or the "Rays per frame" until the estimated memory usage is less than the amount of RAM installed on the system.

 

56 (32-bit)

200 (64-bit)

Rays per frame

This specifies the maximum number of rays that can be stored in a single frame, with a value between 500 and 100,000.

20,000

The product of the "Number of frames" and the "Rays per frame" gives the total number of rays in memory that FRED will store in RAM at any given time.  If more rays are generated during the raytrace than are allowed to be stored in RAM, rays will be temporarily buffered to the disk and stored in "pagefiles" (see below).  It is always preferable to store ray data in RAM because access to the rays is significantly faster from RAM than from pagefiles.  Note, however, that it is undesirable to allocate more RAM than is available on the computer.  If the ray buffer preferences are setup to allocate more RAM than is available, Windows (rather than FRED) takes over the memory handling of the ray buffer and a significant penalty is incurred on the raytrace time.

 

For 32 bit versions of FRED, the maximum total ray count that can be stored in RAM (product of Number of rays and Rays per frame) is 5,000,000.  Additional rays beyond this value will be stored in pagefiles on disk.

 

For the 64-bit version of FRED, the maximum total ray count that can be stored in RAM (product of Number of rays and Rays per frame) is limited by the amount of RAM available.

 

The ray buffer dialog reports the total number of rays able to be stored in RAM based on the current values for "Number of frames" and "Rays per frame".  Rays of different types (incoherent unpolarized, incoherent polarized, and coherent) contain different amounts of information and, therefore, have different sizes when stored in RAM.  The amount of RAM consumed for each of the ray types is estimated in the ray buffer dialog.  The ray buffer dialog also reports the total amount of RAM available on the current computer and FRED will not allow the user to allocate more RAM to the ray buffer (using the incoherent unpolarized estimate in the ray buffer dialog) than is available on the computer.

 

A rule of thumb to follow when allocating RAM to the FRED ray buffer is to specify a maximum RAM allocation of (Total RAM (GB)- 3 (GB)).  This leaves 3GB of RAM available for the operating system and any other programs being run on the computer in addition to FRED.

Pagefile Settings

Directory

Page file storage directory (selected by FRED during installation).

 

Base name

Base name used in naming pagefiles.

FredRays

Min free disk space (Gb)

Minimum free disk space available for ray storage.

2

Check for old page files when FRED starts

When checked, FRED will search the pagefile directory for leftover pagefiles and prompt the user in order to find out if they should be deleted.

Checked

Surface Interaction Buffer

# of pre-allocated slots

Controls the size of a temporary buffer used during ray interactions (one per thread).

specular - 12, scatter - 101

 

Restore Defaults

Restores default buffer settings.

 

OK

Accept settings and close dialog box.

 

Cancel

Discard settings and close dialog box.

 

Help

Access this Help page.

 

 

 

Application Notes


Changing Settings

The default settings in the ray buffer preferences have been chosen to minimize the likelihood of a memory resource limitation.  Each installation of FRED should be adjusted so that the "Number of frames" results in a memory allocation that leverages the available RAM.  The ray buffer preferences dialog shows the approximate memory usage for various ray types (incoherent, polarized, coherent) given the current frame and rays/frame settings, which can be used as a guide for adjusting the settings and ensuring that memory for the ray buffer is not over-allocated.  Keep in mind that in the absence of any other programs, Windows itself needs a few GB of memory for normal operation (i.e. if your computer has 8GB of RAM, Windows uses 2-3GB and there may be only 5-6GB available for FRED to use).

 

 

Related Topics


Preferences Dialog 

 

 

 

 

 

Copyright © Photon Engineering, LLC