Hi there! I’ve been working a lot more on this project, now that I am on holidays. I did a lot of refactoring work, while fixing some rough spots on the API.
I started by implementing plugin support on the editor. I came up with a quite simple plugin API and event system which I used to reimplement all of the core tools. It took a few days to do it properly, but it was well worth it. Now each tool is completely decoupled from each other and they communicate via events. This allows plugins to be enabled and disabled at runtime via a simple plugin manager (with few mouse clicks).
After the editor was stable again and all tools were ported to plugins, I wanted to improve them. I only had transformation tools (gizmos) for positioning, so I added support for scaling and rotation.
White I was at it, I fixed a long-standing feature that I couldn’t get working before: object picking. This allows you to select the objects with the mouse. Most people use the gluUnproject function call provided by the GLU (OpenGL Utility library) but it’s been deprecated, so I had to implement it myself the hard way. It’s working now and it’s very accurate.
As you can see on the previous editor screenshot, I’m also adding a brush system to the terrain editing tools. To make this really neat, I will need to project the brush in the terrain, a technique known as projective texturing. I could hack it fast and make it work just for the terrain, but I like to do things properly, so I added a Projector component that will be more flexible and allows decals and simple shadows.
The projector is still not working, because I needed to add frustum support in the engine first. I had to research how to extract the frustum planes from the projection matrix, which turns out to be very simple. Thanks to Gil Gribb and Klaus Hartmann for their paper: Fast Extraction of Viewing Frustum Planes from the World-View-Projection Matrix. This frustum support will be extended to perform hierarchical frustum culling which should provide a nice speed up for complex scenes.
To finish, today I’ve fixed a small problem in the mesh loader that wasn’t providing the correct vertex normals and played a bit with the shading. I’m using a simple Half-Lambert model with constant ambient factor. This can be improved later by sampling the ambient factor from a cubemap. This is known as image-based ambient lighting and will make things look better.

