theoretical point of view the adoption of visual
techniques for defining both the geometries and the
behaviors of a 3D world in a declarative way is
explored by(Arjomandy & Smedley 2004), but the
same authors state that to be productive the
environment used to specify the behaviors must be
strictly integrated with the environment used for 3D
modeling. For this reason we have decided to adopt
Blender, that shows an excellent integration between
3D modeling and ‘logic bricks’ programming
approach. In (Pellens et al. 2009) the authors try to
facilitate the design of virtual environments and to
make it more accessible to novice users by means of
behavior patterns and tools for the visual
specification of behavior rules. The approach is very
interesting for high level behaviors (e.g. strategies in
videogames) but, in our opinion, it is less effective
for the simple behaviors (e.g. expand, collapse, …)
needed to create the 3D data-bound components,
discussed in this paper. The bibliography related to
data visualization and database visualization is very
rich, starting from (Shneiderman 1996), that defined
the cone tree concept, used in this paper, and from
(Robertson 1991), that identified important
principles and guidelines for advanced visualization
applications. Two extensive and useful reviews of
techniques for software and data visualization, based
on X3D, are given by (Anslow 2008) and by (Sopin
& Hamza-lup 2010), that also define the reuse
concept. Another relevant step towards Web
technologies is about the integration between the
AJAX technology, WebGIS and X3D, which is
detailed in (Huang & Cheng 2009).
3 X3DOM AND JAVASCRIPT FOR
DATA VISUALIZATION
A lot of authors have proposed the adoption of X3D
for advanced visualization tasks with interesting
results, but the popularity of X3D and related
plugins is low if compared with other multimedia
plugins (e.g. Adobe Flash).
A reason is that the learning curve associated to
3D technologies in general (shaders, physics, 3D-
modeling, animations, rendering, …), and to X3D in
particular, is steep, also due to the lack of open
source, good quality, well documented examples.
We feel that the tight integration between Web3D
and the other Web technologies, led by WebGL, and
similar initiatives, is central to overcome these
problems.
In this strategy, X3DOM plays a central role
because of its ability to include xml-described 3D
components within the DOM of Web pages, while
interactivity, distribution, security, and scripting are
managed through standard web technologies.
Moreover, Web programmers can interact with the
3D objects via DOM events and JavaScript and not
only via the “sensor nodes” and the “routes” of X3D
(Anslow, 2008), or the “shaders” of WebGL. The
advantage is twofold:
• Web programmers can read, modify and adapt
live pages coming from the Web to their own
needs;
• the new 3D extensions are xml-based and,
therefore, they can be easily manipulated with
popular Web environments and technologies
(ASPX, PHP, JSP, …).
In this scenario, the efficiency drawback of
interpreted languages, like ECMAScript (also
known as JavaScript or JS, i.e. the interpreted client-
side language used to manipulate the DOM) can be
critical when large datasets are manipulated. So even
if ECMAScript is easy to use for processing HTML
events, it is not always suitable for 3D graphic
effects, interactions and animations.
In order to estimate this breaking point (i.e. when JS
become insufficient for smooth animations or
responsive pages), we measure the speed
degradation of a JS animated cone trees as a function
of the increasing number of nodes. More
specifically, we ran a set of randomly generated
cone trees with an increasing number of nodes on
different personal computers (we used X3DOM
v1.0, Firefox v4.0 Beta 6, ten different computers
with graphic cards ranging from GeForce Go 6200
to GeForce 9200M GS with OpenGL v7.15 driver
and DirectX 9.0c or 10).
In table 1, and in fig. 1, frame per second (fps)
and latency trends are shown as a function of the
increasing number of vertexes (#Pnts) and triangles
(#Tris) in the cone trees. All results are based on the
X3DOM built-in performance indicators. The same
test, performed with X3D and Octaga Player on the
same machines, gives no noticeable latency and no
reduction in fps.
This measure doesn’t take into account complex
factors like the adoption of shaders, animated
textures and other complex aspects, but we feel that
it can be useful as rule of thumb for Web
programmers.
The test shows that JavaScript can be currently
exploited to effectively manage thousands of
triangles, already sufficient to manage small to
medium data sets. We feel that, since X3DOM is
still in its infancy and ECMAScript interpreters are
under active improvements, better performances can
be expected.
USING BLENDER TO DESIGN AND IMPLEMENT DATA VISUALIZATION COMPONENTS FOR X3D AND
X3DOM
271