Finding Material Errors
The attached FRED script is a very simple utility for finding surfaces where material errors have occurred. The script’s basic implementation is the following:
- Loop over the ray buffer
- Retrieve the ray failure code for each ray
- Compare the failure code with the desired error message (in this case “unresolved material”)
- Write out ray and surface information to the output window
Although the reported output does not guarantee that the reported surface contains a material error (the problem could have been upstream in the raypath), it does provide a reasonable starting point for problem diagnosis. For example, the ray id number can be used in the single raytrace utility to re-draw and report the exact material information along the ray’s path.
Download the FRED script: findMaterialErrors.frs