In the 6th chapter, we talked about giving wooden texture to the object. Today, let us see how to give reflection to surfaces in JavaFX 3D. JavaFX provides option to specify specular maps as either image or a color.
Specular Map
Specular maps allows to define a surface’s shininess and highlight colour. The higher the value of a pixel (from black to white), the shinier the surface will appear. Black provides zero reflection and white provides total reflection.
If you want the surface to be having uniform reflection, then use a specular color with Material#setSpecularColor(Color color). Or use Material#setSpecularImage(Image image).
Let’s have a look at the example code.
private Box prepareBox() { PhongMaterial material = new PhongMaterial(); //Set diffuse map material.setDiffuseMap(new Image(getClass().getResourceAsStream("/resources/wood.jpg"))); //Set specular map material.setSpecularMap(new Image(getClass().getResourceAsStream("/resources/illuminati.jpg"))); Box box = new Box(100, 20, 50); box.setMaterial(material); return box; }
and the result will be


Visit JavaFX 3D Course Index Page
Meta titles: JavaFX Reflection, JavaFX 3D Specular Map
… [Trackback]
[…] Find More here to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Info to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More here on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Information to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More here on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] There you can find 64635 additional Information on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More Information here on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Info to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More on on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More here on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] There you will find 89292 more Information on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More here on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More here to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More on on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Info to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More on on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Info to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Information to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More on on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More Info here on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Information to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More Information here on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Info on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More on to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Here you will find 61522 more Information to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More Information here to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Info to that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Find More on on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
… [Trackback]
[…] Read More here on that Topic: genuinecoder.com/javafx-3d-tutorial-7-reflection-with-specular-map/ […]
cheap enclomiphene uk over the counter
buy cheap enclomiphene uk london
medicament kamagra medicament achat
kamagra en australie
buying androxal cost usa
cheap androxal buy san francisco
discount flexeril cyclobenzaprine generic new zealand
how to buy flexeril cyclobenzaprine generic real
how to buy dutasteride purchase prescription
cheap dutasteride buy mastercard
purchase gabapentin generic free shipping
gabapentin perscription from s online
purchase fildena cost effectiveness
discount fildena purchase no prescription
itraconazole feminino onde comprar
purchase itraconazole generic for sale
avodart without a persription
cheap generic avodart
cheap staxyn generic real
Order staxyn without a perscription from us
cheap rifaximin cheap info
rifaximin online canadian pharmacy
purchase xifaxan generic does it work
how to order xifaxan buy online uk
dト嬪テ。 levnテゥ kamagra prテ。ci
kamagra pナ册nocovテ。nテュ v sobotu