An Optimized Ray-Tracing for Complex Solids