D2X-XL Worklog
Notes on features and problems from the development of D2X-XL, newest first.
Cartoon Style |
|
D2X-XL has had a cartoon style renderer for quite a while, and Descent lends itself very well to that look, with its simple textures and its simple geometry. For 2.0 I have reworked it. The Look Light falls in flat steps instead of smooth gradients, and texture colors are reduced to a few levels as well, so surfaces look painted rather than lit. Wall and model textures are smoothed into flat, painted patches when a level loads. Hostages, powerups and other sprites get a dark outline. The Outlines The black outlines are what makes or breaks a cartoon look, and they took the longest. The old renderer drew a black line wherever a wall or a robot ended against something behind it, and a line on the edges inside the picture. To keep this from looking like a technical drawing, an edge between two walls meeting at a shallow angle only got half a line, which now and then was broken into two short pieces. There were exactly two line widths, and the lines were the plain lines the graphics card draws, with little dots on their ends to round them. The first steps were technical. The outlines of robots and then those of the level became ribbons facing the viewer, which gave them exact widths and smooth, round ends. Then the outlines of the level got their own builder: all edges of a mine are analyzed once, the result is kept in a cache, and a shader bends every stroke along the wall it belongs to, relief included. After that the strokes stopped being full or half. Every edge now has a strength that grows with the angle between its two walls, and both the width and the length of its stroke follow that strength. Inner corners are drawn thinner than outer ones, and distant lines thinner than close ones. Where several edges met in one corner, the corner used to turn into a black star. So the edges meeting there are now compared with each other: the dominant ones keep their line, the weak ones fade or disappear. The last round of tuning added the hand drawn touch. Strokes start at corners picked at random, a weak edge that would vanish may keep a short stub as a hint, the length of the strokes varies a little, and a long edge may get a stroke from each end with a gap in between. All of this is procedural. Nothing is painted or stored by hand; the game derives every stroke from the geometry of the level and of the models. It rolls the dice once per level and keeps the result, so a mine looks the same every time you enter it. |
|
Cartoon style is switched on in the render options. It can only be changed while no game is running. |


