Saturday, 16 November 2013

MIGS 2013:Umbra 3- How It works



This was from a presentation by Antti Hätälä, from Umbra Software, at MIGS (Montreal International Game Summit) 2013.

Intro

What do many next gen games have in common? Is the improvements over graphics, such as better shaders, higher textures and more polygons being pushed? Well yes, but almost all the next gen games use a powerful software called Umbra 3.

What is Umbra3

Umbra in some languages means shadow, a name similar to its purpose: occlusion culling. Occlusion culling is simply not rendering objects which the player does not see.  
Umbra3 is a middleware for 3D games, which specifically does this. Its true purpose is “powering up” level creation/ rendering saving game developers precious time and resources.

Why use occlusion culling

Using occlusion culling will save on A LOT  of memory, memory which you can use for many things. You can use this memory to stream better detail in the world, such as textures and models. Physics, and AI can have more leeway, allow for more enemies/objects. Most importantly is improved game performance, not just for the higher end PCs, but also for the lower end PCs and consoles.

 

Ways of doing Occlusion Culling Today(Pros and Cons) 

 

1- Use a set amount of geometry to act as a mask occluding the view of the player. This mask is easy for the developers to specify, and provides flexibility. However this can be easily desynchronized from the player’s view, and will result in many artifacts. A case of this would be when the user spins the camera too fast, the occlusion isn’t done fast enough, and/or creates artifacts.
2- Use of algorithms based on what is seen from the user’s perspective to determine what shouldn’t be draw. This doesn’t really on any 3D assets, and all on the code of the programmer. The major issue with this is that is non-automatic and is relies heavily on the CPU.
3- Use the portals and cells method, which involves pre-setting a bunch of rooms aka cells, and window aka portals. Nothing outside cell the user is in will be rendered, but only if the user looks through a portal. The issue with this one is fact this is only good for indoor environments, and cannot be applied to a large field. Also this involves the time consuming process of placing Cells and Portals throughout the finished level.
4- Finally there is the PVS method- (potiental visiblitly set). Basically it involves creating separate software to precompute what objects will be visible from any spot. Once the software is done, it is automatic, and generally artifact free. However the major issue is when you put in a large world, the PVS could take days-weeks to render. In short despite its flexibility in type of level, this method will limit the scale of the level.

How Umbra 3 does it 

 

Using Umbra, was explained to be a 2 step process 

First is the local step of precomputing a visibility map

This is a map of the whole level, which is done ONLY for non-dynamic objects. This map would be generated offline from separate software, and would be fed into the game prior to running it. The reason why this works well is the fact the map, no matter the size, is turned into voxels. This eliminates the issue of having high poly maps, and even large scale ones, while maintaining a good quality.
From here the software constructs the map, using portals and cells, using the following method. 
1- group together empty voxels 
2- Collect all the voxels within cells 
3-Gerate portals between cells   
4- remove portals not contributing to the occlusion 
5- extract the view location. 
After this you have a nice map which will give you the Tome of the Level.

 

Second there is run methods

There are many methods which the software uses at run to improve exsisting methods of Occlusion culling. Breath first traversal is done of the portals rather than recursive, so we don’t waste memory. The occlusion resolution isn’t rasterized, rather portals are rasterized. With this there is a 1-bit visibily maintained per cell when looking through any portal. The rasterized a depth buffer is used to determine the details of any object found in this buffer. This way objects can properly increase and lower in detail with their distance, if wanted from the game developer. Finally because the world is split into cells, you can stream in these blocks that are required for visibility queries.

 

Conclusion

In the end Umbra will reduce run time memory, allowing other processes to be done for the game. These processes can allow for greater emersion in the or even better performance. With this, artist can now put in more levels of detail within the level, while level designers have greater freedom with tool to create better levels. the target frame rates while enabling a new level of artistic freedom and rapid content iteration times for these projects

No comments:

Post a Comment