Skip to main content

How to Import Resources

This section describes import operations for the following file formats.

  • Image files (*.bmp, *.jpg, *.jpeg, *.gif, *.tga, *.png, *.dds, *.ktx, *.hdr, *.exr)
  • Font files (*.ttf, *.otf, *.fnt, *.fbm)
  • Shader files (*.vert, *.frag)
  • SVG files (*.svg)
  • FBX files (*.fbx)
  • glTF files (*.gltf, *.glb)
  • Icon files (*.bmp, *.ico, *.jpg, *.png)
  • Script files (*.lua)

In addition to the above, Photoshop file (*.psd), Adobe XD file (*.xd), Axure RP file (*.rp) and Sketch file (*.sketch) can also be imported. For more information on these, please refer to Smart Importer chapter.

About .ktx File Format

The following compressed image formats are supported:

  • Etc2CompressedRgbFormat
  • Etc2CompressedSrgbFormat
  • Etc2Alpha1CompressedRgbaFormat
  • Etc2Alpha1CompressedSrgbaFormat
  • Etc2EacCompressedRgbaFormat
  • Etc2EacCompressedSrgbaFormat

To use this type of format, first of all it is necessary to convert an image with a different format (.tga, .gif, .psd, .bmp, .pgm, .png etc.) in a .ktx file. The next tools support generating KTX files:

  • Texgenpack
  • Mali Texture Compression tool
  • Ericcson Texture Compression Tool

This tool compresses texture images to the Ericsson Texture Compression (ETC/ETC2) and Adaptive Scalable Texture Compression (ASTC). The available output file formats are .pkm - that can contain compressed textures - and .ktx – which allows the compression of a 2D texture with all its mipmap levels.

After the conversion is done, the .ktx resulted file can be imported in SceneComposer by following the same flow as in the case of other image formats.

In the case of a converted .ktx file which is imported in the SceneComposer application, the usage of the "DefaultBitmapConverter" property - available for any usual .bmp image - is not possible.

About Bitmap Font

Bitmap fonts are supported by SceneComposer. In order to use bitmap fonts, the SCHost.dll must be compiled using BitmapFont font engine. Only one font engine can be active at a time in an SCHost.dll.

The user can import 2 types of files as bitmap fonts:

  • .fnt (windows font files) - are converted to bitmap fonts
  • .fbm - already converted bitmap font files

When a font is imported, following specific property will be set:

  • Source file names: specifies the name of the file which was imported - helps the user identify a font
drawing-4-1695368958.png


Import Operation

You can open the Import Dialog to proceed importing resources in one of the following three ways.

  • Select [Import] > [Import Resources...] from the menu bar. .
    drawing-4-1695369061.png


  • Right-click on any folder in Solution Explorer and select [Import] > [Resource...] from the context menu that appears.
    drawing-4-1695369266.png


  • Drag and drop the target file to be imported into any folder in Solution Explorer.
    drawing-4-1695369371.png


After selecting a file, operations will vary depending on the file format. Please refer to the following links for detailed operation procedures.

  • Image, font, shader, FBX, and script files
  • glTF files
  • Icon files
  • SVG files

 

Images, fonts, shaders, FBXs, script files
  1. When the import process is executed, Scene Composer will display a message to save any unsaved changes in the solution. Press OK to proceed. If you do not want this dialog to appear during the import process, uncheck the "Always show this dialog" checkbox.

     

     

  2. After saving the solution, the Import Resources dialog will open. Select the target file and press OK.
    You can search for supported file formats by specifying them in the drop-down menu at the bottom right of the file selection dialog.
    Multiple files can be imported together as long as they are in the same file format (images, fonts, etc.).

    drawing-4-1695370351.png


  3. An import dialog will appear depending on the file format (images, fonts, shaders, etc.) to be imported.
    See Import Dialog Options for a description of the settings on the dialog screen.

    loading.gif



  4. Configure import settings as needed and click "Import.
    The file will be imported as a resource in the Solution Explorer in the location corresponding to the settings on the dialog screen.

    drawing-4-1695370378.png

 

glTF file
Once the import process is complete, Scene Composer will display a message to save any unsaved changes to the solution