Sunday 17 July 2011

The wise man knows he is a fool.


So I was trying to be clever, including supplying twizzle vector operators like Vector.XZY() that returns a transformed vector or Vector.XZX(). These give you some clever(ish) results for noise generation, geometry transforms and lighting. I was playing with them - a while ago now - and they've always just 'been there'... Until a typo, and now they have been banished. Causes a REALLY weird physics bug, getting the wrong transform from a matrix and I'm glad to be shot of it.

Secondly, that means I'm close to finishing Sprint 15. Really close.

Lastly - something I can't work on now even though I'm excited about it. After spending breakfast staring at a couple of minifigs from Collection #4, I worked out how to write the brick shader I was thinking of. Sometime in the past twenty years, the plastic used for (at least) minifig legs and probably all bricks has changed. Anybody notice the difference?
On reflection, I really like the new plastic. Its not fully opaque, which means the edges of bricks let a *tiny* amount of light through. This gives a sharp, crisp well defined edge that is ever so slightly lighter than the rest of the brick as if the edge is highlighted.

Its a very nice visual effect, and something that I couldn't put my finger on for ages. I really wanted that crisp edge definition but didn't want the geometry overhead of adding a bevel. In a bright room, its almost emissive as the edge between two faces not hit by the dominant directional light is still brighter than either face in a way that couldn't be achieved with a bevel.

I'd already decided to try adding a bevel using a normal map instead of geometry, but if I can add this effect too then I'll be very happy. Take a close look at an old and a new brick, you'll see what I mean.





No comments:

Post a Comment