content preparation

Return to Overview

Shockwave

The creation of Shockwave related content is explained in this section.

ShockwaveARFrame

Special content, like movie textures for example, can be included via the ShockwaveARFrame. The content creation of such special content is explained in this section.

Movie Textures

  1. Sounds
    1. Create sound files with your favourite sound tool and save them in the mp3 format. Reference the sound files through “audio” tags in the ApplicationConfiguration.scef file.
  2. Movie Textures
    1. Flash video files (.flv) are the base for every movie textures. Use a video tool to create them. Flash video files can contain an alpha channel which can make a movie texture semi transparent. Make sure that the video resolution isn’t too high. Usually, a resolution of 320x240 should be enough.
    2. You can use "flash video files" (.flv) directly as a movie texture or you embed it in a special "shockwave movie files" (.swf). The "swf" container format has the advantage that the video runs synchronously to its sound track whereas Flash video files run asynchronously when embedded directly. Therefore we recommended using a special ".swf" container which embeds your "flv" video.
      You can create your own special "swf" movie container file by using the Adobe Flash Authoring Tool. The according Flash file (.fla), which is needed for the "swf" movie container creation, is called VideoTextureFrame.fla and can be found in the subfolder "media" of the ShockwaveARFrame example application (You can find the latest version here). It is a special Flash movie that simply embedds a "flv" video. In order to embed your own "flv" movie, click on the “FLVPlayer” instance on the stage and change its "contentPath" in the "parameter" section to reference your "flv" movie. Finally you have to publish the movie as “.swf” file. This can be done by pressing "Ctrl + Return".
    3. In the next step, we need to prepare the 3D model for movie textures. If you want to place a movie texture on a 3D model, you have to specify the movie texture parts of the 3D model. This is done by assigning a special material to the movie texture parts. Inside your 3D modelling tool, create a standard material and include the substring “metaioMovieTexture” in the name of the material. Assign this material to all 3D model parts that should contain the same movie texture.
    4. Afterwards connect a movie (.swf or .flv) to your geometry (.w3d) using the configuration options inside the ApplicationConfiguration.scef file. For more details, see the VideoTexture tag explanation in the ApplicationConfiguration section.
    5. If you use "swf" movie textures, the movie textures might be invisible when running a projector. To solve this problem, just move all .flv movies from the media folder into the root folder. This is the folder where the projector (.exe or .app) is being placed.

Shockwave 3D

This section covers the 3D content generation and preparation process for Shockwave.

General information

The Shockwave model format is “Shockwave 3D” (.w3d). Shockwave 3D model files can be created using 3d Studio Max or Maya (up to version 8.0). We recommend using 3D Studio Max to export Shockwave 3D models (see section "Export using 3D Studio Max").

The Adobe Director documentation also contains sections regarding the usage of 3D models within Shockwave: http://help.adobe.com/en_US/Director/11.5/UsingScripting/WS0c3ae2fbbc706611-6e69d42f11e3eb173b7-8000.html

In general we suggest to not use more than 30.000 to 50.000 polygons at the same time (see also the Shockwave 3D content FAQ).

When preparing content for Shockwave, the export to W3D should be checked regularly during modelling to make sure that all the model details and animations are working correctly on the Shockwave side. If the content looks fine in the Shockwave Viewer, it should also be OK after integration into the AR application.

To view the results, several options are possible:

  • 3D Studio Max has a “preview after export” function which can be used
  • A basic Shockwave Viewer can be downloaded for free from Adobes web site http://download.macromedia.com/pub/director/3d/SW3Dviewer.zip
  • Adobe Director can be used to visualize models and animations; a trial version is also available for download.

In the AR application, the content will be positioned on the configured real tracking target/object (usually the planar markerless tracking pattern). The content will be placed in the centre of the configured tracking object with its coordinate axes aligned with the coordinate system of the tracking target (unless otherwise configured or programmed).

Figure 1 shows an example tracking pattern with its coordinate system positioned in the centre of the planar picture. The x-axis (red) is pointing to the right of the picture, y (green) is pointing upwards and z (blue) is pointing towards the camera.

cp1.jpg

Figure 1 Position and orientation of the tracking coordinate system on the tracking object

Regarding rotation, translation and scale you can change those values in your Shockwave application. However, the best approach is to directly export the content such that the orientation and position is as desired for the given use case.

Export using Maya

Export to W3D is only supported in Maya up to version 8.0. If you are using a newer version we recommend exporting your Maya file to .fbx (the Autodesk exchange format), import it into 3D Studio Max and proceed from there.

Export using 3D Studio Max

We recommend using 3D Studio Max for the model export to W3D. This section gives some notes regarding the export process. Figure 2 shows the export dialog settings we recommend when using the export to W3D.

cp2.jpg

Figure 2 Export dialog of 3D Studio Max with recommended settings

The following hints apply to the 3D Studio Max. It is possible that some hints might apply to Maya as well.

  • Problem 1: Compression Settings (Export Dialog)
    • Case: Using „compression settings“, you can set the geometry, texture and animation quality. By default these values are set somewhere between 0 and 100%.
    • Result: The Program crashes with a fatal error
    • Solution: Setting all the quality values to 100% results in (nearly) no crashes.
  • Problem 2: Scale values
    • Case: Scale values of zero will crash the program on export or the animation is corrupted.
    • Solution: Set the scale value of all models to a non-zero value.
  • Problem 3: Parenting 1
    • Case: Parenting many models under one root can lead to an „out of memory“ exception during export.
    • Solution: Remove models from parent / Try to reduce parenting
  • Problem 4: Parenting 2
    • Case: Parented, animated Models will loose their animation on export.
    • Solution 1 :
      • Parent everything with groups and animate the groups
      • Use Point-Helpers and bind. The Point Helpers can be animated. Also constraints are possible.
    • Solution 2 : (Bone-Animations) In case of bone animations: Group the bones with their mesh before export.
  • Problem 5: Animated scale and rotation values
    • Case: Models that are animated with scale values ranging from very small to large values and additionally contain animated rotation values might show a weird animation playback inside Director.
    • Solution: Try to adjust the rotation and scale values until the behaviour changes. Unfortunately there is currently no other solution.
  • Problem 6: Bone Animations
    • Case: Bone animated models are not exported or crash.
    • Solution: Try to reconfigure your bone animation system. Currently there is not more information on how to solve this problem.
  • Problem 7: Texture Quality in Director
    • Case: The texture quality in Director/Shockwave is bad.
    • Solution: Programmatically change the texture quality of each 3D model inside Director. The best result will be “texture.quality = #high” and the type set to “texture.renderquality = #rgba8888”. However these settings are very power consuming. It is better to set “texture.quality = #lowFiltered” and “texture.renderquality = #rgba5551”. It only consumes half the memory and no mipmaps will be generated. However the actual visual difference opposed to the high-end settings is barely visible.
  • Other export problems: There are several web-pages that might be helpful:

Additional hints

  • Reflection Maps:
    If you assign a bitmap-reflection map to a model in 3D Studio Max, the reflection-map is also visible in Shockwave.
  • When you encounter performance issues while running your Shockwave AR application, there are several ways to reduce the PC load.
    • Reduce the number of lights in the scene. You can also try to bake scene lighting into textures to increase performance and create an appealing visual rendering.
    • Reduce the texture quality of your 3D models. This can be done programmatically by changing the shader-properties “texture.quality” and texture.renderformat of each model.

Flash

Flash related content creation is explained in this section.

Flash 3D Models

Unifeye Viewer for Flash has no built-in renderer and the supported model formats depend on the renderer you use (please note that at the moment Flash does not support native 3D renderers so only Software renderers can be used). A commonly used renderer is Papervision (http://www.papervision3d.org/) which supports a broad range of model formats like Collada, MD2 and OBJ and is also used by the examples that are shipped with the Unifeye Viewer package. In general we suggest to not use more than approx. 1000 polygons at the same time (see also the Flash 3D content FAQ).

In the following we show you different export possibilities.

Collada and MD2 are supported by the FlashARFrame application.

Papervision Collada

Collada is an interchange file format for interactive 3D applications. Its a human readable XML file which you can open in any texteditor of your choice. It supports various features like static and dynamic geometries, standard animations, bone animations, material definitions, shader defintions and textures. Dozens of companies have adopted the standard and use it as their file format.

3D Studio Max export

The default 3D Studio Max Collada exporter will produce invalid files for Papervision. You will have to install the OpenCollada file exporter plugin for 3D Studio Max to export valid Collada files for Papervision.

oc1.jpg

Some export hints:

  • Make sure you check "Sample animations" when you want to export animations.
  • Make sure you check "Relative Paths". Texture paths in the file will be saved relative to the exported Collada file and will be searched and found by the Papervision Collada loader accordingly. When you want to load your Collada file into the FlashARFrame, copy it plus texture files into the "bin-debug" folder and reference the Collada model via the ApplicationConfiguration file. If the model loading fails at all or textures are missing, check the paths in the ApplicationConfiguration file and the Collada file and correct them if necessary.

Papervision MD2

MD2 is the standard model format used in Unifeye SDK Mobile and is also available supported by FlashARFrame. The MD2 content for Unifeye Viewer Flash is created the same way as it is done for the Unifeye SDK Mobile with three exceptions:

  1. The texture of the MD2 model has to be stored in the same folder as the MD2 model
  2. The texture has to be a .PNG image
  3. Texture and model have to have the same name

For example if you want to load the model mymodel.md2, you have to add a texture to the folder of mymodel.md2 with the name mymodel.png.

For a detailed MD2 content creation instruction, please download the mobile content creation guide here.


Return to Overview

-- SupportMetaio - 2010-07-15

Topic attachments
I Attachment Action Size Date Who Comment
flafla VideoTextureFrame.fla manage 399.5 K 2010-10-18 - 12:12 SupportMetaio  
jpgjpg cp1.jpg manage 318.9 K 2010-07-15 - 13:57 SupportMetaio  
jpgjpg cp2.jpg manage 98.5 K 2010-07-15 - 13:57 SupportMetaio  
jpgjpg oc1.jpg manage 20.0 K 2010-08-13 - 08:36 SupportMetaio  
Topic revision: r13 - 2010-10-18 - 13:11:50 - SupportMetaio
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback