Catch the sun

When sunlight passes through gaps in the tree canopy, shines in through a window, or radiates from behind mountaintops, it often appears as a light cone or even individual beams. We refer to this atmospheric effect colloquially as god beams—the technical term for them is crepuscular rays.

In 3D graphics, light scattering is simulated with a technique called volumetric lighting. The beams are rendered as transparent cones of light. The jMonkeyEngine offers support for these cool light beams in the com.jme3.post.filters.LightScatteringFilter class.

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.