Hi guys,
I’ve been trying to figure out what the best way is to show a selected character or object on-screen, with the possibility of multiple objects/chars being selectable.
Some of these objects/chars could be instanced from the same object.
The way I’m wanting it to look is a bit like in guildwars or left4dead, with an outline around the object.
I’ll explain some of the ideas I’ve thought of doing this, and the pitfalls I see with them; hopefully you guys can help me find a solution:)
-material with outline shader; this works, but I figured that as soon as I set the outline on the shader, all instances will show this outline (and thus as selected). Is there a way to instance an object and a new version of the shader that shares all resources except the ‘outline’ value of the shader?
-Image effect; somehow write the selected objects to a seperate buffer and apply the outline as post process…sounds great in theory but I have no idea how to do this
-instance a copy of the same object with a transparent outline shader on top of the original object…could work but creates twice the geometry
-use the line renderer to draw an outline…but this would involve somehow figuring out what the outline of an object is at runtime:)
So…am I in any way close to a solution or are all these ideas barking up the wrong tree?
Would really appreciate the help!
Cheers,
Joey