Will it belong to Svo in the future?

Source: Internet
Author: User
Document directory
  • Voxconfiguration
  • Sparse voxel octree
  • Cone Tracing
  • Speed
  • Space occupation
  • Dynamic Object
  • Kdtree?
Reprinted please indicate the source for the klayge game engine, the permanent link of this article is http://www.klayge.org /? P = 2007

In the just-concluded Siggraph 2012, the sparse voxel octree (Svo) proposed by Cyril crassin is extremely popular. Almost every course and talk involving real time rendering inevitably mentions Svo. In addition, ue4 will adopt Svo and idtech6, which has long been said that Svo will be used, and it is even more helpful. So what is Svo and what problems can it solve?

Svo introduction voxconfiguration

The traditional mesh is represented as elements in the units of triangles and quadrilateral. In Svo, elements are simpler and more discrete voxel. Each voxel has its central location, size, and other information, but it does not need to consider the topological relationship between them. It is also easy to calculate all kinds of transactions. The process of converting from mesh to voxel expression is called voxelization.

The voxelization method is also gradually developed. From the CPU-based method to NVIDIA layer-by-layer rendering method, on Siggraph Asia 2010, michael Schwarz and Hans-Peter Seidel's paper "fast parallel surface and solid voxregistration on GPUs" can directly break a mesh into voxel in a pass. After improvement, the speed of decomposing an Stanford dragon is within 5 ms, which is quite efficient.

Sparse voxel octree

Voxel expression also has its weakness, mainly because it is inconvenient to store and access. If voxel is used for intensive storage in the entire scenario, the required space is amazing. For example, in a x512x512 resolution scenario, there are a total of MB voxel. If each voxel has a 32-byte attribute, the scenario can easily break through 4 GB. It is unrealistic to directly exist in the video memory. Therefore, sparse voxel octree needs to be introduced here. By storing the voxlization result on the octree node, you can skip many empty areas in the scenario and reduce the space consumption to 200 MB-1 GB. At the same time, because of the hierarchical structure, the access only needs to traverse a branch, and the speed can also be improved.

By implementing a full set of octree maintenance operations on the GPU, octree can delete nodes completely on the GPU without the help of CPU. In this way, it takes 70 ms to create a scenario for the first time, and 4-5 ms for each update.

Cone Tracing

After octree is ready, cone tracing is required for rendering scenarios. Ray Tracing emits a ray for each pixel. After reaching the surface, it returns a new ray Based on BRDF reflection and refraction. Similar to this, cone tracing only replaces Ray with a cone. With the Svo data structure, irradiance can be first cached in REE, and view pass only needs to be gather.

Issues that can be solved

With Svo + cone tracing, many real-time rendering problems that have been difficult for a long time can be directly solved. Such as soft shadow, area light, multiple lights, Multiple Bounces Global illumination, glossy reflection, refraction, AO, and so on, there is no need to use different methods for hack, you only need to perform tracing once.

In addition, through some prefiltering of Svo, you can also complete the film-level depth of field, level-of-measure, and anti aliasing. Even different from the previous technology, in the Svo framework, fuzzy representation is used to calculate the intersection with the coarse-layered node of the tree, while ignoring the nodes at the reef Creek level, this means that the Blur is faster! For some physical effects, such as smoke and cloud, you can also modify the cone tracing.

Some other interesting applications include: Saving Signed Distance field to Svo, procedural content creating and destruction scenarios can be implemented; using Svo as a bake light map tool; collision detection can also be easily put into the Svo framework.

In general, few technologies can use the same framework to solve so many problems in so many fields at the same time. From this perspective, Svo is indeed very effective.

Challenges

Of course, Svo is not omnipotent, and there are still some restrictions under the current hardware and software conditions. Let's take a look at some of the challenges Svo faces.

Speed

For real-time rendering, speed improvement is an eternal topic. Although the speed of Svo + cone tracing can reach 70 FPS in the demo, it is far from enough for a large system like games. This is one of the reasons why both ue4 and idtech6 are positioned for future hardware. Here, the common optimization is to use a hybrid pipeline: the traditional method of rendering direct lighting (both forward and deferred can), and Svo is responsible for Indirect lighting. In Indirect lighting itself, ue4 also uses the same multiresolution method as klayge 4, which can increase the speed by 2 to 3 times.

Space occupation

To express ultra-large scenarios as Svo, the occupied space will still be huge. Fortunately, Svo is very suitable for streaming. It can dynamically load required nodes with perspectives and other factors, similar to virtual texturing. The method described in idtech6 is similar to this.

Dynamic Object

No dynamic object is not a game. If all objects exist together, if some objects need to change every frame, it means that the whole scenario needs to be re-voxation ation and re-built, with a high overhead. Here, the ue4 improvement method is very direct. Dynamic Objects and static objects are placed on two Svo respectively, and static objects are only created once. Dynamic voxation ation and part of the tree are updated after the change.

For a deformation dynamic object, you can use shell texture to establish Svo on the object surface. Each frame can be translated, rotated, or scaled down based on the deform object, while the content of the Svo remains unchanged.

Kdtree?

For tracing, kdtree is often more balanced than octree, but it is more complex to create a kdtree on the GPU. Therefore, it is not possible to use kdtree instead of REE for data storage and tracking, which becomes svkd.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.