New Shaders + animations

Posted On 22 Apr, 2014
Dynamic light gif

So lets talk about art creation in Wayward Terran Frontier. It all started with this ship:

zerotopI drew this ship, and it took me probably a week to do. At the time it was great, because I could sit down and fiddle with pixels for a few hours while clearing my mind of noise and working out some of the harder programming problems. In the beginning I had intended for this to be the ugly starter ship that you get in the beginning of the game, but of those two things it really only accomplished being ugly. While somewhat endearing, my art process took way too long for me to make a decent set of artwork and I never finished a real second ship. (aside from the smaller ships which don’t really count)

Jan on the other hand has a process. This is a refined science now. The process starts in 3d, and only after bringing a lot of parts together do the ships ever get rendered to 2d. The first ship faction that was created represents Shavala Corporation, one of the main factions from Wayward Terran Frontier: Zero Falls, and you have already seen some of the art for their ships.One advantage to a 3d art pipeline is that once the various 3d pieces are created for a faction, it’s easy to recombine parts and make lots of ships that share similar artistic themes to convey the feeling of ships created by a common designer. Another advantage comes in the form of meta-data. Since we have full 3d to work with we can get information like normal maps and materials for use in some new GPU shaders. Here is what it looks like when you take Jan’s art and draw it in the game with a dynamic light source and custom pixel shaders (click for animation):

Click for animationI don’t know about you, but I got pretty excited when I saw this working for the first time. In fact, it inspired me to go back and look into some of the other graphic elements of the game and see if they could be brought up to par. The first place I started was shields.

Shield graphics accomplished their goal, you could see them and so it was pretty obvious to the user that the reason your shots aren’t getting through to the hull is because there were shields in the way. They used the same voxel destruction as the ship, and so they could use the same art and all they needed to do was be bright and shiny and obvious. However they were a bit too obvious, and ships with lots of shields ended up looking like a smudge of color in the middle of a neon blue rectangle. I didn’t like how shields looked, and I was in the shader-zone, so I made another shader just for shield pixels, here is the result:

It uses fancy blending math to play around with the alpha, and the results are much more pleasing to the eyes. Shields are now a subtle thing that don’t distract from the awesome ship artwork, and yet when you hit them they light up so you still get a nice visual indication of what your shields are doing. Overall this is only going to be a drawback for people who want to make silly drawings with their shields, so I’ll have to come up with some new options for those people.

Explosions!

…and after all that Jan was like “why don’t you use additive blending on those explosion effects?” and I, being in the mood to do graphics stuff, proceeded to spend an entire day playing with the rendering code for not just explosions, but particles in general and also particle physics. Explosions however gained the most benefit from my attention and the new ones look like this (click for slow motion animation):

Click for animationIn addition to new animations, I worked real hard to get chunks to go flying when you blow things up. Not only do explosions break ships into small pieces, but afterwards they knock back everything nearby for some nice cinematic effects.

Click for animationFinally, when you put it all together it looks like this: (Note that I made the ship interiors yellow by filling them with conduits, it shows off the damage quite well I think)

ExplosionsScene