Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1

Chapter 15 ■ 3D Gameplay UI CreatIon: UsInG the sphere prImItIve to Create a UI noDe


You will now have to again utilize GIMP to create your quadrant and spinner texture maps to
professionally texture your board game elements. The current version is 2.8.22.


Creating Your Quadrant and Spinner Diffuse Color Texture Maps


Use the GIMP File ➤ New work process to create a transparent (empty) diffuse texture map composite,
and this time make it 512 by 512 pixels since the quadrant Box objects q1 through q4 are twice as big as
the square Box objects on both axes (or four times larger in total). This matches up mathematically with
doubling the 256-pixel texture map size used for the game board squares. Click the circle (or ellipse) select
tool, shown highlighted at the top of Figure 15-4, and again use the Ellipse Select Tool options tab, below
the tool icons, to set a precise size and location for the circle since we want a white circle perfectly centered
in each game board quadrant. I set the circle’s Size to 400 (equal width and height values create a perfect
circle; any variation will create an ellipse or oval shape), and I divided the rest (512 - 400 = 112 / 2 = 56) to get
my X,Y Position value of 56 , which is also highlighted in red.


Figure 15-3. Create five new Shader PhongMaterial objects in your createMaterials() method and wire them
to diffuseMap objects

Free download pdf