this is the best way i think, color ramp optional. this way you can have control of what the rim color is, maybe varied based off of sun vector. you could make it an add, or just make another material with the emit up a little.
You could do it in post processing. This isn’t a well understood thing in BGE, but it is easily doable, and I’ve been doing it for quite a while now to achieve fancy effects.
This allows you to render out the ‘mask.’ A simple example where I rendered out a ‘mask’ for things is this image where I rendered a seperate pass with just the highlighted object (a chair) on it. (In this scene the object you were looking at highlighted, including the table, books etc.)
I then applied a filter on it to only get the outline, but the same solution could be used to do outlining/highlighting.