logo enkisoftware
Independent game developer making AVOYD
en  fr

Black triangles and nervous_testpilot

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.

Avoyd - debug: broken gl_VertexID to barycentric coordinates for triangle outlining - black triangles bug 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.

Avoyd - debug barycentric outlining, what it should have looked like 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.

Avoyd - black triangles debug bug with specular lighting 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.

Avoyd - triangle order bug in the debug barycentric coordinates An earlier but different triangle order bug in the debug barycentric coordinates (click to enlarge)

Avoyd - bug in the debug barycentric coordinates with glowing additive outlines Debugging a bug in the debug barycentric coordinates with glowing additive outlines (click to enlarge)

Avoyd - debug barycentric glow A wider view of the debug barycentric glow (click to enlarge)

Avoyd - Debug voxel outlining with visible aliasing 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)

Avoyd - vertex optimisation wrong index bug Vertex optimisation wrong index bug, or an AT-AT (click to enlarge)

Avoyd - black triangles debug bug Black triangles debug bug (click to enlarge)

Avoyd - black triangles debug bug Black triangles debug bug (click to enlarge)

Avoyd - black triangles debug bug Black triangles debug bug (click to enlarge)

Avoyd - black triangles debug bug with specular lighting 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.

Avoyd - First internet test - 3 players First internet test - 3 players (click to enlarge)

Avoyd - First internet test - 2 players 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.

Avoyd - large dinosaur skeleton looking structure (click to enlarge)

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.

Avoyd - two large dinosaur skeleton looking structures (click to enlarge)

Avoyd - small dinosaur skeleton looking structure (click to enlarge)

Avoyd - small dinosaur skeleton looking structure with an eye Using an avatar as an eye, it looks like a chameleon (click to enlarge)

 › 2023
 › Avoyd Release Streams and Minecraft Lit Materials
 › Avoyd Beta Stream
 › 2022
 › Isometric Render of a Minecraft Map in Avoyd Voxel Editor
 › 2021
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › 2020
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › 2019
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › Procedural python word generator: making user names out of 4 syllables
 › In-game building
 › Player-deployable turrets in Avoyd
 › 2018
 › Avoyd Game Singleplayer and Coop Multiplayer Test
 › Voxel Editor Evolved
 › 2017
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Multiplayers toxic last hit kill and how to heal it
 › Avoyd Editor Prototype
 › 2016
 › Black triangles and Peter Highspot
 › Colour palettes and lighting
 › Concept art by Rebecca Michalak
 › 2015
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › Feral Vector
 › Normal generation in the pixel shader
 › 2014
 › Python Google App Engine debugging with PyCharm CE
 › Lighting voxel octrees and procedural texturing
 › Patterns and spheres
 › Python Google App Engine debugging with PyTools
 › Interview
 › Domain masking using Google App Engine
 › Octree streaming - part 4
 ›› Black triangles and nervous_testpilot 
 › Presskit for Google App Engine
 › Octree streaming - part 3
 › Octree streaming - part 2
 › Octree streaming
 › 2013
 › LAN discovery with multiple adapters
 › Playing with material worlds
 › Developer Diary archive
 › Website redesign
 › First Person Editor
 › First Avoyd tech update video
 › Implementing a static website in Google App Engine
 › Multiplayer editing
 › First screenshots
 › Thoughts on gameplay modes
 › Back in 1999
 › 2002
 › ECTS 2002
 › Avoyd Version 1.6.1 out
 › Avoyd Version 1.6 out
 › 2001
 › Biting the bullet
 › Avoyd version 1.5 out
 › Monday Mayhem
 › Avoyd version 1.5 alpha 1 out
 › Avoyd version 1.4 out
 › ECTS 2001
 › Fun with Greek letters
 › Closer just a little closer
 › Back already
 › Artificial Humanity
 › Products and promises
 › Ecommerce
 › Explosions galore
 › Spring fixes
 › Open source and ports to other operating systems
 › Avoyd LAN Demo Version 1.1 is out
 › Thanks for the support
 › Avoyd LAN Demo Ready
 › Game Tech
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › Procedural python word generator: making user names out of 4 syllables
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › Normal generation in the pixel shader
 › Lighting voxel octrees and procedural texturing
 › Octree streaming - part 4
 › Octree streaming - part 3
 › Octree streaming - part 2
 › Octree streaming
 › LAN discovery with multiple adapters
 › enkiTS
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › RCC++
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Web Tech
 › Procedural python word generator: making user names out of 4 syllables
 › Python Google App Engine debugging with PyCharm CE
 › Python Google App Engine debugging with PyTools
 › Domain masking using Google App Engine
 › Presskit for Google App Engine
 › Implementing a static website in Google App Engine
 › Avoyd
 › Avoyd Release Streams and Minecraft Lit Materials
 › Avoyd Beta Stream
 › Isometric Render of a Minecraft Map in Avoyd Voxel Editor
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › In-game building
 › Player-deployable turrets in Avoyd
 › Avoyd Game Singleplayer and Coop Multiplayer Test
 › Voxel Editor Evolved
 › Multiplayers toxic last hit kill and how to heal it
 › Avoyd Editor Prototype
 › Black triangles and Peter Highspot
 › Colour palettes and lighting
 › Concept art by Rebecca Michalak
 › Feral Vector
 › Patterns and spheres
 › Interview
 ›› Black triangles and nervous_testpilot 
 › Playing with material worlds
 › Website redesign
 › First Person Editor
 › First Avoyd tech update video
 › Multiplayer editing
 › First screenshots
 › Thoughts on gameplay modes
 › Back in 1999
 › Avoyd 1999
 › Developer Diary archive
 › Back in 1999
 › ECTS 2002
 › Avoyd Version 1.6.1 out
 › Avoyd Version 1.6 out
 › Biting the bullet
 › Avoyd version 1.5 out
 › Monday Mayhem
 › Avoyd version 1.5 alpha 1 out
 › Avoyd version 1.4 out
 › ECTS 2001
 › Fun with Greek letters
 › Closer just a little closer
 › Back already
 › Artificial Humanity
 › Products and promises
 › Ecommerce
 › Explosions galore
 › Spring fixes
 › Open source and ports to other operating systems
 › Avoyd LAN Demo Version 1.1 is out
 › Thanks for the support
 › Avoyd LAN Demo Ready