Voxel GI: Environmental Fill Lights

Started by
6 comments, last by Butabee 11 years, 6 months ago
So everyone's really excited about voxel cone tracing, a realtime raytracing alike that EPIC is attempting to make work in Unreal Engine 4: http://www.unrealengine.com/files/misc/The_Technology_Behind_the_Elemental_Demo_16x9_%282%29.pdf

Right now everyone that's tried this, Nvidia and Epic, have only used it for tracing bounce lighting. But what you're doing is tracing the entire environment, and since you're already doing that, why not use the rest of the information you're getting as well?

Now I know that you can do ambient occlusion with this, but I was wondering why you wouldn't just replace an ambient term (assuming you had one) with an environmental one? Have the entire environment cast light onto itself, you'd get directional colored lighting for free! Turns out Pixar was ahead of me: http://graphics.pixar.com/library/PointBasedGlobalIlluminationForMovieProduction/Slides.pdf

They already use this for their GI, calling them "fill lights". Basically each voxelized point would act as if it was transmitting light, regardless of whether it was being directly hit by a light source (which you also add to the luminance). But you don't actually show this luminance in your final render. Instead you'd then cone trace into this and gather as normal, gathering luminance from everything, giving you free colored, directional light instead of only bounce light.

For a specular hack you could just have your specular cone gather the direct "radiated" color/luminance, maybe desaturated for the fill light value to emulate the reflection coming from bounced lighting.
Advertisement
i've been messing around with the same idea as in that Pixar doc. It's a little modified but it's the same idea. I'm using a simple BRDF of leaving light/incoming light, along with adding up directly lit colors.

I don't have any complex scenes to show but here's a sample version.

This is done on the GPU.



Also, here's the same scene turned into meta balls. lol.


Basically each voxelized point would act as if it was transmitting light, regardless of whether it was being directly hit by a light source (which you also add to the luminance). But you don't actually show this luminance in your final render. Instead you'd then cone trace into this and gather as normal, gathering luminance from everything, giving you free colored, directional light instead of only bounce light
Doesn't the Epic demo do this? They can just paint an emitting light source onto a wall, and it generates direct light and bounce light for the scene.

[quote name='Frenetic Pony' timestamp='1351033575' post='4993259']
Basically each voxelized point would act as if it was transmitting light, regardless of whether it was being directly hit by a light source (which you also add to the luminance). But you don't actually show this luminance in your final render. Instead you'd then cone trace into this and gather as normal, gathering luminance from everything, giving you free colored, directional light instead of only bounce light
Doesn't the Epic demo do this? They can just paint an emitting light source onto a wall, and it generates direct light and bounce light for the scene.
[/quote]

Well yes, but only standard glow map stuff; fire, lava, neon lights, energy producing stuff that you'd just normally get standard glow from. What this is, is to do that for everything, every solid surface is considered to be light emitting according to whatever artist defined level you want, but only for the purposes of cone tracing, you don't actually add this to the final target directly.

Instead you only consider it when you are cone tracing, and you are then picking up light from every surface, this creates a minimum amount of light for the final rendered image, assuming everything isn't black, much like an ambient term. But unlike an ambient term you are getting directional, colored information on everything, and with the hack mentioned specular reflections from every surface.

It's not physically based, at all, certainly. But then again neither is ambient occlusion really. Think of it kind of like the inverse of that actually. Ambient, environment based lighting.

Instead you only consider it when you are cone tracing, and you are then picking up light from every surface, this creates a minimum amount of light for the final rendered image, assuming everything isn't black, much like an ambient term. But unlike an ambient term you are getting directional, colored information on everything, and with the hack mentioned specular reflections from every surface.

Well, this already happens in the demo, doesn't it ? I'm refereing to the part of the animated hand where you can acutally see the hand reflection on the floor (=specular reflection).

The issue is, that voxels are really memory hungry (LVP with 3 LODs of standard voxel maps) or more calculation expensive and still memory hungry (sparse voxel in U4), therefore the resolution would be quite small for everything like a direct light term. We can currently calcualte the direct lit surfaces perfectly, so no need to take a step back, direct lit shadows are also ok, the current most missing feature are indirect light bounces which are approached by CE & U4.
Sounds pretty hacky. IMO a better approach is to feed back the results of your GI solve from the previous frame into the solve for the current frame. If you do this you can effectively get "unlimited bounces", and will look good as long as your solve actually converges. However it's probably too expensive for a voxel cone-tracing set up, since you use a different representation of your scene for rendering and tracing.

[quote name='Frenetic Pony' timestamp='1351052059' post='4993338']
Instead you only consider it when you are cone tracing, and you are then picking up light from every surface, this creates a minimum amount of light for the final rendered image, assuming everything isn't black, much like an ambient term. But unlike an ambient term you are getting directional, colored information on everything, and with the hack mentioned specular reflections from every surface.

Well, this already happens in the demo, doesn't it ? I'm refereing to the part of the animated hand where you can acutally see the hand reflection on the floor (=specular reflection).

The issue is, that voxels are really memory hungry (LVP with 3 LODs of standard voxel maps) or more calculation expensive and still memory hungry (sparse voxel in U4), therefore the resolution would be quite small for everything like a direct light term. We can currently calcualte the direct lit surfaces perfectly, so no need to take a step back, direct lit shadows are also ok, the current most missing feature are indirect light bounces which are approached by CE & U4.
[/quote]

Not as far as I know. From the hand demo, the original NVIDIA stuff, it's a double light bounce as I understand it. But maybe they did? I suppose you'd have to ask them. I know it's not done in the "Elemental" UE4 demo.


Sounds pretty hacky. IMO a better approach is to feed back the results of your GI solve from the previous frame into the solve for the current frame. If you do this you can effectively get "unlimited bounces", and will look good as long as your solve actually converges. However it's probably too expensive for a voxel cone-tracing set up, since you use a different representation of your scene for rendering and tracing.


It IS pretty hacky. But as you pointed out "Unlimited" bounces is going to be far, far too expensive for realtime. This on the other hand is essentially free. And hey, if it's good enough for Pixar, arguably the maker of the most gorgeous CG cartoons out their, then it's good enough for a game. Especially that "free" if you're doing the rest already part.
I think some more testing should be done with this. I don't want to spam this thread with my videos but I've fixed some problems with my version, and it looks pretty good.

I should be able to process GI from about 16k points for the roughly the same cost as 2k since I can process points from more than one constant buffer in one loop.

This topic is closed to new replies.

Advertisement