Vous êtes sur la page 1sur 10

Inglobe Technologies 2008/2011

AR-media












TUTORIALS
MULTIMEDIA VIDEO OBJECTS
(June, 2011)








AR-media Tutorials

Inglobe Technologies 2008/2011

Copyright

Copyright 2008/2011 Inglobe Technologies S.r.l. All rights reserved. No part of this publication
may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any
language or computer language, in any form or by any means, electronic, mechanical, magnetic,
optical, chemical, manual or otherwise, without the prior written permission of Inglobe
Technologies S.r.l.
AR-media Tutorials
Inglobe Technologies 2008/2011

TUTORIAL - MULTIMEDIA - VIDEO OBJECTS
INTRODUCTION
Multimedia objects help you to enrich the augmented reality experience with sound effects (Audio
Objects), video textures (Video Objects) and soundtracks. Each multimedia object is fully controllable by the
end user, you can even define customized interactions by means of simple XML files. In this tutorial well
deal with Video Objects, that basically are a primitive provided by the plugin consisting of a plane with a
movie texture.
As long as you do not modify some intrinsic properties of the Video Object you can nonetheless move the
video plane around, scale and rotate it, you can even stretch or deform the plane itself in interesting ways.
This allows you to put a Video Object almost anywhere in your scene. Multimedia objects come with default
behaviors and, as you will see, Video Objects do not make an exception: users can click them to pause/start
the playback or they can double-click them to rewind.
EXAMPLE TV Set
This tutorial will show you how to create a simple TV set with a playing movie. The final result of the
tutorial is showed below

Step 1: modeling
Even if a Video Object can exists without any other container object, well also add a 3D model of a TV and
place the Video Object on its screen, this will add a more realistic feel to the entire scene. You could either
create your own TV model or just download one already done from your preferred 3D warehouse. At the
end of this preliminary step, you should have something like this
Inglobe Technologies 2008/20
Step 2: Video Object creation
Now its time to create the Video Object
toolbar
1
, click the icon (or just click the
The panel below will open
Click the button near the File path
that the plugin supports only MOV, MPEG and AVI format files
about the supported formats).
If you already know the aspect ratio of the desired video surface, then you can click
menu and select it from the available entries

1
If the toolbar is not visible you can click the little
Inglobe Technologies 2008/2011
bject and to place it onto the TV screen. From the
icon (or just click the Video button in the Objects section of the

File path input box and browse for a video file on your computer
MOV, MPEG and AVI format files, please refer to the
If you already know the aspect ratio of the desired video surface, then you can click
and select it from the available entries. If the desired aspect ratio is not displayed
If the toolbar is not visible you can click the little T button in the plugin interface.
AR-media Tutorials

the AR-media
TM
Objects
the plugin interface).
file on your computer (remember
lease refer to the Users Guide for details
If you already know the aspect ratio of the desired video surface, then you can click Aspect Ratio dropdown
pect ratio is not displayed, just click on the
Inglobe Technologies 2008/20
Custom entry and then enter the aspect ratio you want in the textbox. Remember that the value that you
need to enter is a floating point number
a value of 1.55.
The choice of the aspect ratio is not mandatory, when you create the
default choice and you can modify (or even deform) the
want.
Now lets go on by setting some options related to the
group, you may want to check the Loop
- check the Loop box if you want the video playback to
- check the Autoplay box if you want the video playback
whom the video is attached to, is detected
the Interactions group allows you to specify a set of events that can be triggered automatically or by the
user during the Augmented Reality experience. By leaving the
- click the video surface to pause/play
- double-click the video surface
playback again)
by choosing Custom, you have to provide an XML file that describe
when those events.
When youre satisfied with your choices click
positioned at the origin of the scene, the plane will show a film texture to remind you that it will play a
movie once you start the plugin. Your scene
Inglobe Technologies 2008/2011
enter the aspect ratio you want in the textbox. Remember that the value that you
oating point number: for example, if you want an aspect ratio of

The choice of the aspect ratio is not mandatory, when you create the Video Object
default choice and you can modify (or even deform) the video plane later to fit whatever container you
Now lets go on by setting some options related to the Video Objects were creating.
Loop or Autoplay boxes according to your needs:
box if you want the video playback to automatically restart when finished
box if you want the video playback to start automatically when
attached to, is detected
you to specify a set of events that can be triggered automatically or by the
user during the Augmented Reality experience. By leaving the Default events file, you can:
pause/play the video playback
surface to rewind the video (you can then click it to restart the video
, you have to provide an XML file that describes the events and actions to perform
When youre satisfied with your choices click the Create button: a new 3D plane will be created and
oned at the origin of the scene, the plane will show a film texture to remind you that it will play a
movie once you start the plugin. Your scene should now look like this
AR-media Tutorials
enter the aspect ratio you want in the textbox. Remember that the value that you
: for example, if you want an aspect ratio of 14:9 you need to enter
Video Object you can leave the
to fit whatever container you
were creating. From the Behaviour
boxes according to your needs:
automatically restart when finished
start automatically when any marker,
you to specify a set of events that can be triggered automatically or by the
events file, you can:
ou can then click it to restart the video
the events and actions to perform
a new 3D plane will be created and
oned at the origin of the scene, the plane will show a film texture to remind you that it will play a
Inglobe Technologies 2008/20
You can try to start the plugin now and you will see the video playing just below the TV model, of course
this is not what we are after, so go on with next step.
Step 3: Video Objects setup
What we need to do is to fit the Video Objects plane right onto the TV screen. You can use the standard
Move, Scale and Rotate tools to place the video into position, you
figure
Step 4: Setting up the marker
Now that we have the 3D scene correctly setup, we
Reality by choosing the marker we want to use and
Inglobe Technologies 2008/2011
You can try to start the plugin now and you will see the video playing just below the TV model, of course
this is not what we are after, so go on with next step.
What we need to do is to fit the Video Objects plane right onto the TV screen. You can use the standard
tools to place the video into position, your scene should resemble the following
we have the 3D scene correctly setup, we can go on by configuring the scene
rker we want to use and by setting its properties as well.
AR-media Tutorials

You can try to start the plugin now and you will see the video playing just below the TV model, of course
What we need to do is to fit the Video Objects plane right onto the TV screen. You can use the standard
should resemble the following

the scene for Augmented
its properties as well. Click the button in
AR-media Tutorials
Inglobe Technologies 2008/2011
the main AR-media
TM
Toolbar to access the plugin interface. Select a marker from the library and click the
Add button.
The selected marker will be added to the Active Markers list, once the marker is added to the Active
Markers list you can configure it by clicking the Setup button, the markers setup window will popup

in the Marker Configuration rollout, click on the Include All button and adjust the size of the marker in
order to obtain the desired proportions (you can see a preview in the viewports). When you completed the
marker configuration, just click on the View button to see the scene in Augmented Reality

when the plugin is running you can try to interact with the video surface by clicking it.
AR-media Tutorials
Inglobe Technologies 2008/2011
Step 5: Changing parameters
More often than not, you may need to change some parameters for the Video Object after youve created it
and placed it into your scene. In order to do so, you cannot use the Include All button when adding the
Video Object to a marker, instead you must add the Video Object separately from any other object.
So, lets open again the markers setup window and in the Marker Configuration rollout click the Remove
All button, then in the viewport select both the TV model and the video plane and in the Marker
Configuration rollout click Include. This will add each object individually, from the visual point of view this
has the same effect as what we did earlier but now you can set properties individually. So you should have
something like this

as you can see both objects are now listed in the Attached Objects list. Now if you select any object in the
list youll be able to click the Properties button (just below the list) and so then youll be able to re-
configure your video object as you wish (for example you can change the video file meant to be played, or
change the video behavior or even add an interactions file).
Going further
Non planar video surface: the base object for any Video Object is a plane, if you select a Video Object and
double click on it, youll be able to modify the video surface in a number of interesting ways. For instance,
in the following image we have switched the plane with a curved polygon by using standard tools. Once the
geometry had been created, we simply positioned the texture image file to the new object by using the
Project material technique.
Inglobe Technologies 2008/20
Controlling video with custom interactions
you can create complex scenes, for instance
user and this event can be used to start the playback of the video stream. Assuming that you have already
read the Interactions tutorial, you can easily get something like this
in order to setup a scene like shown above and related interactions, you can create a
Video_A, create a simple model for the button in the UP state and name it
model for the button in the DOWN state and name it
interactions as follow:
- set the following events file for
<?xml version="1.0" encoding="UTF
<events name="video_events">
<event name="on_init">
<actions>
<!-- choose to hide the video on startup
<action source="_self_" target="_self_">
<command>hide</command>
</action>
<!-- take the chance to set the loop mode
<action source="_self_" target="_self_">
<command>loop</command>
<parameters>
<parameter name="loop">true</parameter>
</parameters>
</action>
</actions>
</event>
</events>

- set the following events file for the
<?xml version="1.0" encoding="UTF
<events name="button_up_events">
<event name="on_left_mouse_click">


Inglobe Technologies 2008/2011
Controlling video with custom interactions: using the custom interactions mechanism offered by the plugin
you can create complex scenes, for instance you can create an animated button that can be pushed by the
start the playback of the video stream. Assuming that you have already
tutorial, you can easily get something like this

in order to setup a scene like shown above and related interactions, you can create a
, create a simple model for the button in the UP state and name it Button_UP
model for the button in the DOWN state and name it Button_DOWN. Finally you have to set up
set the following events file for the Video_A object
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<events name="video_events">
<event name="on_init">
choose to hide the video on startup -->
<action source="_self_" target="_self_">
<command>hide</command>
take the chance to set the loop mode -->
<action source="_self_" target="_self_">
<command>loop</command>
<parameters>
<parameter name="loop">true</parameter>
/parameters>
set the following events file for the Button_UP object
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<events name="button_up_events">
<event name="on_left_mouse_click">
AR-media Tutorials

using the custom interactions mechanism offered by the plugin
you can create an animated button that can be pushed by the
start the playback of the video stream. Assuming that you have already

in order to setup a scene like shown above and related interactions, you can create a Video Objects, name it
Button_UP, create another
. Finally you have to set up
AR-media Tutorials
Inglobe Technologies 2008/2011
<actions>
<!-- hide this button -->
<action source="_self_" target="_self_">
<command>hide</command>
</action>
<!-- show the DOWN button -->
<action source="_self_" target="Button_DOWN">
<command>show</command>
</action>
<!-- show the video -->
<action source="_self_" target="Video_A">
<command>show</command>
</action>
<!-- play the video -->
<action source="_self_" target="Video_A">
<command>play</command>
</action>
</actions>
</event>
</events>

- set the following events file for the Button_DOWN object
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<events name="button_down_events">
<event name="on_left_mouse_click">
<actions>
<!-- hide this button -->
<action source="_self_" target="_self_">
<command>hide</command>
</action>
<!-- show the UP button -->
<action source="_self_" target="Button_UP">
<command>show</command>
</action>
<!-- hide the video -->
<action source="_self_" target="Video_A">
<command>hide</command>
</action>
<!-- pause the video -->
<action source="_self_" target="Video_A">
<command>pause</command>
</action>
</actions>
</event>
</events>
Troubleshooting
If for the video texture does not show during the Augmented Reality experience, please check if you have
Apple QuickTime and the latest video card drivers installed on your computer. Fixing these issues should
resolve any visualization problem.
Conclusion
This tutorial has shown you one of the simplest example of a 3D scene involving a Video Object as well as
some other interesting and advanced employments of this kind of multimedia objects. As you have seen,
using custom interactions you can go even further, for example you can create a 3D button that users can
click to control the video stream.

Vous aimerez peut-être aussi