Specifications

Developers guidelines | 3D graphics with Java ME
41 June 2010
A: The 3D Max M3G plugin does not perform any optimisation in regard to calculating
triangle stripes in contrast to the Mascot Capsule exporter plugin and therefore
produces potentially larger file sizes. We recommend using the HiCorp exporter plugin.
Q: Are there any methods applicable to 3D collision detection?
A: No, There is no API defined for collision detection. However, the
RayIntersection class computes a ray intersection in the 3D world.
Q: What texture sizes can be used?
A: All textures in JSR-184 must be of the size 2^n x 2^n (for example 32x32, 128x64).
Recommended maximum size is 256 x 256 (256 x 256 texture is usually the uppermost
limit when it comes to heap memory).
Q: When I scale my model in 3D Max using the scale tool and then export it for
preview, it does not render as expected.
A: The 3D Max scale tool does not operate on the object vertices and instead applies
scaling to the transform matrix. You should scale the vertices directly in order to
ensure that the preview in 3D Max closely reflects the Mascot Capsule render. It is also
possible to scale objects on the fly through the Mascot Capsule v4 API.
Q: I export my model from 3D Max and it does not render as expected with Mascot
Capsule?
A: Remember to keep the modifier stack short and collapse it before exporting. Some
modifiers may hold materials inside which will not be visible in 3D Max but will appear
when rendered by Mascot Capsule. The M3G Viewer can also be invaluable during the
exporting process. Test all files in the viewer before converting and inserting into the
game.
Q: Is it possible to use tiling (looping) textures on 3D models?
A: Yes, tiling textures are supported.
Q: Is there any way to change the vertices directly for an object instead of having to
change to position array and set that to the VertexArray. It would be better to have a
reference to the positions directly. I think the set method is copying the primitive array.
A: Unfortunately the only way to reference the vertices of an object, is by copying the
ones existing in the VertexArray of the object, create a new array, delete the old one
and perform a garbage collection. This is not something that one wants to do each
frame. However, sometimes it is a must, because models tend to deteriorate after
many transforms have been applied to them. This is when one must re-load the model
into memory, to retain its original vertex coordinates.
Q: When I apply my second texture to my figure, the figure disappears? How can I use
more than one texture?
A: You have to specify texture coordinates for each texture to be used on the object:
vertexBuffer.setTexCoords(0, TEXTURE_ARRAY, (1.0f/255.0f),
null);