Jump to content

Real-time Global Illumination: Introducing Latency


Josh

1,723 views

 Share

Since previously determining that voxels alone weren't really capable of displaying artifact-free motion, I have been restructuring the GI system to favor speed with some tolerance for latency. The idea is that global illumination will get updated incrementally in the background over the course of a number of frames, so the impact of the calculation per frame is small. The new GI result is then smoothly interpolated from the old one, over a period of perhaps half a second. Here's a shot of the restructured system sort-of-working, at least it's writing to and reading from the correct textures, though the lighting is not correct here:

Image1.thumb.jpg.0f476fea953ceadb92279c67926a62ca.jpg

Diffuse lighting gets calculated for each voxel, for each of six directions, so the final scene render just takes the normal and uses the dot product to figure out which GI samples to use in the voxel that point intersects. This greatly lightens the load of the final scene render, since it no longer has to perform several costly cone-step rays. Since specular reflection is view-dependent, that part must be ray-traced in the final scene render, but there are some optimizations I have yet to make that will probably double the framerate here. My best estimate right now is that the GI system reduces framerate by 30% when enabled, and that it's not really dependent on scene complexity. In other words, as the scene gets more objects, the performance cost should stay about the same, and we have already seen that Ultra Engine scales extremely well with scene complexity. So everything looks very good.

From what I have seen, real-time global illumination is the killer feature everyone wants. Spending a few extra weeks on this to get a better result makes sense. I don't think I've ever worked on a feature or system that required so much iteration. I get the system working, start using it in different scenes, testing performance, and then I realize what needs to be different. With this feature, that process seems very extreme, but I really think this is the last restructure needed to get the best result possible for your games. Delivering real-time global illumination while maintaining fast framerates is very much inline with the design goals of Ultra Engine.

  • Like 5
 Share

5 Comments


Recommended Comments

Here you can see one single ray working. A sharp image of the dragon appears on the wall, and the floor is visible reflected off the bottom of the dragon's jaw. This will be expanded into many rays for smooth diffuse GI:

drag.thumb.jpg.4638fc9a80416b1ea0ca2b7ff41e8c44.jpg

Since I will only updating a little bit at a time each frame, instead of three large cone step rays I will be using many small ones, maybe 16 or 32. This is sort of halfway in between conventional path tracing and cone step tracing.

  • Like 1
Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...