Light engine
An inverse rasterizer engine demo in Java and Swing, extended with camera movement and a better interface.

At a glance
- Java, Swing
Tags
An inverse rasterizer engine demo, written in Java using Swing. Most calculations run on the CPU, which limits performance, but it is a sample implementation of the rasterization process.
It is a heavily modified version of a rasterizer by C. Dehais, S. Mondet and G. Morin, with camera movement, further optimisation and a better interface. It was carried out as part of the computer rendering course at ENSEEIHT, and the code is not entirely the author's own, so care is advised before reusing it.
Using it
At start-up the program asks for a scene file; a few samples are provided, including the Blender monkey Suzanne and an A380. Once loaded, the scene is drawn as a wireframe, and the keys do the rest:
- Arrow keys: move the camera around.
- L: toggle the lighting.
- Return: loop through the available shaders.
- F1 and F2: wireframe and solid rendering.
- F3 and F4: the same, multithreaded. These modes are experimental and turned out slower than the single-threaded ones.
Your own models
The scenes use a modified version of the OFF file format. A Python script converts a standard OFF file to it. Syntax errors in a scene file can crash the program, since very few robustness checks were made.

