3D Assets Workflow


3D content within Wikitude can only be loaded from so-called Wikitude 3D Format files (.wt3). This is a compressed binary format for describing 3D content, which is optimized for fast loading and handling of 3D content on a mobile devices. You still can use 3D models from your favorite 3D modeling tools (like Autodesk® Maya® or Blender) but need to convert them into wt3 file format. Wikitude offers a desktop application called Wikitude 3D Encoder, which takes over the task of encoding your 3D source file. The Encoder can handle Autodesk® FBX® files (.fbx) and the open standard Collada (.dae) file formats for encoding to .wt3.

This section should give an overview on how to choose the right 3D models for displaying it in Wikitude's augmented reality SDK. As Wikitude is basing 3D support on a converted file format (.wt3) it is good to follow the best practices below.

Input format

Supported 3D model files for encoding it into wt3 files are:

We recommend using FBX wherever possible as tools support for FBX is widely available. Furthermore Collada allows to include customized attributes that might not be understood by the Wikitude 3D Encoder. Furthermore, support for Collad will be dropped with the next major release of the Wikitude 3D Encoder.

Features you can use in your 3D model source files:

Features that are not (yet) supported

Good practice

Use png textures

Textures are stored in png format within wt3 files. While Wikitude 3D Encoder takes care of automatically converting textures to png, it is good practice to use png textures in the source 3D Model file.

Use power of 2 textures

The current rendering hardware on mobile devices requires certain texture attributes if the texture is not a power of 2 textures. This can result in unexpectedly textured models. Additionally using power of 2 textures yields to a better performance when running on the device. A power of 2 textures has a width and height of 2x - like. 64x64, 128x128, and so on.

Validate texture paths

If your opened model appears without textures, very often the texture paths are not set correctly. Make sure your texture paths are valid and accessible. For example check that they reference the texture files in a relative way and that all required textures exist and are accessible.

Keep texture size as low as possible

Keeping texture sizes as low as possible, while maintaining the required details has several benefits. The exported .wt3 file will be smaller and therefore quicker to load over the network or from the application bundle. Additionally it will take up less graphics memory thus freeing up space for additional models or content.

Use only one light

To maintain a good rendering performance each part of your model (node) is only affected by a single light source. You may use multiple lights in the source file but at render time only a single node is selected to affect a mesh part. We make a best guess, utilizing the scene graph to assign a light to the node. If lighting is not required simply remove the lights from your source 3D model file and/or set the corresponding material properties. This helps to speed up rendering.

Resolving problems

3D Model which uses joints (bones) is distorted

Create a master joint where all other joints are attached to.

3D Model shows up correctly in Wikitude 3D Encoder but does not show on the device.

Check that your textures have a reasonable size. Limiting the textures to the lowest size that maintains the required details is recommended.

Textures are missing

Check the error/warning dialog during the import process of the model it will give you detailed information on which textures are problematic. Make sure the texture paths are valid and accessible.

Ambient Light in Blender (dae export)

Add a point light to your scene in Blender, then export the model to a dae-file. Open the file in a text editor and search for the tag "" and remove the attenuation tags constant_attenuation, linear_attenuation and quadratic_attenuation. Do not delete the color-tag. Then save the file and load it into the Wikitude 3D Encoder. The point light will be displayed as ambient light. If you use a point light you may use an additional light source (e.g directional light (=sun)).

Working with 3D Animations

Quick start

Export a model that contains one or more animations from your preferred 3D modelling tool to a DAE or FBX file. After you load the 3D model into the Wikitude 3D Encoder the animations are displayed in a list on the right side of your application window.

Animation listed in Wikitude 3D Encoder

Each row of the list contains the ID of the animation, a control button and the time that passed after you started the animation. Clicking the play button will start the animation from the beginning and play back the animation in the 3D view of the application. The stop button will stop animation and displays the frame, that was drawn last.

Check if your model looks and animates as expected and export it to a wt3 file. You need the IDs of the animations you want to use in your application. The IDs are displayed next to the animation control button (on the screenshot the animation ID is butterfly_animation). In your code you start an animation like this.

// instantiate the model object
var model = new AR.Model("butterfly.wt3");

// instantiate the model animation with the animation id
var animation = new AR.ModelAnimation(model, "butterfly_animation");

// start the animation

Export Animations

The Wikitude 3D Encoder supports animation of joints and transformation animations. This includes transformation animations along motion paths.

When exporting the model from the 3D modelling tool you have to bake your animations. As an example Maya bakes all unsupported constraints, including Maya-supported and FBX constraints, into animation curves.

Grouping Animations

Animations will be grouped automatically to a top level node. In order to create two separate animations you need to group them in your modelling tool accordingly.

To illustrate that let's create an example with 3 spheres and 3 cylinders with different translation animations. In the scene graph this example looks like the following:

• sphere1
• sphere2
• sphere3
• cylinder1
• cylinder2
• cylinder3

Once the example is exported into a DAE or FBX file and imported into the Wikitude 3D Encoder six separate animations, one for each object, will be generated.

Let's assume we want to group all sphere animations into one animation and all cylinders into a second animation. This can achieved by creating two separate groups. One group containing all spheres and another one containing all cylinders. In the scene graph this is going to look like this:

• all_spheres_group
  • sphere1
  • sphere2
  • sphere3
• all_cylinders_group
  • cylinder1
  • cylinder2
  • cylinder3

Once we export this into a DAE or an FBX file and import it into the Wikitude 3D Encoder we would get the desired result: one animation that animates all spheres and another animation animating all cylinders.

Note: Do not group joints, especially when they were already skinned to a mesh.

Known Issues