MLight is a 3D lighting engine I created for SketchUp. It allows users to add various kind of lights in a SketchUp 3D scene. Multiple properties can be edited on lights and materials. Then, the plugin computes scene lighting in real-time. It is very simple to use.

Rendering programming is a challenging world, especially when it comes to optimization and result quality. The first goal of MLight was to make the rendering of SketchUp more realist (and beautiful). But it is not possible to do that without keeping in mind another goal: good performances and not making the memory explode.

Using OpenGL and GLSL, I created a process that retrieves the data from the model, and returns in real-time an improved render depending of the camera position. Combining lights, materials and occlusion shadows was a great challenge because it requires a lot of optimization and quality checks.


There are five different kinds of light available in MLight. The first two are punctual, meaning that each light is represented by a single point in the 3D space. The third one does not have a position, but only a direction to simulate a light positioned very far from the scene (a sun). The last two are groupings of multiple omni lights (linear) or spot lights (surface). All those lights use shadow maps to generate the shadows.


Material properties can be edited to specify how a surface react to lighting. Reflection can be added to simulate mirrors, metallic surfaces, or shiny floors.


Marc-Antoine Desbiens