teslamotors / light-show
- понедельник, 27 декабря 2021 г. в 00:31:30
Tesla Light Show
Welcome to the Tesla Light Show xLights guide! You can create and run your own light shows on Tesla vehicles.
A custom show can be run on a supported vehicle by loading it via a USB flash drive. Create and share your shows with others! A single show can be shared and run on any supported vehicle; they are not model-specific. The sequence data is stored in a .fseq file and the music comes from your choice of .mp3 or .wav.
Insert the flash drive into one of the front USB or USB-C ports, or glovebox USB port, then wait a few seconds.
In Toybox, select Light Show and tap Start The Show. If the files on the USB flash drive meet the requirements, then the custom show will be used instead of the built-in show.
As the custom light show loads, the status at the bottom of the popup cycles through "Loading lightshow.fseq" and "Loading light show...". When the status becomes "Light show ready!", you can exit the vehicle and the custom show will start.
Visit xLights Downloads to download and install the xLights application.
Download and unzip tesla_xlights_show_folder.zip, which is the Tesla xLights bare project directory.
Open the xLights application.
IMPORTANT: In File > Preferences > Sequences > FSEQ Version, select "V2 Uncompressed".
In File > Select Show Folder, navigate to and select the unzipped project directory, then select Open.
Select the Layout tab to view the Tesla 3D vehicle model. You should see the Tesla Model S model listed under the Model/Group table.
Make sure that the 3D preview checkbox is selected. Mac users may need to resize the window in order to see this checkbox.
Users may want to adjust the size of the lights on the model, for better visibility. In Layout > Models > Tesla Model S, open the Appearance dropdown and change Pixel Size.
Select the Sequencer tab. For the best editing experience, only the timeline, House Preview, and Color windows are needed.
Note that the official Tesla Model S .xmodel file includes the superset of lights and closures that are needed for all supported vehicles, and should be used to generate shows for all vehicle types. See light locations for information about where the lights are on each vehicle.
An example sequence is provided that can be run on the vehicle and/or opened in xLights. These instructions cover how to open it in xLights.
Follow the getting started instructions to set up the xLights project.
Download and unzip the example light show, lightshow_example_1.zip.
In File > Open Sequence, navigate to the unzipped folder and select the lightshow.xsq
example file, then select Open.
In the Sequencer tab, double click on "Tesla Model S" then double click on "All Lights and Closures" to view all channels.
Follow the getting started instructions to set up the xLights project.
Select File > New Sequence
Select Musical Sequence
Navigate to your chosen .wav or mp3 file, select it, then select Open
In the Wizard tab select Custom
Change the Frame interval to 20ms then select OK.
Note: any value between 15ms and 100ms is supported by the vehicle, but 20ms is recommended for nearly all use cases. The maximum show size limits do not depend on the frame interval.
Select Quick Start and wait for the sequencer to load
In the Sequencer tab, double click on "Tesla Model S" then double click on "All Lights and Closures" to view all channels
To add effects, click and drag an "On" effect onto a given channel in the effects window. In the Color window (shown by default, but can be found in View > Window > Colors), adjust Brightness if needed according to ramping light channels or closures channel mappings.
For more information on the workflow of creating xLights sequences, please use existing online resources. The rest of these instructions contain Tesla-specific information for show creators.
A Python validator script is provided to help check if your custom light show sequence meets these limitations, without needing a Tesla vehicle.
For usage, run:
python3 validator.py lightshow.fseq
Expected output looks like:
> python3 validator.py lightshow.fseq
Found 2247 frames, step time of 20 ms for a total duration of 0:00:44.940000.
Used 16.45% of the available memory
Most lights available on the vehicle can only turn on or off instantly, which corresponds to 0% or 100% brightness of an 'Effect' in xLights.
The minimum on-time for boolean light channels to produce light is 15ms, although human eyes will have a hard time seeing anything this short! Minimum on-time or off-time of 100ms generally makes the show more pleasing to look at.
In this example, the Left Front Fog turns on and off 3x:
Some channels can have a slow ramp in the intensity during turn-on or turn-off, to create graceful visual effects:
Channel | Model S | Model X | Model 3/Y |
---|---|---|---|
Outer Main Beam | Ramping | Ramping | Ramping on LED reflector headlights; Boolean on LED projector headlights |
Inner Main Beam | Ramping | Ramping | Ramping |
Signature | Boolean | Boolean | Ramping |
Channels 4-6 | Ramping | Ramping | Ramping |
Front Turn | Boolean | Boolean | Ramping |
To command a light to turn on or off and follow a ramp profile, add an 'On' effect and adjust the effect's Brightness parameter in the Color window:
Ramping Function | xLights Effect Brightness |
---|---|
Turn off; Instant | 0% |
Turn off; 500 ms | 10% |
Turn off; 1000 ms | 20% |
Turn off; 2000 ms | 30% |
Turn on; 2000 ms | 70% |
Turn on; 1000 ms | 80% |
Turn on; 500 ms | 90% |
Turn on; Instant | 100% |
Left inner main beam, 70% brightness, effect duration 1s: causes the light to ramp from 0% to 50% intensity over 1s, then instantly turn off (because an empty xLights timeline corresponds to 0% brightness).
Left inner main beam, 70% brightness, effect duration 4s: causes the light to ramp from 0% to 100% intensity over 2s, then stay at 100% intensity for 2s, then instantly turn off after 4s.
Left inner main beam, 70% for 2.06s, 30% for 1.9s, 70% for 2.06s: causes light to ramp to 100% intensity, then down close to, but not reaching, 0% intensity, then back up to 100% intensity, then instantly turn off.
The following tables and images help show which channels are controlled on each car. Some vehicles have lights that do not exist, or have multiple lights driven by the same control output - see notes in Light channel mapping details for this information.
Light Channel Name | Identifier in image - Model S/X | Identifier in image - Model 3/Y |
---|---|---|
Outer Main Beam | 1 | 1 |
Inner Main Beam | 2 | 2 |
Signature | 3 | 3 |
Channel 4 | 4 | 4-6 |
Channel 5 | 5 | 4-6 |
Channel 6 | 6 | 4-6 |
Front Turn | 7 | 7 |
Front Fog | 8 | 8 |
Aux Park | 9 | 9 |
Side Marker | 10 | 10 |
In custom xLights shows, the following closures can be commanded:
Channel | Model S | Model X | Model 3/Y | Supports Dance? | Command Limit Per Show |
---|---|---|---|---|---|
Liftgate | Yes | Yes | Only vehicles with power liftgate | Yes | 6 |
Mirrors | Yes | Yes | Yes | - | 20 |
Charge Port | Yes | Yes | Yes | Yes | 3 |
Windows | Yes | Yes | Yes | Yes | 6 |
Door Handles | Yes | - | - | - | 20 |
Front Doors | - | Yes | - | - | 6 |
Falcon Doors | - | Yes | - | Yes | 6 |
To command a closure to move in a particular manner, add an 'On' effect and adjust the effect's Brightness parameter in the Color window:
Closure Movement | xLights Effect Brightness |
---|---|
Idle | 0% |
Open | 25% |
Dance | 50% |
Close | 75% |
Stop | 100% |
For Idle, Open, Close, and Stop, there is no minimum xLights effect duration in order for the command to take effect. For example, the following sequence has a liftgate open command with duration of only 1s ahead of the dance that comes later, and this is sufficient to open the liftgate all the way:
For Dance, the xLights effect must persist until the dancing is desired to stop.
(Left side marker || Left aux park || Right side marker || Right aux park)
requests from xLights.(Left side marker || Left aux park)
(Right side marker || Right aux park)
(Channel 4 || Channel 5 || Channel 6)
.(Left tail || Right tail)
requests from xLights - note that the license plate lights xLights channel will have no effect on these vehicles.