Time for action — toons and artistic effects

CartoonEdge, Posterization, and CrossHatch (from the com.jme3.post.filters package) are three examples of artistic filters. In contrast to the other photo-realistic filters, artistic filters make the 3D scene look flat and untextured, as if painted or printed.

The following screenshot shows how a toon shader makes the fiercest dinosaur look cute:

Time for action — toons and artistic effects

The toon effect is activated just like any other filter:

  1. Make a copy of Main.java and name the class Cartoon.java. Remember to also refactor the first line of the main() method to Cartoon app = new Cartoon().
  2. Add three class fields: one for the scene, one for the ...

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.