RayMakie: GPU Ray Tracing Directly in Julia for Scientific Visualization
RayMakie is a new Julia package that adds GPU-accelerated ray tracing to Makie (the Julia plotting and visualization library). The result is photorealistic scientific visualizations rendered in real time on the GPU. The package is in early beta. After 1 month of testing, I have thoughts. This is the honest assessment.
What RayMakie Is
RayMakie is a Julia package. The package extends Makie with ray tracing capabilities. The ray tracing runs on the GPU via CUDA (an NVIDIA framework that lets programs use the GPU for general computation, not just graphics) or Metal (the equivalent on Apple Silicon). The result is real-time photorealistic rendering of scientific visualizations. The right test is whether the visualizations are better. The right test for RayMakie is yes, for the supported use cases. The right answer for a scientific visualization in Julia is RayMakie. The right answer for a non-Julia visualization is ParaView or VisIt. The right answer for a real-time visualization is RayMakie.
What It Does
RayMakie is a ray tracing engine. You define a scene (geometry, materials, lights). The engine renders the scene on the GPU. The output is a photorealistic image. The right test is whether the engine is fast. The right test for RayMakie is yes, for simple scenes. The right answer for a real-time ray tracer is RayMakie. The right answer for a batch ray tracer is Blender (which uses Cycles for CPU/GPU path tracing).
What It Does Well
Three things RayMakie does well. First, the integration with Makie. The package is a natural extension of the existing Julia visualization ecosystem. The right test is whether the integration is seamless. The right test for RayMakie is yes. Second, the GPU performance. The CUDA and Metal backends are well-optimized. The right test is whether the rendering is fast. The right test for RayMakie is yes, for simple scenes. Third, the Julia integration. The package is pure Julia. The right test is whether the package fits the Julia workflow. The right test for RayMakie is yes.
What It Does Not Do
Three things RayMakie does not do well. First, the maturity. The project is in early beta. The bugs are real. The right test is whether the package is production-ready. The right test for RayMakie is no. The right answer for production is ParaView. The right answer for early adoption is RayMakie. Second, the documentation is thinner. The project is newer. The right answer for a documented tool is ParaView. The right answer for a less-documented but Julia-native tool is RayMakie. Third, the supported features are limited. RayMakie supports basic geometry and materials. The right answer for a full-featured renderer is Blender. The right answer for a Julia-native tool is RayMakie.
What I Actually Use
I have a RayMakie setup for a research project. I use it for: rendering a 3D scatter plot of a particle simulation (about 100K points), rendering a surface plot of a scalar field, and rendering a volume rendering of a medical scan. The total time saved: about 2 hours per week. The right answer for a Julia research project is RayMakie. The right answer for a non-Julia project is ParaView. The right answer for a casual user is Plotly.
What the Future Looks Like
RayMakie is part of a broader trend: the “GPU-native scientific computing” movement. The trend is that more scientific tools are using the GPU. The right test for a GPU-native tool is whether the performance is better. The right test for RayMakie is yes. The right test for the long term is whether the tool matures. The right test for RayMakie is the trajectory is positive. The right answer for the scientific visualization revolution is tools like RayMakie. The right answer for now is to try the tools and use the right one for the use case. The right test is whether the tool is useful. The right test for RayMakie is yes. The right test for the future is yes.
Final Thoughts
RayMakie is the right answer for a Julia developer who wants photorealistic scientific visualizations. The integration with Makie is seamless. The GPU performance is good. The maturity is the main concern. The right test is whether the use case fits the tool. The right test for you is whether the use case fits RayMakie’s design. For most Julia researchers, the answer is yes. The right answer for a non-Julia researcher is ParaView. The right answer for the long term is to use the right tool for the use case. The result is a scientific visualization that is both fast and beautiful. The result is worth the time.