Time for action – this city needs more glow

You already know a way to add glows: the GlowMap and GlowColor parameters in materials. A bloom filter results in the same halo-like glow, but it is applied scene-wide.

Let's apply a glow to our scene:

  1. Make a copy of Main.java and name the class BloomGlow.java. Remember to also refactor the first line of the main() method to BloomGlow app = new BloomGlow().
  2. Add three class fields: one for the scene, one for the FilterPostProcessor, and one for the bloom filter (from the com.jme3.post.filters package):
    private Spatial sceneGeo;
    private FilterPostProcessor fpp;
    private BloomFilter bloom;
  3. Initialize bloom and fpp in the simpleInitApp() method. Add the FilterPostProcessor to the viewPort, and add the BloomFilter ...

Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.