Up until now, we've
always used the solid color ColorMaterial
to draw our graphs. However, to get the most out of your 3D world, you'll need to know TextureMaterial
. This recipe introduces how to use it with a bitmap. The next chapter will show a few practical examples of the techniques learned here.
As in the previous recipe, start by creating a copy of the Moving around the chart recipe.
You'll also need a bitmap image. For instance, you can download open source textures that are free to use from http://opengameart.org/textures/all. There is only one requirement: the bitmap's size, both height and width, should be powers of two.
This is a limit inside Away3D that stems from the limits of the graphical card that renders the image to the screen.