Specifications
Developers guidelines | 3D graphics with Java ME
39 June 2010
Q: How can I make a racing game MIDlet using Mascot Capsule version 3, when the
maximum value for the far-clipping plane is 32767? For accurate sine and cosine as
well as for vector analysis I normally have to scale the scene so that 4096 represents
the 1.0. If I do so, I only have 7 units for my viewing frustum, difficult for a racing game.
A: While there are many tricks you can use to make a racing game in fixed-point range,
the first step is to start sacrificing accuracy, most of which would be lost during the
rasterisation step (since the viewpoint dimensions are less than 200 pixels).
Q: Is there any possibility to emulate fog ?
A: Yes, however, fog involves an extra color blending operation per pixel, making it
very slow to implement in software. There are many ways to emulate fog, using semi-
transparent textured triangles is one of them.
Q: Which opacity (transparency) settings can I use for texture on 3D objects ?
A: There are 3 opacity settings that can be used: 0%, 50% and 100%. If one wanted to
alter the colour of a texture by simply changing the material colour of the model, one
can do so by choosing the 50% setting.
Q: Is there any methods to applicable to 3D collision detection ?
A: Unlike Mascot Capsule v4, where there's an implemented method for Ray
Intersection, version 3 does not support this.
Q: In order to implement a correct collision detection framework we need a function to
retrieve all vertices for a Figure in Mascot Capsule Version 3. How can we achieve
that?
A: If you choose to use renderPrimitives(), you have the geometry data. When
using Figures loaded from a resource there is no way to retrieve the geometry.
However, in practice you would have some more suitable representation of the objects
for collision detection, typically a hierarchy of spheres, OBBs, and perhaps – if really
necessary – a simplified version of the rendered geometry. Alternatively, you can keep
track of the vertices in your game and draw the scene using the 3D graphic.
Note that instead of using the binary format (bac), by using the ASCII format, vertex
data and model data can be stored.
Q: Is it possible to use tiling (looping) textures on 3D models in a MIDlet?
A: By tiling textures in your favorite 3D tool and exporting them with HiCorp's tools,
you will get the desired tiling effect. However, this isn't always effective and should be
used with caution. For generating floors and ground, use the renderPrimitives method
with textured triangles or quads.
Q: Is there any limit on the number of polygons that can be used within a scene ?
A: An unlimited number may be used. However, performance will be a limiting factor.
Q: There seems to be no cull functionality in micro 3D? Is it possible to specify back
face culling?