ApplicationConfiguration

You can customize the published ShockwaveARFrame / FlashARFrame application without the need of programming. This includes the modification of 3D models, sound and video textures. The customization is done via a configuration file which is called ApplicationConfiguration.scef. The file is a human readable XML file and is placed in the same folder as the ShockwaveARFrame movie for Shockwave and in the "bin-debug" subfolder for Flash. The skeleton and usage of the Application Configuration file is explained below.

Basic tag:

<?xml version="1.0" encoding="UTF-16"?>
<Scene>
   <SceneParams> … </SceneParams >
   <ApplicationConfiguration> … </ApplicationConfiguration>
   <VideoTextures> … </VideoTextures>
   <Geometry> … </ Geometry >
   <Geometry> … </ Geometry >
   <Geometry> … </ Geometry >
   …
</Scene>

Scene

Basic tag that describes beginning and ending of the Application Configuration.

SceneParams

Defines global parameters that are valid throughout the whole application.

ApplicationConfiguration

Defines bindings between geometries, COSes, audio and video textures

VideoTextures

Definition of video textures.

Geometry

Definition of each geometry that is loaded into the system.

Additional note:

  • The tags “SceneParams”, “ApplicationConfiguration” and “VideoTextures” only appear once in the file. The tag “Geometry” is defined for each geometry.

“SceneParams” tag:

<SceneParams>
<markerDataPath>tracking/TrackingData.xml</markerDataPath>
   <Filesize>1200000</Filesize>
   <mirrorMode>0</mirrorMode>
   <renderAntialiasing>0</renderAntialiasing>
</SceneParams >

markerDataPath

Path to the tracking configuration file to be loaded. The path has to be separated by slashes “/”. You can only input relative pathes like “tracking/TrackingData.xml” and absolute web-pathes like www.myhompage.com/TrackingData.xml. Relative pathes have to be defined relative to the Shockwave movie file.

Filesize

The file size of all media data (audio files, 3d models and videos) in bytes. It is used to set the progress bar during downloading the files. For example 1200000 bytes translates to 1.2MB.

mirrorMode

If set to 1, the camera image and the augmentation is mirrored at the vertical axis. It creates the illusion of looking into a mirror. Set it to 0 to disable the mirror mode.

renderAntialiasing

If set to 1, antialiasing is enabled, resulting in a smoother render output, else disabled. You should enable antialiasing only, when occlusion mode is activated and the application is running on a "good" PC. Expect a nicer image but also a framerate decrease.

useMultipleCoses (Shockwave only) If set to 1, multiple markers can be tracked at once instead of one
skipFrameInit (Flash only) Every Nth camera frame is not used for the tracking pattern initialization process. Appropriate values might increase the performance greatly. If you use the value 3, every third frame is skipped. If you use the value 2, the best performance is achieved and every second camera frame is skipped. Use the value 0 to use all frames.
baseURL (Flash only) Define base url for content. If defined then the paths to content elements will be interpreted relative to this url, otherwise the paths to content are relative to the directory where application is located.

Additional note:

  • All those tags appear only once in the configuration file.

“ApplicationConfiguration” & “geometry” tag:

An exemplary geometry to COS binding is shown below. A geometry named “UnifeyeViewerLogo” is bound to the coordinate system with the cosID 1.

<ApplicationConfiguration>
   <!-- Binding a geometry to a Cos -->
   <Cos>
      <cosID>1</cosID>
      <contentLength type="ms">1000</contentLength>
      <useHeadlight>0</useHeadlight>
      <trackingTolerance>1500</trackingTolerance>
      <geometry>
         <name>UnifeyeViewerLogo</name>   
         <contentLength type="frames" fps="30">50</contentLength> 
         <animationType>InOut</animationType>
      </geometry>
      <!-- another geometry definition
         <geometry>...</geometry>
      -->
   </Cos>
</ApplicationConfiguration>

<!-- Definition of a geometry -->
<Geometry>
   <title>UnifeyeViewerLogo</title>
   <type>normal</type>
   <vrmlPath>http://sw.ar-live.de/models/UnifeyeViewerLogo.W3D</vrmlPath> 
   <cosID>1</cosID>
   <Rotation>
      <x>0</x>
      <y>0</y>
      <z>1</z>
      <angle>0</angle>
   </Rotation>
   <Translation>
      <x>0</x>
      <y>0</y>
      <z>0</z>
   </Translation>
   <Scale>
      <x>1.3</x>
      <y>1.3</y>
      <z>1.3</z>
   </Scale>
</Geometry>

ApplicationConfiguration tags:

Cos

Defines a new coordinate system. A coordinate system is bound to a tracking pattern/tracking coordinate system. You can bind geometries to this coordinate system.

cosID

The cosID of the new coordinate system. Within the tracking data you define several coordinate systems. The first COS defined has the cosID “1”, the second “2” and so on. Set the cosID to define which coordinate system of the tracking configuration you are referring to.

contentLength

You can bind several geometries to each COS. The geometries might be animated. By the help of “contentLength” you can set the standard animation length for each geometry bound to the COS. The standard animation length can be overwritten by each geometry individually by defining the tag again (see contentLength in geometry tag).
It has the attributes “type” and “fps”. If type is set to “ms”, the animation length is expected to be given in milliseconds and the attribute “fps” is irrelevant. If type is set to “frames”, the attribute “fps” is used to calculate the duration of the animation in milliseconds internally. In “frames” mode, the animation length has to be expressed in frames.

useHeadlight

If set to 1, a headlight will be used for all geometries that are bound to the COS. If set to 0, no headlight is used. A headlight is a light source that illuminates all geometries frontally.

trackingTolerance

Time in ms, the tracking will be considered as still valid even if the according tracking COS/tracking pattern is currently not being tracked.

geometry

Defines a geometry that is grouped under a COS. You can define multiple geometries to be grouped per COS.

name

Each geometry has a unique name. This name references the “Geometry” tag outside of the “ApplicationConfiguration” tag where additional properties for the geometry are defined (see “Geometry tags” below)

contentLength

Overwrites the standard contentLength of a geometry.

animationType

The “animationType” tag sets the animation type for the model. The following types are possible:

“InOut”: (Shockwave Only )The animation will be played once and the model will remain at the end of the animation once the animation finishes. If the tracking gets lost, the animation will be played back in reverse order.

Single: The animation will be played once and the model will remain at the end of the animation once the animation finishes.

None: No animation will be played for the model (default).

Loop: The animation will be looped.

Geometry tags:

title

A unique name, describing the geometry. This name is used within the “ApplicationConfiguration” tag to reference the geometry.

type

Describes the type of the 3D model. Can be set to "normal" or "occlusion".

Important Note: When setting one model to “occlusion”, the rendering pipeline changes. In “occlusion” mode the rendering is faster but no GUI elements are visible anymore (due to the DTS mode being switched on. Also see 3.5.3).

"normal": The 3d model is rendered as usual.

"occlusion": (Shockwave only) The 3d model isn't visible but can occlude parts of all other 3d models.

vrmlPath

Path to the Shockwave 3D model. The path description should be relative. Nevertheless you can use absolute pathes for Internet (http://...) addresses. Do not get distracted by the name “vrmlPath”. You can only use W3D models here.

cosID

Defines to which cosID the geometry should be bind

Rotation

Initial rotation value of the geometry. The rotation is defined by the sub-tags “x”, “y”, “z” and “angle”. It describes the rotation in axis-angle notation. “x”, “y”, “z” define the axis and “angle” the angle in radians.

Translation

Initial translation value of the geometry. The translation is defined by the sub-tags “x”, “y” and “z”.

Scale

Initial scale value of the geometry. The scale is defined by the sub-tags “x”, “y” and “z”

Additional notes:

  • You can define multiple “Geometry” tags.
  • You can bind multiple geometries to each coordinate system.

“ApplicationConfiguration” & “audio” tag:

The example below shows how to assign an audio file to a coordinate system. The audio file is played back when the coordinate system is being tracked.

<ApplicationConfiguration>
   <Cos>
      ... cosID, geometry etc. here ...
      <audio>
         <name>myAudio</name>
         <looping>0</looping>
      </audio>   
   </Cos>
   <Audio>
      <name>myAudio</name>
      <path>http://sw.ar-live.de/sounds/summer.mp3</path>
   </Audio>
</ApplicationConfiguration>

ApplicationConfiguration tag descriptions:

Cos

See section: “ApplicationConfiguration” & “geometry” tag descriptions

audio

Basic tag to bind an audio file.

name

Unique name that references an audio file (see tag “Audio”).

looping

If set to 1, the sound will be looped. If set to 0 it will only be played back once.

Audio

Basic tag to describe an audio file.

name

Unique name that defines the audio file. This name is being used to reference the audio file in the “Cos” tag above.

path

Path to an .mp3 audio file. It should be relative. In case of web-addresses (http://...), it can be absolute.

Additional notes:

  • You can define multiple “Audio” files
  • You can reference only one audio file per coordinate system.

“ApplicationConfiguration” & “VideoTextures” tag:

The example below shows how to bind a video texture to a model. A video texture or movie texture is a video that is placed on a part of a geometry.

<ApplicationConfiguration>
      <Cos>
         ... Cos properties …
         <geometry>
            … geometry properties …

            <videoTexture>
               <name>MyMovieTexture</name>
               <animationType>Normal</animationType>
            </videoTexture>
         </geometry>      
      </Cos>
<ApplicationConfiguration>   
      
<VideoTextures>
   <videoTexture>
      <name>MyMovieTexture</name>
      <path>http://www.myserver.de/myMovie.flv</path>
   </videoTexture>
   … another video texture definition here …
</VideoTextures>

Application Configuration Tags:

Cos

See section above

geometry

See section above

videoTexture

Basic video texture tag

name

Unique name that references a video texture (see “VideoTextures” tag below).

animationType

animationType can be "Normal" or "Loop". If "Normal" is used, the movie is played only once. Otherwise it will be looped

VideoTextures Tags:

videoTexture

Basic tag to create a new movie/video texture.

name

Unique name that defines a movie texture.

path

Path to the movie. The path should be relative but can be absolute in case of web-addresses (http://...).

The movie can be an .swf or .flv file. .swf has the advantage that video and sound can run synchronously whereas .flv files can't. In order to create an appropriate .swf file, use the provided example file VideoTextureFrame.fla as a template and exchange the movie. An .swf movie-texture is a flash file that embeds an .flv movie

stream

(Flash only, FLV movies only) If set to 1, the video is fully downloaded before the application starts. If set to 0, the video is streamed.

Additional notes:

  • You can define multiple “Video Textures”
  • You can assign only one video texture per geometry

-- SupportMetaio - 2010-08-13

Topic revision: r4 - 2011-03-28 - 15:45:28 - 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