SakeTami
DORFteam
DORFteam

patreon


End of June Update - Shadows and Lights

Hello everyone,

 There are still some kinks that would need to be worked out, but we now are on the cusp of fully functional shadows cast from units and terrain, as well as individual point lights cast from units and map objects.

 As can be seen here, light emanates from a single point in the middle (where that glitchy candelabra object is) and the surfaces of the surrounded tanks are illuminated by it realistically. (note that the Heavy tank in the center is still glitchy with its depth sorting, hence the gun barrels rendering beneath the turret/hull. This will be need to be addressed at some point).

Point lights also have quite a few options, regarding color, intensity, and the degree of falloff. This can be adjusted per-lightsource in the map editor.

 

Here's a showcase of how the sun/moonlight differences look in relation to a point light source.

 

Note that in the above scenes, we are using specific objects like the Tesla Tank to cast light. The Tesla Tank emitting light like this probably isn't something we'll have in the final game, but it serves as a useful testcase.

Now onto shadows:

The shadow casting features are currently on a separate PR (hence why the units in the light showcases above weren't casting shadows), but it is nearly complete and will be merged shortly.

There is actually a distinction between how units cast shadows and how terrain casts shadows; units must use a 3D model to cast the shadow, though this model is totally invisible ingame, and is solely used for shadow casting purposes. Terrain utilizes the terrainmesh itself to determine shadows, hence why the shadows cast from the hills in the above gif are somewhat geometric looking (this does have some downsides but makes this process very simple, and so is very much worth it). The above gif also shows a few errors, such as certain tiles self-shadowing in an unrealistic way, but this will likely be fixed soon.

(Also, if you are confused as to what those weird discolored blobs in the above GIF are, those are all scrap pile sprites, which completely lack any depth/XY normals data, and thus are not illuminated by the sunlight correctly)

A substantial amount of work has also been done on the game's terrain system:

 

To avoid the terrain looking too blocky, I've devised a system of transitionary tiles, which smooth out the transition between one terrain tile shape and another. The result is 72 distinct transition tiles for slopes to give it a bit more realism. Without these transitions, terrain would look exceedingly geometric, not unlike the terrain in a game like Roller Coaster Tycoon.

For context, here's this same hillside but with the actual tile dimensions depicted by the terrainmesh:



That's all the updates for now. Of course, there still are a number of light related things that need to be updated; light flashes from explosions and muzzle flashes, spotlights, and also adding a deferred rendering system to massively optimize the lighting engine. These will likely be completed before the end of next month.

As always, thank you all for the continued support.

Comments

I can't wait to get so creative with this!

Rock Raider

Yes, just wrapping up some things before I make the update.

Henske

Vas sacar algo nuevo hoy?

Eduardo De Alba Cejudo


More Creators