Time for action – this city needs more gloom
We use ambient occlusion (SSAO) in scenes with no directional sunlight; for example, to simulate a gloomy indoor scene, a narrow street, or a gray, overcast day.
You activate ambient occlusion as follows:
- Make a copy of
Main.java
and name the classShadowSSAO.java
. Remember to also refactor the first line of themain()
method toShadowSSAO app = new ShadowSSAO()
. - Add
FilterPostProcessor
as a class field, and initialize it in thesimpleInitApp()
method. AddFilterPostProcessor
toviewPort
of yourSimpleApplication
:private FilterPostProcessor fpp; public void simpleInitApp() { FilterPostProcessor fpp = new FilterPostProcessor(assetManager); viewPort.addProcessor(fpp);
- Create an
SSAOFilter
object (fromcom.jme3.post.ssao ...
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.