JavaFX 3D Tutorial #10 – Self Illumination

In JavaFX 3D, you can make use of self illumination maps to provide glowing effects for objects. Self illumination allows to add extra details for the objects.

Self Illumination Map

Self illumination map allows to add an additional glow to the image. You can see the effect in the following image.

JavaFX Self Illumination Example

JavaFX PhongMaterial provides an option to set illumination map using the method

public final void setSelfIlluminationMap(Image value)

It takes an image as parameter. The glow color will be the color used in image. A dark pixel doesn’t contribute to the glow. For example, in the above earth illumination case, I have used following illumination map.

Earth’s illumination map

 

PhongMaterial material = new PhongMaterial();
material.setDiffuseMap(new Image(getClass().getResourceAsStream("wood.jpg")));

//Set self illumination map
material.setSelfIlluminationMap(new Image(getClass().getResourceAsStream("illuminationMap.jpg")));

Box box = new Box(100, 20, 50);
box.setMaterial(material);
return box;

 

Visit JavaFX 3D Course Index Page

Muhammed Afsal Villan

Muhammed Afsal Villan is an experienced full-stack developer, specialized in desktop and mobile application development. He also regularly publishes quality tutorials on his YouTube channel named 'Genuine Coder'. He likes to contribute to open-source projects and is always enthusiastic about new technologies.

More From Author

JavaFX 3D Tutorial #9 – Moving Light Animation

JavaFX 3D Tutorial #11 – Bump Maps for Wringles

52 thoughts on “JavaFX 3D Tutorial #10 – Self Illumination

  1. Pingback: read more
  2. Pingback: gold rim chairs
  3. Pingback: aksara178 login
  4. Pingback: rich89bet
  5. Pingback: ks quik
  6. Pingback: hihuay
  7. Pingback: altogel mewah
  8. Pingback: sex 12 tuổi
  9. Pingback: dk7
  10. Pingback: 안전놀이터
  11. Pingback: faw99
  12. Pingback: Funny videos
  13. Pingback: cat888
  14. Pingback: marbo 9000
  15. Pingback: online chat
  16. Pingback: filler
  17. Pingback: weed aarhus
  18. Pingback: dark168
  19. Pingback: read this
  20. Pingback: lg96
  21. Pingback: pg168

Leave a Reply