Saturday, April 9, 2016

Now you see me, now you don't!

EDIT: well, this solution isn't good enough. If you watch it from a different camera angle, the text is very visible, which I don't want. Searching for another solution. However, I'll leave it here, as maybe someone will come through the same problem I did (3D text showing through game objects). 

EDIT2: All it took to fix it is just to create a new material for the floor, use the "Standard (Specular setup)" material, set "Specular" to black, and set "Albedo" to a light grayish value. Now it works from all angles.

Taking month-long breaks are my thing. Probably my weak willpower. Whatever.

Wanted to do a quick test of a way of including easter eggs. Let's assume I want to hide a piece of text in a room, and I want it to be revealed only if there is a different colored light is there. For example, I have a red text on a white floor, and the room is lit with red light. You won't see the text. But, if the room is lit by any other colored light (blue, green, white, etc..), then the text will be clearly visible.

However, there is a problem with the standard 3D text Unity grants. I'm not going into the details, but this blog post does. After fixing the shader, it works just as I imagined.