Article Preview
Buy Now
| Print: | |
| PDF: |
The Topographic Apprentice
Presto Chango!
Dynamic Textures
Issue: 4.4 (March/April 2006)
Author: Joe Nastasi
Article Description: No description available.
Article Length (in bytes): 3,662
Starting Page Number: 38
RBD Number: 4416
Resource File(s): None
Related Link(s): None
Known Limitations: None
Excerpt of article text...
In both A-OK! The Wings of Mercury and A-OK! Spacecraft Simulation System, there is a requirement to have an Earth model. Unlike many space games, the camera is much closer to the surface and therefore, really puts the texture to the test. It gets blurry real quick. A-OK! Wings of Mercury was released in early 2002 and the graphic cards in the Macs (it was not released on Windows until November, 2005) limited the texture to 512 x 512 pixels.
Since the product also had to support older cards as well, I needed to be able to use smaller textures. Due to the limitations of the RB3D API, I was forced to build three Earth models with identical geometry, but progressively lower resolution textures. The model was selected by a popup menu in the preference window.
With REALbasic 2005 Release 3, RB3D gained the ability to directly access an Object3D's texture. So now, instead of having three models, one Earth model will suffice; we just have to swap the texture! An Object3D can have multiple instances of the new Material class. In our case, only one is required. A Material class can apply a DiffuseColor or a Texture. We will use the Texture property, which is a subclass of the Picture class.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|










