TriLib – Tutorial : Enabling DevIL image library

TriLib includes DevIL image library.

What is DevIL image library?

Developer’s Image Library (DevIL) is a programmer’s library to develop applications with very powerful image loading capabilities, yet is easy for a developer to learn and use. Ultimate control of images is left to the developer, so unnecessary conversions, etc. are not performed. DevIL utilizes a simple, yet powerful, syntax. DevIL can load, save, convert, manipulate, filter and display a wide variety of image formats.

Currently, DevIL can load .bmp, .cut, .dds, .doom, .exr, .hdr, .gif, .ico, .jp2, .jpg,.lbm, .mdl, .mng, .pal, .pbm, .pcd, .pcx, .pgm, .pic, .png, .ppm, .psd, .psp, .raw, .sgi, .tga and .tif files.
Formats supported for saving include .bmp, .dds, .h, .jpg, .pal, .pbm, .pcx, .pgm, .png, .ppm, .raw, .sgi, .tga and .tif.

Unity only allows you to load .PNG and .JPG external image formats.
Devil allows TriLib to load all above image formats.

To enable DevIL on your project, first, ensure you have checked these files when importing your TriLib package:

A menu item called “TriLib” will appear on your Unity menu bar.

To enable DevIL, check the “Enable DevIL Image Library”

That´s it.
Now your TriLib models textures will be loaded using DevIL image library instead Unity internal image loader.

DevIL is not available for iOS target due to license requirements incompatibilities.