Java Reference
In-Depth Information
The M3G application then simply activates or stages the animation and the transforma-
tion using high-level scene-graph control APIs.
The Elusive .m3g Serialized Scene Graph File Format
The 3D world used in retained mode is typically not painstakingly built using M3G APIs, but
loaded from a file. In fact, JSR 184 specifies a file format, with the extension .m3g , that is used to
store these serialized 3D worlds.
Using the retained mode in M3G literally involves the following steps:
Loading a complete serialized 3D world from a .m3g file
1.
2.
Rendering an animation using the newly loaded 3D world
What is not obvious, however, is how you would create the prefabricated 3D world (the
.m3g file) in the first place. In fact, the M3G API cannot be used to create a .m3g file. There is no
API call to serialize a 3D world.
Creating a .m3g File
The idea is to use a sophisticated 3D modeling package on a high-powered workstation (and
not on your mobile device) to create your 3D world.
Once the world (all the objects, transformations, animations, etc.) are created, a .m3g file
can then be generated. This .m3g file can then be moved to a mobile device and used within an
application.
At the time of writing, however, very few sources exist for sophisticated 3D modeling packages
that will generate .m3g worlds.
Superscape ( http://www.superscape.com/ ) has a product called Swerve that can create
these .m3g files. Unfortunately, Superscape has not yet made this tool available to the general
public.
Autodesk's 3D Studio Max, Version 7 ( http://usa.autodesk.com/) has the capability to
export .m3g files. However, the exporter deals mainly with the creation of 3D objects, but does
not have the ability to define and serialize animation.
HI Corporation ( http://www.hicorp.co.jp/e_index.html ) is also reported to have a .m3g
exporter utility to export 3D models from Autodesk's 3D Studio Max and NewTek's LightWave.
So you see, it is not quite possible yet, unless you are up to creating your own 3D modeling
tool, for you to easily make use of M3G's retained mode of operation.
Working with Retained Mode
Our last example will provide you with some hands-on experience with animating a retained
mode 3D world.
Without the ability to create complete .m3g files, in this the example we'll use a prefabricated
.m3g file from the Wireless Toolkit's 3D samples. This 3D world is created using Superscape's
Swerve tool.
To try out this example, create a new project called RMMIDlet and copy the source code files
into the src directory of the newly created application.
Search WWH ::




Custom Search