Hello! I’m making a game, as we all may do, and stumbled upon a problem. It didn’t seem like it was going to be hard to solve at first, but after a bit of research, it seems the effect I want will have to be sacrificed in some way.
What’s the problem? I’m trying to make something like a shader effect that detects edges of parts. For example:
Manifold garden
Euclid
AntiChamber
I’m aware that making custom shaders is impossible right now, but things like cel-shading and cartoon outlines arent. Though cel-shading, nor cartoon lines get the exact desired look I’m looking for.
If you can see the image above, (I didn’t make this btw) the outlines aren’t the same as in the examples. In the examples, the closest edge of a part is highlighted too, parts that share the same side don’t have a line between them, and parts that intercept each other at a 90-degree angle make a line.
Some rules I have made my self to find exactly what I’m looking for are:
-
the edge of a part that are pointing towards the player must be highlighted.
-
the further edges of a part must be highlighted.
-
Any side of a part that is intersecting with the side of another part at a 90-degree angle, must have a highlighted line where they intersect.
-
Parts that share a side with another part should not have a line between them no matter the colour/properties of this part. (So things like stairs don’t have a bunch of lines on the sides of them)
Example Images:
Some other things that we can rule out is that I would do this by hand, but like antichamber with the player placed blocks, it would have to update the edges, and things like outlines/Legacy Outlines won’t work either since that would go against rule 4.