Tube Lights in Antigraviator
Published 2 years ago
What we learned from looking at the Adam demo.
While looking for a solution for volumetric lights in Unity I stumbled upon the „VolumetricLighting” git hub  which was created by the team behind the Adam demo. While we ended up not using the volumetric features, we do use the so called „tube lights”. In this article I’ll go over why and how we use tube lights in Antigraviator.

Lights, Lights and Tube Lights

Let’s start with why are we using it instead of regular lights such as a point light. One of the reasons is that while point lights have a small specular highlight, with tube lights we can achieve an elongated highlight on objects.

Ambient Tube Lights

Another possible way to use it, is as an ambient light. Depending on the situation you are in, the specular highlight that comes with it can be a blessing but also a curse. In our case it is a blessing as it can be seen on the city tracks, it gives nice highlights on the ship and on the track too.
Sometimes however, you just want a bit of ambient lighting without highlights. For example lighting up a darker corner in your scene or sometimes even for faking bounce light a bit. Of course this is not accurate at all and it has its limits but in some cases it can add to the scene. If the camera angle makes it possible or if you don’t have shiny surfaces tube lights are perfectly fine for this purpose especially since you can disable the source mesh that is emitting the light.
And finally it is a quite cheap solution for area light approximation as long as they are not overlapping too much.

Tube Light Drawbacks

This however comes with drawbacks which leads us to the cons of tube lights.
One of the biggest drawbacks is that it casts no real shadows. This can be somewhat resolved by using the shadow plane feature of the light, which limits/cuts off the light’s influence. You can use up to 2 shadow planes. It is extremely handy if you don’t want the light shine through walls for example. But for more complex shadows it is just not good enough.
Another thing that would be pretty useful is to be able to add a mesh as a shape for the light. This would open a bunch of possible ways to use these lights, one of them being neon sings for example. Another limitation tube lights have is that it only works in deferred rendering and it only affects object that are rendered in deferred.


As I said in the beginning we ended up not using the the volumetric feature but they look very good and it can add a lot to your scene especially if it’s an indoor scene so I highly suggest you to check out the git hub page and play around with them, especially since it’s free. In my opinion these assets together with the new Post-Processing stack were one of the biggest contributors to why the Adam demo looked so good.
Mike Coeck
Managing Director - Executive