X3DOM Documentation, Release 1.4.0
(x3dom.pat). You can change the marker by creating a new one with thepatterngenerator, putting the results into the
Data folder and renaming it to x3dom.pat. Please note that you should keep the generator’s default values for marker
resolution and segment size of 16×16 and 50% in orderto work properly.
Including the FLARToolkit marker tracker
as soon as it recognizes a marker in the video. The exchanging values include the marker’s position and orientation.
As mentioned, they are used to set the 3D object’s position and rotation.
Asimple 3D Scene
The demo scene shows a simple AR application: The earth globe, which hovers above the marker. A second layer
shows the actual clouds surround the whole planet; live data loaded into the 3D scene.
Our demo is declared in HTML and structured in several divisions. Both, the 3D content and the compiled SWF, are
grouped inside two several <Div /> nodes. The layer containing the 3d markup is styled with CSS and positioned on
top of the compiled ﬂash movie. Note that both have to have the same size and position in order to achieve a well
Then, we set up a <MatrixTransform /> node, which groups every 3D object we want to be positioned on the
marker. Inside we declare a simple <Sphere /> geometry and texture it with a png ﬁle of earth’s appearance.
Around the ﬁrst one, we place a second <Sphere /> object at the same position but with a larger scale and texture
it with the transparent cloud data.
The basic structure
<viewpoint fieldOfView=’0.60’ position=’0 0 0’></viewpoint>
translation="0 0 20" scale="50 50 50"
rotation="0 1 0 3.145">
<transform def="earth" rotation="1 0 0 0 -1.57">
<transform def="clouds" rotation="1 1 0 0 0 -1.57"
scale="1.1 1.1 1.1">