Skip to main content

How to Import Resources

This section describes how to import resources by selecting Import Resources... from the Import menu on the menu bar.

drawing-4-1727160599.png

Import File Formats

You can import the following file formats using this menu:

  • Image files (*.bmp, *.jpg, *.jpeg, *.gif, *.tga, *.png, *.dds, *.ktx, *.hdr, *.exr)
  • Font files (*.ttf, *.ttc,*.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)

Beside the formats listed above, Scene Composer also supports importing Photoshop (*.psd) and Adobe XD (*.xd) files. For more details on importing these formats, see the Smart Importer chapter.

When importing font files, the application recognizes and imports them as fonts, regardless of their file extensions. For more information, see the explanation here.

Beginning with CGI 3.14, Scene Composer can play back skinning animations after you import skinning-enabled FBX or glTF files.

About .glTF File Format

SceneComposer supports the following glTF file formats during import:

  • glTF: References external binary data (geometry, animation keyframes, skinning data), and image files.
  • glTF-Embedded: Contains base64-encoded binary data, and images embedded inline using data URIs.
  • glTF-Binary: Packages the entire glTF asset (JSON description, .bin binary data, and images) into a single binary file.

For more detailed information on these file formats, see the Khronos website: GLB File Format Specification.

About .ktx File Format

Scene Composer supports the following compressed image formats:

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

To use these formats, you have to convert the source image from a supported image type (such as .tga, .gif, .psd, .bmp, .pgm, .png etc.) into a .ktx file. You can use the following tools to create KTX files:

  • Texgenpack
  • Mali Texture Compression Tool
  • Ericsson Texture Compression Tool

These tools compress texture images using Ericsson Texture Compression (ETC/ETC2) and Adaptive Scalable Texture Compression (ASTC). They supports the following output formats:

  • .pkm - Contains compressed textures
  • .ktx – Stores a 2D texture along with all associated mipmap levels.

After conversion, you can import the .ktx file into Scene Composer following the same process as for other image formats.

When importing a converted .ktx file into Scene Composer, you cannot use the DefaultBitmapConverter property that is  available for standard .bmp images.

About Bitmap Font

Scene Composer supports the use of bitmap fonts. To enable the bitmap font functionality, you must compile the SCHost.dll using the BitmapFont engine. Note that only one font engine can be active at a time within an instance of SCHost.dll.

The following file types can be imported as bitmap fonts:

  • .fnt - Scene Composer converts these Windows font files to bitmap fonts.
  • .fbm - Pre-converted bitmap font files

When you import a font, Scene Composer sets the following property:

  • Source file names - Indicates the name of the imported file, helping you identify a font
drawing-5-1717170340.png

On OpenGL ES1.1 platforms, such as Traveo2, importing shader files, SVG files, FBX files, and glTF files is not supported.


Import Operation

Open the Import Dialog in one of the following three ways.

Menu Bar

Select Import > Import Resources... from the menu bar.

drawing-4-1727160619.png



Context menu

Right-click on any folder in Solution Explorer and select Import > Resources... from the context menu.

drawing-5-1717170156.png



Drag and Drop

Drag and drop the target file that you want to import into any folder under Solution in Solution Explorer.

drawing-5-1717170521.png
    • You can also import a glTF file by drag and drop to any folder under Solution in Solution Explorer.

    • Note that in an OpenGLES1.1 environment, you cannot import shader files (*.vert, *.frag), SVG files (*.svg), FBX files, and glTF files via drag and drop.

    • When you drag an image file format (*.bmp, *.jpg, *.png) that Scene Composer can import as an icon into any folder under Solution in Solution Explorer, a dialog box appears, allowing you to choose whether to import it as an image or icon resource.
      drawing-4-1695617424.png

Save Solution

When you start the import process, Scene Composer checks your solution for unsaved changes. If necessary, you are prompted to save your solution. Click OK to proceed. Once the solution is saved, Scene Composer opens the Import Resources dialog.

drawing-5-1717170573.png

To hide this dialog from popping up at future imports, clear the Always show this dialog checkbox.

Import operations by file format

After you select a file, Scene Composer shows different import operations depending on the file format. See the following topics for detailed import procedures.

Image, font, shader, FBX, and script files

For importing FBX files that contain skinning, see here.

When you import an image file, Scene Composer retains the original image file along with the bitmap information file (*.bin file) used on Scene Composer. See here for details.

  1. In the Import Resources dialog, select one or more resource files that you want to import and click OK.

    • Search for supported file formats by selecting them in the drop-down menu at the bottom right of the Import Resources dialog.
    • Import multiple files at once as long as their file format belong to the same category, such as Image files or a Font files.
    • Select Font files from the pull-down menu below, to import any file as a font file, regardless of its extension.
      drawing-4-1756260098.png


  2. After you selected the files to import, Scene Composer displays an Import dialog for the selected file type (Image, Font, FBX, Shader…).

    • See Import Dialog Options for a description of the settings on the dialog screen.

    • Select Import as wireframe check box to import the wireframe vertex buffer when importing an FBX file.
    • When the import selection contains Radiance HDR (.hdr) files, a Radiance HDR Format option appears in the Import dialog. 
    • The available choices and the default value follow the setting made in the Import Images Config panel of Solution Options. See Import Dialog Options for details.

      drawing-5-1717170648.png



  3. Configure the import settings, then click OK.

    • Scene Composer imports the file as a resource in Solution Explorer.

      drawing-5-1717170717.png
FBX files with multiple animations

Scene Composer supports the import of FBX files that contain multiple animation tracks. Scene Composer automatically creates the names of the imported animation tracks based on the animation tracks contained in the FBX file.

drawing-4-1728536029.png

You can import the following types of animations from FBX files:

  • Translation
  • Rotation
  • Scaling

Icon files

See Icon Picker for information on how to use imported icon resources.

  1. In the Import Resources dialog, select the target file, then click OK. 

  2. If the selected file format is "*.ico", Scene Composer displays the Import Icons dialog that provides the following options:

    • The Selected files field displays the path to the selected file. To re-select a file, click Select File... .
    • In Destination folder, specify the location where Scene Composer imports the file as a resource.
    • As explained in the Drag and Drop section, when you drag and drop an image file (*.bmp, *jpg, *.png) that can be imported as an icon, Scene Composer displays a prompt allowing you to select whether to import it as image or icon.

      drawing-5-1717170817.png


  3. Click OK to complete the import operation.

SVG files
  1. In the Import Resources dialog, select one or more SVG files that you want to import and click OK.


    drawing-4-1696552970.png



     

  2. Scene Composer displays the SVG Importer dialog:

  3. Configure the import settings, then click Import..

    • Scene Composer creates the ImportedScenes and Scenes folders at the destination folder selected in Solution Explorer. The former holds data imported as template scenes, while the latter holds data imported as actual scenes. 

    • If you import multiple SVG files, the Scene Editor displays the actual scene that corresponds to the topmost SVG file in the SVG Importer.

      • Transform > Position > X = 0, Y = 0 is the item's initial position.

    • You can copy group nodes from imported scenes and paste them into your desired scene to use them.

      drawing-5-1732885221.png

glTF files

The CGI Studio glTF Importer does not support the following features:
  - Morphing
  - Vertex Buffer Streams
  - Sparse Accessors

For additional details on handling glTF files — e.g., supported extensions, multiple UV sets, and limitations — see the glTF file page.

For importing glTF files that contain skinning, see here.

  1. In the Import Resources dialog, select one or more resource files that you want to import, then click OK.

  2. Scene Composer displays the Import GLTF dialog:

    • When you check Import Dynamic Appearance, Scene Composer imports the file with a dynamic GltfAppearance. When you clear it, Scene Composer imports the file with a static Appearance.

    • When you import the file with a dynamic GltfAppearance, Scene Composer attaches a GltfAppearance to Mesh, SkinningMesh, and SkyBox, and you can edit the glTF 2.0 material properties directly in the Properties panel. For details about each property, see Properties Overview.

    • When you import the file with a static Appearance, Scene Composer configures the appearance as a combination of shader uniforms and textures. For details, see Physically Based Shading (PBS) on the glTF file page.

    • When you import a glTF file that uses KHR_materials_transmission, Scene Composer automatically creates the render targets and cameras that transmission requires. For details, see Importing Transmissive Materials on the glTF file page.

    • Use the import dialog to configure Image-Based Lighting (IBL). You cannot change these settings after the import.
    • If you do not want to use IBL, clear the Use Image Based Lighting (IBL) checkbox.
    • During glTF import, the Engine automatically generates the IBL from a single HDR panorama (latlong) image, so you do not have to set the radiance, irradiance, or BRDF integration textures manually.
    • Configure HDR Panorama (Latitude/Longitude) Image, IBL Cubemap Texture Size, and IBL Lookup Texture Size in the import dialog as necessary.
      • IBL cubemap textures size: Specifies the size of the cubemap texture used for IBL generation. The default value is 256. On ES2.0 platforms, the minimum value is 64 and the size must be a power of two. On ES3.0 platforms, the minimum value is 64.
      • IBL lookup textures size: Specifies the size of the lookup texture used for IBL generation. The default value is 256. On ES2.0 platforms, the minimum value is 64 and the size must be a power of two. On ES3.0 platforms, the minimum value is 64.
    • You can also set IBL in Solution Options. For details about these settings, see IBL HDR.
      drawing-4-1788999660.png



  3. After confirming by clicking OK, Scene Composer displays the Import GLTF dialog:
    • You can’t change IBL settings in the import dialog (red box below).
    • When you specify an HDR panorama image and run the import, the Engine automatically assigns the generated shared IBL textures to each mesh (orange box below).
    • The Engine generates the following textures: LambertianTexture (Diffuse/Irradiance), GGXTexture (Specular/Radiance), GGXLutTexture (BRDF 2D LUT), and SkyBoxTexture (Skybox).
    • For other settings on the dialog, see Import Dialog Options.

      drawing-4-1779926844.png

  4. Configure the import settings, then click OK.

    • Scene Composer imports the file as a resource in Solution Explorer , based on the selected dialog settings.

      drawing-5-1717172418.png

Shared IBL textures

When you import a glTF and generate IBL from an HDR panorama (lat/long), the importer automatically assigns the shared IBL textures (LambertianTexture/GGXTexture/GGXLutTexture/SkyBoxTexture) to each mesh. When you change a shared IBL texture, the importer propagates the change to all meshes that reference the shared IBL texture. 

In the example below, select LambertianTexture (Diffuse/Irradiance) in Solution Explorer and set Magnification Filter to Nearest in the Properties panel. The importer applies the same setting to every mesh/material that references LambertianTexture. 

drawing-4-1759818288.png