Trisha Shetty (Editor)

Mobile 3D Graphics API

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

The Mobile 3D Graphics API, commonly referred to as M3G, is a specification defining an API for writing Java programs that produce 3D computer graphics. It extends the capabilities of the Java ME, a version of the Java platform tailored for embedded devices such as mobile phones and PDAs. The object-oriented interface consists of 30 classes that can be used to draw complex animated three-dimensional scenes. M3G was developed under the Java Community Process as JSR 184. As of 2007, the current version of M3G is 1.1, but version 2.0 is in development as JSR 297.

Contents

Goals of M3G

M3G was designed to meet the specific needs of mobile devices, which are constricted in terms of memory, and processing power, and which often lack an FPU and graphics hardware such as a GPU. The API's architecture allows it to be implemented completely inside software or to take advantage of the hardware present on the device.

Immediate and Retained Modes

M3G provides two ways for developers to draw 3D graphics: immediate mode and retained mode. In immediate mode, graphics commands are issued directly into the graphics pipeline and the rendering engine executes them immediately. When using this method, the developer must write code that specifically tells the rendering engine what to draw for each animation frame. A camera, and set of lights are also associated with the scene, but is not necessarily part of it. In immediate mode it is possible to display single objects, as well as entire scenes (or worlds, with a camera, lights, and background as parts of the scene).

Retained mode always uses a scene graph that links all geometric objects in the 3D world in a tree structure, and also specifies the camera, lights, and background. Higher-level information about each object — such as its geometric structure, position, and appearance — is retained from frame to frame.

Other Features

The M3G standard also specifies a file format for 3D model data, including animation data. This allows developers to create content on PCs that can be loaded by M3G on mobile devices.

M3G utilities

  • Desktop-M3G - Open source implementation of M3G for Linux and Android
  • XMM3G - Open source implementation of M3G for Windows, WinCE, Linux, Android, iOS and Bada
  • M3X - XML encoding of the .m3g file format and related open-source tools
  • Wizzer Works M3G Viewer - open source toolkit for viewing and manipulating .m3g files
  • M3GExport for Maya
  • Mascot Capsule M3G Exporter for 3ds Max, Maya, Lightwave, and Softimage|XSI
  • M3G Exporter for Milkshape 3D for MilkShape3D
  • Blender Exporter - an open-source M3G exporter for Blender
  • Blender Converter - an open-source file level converter for Blender
  • M3G Exporter for Metasequoia - an open-source M3G exporter for Metasequoia
  • M3G Reader Writer - an open-source C/C++ library for reading/writing .m3g files
  • References

    Mobile 3D Graphics API Wikipedia