Skip to content
Memo Akten edited this page Jan 23, 2015 · 5 revisions

This guide is meant as a very basic beginners intro to what is needed to get up and running with, and controlling ILDA-compatible galvanometer based laser projectors in realtime. (I'll explain what that means below). This is not meant as a comprehensive source of information.

WARNING: Lasers are dangerous. No joke. Even weak lasers can PERMANENTLY BURN your retina in a fraction of a second before you even have time to blink. It doesn't just depend on the power of the laser, but the width of the beam, exposure time, distance, scan range of image etc. Invisible (e.g. infrared) lasers are even more dangerous as they don't trigger your blink reflex. Instead as you go blind you hear a popping sound as your retina heats up and the intraocular fluid in your eye boils. Seriously. Don't mess around with lasers unless you know you're safe. Get Laser Safety Training or work with a Laser Safety Officer. http://www.laserfx.com/BasicSafety/IndexBasicSafety.html

ILDA

ILDA is the organization that governs the use of lasers in art, entertainment and education.

ILDA Image Transfer Format

ILDA has also defined the protocol which allows communication between laser controllers (E.g. computers) and fixtures (e.g. laser projector), this is called the ILDA Image Transfer Format. It is a static vector image format, and can be summarized as simply a sequence of point positions (x,y) and colors. (Animations are simply sequences of static image frames).

ofxIlda (this openFrameworks addon) abstracts and encapsulates the ILDA protocol, so you don't need a deep understanding of it, but having a general overview of what it does could be useful, especially to debug problems.

Required hardware to get started

  • PC: Computer to generate the content
  • Laser fixture: An ILDA compatible galvanometer based laser projector
  • ILDA Interface: A small box that sits between your PC and your laser fixture. Also called a 'DAC' (Digital-to-Analog-convertor). It converts the ILDA frame information from digital (as stored in the PC memory) into an analog ILDA signal.
  • ILDA cable: To connect your DAC to the laser fixture. Has a DB-25 connector.

Laser Fixture (ILDA-Compatible Galvanometer based laser projector)

This refers to:

  • A laser projector than can
  • receive image information in the ILDA Image Transfer Format via a standard ILDA cable (DB-25 Connector)
  • and control its laser beam with two galvanometers and mirrors

How it works

In single color fixtures (e.g. green), inside the fixture there is a single laser beam which first hits one mirror, and then the second mirror and then exits the fixture. By adjusting the angle of the two mirrors the fixture can control the (x,y) position of the laser beam. These mirrors vibrate furiously fast, sending the single laser beam all over the place, hopefully to where you want it to go. So when you see a laser image of a unicorn, it's actually a single laser beam bouncing off two vibrating mirrors sweeping (or scanning) the outline of the unicorn. When you see an animation of a dancing unicorn, it's simply a sequence of frames.

In multiple color fixtures (e.g. RGB), there are multiple laser beams in the fixture (E.g. red, green, blue). These beams are aligned and overlaid onto each other with dichroic mirrors (which let one wavelength of light through and reflect another). Then this aligned RGB beam hits the two mirror/galvanometers and again can control the (x,y) position of the combined laser beam.

Specs

The most important specs of a laser fixture are:

  • Power: E.g. 200mW, 1W, 4W etc. The bigger the number, the brighter (and more dangerous) it is. (1000mW = 1W). 1W+ is seriously bright and will hurt your eyes just looking at it from closeup or in a small space. 200-300mW should be enough for a small space, but won't be very bright. Massive outdoor projections could be 4W, 10W or even more. Multicolor lasers will have individual power ratings, (e.g. 350mW, 500mW, 250mW) one for each color.

  • Galvanometer / scanner speed: How fast and accurate the galvos are. e.g. 30Kpps, 60Kpps. One common misconception is that this signifies how many points the laser can draw. That's incorrect, because it depends on how complex and wide the shape is! (if you think of the physics of how the galvos move, this becomes clearer). These speed specs actually should accompany a degree (8 degrees by default). E.g. 60Kpps at 4deg, or 30Kpps at 8 deg. And it refers to how many points per second it can draw the ILDA test frame with no visual deformation (or within acceptable ILDA standards). So it doesn't mean you can push 60Kpps for your own drawing, just the ILDA test frame at the specified degrees (usually 8deg). 30Kpps is kind of a standard but not amazing. 60Kpps is much better. But again it depends on how wide (an angle) an image you will need to project.

  • (Max) Scan angle: The 'field of view' of the fixture. I.e. how wide (an angle) it can project. Some fixtures have a variable scan angle, i.e. even while you're sending the same ILDA signal, on the fixture itself you can widen or narrow the angle, like a 'zoom' adjustment on a normal video projector. Remember as you make the image bigger, i.e. wider, the galvos are working harder so your image quality will degrade and you won't be able to push as many points. Also remember that the 30kpps or 60kpps is usually for 8 degrees, not 80!

Other features you'll find are:

  • laser class: This depends on the power (i.e. danger) of your laser.
  • special / security features: By law high power laser fixtures in public spaces need certain things like instant kill-switches, key locks etc. So different models have different things, removable remote pads etc.
  • modes: Some fixtures will have some default presets and modes, like audio-reactivity, built in patterns etc.
  • DMX: Some fixture have DMX control. AFAIK the DMX can only control presets, modes, triggers etc. I've not seen ILDA over DMX (i.e. controlling the actual galvanometers and image), and I don't think it's possible with DMX's bandwidth.

DACs

This is the interface that sits between your PC and the laser projector. They can be USB or ethernet. There are quite a few out there. Here are just a couple I have personally used or have friends who have used.

Note: There is a DIY hack using a soundcard to act as the DAC (which it already is) to control a galvanometer: OpenLase by Héctor 'marcan' Martín Cantero

Drawing

An ILDA Frame is a single static image that contains the required information for that image. A laser animation is simply a sequence of ILDA Frames.

ILDA graphics are vector, they are essentially a list of points (x, y) coordinates, and colors.

In ofxIlda, an ILDA Frame is the class ofxIlda::Frame which in turn is a vector of ofxIlda:Poly which in turn is a child of ofPolyline. So you draw your laser shapes as you would draw with an ofPolyline.

I tend to like to modularize classes as much as possible. So ofxIlda::Poly stores a single polygon information, ofxIlda::Frame only stores frame information as a sequence of Polys, ofxEtherdream takes a ofxIlda::Frame and sends it to the DAC etc. This is all quite low-level and fundamental stuff, and a lot of features can be added on top. I prefer if these features are added as separate classes / modules / handlers which can take a Frame or a Poly, and return a modified one (or modify in place).

Shapes

It's important to remember that a laser projector works by vibrating two mirrors (the galvanometer) incredibly fast, so chances are it will not be able to accurately represent the image that you sent, especially complex shapes - but even the most basic shapes if not formatted correctly. The true outcome of what you see will depend on many many parameters including the quality of the galvanometer and will be shaped by the physics of how it is moving.

E.g. If you want to draw a square and just send 4 dots (for the corners), you will probably get nothing or a crazy blob or circle as the galvos go spinning around those 4 points insanely fast.

A very quick and easy fix is to resample the square and send it as a few thousand points, equally spaced (i.e. lots of points along the straight edges of the square as well as the corners). This is in fact what ofxIlda does in the background, it uniformly resamples your shapes so you don't have to do this (actually this is an option you can enable or disable or customize).

The above isn't very optimum because there are lots of points along straight lines. You could try and optimize it by sending more points nearer the corners, and fewer points for the straight lines. But then you'll see that the corners are much brighter and the lines are darker, because the beam is spending more time on the corners and less time on the straight lines.

An alternative and more advanced method is to use blanking at the corners, i.e. go in a straight line quite quickly (i.e. fewer points than the uniformly resampled version), blank the laser and turn around to come back and do the adjacent side. Switch the laser on just before speeding down that side and repeat. In my experience this is a PITA to do algorithmically since it depends on so many factors including the physical properties of your galvos and even the scan angle your fixture is set at (if it has variable scan angle).

Blanking

As mentioned above, blanking is turning the laser off at a point and turning it back on again (by setting intensity/color to 0). Usually you don't need to worry about blanking, if you have multiple Polys in your Frame, ofxIlda will take care of the blanking for you to make sure the laser is turned off as it goes from the last point of Poly1 to the first point of Poly2. However, just like the above problem, if the laser turns off while it's still moving you may see smears if the galvanometer has too much momentum. One solution to this is to duplicate the end points of Polys multiple times. The exact number of times you need to do this unfortunately depends on the quality of your galvanometer and your shape. ofxIlda has settings to do this automatically (and defaults to around 30x). On high quality galvanometers this might be too much, and instead you might see the end and start points of Polys being too bright, as the laser rests there for too long.

Optimization

As mentioned ofxIlda takes care of blanking, and optionally uniformly resamples your Polys ready to be sent to your DAC (e.g. with ofxEtherdream). However it doesn't do any re-ordering of the points or Polys. Re-ordering your points or polys (E.g. with a travelling salesman like algorithm) could be a massive optimization, as you don't want your galvanometer to be jumping all over the place if it doesn't need to. If you have a single long Poly with no blanking then there's nothing you can do. But if you have lots of Polys scattered around, then reordering them (or even changing start point and traversal order in some of them) to make sure that the laser minimizes the distance it travels will make a difference. ofxIlda does not do this, but this could be implemented externally quite easily (e.g. a class or function that takes an ofxIlda::Frame and returns an optimized ofxIlda::Frame).

Intensity

Not all lasers have linear scaling with intensity (in fact most don't, unless they have a built in LUT). I.e. sending 50% brightness will not result in 50% perceived brightness. Likewise sending 20% brightness will not result in 20% perceived brightness. On top of that RGB (i.e. white) lasers use 3 lasers in them: red, green blue, which they mix to get white. If you send 50% brightness to all three, expecting to get mid-grey, you could get dark purple, or medium green, since the non-linearity in each of the 3 lasers is likely to be different. You will need to do a manual LUT calibration if you want to stay accurate. I use MSAInterpolator to manage LUTs. I.e.

  • First calibrate by feeding it a few empirical values (e.g. sending (0.1, 0.15, 0.2) results in 25% grey, (0.37, 0.4, 0.47) results in 50% grey, (0.6, 0.67, 0.7) results in 75% grey). These input values were found by trial and error
  • Then feed it a desired color/intensity value (e.g. I want 0.7, 0.2, 0.3), and it returns a real (i.e. empirical interpolated) color/intensity value (e.g. 0.6, 0.1, 0.2)

Note: some cheap lasers don't even support intensity adjustments, no matter what you send them, they are either on or off (the cutoff point between on or off could be anywhere between 0...1 depending on the fixture)

Variable Field of view

A lot of pro lasers have a field of view adjustment. Which basically scales the x and the y up and down (or centre offsets). I.e. imagine you send a full frame square [(0, 0) - (65535, 65535)]. You might have a fixed FOV laser (e.g. 60 degrees) which projects that full frame square at 60 deg; or you might have a variable FOV laser (E.g. my one is 0 degrees - 80 degrees). So you sit in your rehearsal studio, design your shape, test it, make sure everything is looking perfect, tweak the number of points etc and it looks great. Then you goto a venue, the projector position is different, you play with the fov scale on the projector (you don’t touch the shape that’s being output from your software). And it all goes tits up because the degrees that the mirrors need to swing have changed. So make sure you have all the number of points and resampling and everything on sliders!

Laser Safety Goggles

Lasers are dangerous, I said this at the top. While working you can use laser safety goggles which are designed to block out very specific narrow wavelengths. So you can see all colors except for the color(s) blocked by the goggles, which you'll need to match to your laser. Goggles also come with an Optical Density Rating. This OD rating needs to be paired with the power density of your laser. Unfortunately this isn't as simple as the power of your laser (ie how many W it is) but also the diameter of the beam, which depends on the diameter of the beam when exiting the machine, which also depends on the lens and collimation, and also the beam divergence and distance to the source. Ie the further away you are, the wider the beam and the weaker the power density of the beam.

Single frequency (E.g. green) goggles are not too expensive (£100-£150). Multiple frequency goggles (e.g. RGB) are a lot more expensive and hard to find. So one thing I do when working with RGB lasers is disable the RB and only work in green, wearing green blocking goggles. Note: when wearing the goggles you will not see the laser at all, unless the laser is more powerful than what the goggles can block.

Further Reading

Acknowledgements

Thanks to Golan Levin for recommending the Etherdream DAC and pointing me in the right direction to begin with. and Daito Manabe and Yusuke Tomoto for sharing their code to connect to the Etherdream.