Content Development

Professional content development for digital signs, video walls and touch-kiosks with Lightwing involves preparing the image, video, font and object files for your project plus a Lightwing script file. The Lightwing SDK provides many examples that can simply be copied into a new project to use as a starting point for creating new content. Most projects will require new images and a new script file. The best practice for creating new scripts is to copy and paste pages from existing scripts that already have the desired features. Experiment with making some minor edits to an existing script to get comfortable with the process. The Lightwing scripting language is powerful and fantastic new sign content can be made from the examples provided in the SDK.

All of the content files for Lightwing are made or converted using open-source tools that have little or no cost. An incredible wealth of images, videos and fonts are also available on the web that can be used with Lightwing at little or no cost as well.

A specific directory structure is required for Lightwing which is the same on Windows and Linux players. The home folder for Lightwing can be changed on Windows or Linux by defining the LIGHTWING environment variable

Lightwing Directory Structure

Names             Descriptions                         File Type Extensions           Origins
    
lightwing             Home Folder
        \data            Data Files                              CSV                                           Excel, Google Docs, etc.
        \demos        Demonstration Signs
        \effects        Effect Files                            PFX                                           Text Editor
        \fonts           Font Files                              PVR                                           PVRTexTool
        \images       Image Files                            PVR, PNG, JPG, BMP               PVRTexTool, PVRTexToolCLI, GIMP, PhotoShop, etc.
        \objects       Animation Objects               POD                                         Blender with PVRGeoPOD Exporter
        \scripts        Script Files                             LWS                                         Text Editor
        \updates      Content Update Files          ZIP, gz, bz2                             WinZip, 7Zip, tar, etc.
        \videos         Video Files                            lv0, lv2, lv4                              WinFF, ffmpeg, MP4Box, etc.

Lightwing requires most of these folders, except for demos which is a recursive set of folders with this same structure containing demonstration signs. The demos folders contain compact sets of files that are specific to each demo. The fonts, effects, objects and videos in these folders are duplicated from the main tree. However, the images and scripts are unique to each demo and offer excellent examples of how to create professional signs with Lightwing.

Converting Images

Lightwing will display the most popular image file types directly, including JPG, PNG, BMP and PVR. However, your project will perform better if JPEG and BMP images are converted to either PVR or PNG formats. JPEG images load more slowly than other formats because they require color space conversion. Lightwing will do this automatically, if necessary, but this can impact performance if your project uses a lot of JPEG images. JPEG was designed for digital cameras and it stores images in a color format that is not directly compatible with display panels, which require RGB format. It’s more efficient to do this conversion once on a PC, rather than requiring the sign player to do it every time the images are used. Since PNG images are already stored in RGB color format, they are decoded faster. PNG also offers better image quality than JPEG and has alpha transparency features that are quite useful for building digital sign content. Professional sign projects usually require some editing of the images anyway to do resizing, cropping, etc. So, the best practice is to convert all images to either the PNG or PVR formats as this editing is done.

BMP files have a different problem – they are uncompressed. This means they use more disk space, but it also causes them to load more slowly because they are typically so much larger than compressed formats. JPEG and BMP images are fine for small projects, but should be avoided with larger projects to get the best performance and image quality.

The PVR format loads even faster than PNG because it’s accelerated by the GPU and PVR supports mip-map filtering, which dramatically improves the quality when images are scaled down to fit animated 3D objects. The support for accelerated PVR images is a feature almost unique to Lightwing and it’s one of the key reasons Lightwing outperforms other solutions so dramatically. However, the PVR format does not support alpha transparency on Lightwing, so png must be used for images that require blending, such as background layers.

Converting images to the PNG format requires an image editing app such as Gimp, PaintShopPro or Adobe PhotoShop, particularly if you want to make images with transparency. If you are not using transparency, it is better to convert images to PVR format. This is done with the PVRTexTool which is included in the Lightwing SDK and should already be installed at:

C:\Program Files (x86)\Lightwing\Tools\PVRTexTool\PVRTexTool.exe

Converting Images with PVRTexTool

1. Open the image file to convert (Ctrl-O).
2. Bring up the encode texture dialog (Ctrl-E).
3. Select the "Group/API" named "OpenGL ES 2".
4. Select "ETC1" from the list.
5. Select "Fast Perceptual" for the "ETC Encoding Mode".
6. Check the "Generate MIPMaps" box and confirm that the "Vertical Flip" box is not checked.
7. Click the "Encode" button and wait a few seconds.
8. Save the new image (Ctrl-S) as a PVR file into the folder: lightwing\images

PVRTexTool converts images for Lightwing content development

PVRTexTool Configured to Convert Images to PVR ETC1 Format for Lightwing

There is also a command-line version of PVRTexTool provided, which is better for converting a large number of images as a batch process. To convert a batch of images, first use the Batch File Generator (BFG) and then PVRTexToolCLI. This method also allows images to be resized as they are converted and bad file names to be corrected. Only images which have a height greater than the maximum specified height will be resized automatically and their aspect ratios are always preserved. Set the maximum height to zero to disable this resizing, which is the default.

The Batch File Generator recognizes BMP, PNG and JPG files as images. If the format of any image file is not recognized, errors will be recorded in the generated batch file. This program can also optionally convert image file names that contain symbols which are illegal on Linux such as commas and spaces. It will remove illegal symbols and replace spaces with underscore symbols.

Converting a Batch of Images with BFG and PVRTexToolCLI

1. Run the Batch File Generator provided in the Lightwing SDK at:

            C:\Program Files (x86)\Lightwing\Tools\PVRTexTool\BFG.exe

2. Select the maximum image height (typically 1080 or leave it at 0) and confirm that the "Flip Vertical" box is not checked.
3. Click the "OK" button and browse to the folder which contains the images to be converted.
4. Wait while the Batch File Generator scans the folder and generates the batch file in that folder.
5. The batch file (Convert.bat) can be edited at this point if any corrections are needed.
6. Run the batch file. This can take awhile for a large number of large images.

Note that running batch files generated with BFG requires opening a Windows command shell with PVRTexToolCLI.exe in the command path.

Converting Fonts

    A large set of open-source fonts is provided in the Lightwing SDK in sizes from 10 to 200 pixel heights in increments of 10 pixels. Additional fonts can be added using PVRTexTool, but not with PVRTexToolCLI.

Converting Fonts with PVRTexTool

1. Select "Create Font Texture..." from the File menu.
2. Browse to the ttf or otf font file and open it.
3. Select the desired Size for the new font between 1 and 200 pixels in height. For this example, use: 50.
4. Set the Border to 2 pixels and check the "Grid Fitting" and "Anti Aliasing" boxes and click the "OK" button.
5. Save the new font (Ctrl-S) as a PVR file into the folder: lightwing\fonts
6. The new font must be named with the chosen font size appended with an underscore symbol. For example: "NewFont_50.pvr".
7. Repeat as needed for additional font sizes.

    Many additional fonts are available from the web and many are open-source. Refer to the Additional Recommended Downloads table for links.

PVRTexTool converts fonts for Lightwing content development

Example of Converting a Font for Lightwing with PVRTexTool

Converting Videos

    Lightwing decodes video very efficiently using a dedicated processor called the VPU. Several video codec types are supported including MPEG-4, H.264 and MPEG-2. Motion JPEG is supported, but only for 4:2:0 format (not 4:2:2). Lightwing does not support audio, so video container files must be converted to a format with no audio. The most common video file formats (including mov, mp4, mkv and avi) can be converted easily using one of several open-source tools, including WinFF, ffmpeg, avconv or MP4BoxThe Lightwing SDK includes WinFF and ffmpeg.

Lightwing also requires that video files be named with extensions that correspond to the video codec type the file contains. These are listed below.

Video Codec Type File Name Extensions

Codecs        Extensions

MPEG4         lv0  
H.263            lv1
H.264            lv2
VC1                lv3
MPEG2         lv4

    WinFF is a graphical user-interface for the ffmpeg libraries and is recommended for use with Lightwing on Windows. WinFF includes the ffmpeg libraries. The installer for WinFF is included in the Lightwing SDK installation as well as presets designed specifically for use with Lightwing. If it’s not already installed, run:

        C:\Program Files (x86)\Lightwing\Tools\WinFF\WinFF-Installer.exe

The first time WinFF is launched, import the presets for Lightwing:

Edit > Presets > Import > Browse to presets file > Open > Save

C:\Program Files (x86)\Lightwing\Tools\WinFF\LightwingPresets.wff

Converting Video with WinFF

1. Click the "Add" button to select the input video file to convert.
2. Select the "Output Details" tab.
3. Set the "Convert to:" option to "Lightwing".
4. Set the "Preset:" option to one of these:

        Fast Copy of MPEG4 to Lightwing Video (H.264)
        Transcode Other Formats to Lightwing Video (H.264)
        Fast Copy of MJPEG to Lightwing Video (MJPEG)
        Transcode MJPEG to Lightwing Video (H.264)

5. Set the "Output Folder:" to the Lightwing videos folder:
    
        C:\Users\<User>\AppData\Roaming\Lightwing\videos
        
6. Click the "Convert" button.
7. Check the log window that is opened for any error messages.
8. Copy the converted video file to a Linux player using the WinSCP tool.
9. Use the lvt test tool on the linux player to confirm that the video is converted correctly:
    
        lvt videos/NewVideo.lv2

    If you are unsure which preset to use in WinFF, start with the Fast Copy Lightwing presets first. If those fail, then try the Transcode Lightwing presets. The Transcode presets require more time to process, but they can convert a much wider range of video codec types.

WinFF converts video for Lightwing content development

Example of Converting a Video for Lightwing with WinFF

There are several sites on the web that specialize in video loops for background effects for digital signage that are available in the mov and mp4 formats that can be converted for Lightwing. Refer to the Additional Recommended Downloads table for links.

Since video is not implemented in the Windows version of Lightwing, it is recommended to also make a representative image from each video. The Windows version of Lightwing will automatically display an image in place of the video if an image is provided with the same name as the video. This helps visualize the appearance of new sign content while developing on Windows and the video will play on the Linux Lightwing player without any modification to the script file.

The substitute images must have the same names, except that the extensions must be PVR and the files must be located in the images folder. Suitable images can be captured from a video using the Windows Print-Screen feature. Play the original video on any Windows video player in full-screen mode and press the Print-Screen key to capture images into the Windows clipboard. Then, paste the captured images into an image editor and follow the procedure detailed above to convert the images into PVR format.

 Creating Animation Objects

    Lightwing features advanced 3D animation capabilities which are implemented mainly through object files. Lightwing object files have the file name extension POD. They contain geometric models of 3D shapes as a minimum, but also usually have animations and texture coordinates for mapping images or video to the models. They may also have solid colors or lamps for directional lighting effects. Objects are created with 3D authoring tools like Blender, 3DSMax or Maya, which are used heavily in the game development industry. Learning to use these tools is beyond the scope of this guide, but Blender is open-source software and there are many tutorial videos about using Blender available on the web.

    This section details how to install Blender and export object files from it. 3DSMax or Maya can be used also, if you are already familiar with those tools. In any event, the Lightwing SDK provides many prepared objects that can be used directly, without these tools or any knowledge of Blender. So, this section is for experienced Blender users who want to create their own custom 3D models and animations for Lightwing.

Blender converst 3D objects for Lightwing content development

Example of an Animated 3D Object for Lightwing Created with Blender

The Lightwing SDK provides the PVRGeoPOD plugin for Blender. Plugins for 3DSMax and Maya are also available from the PowerVR SDK and for other operating system platforms. The stand-alone versions of PVRGeoPOD take Collada (dae) files for input, which can be produced from most 3D modelling apps. But, the recommended approach is to use the PVRGeoPOD plugin with Blender, because this avoids the Collada conversion step and is simpler to use. Blender is supported for both 32 and 64 bit versions of Windows.

Install the PVRGeoPOD Plugin for Blender

1. Download and install Blender version 2.76 (or newer) for Windows. You may install either 32 or 64 bit versions of Blender on 64 bit Windows,
    but only install 32 bit Blender on 32 bit Windows. Both versions are compatible with Lightwing even though Lightwing is 32 bit software. 
    The term (x86) denotes 32 bit software on 64 bit Windows.

2. Locate the following folders in the installed Lightwing SDK. Only copy files from the folder that corresponds to the version of Blender you have installed (32 or 64 bit):
    
        C:\Program Files (x86)\Lightwing\Tools\PVRGeoPOD\Blender-32\
        C:\Program Files (x86)\Lightwing\Tools\PVRGeoPOD\Blender-64\
    
3. Copy these files from the chosen folder to these folders:  The "(x86)" should only be used if you have installed 32 bit Blender on 64 bit Windows, otherwise, it should be removed.
    
            PVRGeoPOD.dll    ->     C:\Program Files (x86)\Blender Foundation\Blender\<version>\scripts\addons\.
            QtCore4.dll        ->     C:\Program Files (x86)\Blender Foundation\Blender\.
            QtGui4.dll        ->     C:\Program Files (x86)\Blender Foundation\Blender\.
            
        This file will be copied by the Add-on installer in the next step:
              PVRGeoPODScript.py    ->     C:\Users\<User>\AppData\Roaming\Blender Foundation\Blender\<version>\scripts\addons\.

4. Launch Blender and run its Add-on installer:

        File > User Preferences > Select Add-ons Tab > Install from File > Browse to file (PVRGeoPODScript.py) > Install from File
        
        Check the enable box for "Import-Export: PVRGeoPOD", then click the "Save User Settings" button and close the user preferences window.

5. Test and configure new PVRGeoPOD installation in Blender:
    
        File > Export > PVRGeoPOD > Browse to \lightwing\objects\ folder and enter a new file name > Click "Export pod" button.

        The PVRGeoPOD dialog window should now appear. If not, it is probably because one of the above files was not copied correctly.
    
6. Enable animations export for PVRGeoPOD:
    
        Select the Transformations tab and click the Export Animations box to enable animations export, if it is not already enabled.
    
7. Complete the export by clicking the Export button, then OK.

The following image shows the Add-on installer with the PVRGeoPOD exporter properly installed in the Blender User Preferences window.

BlenderPlugins

Configuring Blender to Export 3D Objects for Lightwing

The following image shows the PVRGeoPOD exporter open in Blender with correct settings to export a POD object file for Lightwing.

BlenderExport

Example Configuration of a Blender Object Export for Lightwing

 

 

<   Software Installation                                     Introduction                                  Player Deployment   >