So the reason things have been a little quieter from my quarter is simply that I’ve been working on a small 3D engine. I wanted to understand the abstractions that great engines like Three.js or J3D provide, not really create Yet Another 3D Engine, if you like. This monkey is one of a few tech tests for the engine that I wanted to share.
- I want to update the vertex normals which requires knowledge of mesh topology
Making it fun
Just moving the vertices would be fine, but what I decided to do initially was to use each vertex’s Y position, relative to the centre of the head and use that as an offset for a sine wave motion. The sine wave pushes each vertex out along the vector it makes with the centre so we see a ripple that runs down the head.
Then after a day or so I realised I just assumed we all wanted things to run down the Y axis. No, no, no. Why don’t we have it as an option? And while we’re at it let’s add in options for controlling the magnitude and speed of the undulation.
Soon I’ll be pushing out the 3D engine I’ve been building, and recording some videos explaining the process I went through. In there are some other samples like this one (although not quite as silly to be perfectly honest) so I hope you’ll enjoy that when it comes out. In the meantime, however, why not go and undulate a monkey? In the computer, not in real life. That would be odd.