Bitmap Source Converter
The Bitmap Source Converter is an add-on module of TracePro. The Bitmap Converter acts to project the “light” from an arbitrary planar scene into an optical system. This converter will sample the data in a bitmap and send a subset of light into a solid angle or cone, defined by the position of the optical system relative to the scene location. Both near and far scenes can than be projected into the optical system for analysis. The user defines an aperture in space, the input aperture of an optical system, and the converter aims rays in one or more wavelengths into the aperture from each pixel. The ray aiming uses random sampling of the solid angle to define the direction of each ray. The position, direction and flux of each ray is stored in an ASCII or Binary file to be used as input into TracePro. The formats supported include BMP, JPEG, GIF, or PNG file. The TracePro generated source file contains starting rays suitable for tracing in TracePro. TracePro then reads this file format, performs a ray-trace, and displays the resulting illuminance distribution in true color. Color information in bitmap files is encoded as red, green and blue values (additive color). The colors take on values from 0 to 255 for 24-bit color (8 bits per color), this being the preferred mode of operation for this software component. Other color depths are also supported. To generate the TracePro source file, rays are started from each pixel in the bitmap. The user may specify many ray sample points per pixel for good sampling, and there are three rays for each sample point, one ray for each color. The rays are assigned a flux and wavelength attribute corresponding to the brightness and color of the pixel and aimed toward the entrance surface of the optical system. Ray sample points are selected in a uniform random distribution over the pixel, and their directions are selected to give a random distribution over the entrance aperture of the optical system. The information written to the ray file contains the starting points and directions of rays in the entrance aperture of the optical system, i.e., it comprises a virtual source representing the bitmap scene. The far field scene is specified by: · The global coordinates of the center of the scene. · The x and y dimensions of a pixel at the center of the scene. · The direction cosines of the local x and y (horizontal and vertical) axes of the scene, expressed in global coordinates. · The red, green and blue (RGB) values for each pixel in the scene. · A global mapping of the RGB values into one or more wavelengths. · The gamma of the mapping between RGB and luminance. · Optional temperature for each pixel in the bitmap. The default mapping of the RGB into wavelength is into three wavelengths in order to produce a true color image. These wavelengths are the CIE reference color stimuli, R = 0.700 mm, G = 0.5461 mm, and B = 0.4358 mm[1]. It is vital to have a good default mode for using bitmap modeling. In this mode, the user can simply open a bitmap and, with a minimum of data entry, make a useful source file. A subsequent ray-trace produces a true color scene as imaged by the optical system. In this mode, the software must have a good set of default values that provides an acceptable result. The only input that the user is required to enter is the center, dimensions and orientation of the scene and of the entrance aperture of the optical system. Defaults used in this mode are: · Emit rays from each pixel of the bitmap. · Emit in Lambertian angular pattern, with importance sampling toward entrance aperture of optical systems. · Emit light in three wavelengths, mapped from RGB values using CIE primary reference color stimuli wavelengths to produce true color. · Use default values for luminance mapping, namely k = 1, g = 1 and Lo = 0. This means that for a typical scene, e.g. 640x480 pixels, if we are to emit 50 rays from each pixel for each of three wavelengths to adequately sample the entrance aperture, almost 50 million rays would be generated. At the current state of hardware and software, this is too many to be feasible for timely completion of simulation.In most cases, examining an enlarged subset of a large image is preferred over examining the full image. This avoids having the resolution of the computer display affect the perception of the simulation results. |