Triverse Tile Graphics Update

Graphics have gotten a major update! Here are some ships with the new look:

NewGraphicsShip1NewGraphicsShip3
NewGraphicsShip2NewGraphicsShip4

Gameplay comes first, but graphics bubbled back up as a priority because they were blocking several gameplay issues:

  • Visualizing team membership: The previous graphics supported a single color per part, but several variables need mapping: team, power level, energy/damage level, and whether the part is firing, selected, or highlighted.
  • Streamlining tile asset pipeline: I can create tiles in Inkscape, but it’s a manual approach. I want more automation in the process as well as control over what assets are produced from my original content.
  • Aesthetics: I want a less abstract appearance and a better sense of depth. This is about immersion; ships should feel like solid, physical objects.

New Tile Rendering Mode

Tiles now have lighting applied and region-based coloring. Each tile is still rendered as a single triangle, but vertices hold more data and the shader does a bit more work. Performance is not noticeably different, although rendering is nowhere close to being a bottleneck at this point.

Drawbacks:

  • Power level visualization: Previously, power level was clearly indicated by the hue of parts, but now it’s generally more subtle through power regions and glow. Build mode might be a good place to enhance the power colors more.
  • Overall ship color to indicate team: This might be limiting in terms of what variations in color specific parts can have. In most games, team color is shown as trim on structures/units/etc, but here the parts are too small for that to work well. Some parts already have power regions as well that could make this ambiguous.
  • Portability: Shaders do more work now, which might present issues when considering less powerful devices (tablets?).
  • Modeling difficulty: My modeling approach amounts to writing functions in a text editor.

Generating Triverse Tiles

To generate tiles, I enhanced Eval2D to use DirectX 11 for sphere tracing, then wrote appropriate signed distance functions to produce shapes that look reasonable as ship parts. Turns out HLSL has built-in automatic symbolic differentiation, which means I can easily obtain normals without resorting to ddx/ddy or additional sampling. All the new tiles assets are generated as a build step or as part of unit tests for convenience. I figured this way would be more interesting than learning/automating Blender.

Normal map generated for a cell junction:

JunctionCellSmall

Obligatory noise/sphere reflections (not related to game!):

SphereTracing3Small

References:

Next Steps on Graphics

Graphics are out of the way for now, but I expect to revisit these areas at some point:

  • Terrain tiles: The rock tiles are good enough for now, but this will need improvement once I introduce additional kinds of terrain. On the aesthetic side, they aren’t exactly seamless and they don’t quite match the new look.
  • Effects: HUD, projectiles/beams/trails, particle textures can be improved, but changes would largely be aesthetic and lower priority.
  • More tile shading variety: The colors still look too flat and uniform. It might be worth looking at mapping power to lightness in some way.

Eval2D Available for Prototyping Procedural Textures

Eval2D runs C# scripts and displays results visually as you type; it’s a visual REPL for quick prototyping. Eval2D includes a small function-oriented library for procedural texture generation.

It’s worked well enough for me, and I’ve recently cleaned up the API and written some bits of documentation to the point where it might be useful to others. It’s intended for anyone with programming/scripting experience who needs to make some noise. The noise library could be included in a game using the same code written in the app, although it’s not really designed for high performance.

Download: Eval2D-0.0.2.0.zip (2.2 MB)

Screenshot of Eval2D showing code view and Voronoi noise.

.NET 4.5 is required, which is available here if you don’t have it yet.

I included a tutorial as the default script that covers much of the API. For additional reference, check the assembly .xml files and the readme. Note that this is an early release and much of the app is in an incomplete state. Feedback is welcome!