Gorgeous Arch-Viz in Unity 5

February 24, 2015 in Technology

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.

Front-Huge
28
Under-16-10
Side
Redo1
Redo4
Redo5
TopShadow-16-10
Reflection probes
TopShadow2-16-10
Night5-Top
Shadow1
Night4-Corner
Indirect shadow penumbrae
Indirect shadow penumbrae

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:

Geometry
Real-time lightmap systems
Real-time lightmap texture density and UV charts

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.

Acknowledgements

A big thanks to Alex Lovett owner of shadowood.uk. He has been tirelessly stress testing the GI workflow from when it was in alpha. Also thanks to the Geomerics folks, especially Roland Kuck.

The following Asset Store items were used. SE Natural Bloom & Dirty Lens by Sonic Ether, Amplify Motion and Amplify Color by Amplify Creations.

Comments (28)

Subscribe to comments
  1. cmvrgr

    March 3, 2015 at 11:51 pm / 

    Is it working on mobile deviced ?

    1. Jesper Mortensen

      March 4, 2015 at 8:54 am / 

      No, not well. This was designed for desktop. Real-time shadows and all the post FX would be hard to achieve on mobile, although I’m sure we could get near. Last year we put together a mobile project using realtime GI: http://malideveloper.arm.com/demo-showroom/gaming/geomerics-transporter/

      1. Ori

        March 20, 2015 at 1:49 pm / 

        Do you use in both demos standard PBS or you have something special for mobile version?

        1. Jesper

          March 20, 2015 at 7:05 pm / 

          We use standard PBS in this demo. For the previous mobile demo we used custom handwritten PBS shaders since it was made before the PBS feature was ready. If we had made it today we would probably have used the standard PBS shaders.

  2. Knightoffaith

    February 28, 2015 at 11:48 pm / 

    Man, this looks really nice. Would love to see tutorials when Unity 5 comes out, as even looking at the blog posts on many Unity 5 features like those in lighting are quite beyond my reach. Granted, I don’t have much experience, but I would love to be able to walk through how to implement some of these great features from a basic level (or, relatively so, might need to learn some things beforehand as long as I can figure out what that would be).

    But, yeah, quite neat!

    1. Jesper

      March 2, 2015 at 12:05 pm / 

      The Learn team are doing a great job at creating tutorials see unity3d.com/Learn. There will be a great deal more coming that will spill the beans on how to get the most out of PBS/GI/RefProbes in Unity 5. The team has created some awesome content that will be shown at GDC, so stay tuned.

  3. Roman

    February 26, 2015 at 9:20 am / 

    Sorry, I do have some more questions :)
    1. Was a camera animation plugin used?
    2. And how did you achieve reflections on a floor and all objects in the scene? Is it a big ref.prob or a series of them?

    Thanks!

    1. HeliosDoubleSix of Shadowood

      February 26, 2015 at 10:29 am / 

      Several Reflection Probes with and without Box Projection, getting them to look good is an exercise in frustration but with enough fiddling it can get good results, theres a bunch of reflection tech coming that will add to the arsenal which I can’t wait for. Though I really want Aras’s Planar Reflection to be adapted to support roughness ( either overall or masked with a map ) or at least specular map for use with large floor/flat areas.

      No Camera Plugin, just anchoring to other objects so you can pivot the camera / rotate it around and a lot of curve editing, a bug in Unity allows you to drag the curves and handles while staying in a fixed place in the animation which helped a lot ( normally it would follow your edit ) that should be coming as a real feature at some point :-)

      1. Roman

        February 26, 2015 at 11:05 am / 

        Hi Alex!

        Thanks for your reply! It is very helpful.
        I will definitely share my project at some point with you. And yes reflection probes are a bit stressful :)) especial after 3d packages and traditional visualisation.
        Speak to you later.

        Cheers

  4. Roman

    February 26, 2015 at 9:14 am / 

    Hi there,
    It would be great to get an answer from Alex if possible. )

    I am working on something similar just now, but I wonder what effects/color correction was used, and was a dynamic aperture achieved or exposure is the same for dark and bright areas?

    Cheers

    PS the animation looks good!

    1. HeliosDoubleSix of Shadowood

      February 26, 2015 at 10:22 am / 

      The exposure changes from shot to shot with key framing, auto exposure is definitely something that is needed though; even in a rudimentary form, generally the exposure is only slightly adjusted by hand here.

      Posted Effects, Amplify Color with custom LUT done in Photoshop, Amplify Motio for motion blur, Vignette / Chromatic Aberration from Standard Assets, Sonic Ethers Bloom / Dirty Lens, a bit of Noise, and the two Ambient Occlusions included with the standard assets, Sonic Ether has a cool looking SSAO coming soon also but I could’nt get hold of it for this. Simple sustom exposure post effect to do the fade to black

  5. JDMulti

    February 26, 2015 at 9:05 am / 

    Really nice visualization with Unity 5. I’m really curious how all this is done and I can’t wait to ever get my hands on that scene somehow. Is there a slight chance we could access that scene for learning purpose? Might Unity use that scene for creating there GI tutorials? I would love to, because I’ve been playing with Unity 5, but didn’t get near that quality and I really want to know how he archived that by looking about everything. I know people that would kill to get there hands on such a scene…. ( looking around like… it wasn’t me ) ^_^

    1. JDMulti

      February 26, 2015 at 9:07 am / 

      btw, that light from the robot probe, is that IES support or just a light cookie?

      1. HeliosDoubleSix of Shadowood

        February 26, 2015 at 10:32 am / 

        A custom Light Cookie that I spent way way too much time on ;-) IES in some form or another is coming I think, but how useful they will really be I don’t know as they are hard to edit, and they are infinite fall off so they have can’t be done 100% real for performance reasons, better to have a tool that turns a IES light into a 3D Light Cookie and allows you to edit it, but yes Cookies do quite a good job of getting most of the look of a IES Light, just takes patience in making a good map.. a lot of patience :-P

        1. BravoMoshe

          March 4, 2015 at 9:09 pm / 

          Hey,

          Awesome work!

          Any chance you would be willing to share your light cookie?

  6. Andy

    February 25, 2015 at 9:58 pm / 

    It looks very nice, as if it were animation cells created by Walt Disney Studios in one of their visions of what future civilizations might look like.

  7. James Griggs

    February 25, 2015 at 7:19 pm / 

    The youtube video is nice, BUT isn’t the point that this is realtime? Is there a webplayer or something to see this in realtime?

    1. SouldomainTM

      February 25, 2015 at 7:32 pm / 

      I would like to have a webplayer, too. And my GPU is already running away and hiding under the bed. :D

    2. Jesper Mortensen

      February 27, 2015 at 7:34 am / 

      As discussed in the post the resolutions were set so high that updating all the pixels leads to a lighting framerate that is interactive and not realtime. However, as the lighting is running asynchronously it does not affect the rendering framerate much, and this means that Alex was able to use a very nice lighting workflow for authoring the demo. Once we add scheduling such that we only update the visible parts of the scene we will be able to get this running in realtime.

  8. Arav Singhal

    February 25, 2015 at 6:19 pm / 

    I have the Unity 5 RC, and I too have got amazing results. But I have two problems with the rendering system, the first is that Realtime indirect shadows for point and spot lights aren’t yet supported. I know that it might not seem that important, but in many cases you can see artifacts like light at the corners of walls. Second, and I think the worst issue with Unity 5 yet is the reflection probes. The reflection baked by then it’s only good if the camera is at the origin of the reflection probe, but otherwise they look really bad. A workable hack is to set the reflection probe type to custom, and using scripts from the community (also available in my free Asset Realtime Reflections) to render a cubemap from the camera and assign it to the reflection probe. And I just remembered, the Resources folder in Unity 5 RC1 seems to have no effect, which means Assets like Shadow Softener don’t work at all! I will file a bug report tomorrow. Shadow Softener or its alternatives are a must for me.

    1. Kuba Cupisz

      February 25, 2015 at 10:22 pm / 

      Arav, the hack for the reflection probes that you mention might work for your specific use case, but it’s not something you should generally recommend. In general reflection probes are great for two setups: 1. objects reflecting environment that is assumed to be infinitely far away (say, a car reflecting the sky), 2. objects reflecting the environment that is assumed to be placed somewhere on the faces of the box gizmo (say, floors and walls of a room, cause rooms are typically cuboid). For the second case you need to enable box projection on the Reflection Probe component.

      Screen space reflections can improve a bunch of cases not handled well by the current system. More on that in the near future.

  9. imaginaryhuman

    February 25, 2015 at 4:36 pm / 

    Very nice. I wonder how long before someone makes a movie using Unity?

    1. Nicolas Musset

      February 25, 2015 at 7:59 pm / 

      That’s already been done.
      See for yourself: https://www.youtube.com/watch?v=YdNdEuU30m4

      1. James Griggs

        February 25, 2015 at 8:46 pm / 

        And that was only Unity 4 :)

      2. Andy

        February 25, 2015 at 10:01 pm / 

        Wow, that music was annoying and didn’t help the convey the tension of the protagonist at all.

      3. SouldomainTM

        February 26, 2015 at 6:11 am / 

        Again no webplayer. :(

  10. koblavi

    February 25, 2015 at 4:27 pm / 

    Nice work! I’ve been following his posts since the early days. I’ve been testing out unity 5 (GI features especially) for a game I’m porting to IOS and early results look pretty stunning.

    “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.”

    This is definitely a must have. I hope it comes early enough.

    Awesome work with Unity 5!! can’t wait for the final release!
    Question: How soon before we can start playing with (true) multithreaded scripting?

    1. René Damm

      February 25, 2015 at 6:47 pm / 

      Question: How soon before we can start playing with (true) multithreaded scripting?

      There are no plans ATM to make the entirety of the Unity API thread-safe as we don’t think that is a good approach to the problem. Of course, on a case-by-case basis, it can make sense for specific APIs.

      There are, however, plans/thoughts/ideas to provide increased opportunity for jobifying scripted logic and running those jobs on Unity’s own job system.

Comments are closed.