I have a small problem regarding Blender’s game engine (at least I thought it was a small problem at first, but after two days of trying and looking around in various forums I’m not so sure anymore).
I’m working on something that’s supposed to become an RTS game someday. I’ve made a world map
where I want to be able to select any country (each country being a seperate object, divided into regions on the vertex level). That country should be highlighted when selected. I am now working on the material for this selection. The highlight should follow the country border and fade to alpha 0 towards the center of the country.
I quickly made up some images in GIMP to better explain my goal, with just two countries.
If I’d select germany, it should look something along the lines of this image
When I select Austria it should look like this
Now, if I were to play as Austria for example, and I’d annex Germany (:evilgrin:), the selection should extend to both countries and look like this (I guess I’d have to join both meshes to achieve this).
I’ve tried everything I could think of (toon and edge shading, transparent material with fresnel, vertex colours, material nodes, some sort of volumetric light, I looked for tutorials regarding materials for holograms or ghosts, even a electron microscope material), but nothing seems to work. Moreover, half of the methods I tried don’t seem to be compatible with the game engine anyway - procedural blend textures for instance. Also, since the whole thing should be quite flexible (any country in the world being able to take over any other country, also not directly connected countries) UV textures are not an option I think. Preferably I’d also like to not add any additional geometry, too, as there’s already enough I think (if not too much).
I think the most promising approach would be to use material nodes, something like in this tutorial:
but for one I think this doesn’t work on flat surfaces (at least not exactly as in the video), and I can’t make the material show up in the game engine either (GLSL enabled).
Any advice would be appreciated (step-by-step instructions at best), I’ve uploaded a blendfile too, if that helps.
Thank you very much in advance!