Juliette Foucaut - 01 Feb 2014
How we started with a bug and ended up with a music video collaboration with the awesome nervous_testpilot:
Music by nervous_testpilot a.k.a. Paul Taylor of Mode 7.
10 days ago whilst working on graphics, Doug introduced a cool-looking bug and posted a screenshot on twitter.
Those black triangles shouldn't be there. (click to enlarge)
Doug: I had a technique which draws triangle outlines without requiring extra vertex data or more draw calls, but a recent optimization to the vertex data had changed the triangle order such that this method no longer worked. The end result is that some triangles have outlines, some become grey, and others black. Since the pattern depends on the vertex order from the optimizer it ends up having a geometric pattern which is related to the surrounding structure. The strong borders enhance contrast, and add detail, especially in the distance where for performance reasons we fade out material colours.
The debug barycentric outlining as it should look, i.e. no black triangles. (click to enlarge)
Anyway, we were pleasantly surprised when Doug's screenshot featuring the black triangle debug bug caught people's attention on Twitter, and delighted when Paul Taylor of Mode 7 (makers of award winning Frozen Synapse and Frozen Endzone), a.k.a. nervous_testpilot, suggested to use the visuals for one of his music videos! Wow :D
Not only was recording the video for Paul fun and gave us some nice publicity, there were added bonuses:
we weren't too concerned about the movement jerkiness in our technical videos or in-game, but the brutal starts/stops in the run were jarring for a more artistic video. So Doug implemented a cinematic camera slider, adding inertia to smooth movement (though it took time and a few near collisions with walls to get used to it)
exploring the 'black triangle' environment exposed a serious low-level bug. It was hidden in a remote area which I wouldn't have normally explored if I hadn't spent time flying from corner to corner in a defective build, trying to get used to the newfangled inertia so I could show off the smoothness without colliding with surfaces.
the black triangles feature made us appreciate how much patterns can add depth and readability to the environment. In addition, Doug added specular lighting, with the light bouncing off surfaces but not the black triangles, which gave the world a rather nice look, interesting.
Black triangles debug bug with specular lighting (click to enlarge)
To end this post, I've collected all the black triangle screenshots, and a few others taken in debug mode, for a last peek before we move on.
An earlier but different triangle order bug in the debug barycentric coordinates (click to enlarge)
Debugging a bug in the debug barycentric coordinates with glowing additive outlines (click to enlarge)
A wider view of the debug barycentric glow (click to enlarge)
Debug voxel outlining, the visible aliasing in the distance occurs because the outlining is done at a constant 1x1x1 size rather than using the level of detail geometry. (click to enlarge)
Vertex optimisation wrong index bug, or an AT-AT (click to enlarge)
Black triangles debug bug (click to enlarge)
Black triangles debug bug (click to enlarge)
Black triangles debug bug (click to enlarge)
Black triangles debug bug with specular lighting (click to enlarge)
Shots from the first network tests. The vertical arc (in red) across the image is part of my own avatar. It shows because the avatar is misaligned with my view, it's a bug. The red spheres with a hollow are the other players' avatar placeholders.
First internet test - 3 players (click to enlarge)
First internet test - 2 players (click to enlarge)
Watching Miguel Cepero create a dragon hut in his incredible Voxel Farm engine, I was wondering if I would be able to do something similar in Avoyd. It's not as nice as the dragon hut but I was able to build a couple of dinosaur skeleton looking structures.
The editing tool in Avoyd is very basic compared to Voxel farms', but I was lucky: whilst it's currently rather hard to do straight lines in Avoyd, it's a doodle to draw on an invisible sphere surface, hence perfect for making ribcages. It came out surprisingly well I think.
Using an avatar as an eye, it looks like a chameleon (click to enlarge)