Using an image as a source
This knowledge base article describes how to use a bitmap image as an emitter in FRED using the Detailed Source construct. An example system is included that demonstrates a bitmap source being imaged by an ideal 1:1 relay lens.
- Right mouse click on the Optical Sources folder of our object tree and select “Create New Detailed Optical Source”. On the Positions/Directions tab, set the type to “Bitmap (points specified by bitmap pixels)” and load in the bitmap file. Though not required, the semi-width and semi-height are set to match the aspect ratio of the pixel counts in the bitmap.
- The designated number of rays/pixel have their positions randomized within each pixel.
- The chromaticity coordinates of the bitmap pixel are calculated.
- The wavelengths in each pixel have their weights solved to match the chromaticity coordinates from (2).
- Each ray’s solved weight from (3) is multiplied by the weight factor specified on the Wavelength tab of the source.
- On the Wavelengths tab of the Detailed Source dialog box, right mouse click in the wavelengths list and choose “Set Standard Bitmap Wavelengths”.
- Right mouse click in the wavelengths list again, and choose, “Set All Colors From Wavelengths”
Running the Example File
- Open the dialog for the source model by double clicking on the BitmapEmitter source node on the tree.
- Click on the Positions/Directions tab.
- Use the Select button in ray positions specification to load the Photon.jpg file. Make sure that the rays/pixel specification is set to 1.
- Click on the OK button to commit the changes.
- Select Raytrace > Trace and Render from the menu to perform the raytrace. Visualize the rays in the 3D view (note, performing a Trace All Sources will be faster than the Trace and Render option).
- Select Analyses > Color Image to view the re-imaged bitmap source at a magnification of -1.