The Quest for Very Wide Outlines
bgolus.medium.com
bgolus.medium.com
Never having done any work like this on the GPU, I hadn't realized this would be possible.
Windows has had a built in 'timeout detection & recovery' system for years now specifically designed to detect when the GPU locks up and then basically just knock it over and restart it so your PC becomes usable again. [ https://docs.microsoft.com/en-us/windows-hardware/drivers/di... ]
Vulkan and Direct3D 12 have, by giving you more direct access to 3D hardware, brought back a lot of the fun 'this game caused a kernel mode crash or hung the entire machine' experience we used to get in the Windows 9x days. As a game dev whenever I do some Vulkan or D3D12 testing I make sure to reboot the machine afterward to avoid having my browser crash 4 hours later because the video driver stomped on some stray pages in the file cache.
I’ve explained this many times to art and design directors and there is always the starement of “but this game did it”! To which my response is, this game is on PS4 not mobile, or it required a lot of asset pipeline customization, and/or hand authoring. Of course it can be done, but it may come at the significant expense of other systems.
As the images with the black outline show near the top of the article, scaling up the component parts and drawing them as black don't achieve a good effect. The "correct" approach is to find each opaque bit of the 3D object you're outlining and draw opaque outline pixels within a radius of the outline width around it. This is slow, however, since you're essentially operating per-pixel. To achieve reasonable performance, there's a good amount of optimizing that needs to happen.
In the Jet Set Radio HD and Guilty Gear Xrd -SIGN- examples, I get it. But the really thick one with the robot only reminds me of activity books for very young children, which are used with those dull safety scissors.
I'm failing to come up with some circumstance in which I'd actually want something to look that way.
I'm concerned that the results turn a single point into a square rather than a circle. Would using non-square-grid point distributions alleviate this?
Perhaps this could be useful for GPU line rendering, though it's a texture-space algorithm and won't solve drawing a thin line in the first place (which I don't know if it's easier than a thick line or not).
Since the model may be viewed from any direction, this would be very hard to do in post, since there’s no way you can get the model to look correct from all angles.
Your comment makes it sound like there's only one presumed use-case for this.
Also, FWIW, this was posted today on Reddit - a nice writeup of "5 ways to draw an outline" in Unity that also tips a hat to the OP article: