# Focused Gaussian beam going through a plane

I try to create a focused Gaussian beam which is going through the focal plane.

So far I tried a Volume scatter with a lot of lamps in the middle, which completely failed.

For the second try I exported an intensity distribution with matlab and used this as an UV-map to control the transparency of a plane. My beam consists now of a lot of planes (see first picture) which is also not ideal because at the intersection with the focal plane there are some lines visible.

If I increase the transparency of the plane, the result is ok but I am not 100% satisfied (see second picture).

So my question is, if it is possible to create some kind of light or intensity distribution which I can tweak with functions, so that I have a Gaussian shape in the x-y-plane and a hyperbolic or quadratic shape in z-direction?

I already saw the previous question about a Gaussian beam, but unfortunately the blender files cannot be downloaded anymore and without I was not able to understand fully what was going on and the problem is also a bit different.

Here is a two dimensional plot of how the intensity distribution of a focused Gaussian beam should look like approximately.

The colormap is just for better illustration, for my image it should be only red. The important thing is that the width of the beam gets smaller in the middle where the plain is but also the intensity there gets higher.

• I would be helpful if you could point us to an image you are trying to achieve as "Gaussian beam" seems very vague. This is the images that google turn up with google.com.sg/…. As you can see it's not very clear to most of us what a gaussian beam should look like. Commented Aug 23, 2017 at 11:17
• Ok, I added a two dimensional plot in the original post.
– JSE
Commented Aug 23, 2017 at 12:15
• Maybe try using an IES light file? Commented Aug 23, 2017 at 15:43
• I watched a vew tutorials and also downloaded the IES_gen3 program where you can create your own IES, but for me this looks like these are only point light sources, where you can tweak the emission in dependence of the angle. I was not able to create the curved shape.
– JSE
Commented Aug 23, 2017 at 18:47

You can create such a beam using a Volumetric Emission shader and some maths nodes.

The Gaussian distribution is as follows :

Create a mesh (eg, a cube) to act as the domain for the volumetrics. The Object coordinates will be used, passed through a Mapping node to allow it to be easily manipulated and scaled.

To to create a vertical beam you can calculate the square of the distance as 'x^2 + y ^ 2'. This can be used directly as the 'x^2' in the above equation.

All that remains is to scale the beam based on the square of the Z-coordinate.

This produces the following material :

You can adjust the Mapping node to vary the scaling along each of the X, Y, Z axis, adjust the 'Add' node to affect how tightly the beam is focused and adjust the Multiply node to affect the overall brightness of the beam.

Blend file attached

EDIT : Just noticed the edit to add variation in intensity towards the focus. This can be easily achieved by driving the final Multiply for the intensity from the Z coordinate. eg, something like the following to focus the beam to a bright spot on the plane :

• Awesome, this is exactly what I was looking for, thank you! It seems like these math nodes are really powerfull tools. I'm really happy because there are so much things I can do with this now.
– JSE
Commented Aug 23, 2017 at 21:42
• Glad to help. The maths nodes can bebquite powerful - but it can take a while to get right sometimes. Commented Aug 23, 2017 at 22:35
• This is really cool.... I had a quick question though... if I want a transparent background in cycles - it seems like the beam above and below the plane disapear. Is it possible to have the render film transparent and this still work? blender.stackexchange.com/questions/1303/…
– JPH
Commented Jun 1, 2022 at 12:41
• I faced the same issue many times and so far could not find a perfect solution. This strange behaviour of volume emission over transparent background was already discussed at several places, hence I also did not open another question regarding this.
– JSE
Commented Jul 6, 2022 at 11:01
• Part of the problem is the eventual output format. For example, PNG doesn’t really support this due to how it holds the alpha. You should be able to render in another format that does support alpha and emission. Commented Jul 6, 2022 at 13:50