Smode plugin for sending streams to LASER projectors.
- Build a static library and C header from the Rust library. See the Rust
smode_laser
library README.md here for more details on how to achieve this. - Build the plugin project file using the batch script. There are 3 included .bat files inside the plugin/ folder. Double click on the .bat file that matches the version of Visual Studio you have installed on your system. This will create a build/ folder which contains a visual studio solution.
- Build the plugin itself using the generated visual studio solution. To do so, navigate to build/Visual Studio xx/ and open the Laser.sln file. Next, in the Solution Configuration drop down menu, select to build in either Debug or Release mode. Finally, right click on the SMODE PLUGIN Laser in the Solution Explorer and click Build.
- Install the plugin within the plugins directory of your Smode SDK. There will be either a new folder call Debug or Release created that contains the plugin. For debug, copy the file Laser-debug.dll ... For release, copy the file Laser.dll. Navigate to the SmodeSDK folder and paste the .dll file within the plugins/ folder.
Nannou's ether-dream
repository provides a small DAC emulation
library. The examples provided with this library are quite useful for
testing DAC streaming in the case that you do not have an Ether Dream available.
To run the DAC emulator examples, follow these steps:
- Make sure you have installed Rust as described in the
smode_laser
Rust library steps here. - Clone the ether-dream repository somewhere and
cd
into it:git clone https://github.com/nannou-org/ether-dream cd ether-dream
- Build and run one of the examples:
or
cargo run --release --example dac_emulator_default
cargo run --release --example dac_emulator_visualiser
The examples may take a while to build as the visualisation requires the
nannou
library which cargo will build from scratch. If you run into any build
issues, you may wish to check you have the necessary system requirements as
mentioned within the relevant section of the nannou guide.
Please keep in mind that the visualisation itself is currently very basic and may not accurately reflect the behaviour of a LASER projector controlled by an Ether Dream DAC. For example, there is no inertia simulation, luminance attenuation based on scanner speed, or individual point accentuation. On top of this, the behaviour of each projector will differ based on their own hardware limitations.
Running multiple emulators can be useful for testing communication between more
than one DAC in the case that multiple physical DACs are unavailable. However,
doing so will require writing a little extra code in the example. Within the
ether-dream/dac-emulator/examples/dac_emulator_default.rs
example, we can see
that the first line within the main function creates a default DAC description:
let dac_description = Default::default();
If we wish to run a second DAC emulator on the same network, we'll need to
change its MAC address by making the dac_description
mutable and assigning the
field like so:
let mut dac_description = Default::default();
dac_description.mac_address = [0x00, 0x11, 0x22, 0x33, 0x44, 0x55].into();
The default MAC address can be found here.