To compile JavaFX with 3D features you have to get the early access version of the JDK8.
At the moment as far as I know there is only a windows support for the 3D features, but abuild for Mac and Linux will soon be released. (Luckily enough 3D support also works for a virtualized Windows running on Mac - this is how i got to the screeenshots.)
This blog entry is about a Scala version of the provided 3D examples.
First, there is the class PhongMaterial, which defines some sort of "Phong shaded material". Basically you can create a material which can have a color or some texture.
|a red box and a blue sphere rendered with JavaFX|
This is a screenshot of the same program, different colors, with a bumpmap applied:
|example using a bump map|
Here is the code: