Posts

Showing posts from December, 2005

M3G - 3D Object Materials

Image
Materials A light can cause different effects. A shiny silver ball reflects the light in a different way than a sheet of paper does. M3G models these material characteristics with the following attributes: Ambient reflection: The light that is reflected by an ambient light source. Diffuse reflection: The reflected light is scattered equally in all directions. Emissive light: An object can send out light to imitate glowing objects. Specular reflection: The light that reflects off objects with a shiny surface. You can set a color for each material attribute. The shiny silver ball's diffused color would be silver and its specular component white. To get the final object color, the material's color mixes with the light's color. If you point a blue light toward the silver ball, it would turn bluish. Listing 9 shows how to use materials: Listing 9. Setting a material // Create appearance and the material. _cubeAppearance = n

Your first 3D object

Image
Your first 3D object As a first example, you'll create a cube as displayed in Figure 1. Figure 1. Sample cube: a) Front view with vertex indices, b) Side view with clipping planes (Front, Side) The cube lives in what M3G defines as a right-handed coordinate system. If you take your right hand and stretch out your thumb, index finger, and middle finger so that each finger is in a right angle to the other two fingers, then the thumb is your x axis, the index finger the y axis, and the middle finger the z axis. Try to align your thumb and index finger with the x and y axis in Figure 1a; your middle finger should then point toward you. I've used eight vertices (the cube's corner points) and placed the cube's center at the coordinate system's origin. As you can see in Figure 1, the camera that shoots the 3D scene looks toward the negative z axis, facing the cube. The camera's position and properties define what the screen later displ

JSR-184 a.k.a. Micro3D a.k.a. Java Mobile 3D

What is Java Mobile 3D? Definition from Sony Ericsson developer site : Java Mobile 3D Graphics (also known as JSR 184 ) is an API tailored for the generation and presentation of 3D content on mobile platforms. This section discusses this API and an alternate 3D implementation, HI Corporation’s Mascot Capsule Micro3D version 3 (also known as Micro3D ). Sony Ericsson has chosen to implement both API sets, allowing Mascot Capsule Micro3D serve as a migration path for 3D applications until Java Mobile 3D-enabled devices become widely available. Here, we’ll also briefly try to address any possible point of confusion related to the two implementations of 3D Java APIs in Sony Ericsson phones . M3G is a fun technology to play around for developers, ever in history 3D developement got so easy (well if compared with Direct3D and OpenGL programming)!