If you were wondering how far you can push Unity grapics-wise, here’s the answer:
Real-time lighting, no lightmaps. Dynamic light and geometry.
If you were wondering how far you can push Unity grapics-wise, here’s the answer:
Real-time lighting, no lightmaps. Dynamic light and geometry.
Hi *,
This is our master thesis on Real-Time Rendering and Interactive Configuration of Apartments, on which we worked together with Kuba.
In short: real-time global illumination via instant radiosity and deferred lighting.
From the Abstract:
We present a method for high quality, real-time rendering of apartment interiors, illuminated with dynamic light and under the conditions of changing geometry. The complete lighting solution is composed of a number of techniques (area lights, indirect illumination, direct highlight) working in conjunction with a global illumination algorithm based on virtual point lights. Rendering of hundreds of lights at real-time frame rates is enabled by a deferred lighting pipeline, decoupling scene and lighting complexity.
We demonstrate, that the described solution allows the user to interactively modify geometry (customisation of the apartment’s layout) and lights (e.g. time of day modification). We also suggest an acceptable degradation method enabling the same lighting quality on slower machines.
The prototype has been developed in Unity of course, and you’re welcome to try it out (it has quite high hardware requirements, though).
The thesis itself has been written in a form of a short article – a recommended read if you’re interested how the technique works.
(Note: the prototype has been developed in an yet unreleased Unity version 2.6. This is why we’re not posting the project files yet, nor the web player build, which is actually our target platform.)
All the resources here:
robert.cupisz.eu
kuba.cupisz.eu
Not bad! Although I get sad by these kind of things when I realize they’re not feasible in games yet. ![]()
who said you can’t use it in games. how about “spot the error in the picture” games? ![]()
Some antialiasing would be nice.
This kinda stuff works just fine for games. Several important studios have licensed both Lightsprint and Enlighten. Glad to see work being done on this. I was going down that road last year until our funding went poof.
Nice. I don’t have any technical knowledge on what exactly this method is supposed to achieve; reality, feasibility etc, but the back corridor and what looks to be the closet are way too dark in such a short range.
Does it run any better for Unity 2.6, or will you be improving it significantly? My GPU (which, for a crude comparison, handles Crysis fine at mid settings; perfectly playable) just produced tearing and artifacts due to overheating ![]()
Exposure settings come to mind to really do it properly. But the lighting I see there would be more than sufficient if you chose a slightly grungier enviroment (make those walls brick or rock, make the ground concrete).
The easiest way to hide cheap lighting is with additional edge detail, makes it a lot more difficult for the brain to pick flaws in lighting. So straight away, if you made the floor into tiles, it would instantly be more believable, etc ![]()
Wow that is pretty amazing. Really good quality.
It was really cool to move the walls around and see how everything adjusted. It wasn’t real-time enough for a FPS or anything on my MBP, but it sure shows potential.
That’s amazing stuff! Says one who’s used to bake global illumination into textures with mental ray and it can take hours to render. Global illumination in realtime that’s the future someday!
I’d say reality and feasibility on the hardware from 1,5 years back.
Anyways, I think you’re not taking into consideration the fact, that your brain is cheating you a lot when seeing such a setting. This result is close to what you would get when running around the place with a camera set to a fixed exposure. Of course eye accommodation technique could be future work.
No and maybe. When you run the standalone, you’re technically running 2.6. As for the improvements - let’s first take some holidays and think afterwards.
Sure, cause rock and concrete are just the default materials in one’s apartment. On a more serious note though, we have chosen to present the apartment as it was shortly after it has been built. Walls are covered with smooth plaster to show what is the real quality of lighting that can be achieved. Using high frequency textures that would cover any flaws in the lighting would just be cheating.
That’s the most expensive cheap lighting I have ever seen! ![]()
Its nowhere near the most expensive lighting you’ve ever seen… It’s the most expensive realtime lighting you’ve ever seen ![]()
Having pipelined architectural previs into both Source and Unreal Engine, I totally appreciate real time application of globals… Since with Source you hit ‘build’ and pray it does a decent job with its ‘dumb’ rays, and Unreal is a baking nightmare ![]()
Runners on the ceiling and floor around those walls would totally help ‘ground’ it all (perhaps a necessary evil in the absence of ambient occlusion).
So, now the question everyone wants… can you do realtime caustics? ![]()
(I’m aware there is nothing physically accurate about AO but it usually is extremely helpful in adding that extra 5% of realism).
Great work guys,
Is there anything preventing this from being applicable to any interior scene (An Aztec temple perhaps?) and with animated characters.
Can you kindly post an executable file with anti-aliasing and the ability to launch full screen at any selected resolution (Like normal unity projects)
Thanks for all your comments!
I’m running it on a unibody MBP, and it’s quite smooth (but nowhere near fast enough for an FPS, of course). Some detailed performance timings are discussed in the article, but they’re for a desktop geforce 8800. I might post some timings for a mobile geforce 9600M later on.
Well, lightmap baking within Unity is coming sooner or later, so stay tuned ![]()
We were thinking about adding SSAO to the effect, but there’s no point. Plain SSAO (or any other AO) just looks like dirt, as it does not respond to lighting changes (we comment on that in the article). It only looks plausible, if you’re rendering a sewer control room ;>
SSDO on the other hand might positively contribute to the final effect, but it probably wouldn’t be all that visible.
Sure. There are some really clever image-space techniques fast enough to be suitable for real-time apps and could be integrated into our pipeline. If you’re interested, read on: Caustics Mapping
There’s nothing physically accurate about any CG technique. AO is yet another approximation pushed one step away from realism towards the ease of computation.
Aztec temple should work just fine. You have to remember though, that the bigger the scene and the more sub-areas it is composed of, the more VPLs you’ll need. As we write in the article, some other techniques have to be applied to render more VPLs at high-enough frame rates.
It also depends what’s ‘high enough’ for you. Crytek is doing some experiments with global illumination in Cryengine 3 (A bit more deferred) - more details will be presented this week at SIGGRAPH. So global illumination might fast enough for shooters pretty soon. Never on Intel 945, though ![]()
Heh, anti-aliasing doesn’t work with deferred rendering out of the box, but there is a number of ways to implement it. Also, the application is fill rate bound of course, so the higher resolution you run it in, the higher frame times you’ll get.
Once Unity 2.6 is released, we will publish the project files and you’ll be very welcome to experiment with your own setups and scenes. The only reason why we needed 2.6, is that the rendering pipeline requires 16-bit precision render textures, which were not available previously.
OMG ! Yet another great feature coming to Unity… can’t we take a little pause, please ? just kidding, I want it so bad ! ![]()
If it looks like dirt you’ve got it too intense and too wide, needs to be tightened up and most likely halved.
When doing it for ads or archviz, I typically produce a separate AO pass (which is multiplied over the final comp) and a seperate set of mattes for glass (so I can remove AO on glass, where its definitely not appropriate).
Try not to think of AO’s on walls, think of it under couches or in areas where there’s tightly bunched geometry, because that’s where it becomes worth its weight in gold ![]()
Exactly, no AO on walls and that was my original point: we excluded AO from our specific scene, where it would look like dirt.
In deeper creases, folds or holes I agree AO is invaluable, as these areas should be darker regardless of the lighting conditions - but we didn’t have any of those geometry features in our scene.
I understand your scene had to be in a controlled environment but did you think of bringing textures into play? Does the color bleeding take the solid color of the object or can it also calculate it based on the texture.
Where’s the webplayer?!?!
foam
The colours on the walls already come from textures, and of course we are sampling the colour from an appropriate mip level not to be fooled by high frequency colour changes. So you can stuff any texture on any surface and the colour bleeding will update accordingly.
Please read more carefully. From Robert’s post and our websites:
“(Note: the prototype has been developed in an yet unreleased Unity version 2.6. This is why we’re not posting the project files yet, nor the web player build, which is actually our target platform.)”