Thursday, August 23, 2018

Mr. Blinky

Well, that certainly is a creepy purple vaguely head-shaped lump. This is a slightly more complex model than the non-descript pillar of purple from the last post, and it blinks. It has separate shape keys to close each eye, and an animation linked to both of them. It also has shape keys for opening and closing the mouth, but I haven't created the tools to pick and choose which animation or key I am manipulating from the game engine's UI yet, so I'm stuck just showing one at a time.

Anyway, things move along. Maybe some additional UI tools before I go on to the clouds...

Sunday, August 19, 2018

Shape Keys

Shape keys, or morphs, or morph targets, are a way to control the shape of a mesh by having a number of different meshes (or targets or keys) with the same number and arrangement of vertexes, each of which represents a kind of target shape. Then, by adjusting a weight value you can use one or more of these shapes to influence the final shape. The video above demonstrates a very, very simple case where I have a big purple block, and one shape key attached to it, which is the same block with one side pulled out into an ugly protruding lump. By sliding the control on the lower left, I can run through an animation which makes the lump bulge out and then fade away (changing the shape key weight from zero to one and back again).

I got support for the shape keys themselves into the code last week, but I had to spend a bunch more time adding in support for UI controls and support for linking those controls up to the animation so that I could fool around with the weights in real time. (This is called testing in some circles.) Now that the basic support is in there, it should be a lot easier to set up other controls and debug tools from now on.

I know I said something about clouds last time, but I think the next thing I'm going to do is some more complete shape keys, e.g. a rig for animating a face or some such. We'll see how long that takes, and then I'll probably go back to work on atmospheric effects, unless I get distracted by something else.