@Heliosdoublesix does Arch-viz with realtime Global Illumination
Is it possible to dial up the quality level in Unity 5 high enough to make high-end architectural visualizations?
In response Alex Lovett aka @heliosdoublesix built this gorgeous architectural visualization demo in Unity 5.
It makes good use of the real-time global illumination feature, physically based shading, reflection probes , HDR environment lighting, the linear lighting pipeline and a slew of post-effects all in order to achieve the necessary visual fidelity expected in an architectural visualization.
The aim was to push for quality, so very high resolution textures were used and the model has just over 1 million faces.
There is no baked lighting in this scene
The first part of the demo has a fast moving sun. The second part has more localized lighting; a spot light from a fellow maintenance robot lights up the environment in addition to the headlight of the robot the viewer is piloting. In both parts there is considerable environment lighting.
Due to how the scene is laid out, there is a lot of bounced lighting and also quite distinct penumbrae caused by indirect lighting. For example, the v-shaped columns cast a very sharply defined indirect shadow onto the ceiling, which is especially visible in the night time part of the video.
Using high resolution real-time lightmaps
When the lighting changes, these penumbrae and the overall lighting gradients have to change significantly. In order to do this with global illumination, the Enlighten powered real-time lightmaps feature was employed. Traditionally, Enlighten is used in-game at relatively low resolutions (1-2 pixels per meter). This works well because the bounced lighting is generally quite low-frequency.
In this demo, a much higher density is used to capture the fine details in the lighting. An overall density of 5 pixels per meter was used. There is about 1.5 million texels in the real-time lightmaps in total. In the resolution screenshot below you get a sense of the density in relation to the scene size.
At this resolution, the precompute time spent was about 2.5 hrs. The scene is automatically split into systems in order to make the precompute phase parallelizable. This particular level was split into 261 systems. The critical path through the precompute (i.e. the sum of the most expensive job in each stage along the pipeline) is about 6 minutes. So there are significant gains to be made by making the precompute distributed. And indeed going forward, one of the things we will address is distribution of the GI pipeline across multiple computers and in the cloud. We will look into this early in the 5.x cycle.
See geometry, GI systems and real-time lightmap UV charting screenshots from the Editor below:
Interactive lighting workflow
Once the precompute is done, the lighting can be tweaked interactively. Lights can freely be animated, added, removed and so on. The same goes for emissive properties and HDR environment lighting. This demo had two lighting rigs; one for the day time and one for the night time. They were driven from the same precompute data.
“I’m able to move the sun / time of day and change material colors without having to rebake anything. I can play with it in real-time and try combinations out. For a designer like me, working iteratively is not only easier and faster, but also more fun,” says Alex Lovett.
Lighting 1.5 million texels with Enlighten from scratch takes less than a second. And the lighting frame rate is decoupled from the rendering loop, so it will not affect the actual rendering frame rate. This was a huge workflow benefit for this project. Interactive tweaking of the lighting across the animation without interruption drove up the final quality.
To make this a real-time demo, some rudimentary scheduling of updating the individual charts would have to be added, such that visible charts are updated at real-time, while occluded charts and charts in the distance are updated less aggressively. We will look into this early in the 5.x cycle.