Lasers with refraction in Blender
2 minutes read
Context
Recently, I wanted to create a refraction simulation in Blender, thinking that with it should work well in Cycles and that I would be able to complete it without trouble. However, I ended up discovering that this is absolutely not trivial and I that I absolutely don’t know how render engines work.
The next sections will describe my inital attempt, as well as different solutions. This article is largely based on my Blenderartists support post and the discussion that followed.
Objectives
My initial goal was to model a ray shining through a block of glass (image from Wikipedia) : 
What I wanted was to be able to use such a scene to play around with variations of the refractive index and the angle of incidence. This did not work and I ended up programming a small Python simulation instead, which you can download.
In the following, I will present the different methods to make lasers with refraction in Blender, with their advantages and shortcomings. First, I will present light-based methods for path tracing with Cycles. Second, I will present geometry-based methods that can work with EEVEE.
Downloads
There is a download link for each method in the Summary section, but you can download all files here :