SakeTami
DORFteam
DORFteam

patreon


End of April Update - Better methods for smoke and fire

Hello everyone,

This month was mostly spent figuring out a way to improve the game's visual effects, specifically in the area of smoke, explosions and clouds of dust and similar things. Originally, most of these used either stock videos digitized into sprite animations, or were fluid simulations created in Maya. While these look fine in an otherwise 2D game, the addition of dynamic lighting and Z-sorting has led to some problems. Making sprites from canned videos doesn't allow us to generate Z-data or normals, and similarly, Maya's fluid sims don't generate them either. The solution we've found, is to still create these effects in Maya, but using 3D models of clouds, animating them using deformers, and applying a volumetric shader to them. While applying a volumetric shader doesn't allow normals or Z-data to be generated, if this shader is replaced with a standard shader, these types of data can be rendered, meaning that it's just a matter of doing 2 separate render passes.

What's even the point of this? The main problem is a lack of Z-depth results in an odd billboarding effect, where part of the explosion or cloud will be cut off at the bottom (as it is essentially clipping through the ground), and will often render under or over objects in a really unnatural way. This is not as much of an issue for fire and explosions, where it's easier to fudge these values (this is basically what all old 2D RTS's did), but in the case of a game that technically uses a 3D world, this becomes more of a problem for effects that aren't self-illuminated, such as smoke and dust, where the clipping issues are not only more noticeable, but also the lack of normals data means these clouds can't actually be lit or shadowed dynamically. While an older method just involved fudging these values by just creating an animated 3D sphere that roughly corresponds to the shape of the explosion or cloud, and generating the relevant data from that, this new version is far more accurate and better in every way.


Here's a look at one of the explosion/cloud models. It looks like nonsense, but when the shader is applied, the result is what you are seeing ingame.


Not only do the dust clouds receive lighting from that central source, but also receive shadows cast by the tank in the middle.

While these clouds might be toned down (as they are quite thick and may be a little too distracting during gameplay), reducing the alpha value of the color palette for the cloud is a quick and easy way to make it more transparent and fitting for when vehicles drive over surfaces that may not kick up as much dust.



Explosions effects also look great in this system. As you can see, explosion effects are often a mashup of different layers, with separate sprite animations for the fireball, smoke, dirt, dust cloud and the pieces of debris, which also have their own fire and smoke trails. Splitting it up this way adds more variety, but also is necessary for the different lighting values that certain visuals have; since fire and explosions are self-illuminating, they have to be designated as such, as well as given an alternative blendmode, while non-self-illuminating assets like smoke and dust use different values.

Above is a good demonstration of how smoke and dust can catch shadows, making for a cool layered effect. As you can also see from the above gif, fire is a proper mechanic in the game now, with certain weapons and explosions creating patches of fire, which are hazardous to units that move over them.

Obviously the flamethrower effect leaves something to be desired. We're working on a retooling of the way projectile effects work that will allow for far more options and will allow for more flexible effects design, versus how rigid the system is now (for example, the way it works now, projectiles can only have a single effects trail, contrail, etc).


Fire also works by essentially existing in stages, with larger fire "units" slowly degenerating into smaller fires, which deal less damage, until eventually a fire reaches its smallest form, and will fade out of existence when it fully deteriorates.


Trees and vegetation will also catch fire and burn away, and will spread their fire to nearby trees if possible. Currently this is done via a somewhat hacky method and so doesn't look quite right, but the principle is still there. We'll also need to find a way to alter certain terrain tiles whenever fire has spread on it, such as making it so soil and grass tiles become a burnt terrain tile if there's been a fire.

We also have some new units, and redone art for old units.





The Warband will get flamethrower turrets, which must be fueled to fire. Connect them to fuel or oil pipelines, or have fuel trucks deliver these liquids to them, to allow them to fire. You can position them behind walls, allowing them to fire over them while remaining fairly protected.

The collective Tesla Armature. While not as defensible as the Empire's equivalent and lacking an MG, it is faster and has a more deadly attack. Must be operating within range of a power generator, though power generators will be mobile to be able to keep up with your Tesla units.


The Collective Tesla Coil. While dealing extreme damage to most units, the chargeup process and the fact it needs to deploy to fire means it's not ideal against fast moving targets.


We also have Avian Cavalry for the Empire. They are nothing special as an attacker, but very useful as an early game scout, especially since the Empire lacks fast moving units in general.

That's all for this update. We hope to get a little more done with the fire mechanics and visuals (among other important things) so that we can make a short video better demonstrating those systems.

As always, thanks for the continued support.

Comments

The digging function isn't in the game yet. Programming-wise we've been focusing more on implementing new visual updates and fixing up the airstrikes/air support logic.

Henske

finally got around to subbing to the patreon, im so excited for this game

Uneuclid

Amazing looking update. A bit off topic but is the digging function already in the game? And how will it affect gameplay? I would really love to be able to use it to set up ambushes and surprise the enemy. Are there any more concepts for terrain manipulation?

Vincent Bauer


More Creators