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:
- Make a copy of
Main.java
and name the classBloomGlow.java
. Remember to also refactor the first line of themain()
method toBloomGlow app = new BloomGlow()
. - Add three class fields: one for the scene, one for the
FilterPostProcessor
, and one for the bloom filter (from thecom.jme3.post.filters
package):private Spatial sceneGeo; private FilterPostProcessor fpp; private BloomFilter bloom;
- Initialize
bloom
andfpp
in thesimpleInitApp()
method. Add theFilterPostProcessor
to theviewPort
, and add theBloomFilter ...
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.