Home // Blog // Dev Update 9/14/2018

Greetings Wardens

Happy Friday! In this week’s update, we cover some additions with the Modular Defense Satellites, and going forward with replacing “Cascade Shadow Maps” with “Raytraced Distance Field Shadows” (New way of dealing with shadows on such a massive scale).

Modular Satellites Progress

These unmanned automated devices that can be deployed anywhere in orbit around the planet are now being setup to with modular sections so they may be equipped with Weapon ports, Sensor Suites, Mag Drive Navigation signaling or what ever equipment you see fit to install. Suit up a Satellite to be an automated defense platform, or a forward detection device. And with unlocking new technologies via research, you will even be able to upgrade different components such as the Solar Panels to help recharge the batteries on board.

Satellites equipped with weapons will automatically engage meteors or enemies that fly within their engagement ranges (much like the Fleet Groups) but are unable change from their deployed position unless redeployed. These make for great cheap assets for defending strategic areas or providing automated cover over cities/countries that you wish to provide more protection over.

With these satellites, we also want to look at gameplay related to orbit paths with them. We were thinking rather than have the Satellites be set in geostationary orbit that setting orbit paths for Satellites will make for a more dynamic setup of these defense Satellites. But we leave that question up to you all. Would you like to see these Satellites be deployed to include an orbit path around the planet?

Related image

New Shadows Method

While we were working on the Mega-Meteors for the Alpha, we came across an issue with Unreal’s default Cascade Shadowmaps. Since our game has nothing but dynamic actors and massive environments with empty space, it only makes sense to setup the lighting and Shadows to be all dynamic shadows and not rely on Static Shadows as we have a dynamic Time of Day. With that said, the generic method of dynamic shadows is “Cascaded Shadowmaps” (or CSM for short). This method is great when you have smaller actors within a close range to the camera and are also within the frustum of the camera, but not good for both large and small objects at odd angles to the camera (which we will get into).

However one specific issue we discovered with CSM within Unreal was that there’s a World Position limitation on objects that exceed ~22km from origin and stop casting their shadows!!

We thought it was odd for awhile that outside of this range (especially relative to our scaled Earth) that we weren’t seeing any self shadows on our ships or asteroids. This was further confirmed when we were attempting to make certain that the innercaves of the Mega-Meteor were dark, but weren’t since light was bleeding in since the CSM wasn’t active.

Thinking it was the Directional Light from the Sun, tried with other lights, but they too had CSM distance limits for the shadows as well.

Enter Raytraced Distance Field Shadows (RTDF)

https://docs.unrealengine.com/en-us/Engine/Rendering/LightingAndShadows/RayTracedDistanceFieldShadowing

Enabling this new method of Shadow casting allowed us to go well beyond the 22km limit of CSM and use it on our vessels in our massive level!

(Left = Non-working CSM, Right = RTDF with Shadow Proxy)

(Left = RTDF with Shadow Proxy, Right = Non-working CSM past 22km)

The best part about the RTDF method now of shadows is allowing for shadows to be cast regardless of having the object in the camera frustum! For instance in this scene, I have both an asteroid and the Helios casting a shadow on this Mega Meteor.

But moving the Camera past these two objects, CSM wouldn’t continue to calculate making these shadows, but RTDF does!

This is now great news for us as we can now get a proper shadow casted on both self shadows and also onto other objects in our massive level. With the proper self shadowing now as well, we can properly have the caverns of the mega meteor dark (and full of terrors!)

However, with RTDF, there are still some drawbacks that we discovered.

1 – The shadows only seem to work on Static meshes (not animated skinned meshed). This means that we will need to go with a Shadow Proxy solution when it comes to the Ships/Aliens and other animated objects, and have those proxies follow the bones of the mesh in order to be as close as possible to what the shadows would be. We have already tested this method on a few ships and the results work out with little issue.
2 – We have discovered there is an upper limit of size of object that can utilize RTDF.

There are two issues with scaling up meshes to huge sizes: 1) low effective resolution / high memory consumption because volume textures don’t scale up well, and 2) increased GPU cost during cone tracing because culling happens on a per-object basis and those huge meshes have to be traced by all surroundings. These affect both DFAO and RTDF shadows. By default there’s a cutoff where meshes larger than the threshold will be excluded, you can change this to whatever you want. float GAOMaxObjectBoundingRadius = 50000; TEXT(“Objects larger than this will not contribute to AO calculations, to improve performance.”)

https://answers.unrealengine.com/questions/331393/dfao-on-large-scaled-objects.html

We confirmed this by taking a 1 meter diameter sphere and scaled it to 1 KM (500 meter or 50,000 Unreal Units radius).

This means that we will have a difficult time with larger objects such as Mega Meteors and Earth… And we don’t want to return to using CSM on the Planet as well as with the massive distances for CSM and the camera frustum angling only slightly and you’ll see tears quite easily.

However, all is not lost. As was answered by Epic staff, this “GAOMaxObjectBoundingRadius” float value can be changed in code (I wish it was exposed) and allow us to take larger objects into account like Planet Earth. At the moment with the limited number of objects in orbit around the planet, we barely see a memory jump (40mb) with all actors included. We will take a look at this next week to see how much of a memory jump adding a massive object like the Planet is. If all else fails, we’ll look at making a segmented object to provide the shadow proxy for the Mega Meteors and the planet.

For now, enjoy some new screenshots of the new shadowing!

We thank you all for your continued support! We’ll see you next week!

– Polar Zenith

0 Comments ON " Dev Update 9/14/2018 "

Subscribe to the Solar Warden Newsletter

Solar Warden on Social Media

Facebook

Twitter


YouTube


Reddit

Join Live Chat on Discord

Solar Warden on IndieDB

Solar Warden

Polar Zenith Copyright © 2022 Polar Zenith, LLC. All Rights Reserved.