Facebook Patent | Systems And Methods For Reducing Rendering Latency

Patent: Systems And Methods For Reducing Rendering Latency

Publication Number: 20200160587

Publication Date: 20200521

Applicants: Facebook

Abstract

In one embodiment, a computing system may determine a first orientation of a viewer in a three-dimensional (3D) space based on first sensor data associated with a first time. The system may render one or more first lines of pixels based on the first orientation of the viewer and display the one or more first lines. The system may determine a second orientation of the viewer in the 3D space based on second sensor data associated with a second time that is subsequent to the first time. The system may render one or more second lines of pixels based on the second orientation of the viewer and display the one or more second lines of pixels. The one or more second lines of pixels associated with the second orientation are displayed concurrently with the one or more first lines of pixels associated with the first orientation.

PRIORITY

[0001] This application is a continuation under 35 U.S.C. .sctn. 120 of U.S. patent application Ser. No. 15/954,530 filed 16 Apr. 2018.

TECHNICAL FIELD

[0002] This disclosure generally relates to computer graphics, and more particularly to graphics rendering methodologies and optimizations for generating artificial reality, such as virtual reality and augmented reality.

BACKGROUND

[0003] Computer graphics, in general, are visual scenes created using computers. Three-dimensional (3D) computer graphics provide users with views of 3D objects from particular viewpoints. Each object in a 3D scene (e.g., a teapot, house, person, etc.) may be defined in a 3D modeling space using primitive geometries. For example, a cylindrical object may be modeled using a cylindrical tube and top and bottom circular lids. The cylindrical tube and the circular lids may each be represented by a network or mesh of smaller polygons (e.g., triangles). Each polygon may, in turn, be stored based on the coordinates of their respective vertices in the 3D modeling space.

[0004] Even though 3D objects in computer graphics may be modeled in three dimensions, they are conventionally presented to viewers through rectangular two-dimensional (2D) displays, such as computer or television monitors. Due to limitations of the visual perception system of humans, humans expect to perceive the world from roughly the same vantage point at any instant. In other words, humans expect that certain portions of a 3D object would be visible and other portions would be hidden from view. Thus, for each 3D scene, a computer-graphics system may only need to render portions of the scene that are visible to the user and not the rest. This allows the system to drastically reduce the amount of computation needed.

[0005] Raycasting is a technique used for determining object visibility in a 3D scene. Conventionally, virtual rays are uniformly cast from a virtual pin-hole camera through every pixel of a virtual rectangular screen into the 3D world to determine what is visible (e.g., based on what portions of 3D objects the rays hit). However, this assumes that uniform ray distribution is reasonable when computing primary visibility from a virtual pinhole camera for conventional, rectangular display technologies with a limited field of view (e.g., computer monitors and phone displays). This assumption, however, does not hold for non-pinhole virtual cameras that more accurately represent real optical sensors. Moreover, current VR viewing optics (e.g., as integrated within a head-mounted display), provide a curved, non-uniform viewing surface rather than conventional rectangular displays. As a result, conventional rendering techniques, which are designed and optimized based on the aforementioned assumptions, are computationally inefficient, produce suboptimal renderings, and lack the flexibility to render scenes in artificial reality.

SUMMARY OF PARTICULAR EMBODIMENTS

[0006] Particular embodiments described herein relate to a primary visibility algorithm that provides real-time performance and a feature set well suited for rendering artificial reality, such as virtual reality and augmented reality. Rather than uniformly casting individual rays for every pixel when solving the visibility problem, particular embodiments use a bounding volume hierarchy and a two-level frustum culling/entry point search algorithm to accelerate and optimize the traversal of coherent primary visibility rays. Particular embodiments utilize an adaptation of multi-sample anti-aliasing for raycasting that significantly lowers memory bandwidth.

[0007] Particular embodiments further provide the flexibility and rendering optimizations that enable a rendering engine to natively generate various graphics features while maintaining real-time performance. Such graphics features–such as lens distortion, sub-pixel rendering, very-wide field of view, foveation and stochastic depth of field blur–may be particularly desirable in the artificial reality context. The embodiments provide support for animation and physically-based shading and lighting to improve the realism of the rendered scenes. In contrast, conventional rasterization pipelines designed for conventional displays (e.g., rectangular monitors or television sets with uniform grids of pixels) are typically implemented in hardware and require multiple passes and/or post processing to approximate these features. Moreover, conventional ray tracers, which primarily focus on Monte Carlo path tracing, do not achieve real-time performance on current VR displays (e.g., with 1080.times.1200.times.2 resolution and 90 Hz refresh-rate requirements). The embodiments described herein, therefore, is particularly suitable for rendering artificial reality and present a concrete, viable alternative to conventional rasterization techniques.

[0008] Embodiments of the invention may include or be implemented in conjunction with an artificial reality system. Artificial reality is a form of reality that has been adjusted in some manner before presentation to a user, which may include, e.g., a virtual reality (VR), an augmented reality (AR), a mixed reality (MR), a hybrid reality, or some combination and/or derivatives thereof. Artificial reality content may include completely generated content or generated content combined with captured content (e.g., real-world photographs). The artificial reality content may include video, audio, haptic feedback, or some combination thereof, and any of which may be presented in a single channel or in multiple channels (such as stereo video that produces a three-dimensional effect to the viewer). Additionally, in some embodiments, artificial reality may be associated with applications, products, accessories, services, or some combination thereof, that are, e.g., used to create content in an artificial reality and/or used in (e.g., perform activities in) an artificial reality. The artificial reality system that provides the artificial reality content may be implemented on various platforms, including a head-mounted display (HMD) connected to a host computer system, a standalone HMD, a mobile device or computing system, or any other hardware platform capable of providing artificial reality content to one or more viewers.

[0009] The embodiments disclosed herein are only examples, and the scope of this disclosure is not limited to them. Particular embodiments may include all, some, or none of the components, elements, features, functions, operations, or steps of the embodiments disclosed above. Embodiments according to the invention are in particular disclosed in the attached claims directed to a method, a storage medium, a system and a computer program product, wherein any feature mentioned in one claim category, e.g. method, can be claimed in another claim category, e.g. system, as well. The dependencies or references back in the attached claims are chosen for formal reasons only. However, any subject matter resulting from a deliberate reference back to any previous claims (in particular multiple dependencies) can be claimed as well, so that any combination of claims and the features thereof are disclosed and can be claimed regardless of the dependencies chosen in the attached claims. The subj ect-matter which can be claimed comprises not only the combinations of features as set out in the attached claims but also any other combination of features in the claims, wherein each feature mentioned in the claims can be combined with any other feature or combination of other features in the claims. Furthermore, any of the embodiments and features described or depicted herein can be claimed in a separate claim and/or in any combination with any embodiment or feature described or depicted herein or with any of the features of the attached claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010] FIG. 1 illustrates an example of a bounding volume hierarchy tree data structure.

[0011] FIG. 2 illustrates an example three-level hierarchy for defining locations from which rays/beams are projected.

[0012] FIG. 3** illustrates an example of rays and subsample rays associated with a footprint**

[0013] FIG. 4 illustrates an example of a beam being cast through a tile.

[0014] FIG. 5 illustrates an example of a beam being cast through a block.

[0015] FIGS. 6A-C illustrate an example of a method for determining visibility.

[0016] FIG. 7 illustrates an example of a focal surface map.

[0017] FIG. 8 illustrates an example of a focal surface map and camera parameters.

[0018] FIG. 9 illustrates a method for natively generating an image with optical distortion for a VR device.

[0019] FIG. 10 illustrates an example of an importance map.

[0020] FIG. 11 illustrates an example method for generating an image based on varying multi-sample anti-aliasing.

[0021] FIG. 12 illustrates examples comparing a graphics-generation timeline without using beam racing to timelines using beach racing.

[0022] FIG. 13 illustrates an example method for generating video frames for a VR display using beam racing.

[0023] FIG. 14 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

[0024] One of the fundamental problems in computer graphics is determining object visibility. At present, the two most commonly used approaches are ray tracing, which simulates light transport and is dominant in industries where accuracy is valued over speed such as movies and computer-aided designs (CAD). Due to the intense computational requirements of ray tracing, it is traditionally unsuitable for applications where real-time or near real-time rendering is needed. Another approach for determining visibility is z-buffering, which examines each 3D object in a scene and updates a buffer that tracks, for each pixel of a virtual rectangular screen, the object that is currently closest. Typically, z-buffering is implemented by current graphics hardware and lacks the flexibility to handle rendering tasks that deviate from the aforementioned assumptions (e.g., pin-hole camera and/or rectangular screens with uniform pixel distributions). Particular embodiments described herein provide a visibility algorithm that has performance characteristics close to that of z-buffering, but with additional flexibility that enables a wide variety of visual effects to be rendered for artificial reality.

[0025] To provide further context, conventional z-buffering is often used for addressing real-time primary visibility problems, largely due to its applicability to uniform primary visibility problems (e.g., for conventional rectangular screens) and the availability and proliferation of inexpensive, specialized hardware implementations. The z-buffer algorithm uses a z-buffer, a uniform grid data structure that stores the current closest hit depth for each sample/pixel. Most implementations of z-buffering assume samples/pixels are laid out in a uniform grid, matching precisely to the organization of the data structure. The uniform nature of the grid structure, combined with the uniform distribution of samples mapped onto this grid, allows for a very efficient algorithm for determining which samples overlap a polygon/triangle. The process of mapping the spatial extent of an object onto the grid is known as rasterization.

[0026] The uniform nature of the grid used in the z-buffer algorithm leads to high efficiency but makes the algorithm inflexible. The assumed uniform sample distribution is reasonable when computing primary visibility from a virtual pin-hole camera for almost all direct view display technologies such as TVs, monitors or cell phones. However, these assumptions do not hold for non-pinhole virtual cameras, secondary effects such as shadows and notably for modern virtual reality devices due to the distortion imposed by the viewing optics of a head mounted display, and currently must be worked around on a case-by-case basis.

[0027] Algorithms such as the irregular z-buffer still use a uniform grid but allow for flexible number and placement of samples within each grid cell. Irregular z-buffering suffers from load-balancing issues related the conflict between non-uniform sample distributions in a uniform data structure, making it significantly more expensive than traditional z-buffering. Further, having a uniform data structure means that the algorithm supports only a limited field of view and does not support depth of field rendering.

[0028] In contrast to z-buffering, ray tracing algorithms take a more general approach to determining visibility by supporting arbitrary point-to-point or ray queries. The ability to effectively model physically-based light transport and naturally compose effects led it to be the dominant rendering algorithm rendering movie scenes. However, the flexibility that ray tracing provides comes at significant cost in performance, which has prevented it from becoming prevalent in consumer real-time applications, such as VR/AR.

[0029] Particular embodiments described herein overcome the shortcomings of existing rendering techniques to achieve ray rates in excess of 10 billion rays per second for nontrivial scenes on a modern computer, naturally supporting computer-graphics effects desirable for artificial reality.

[0030] Particular embodiments address the visibility problem in computer graphics. In particular embodiments, a rendering system may use a raycaster that uses a three-level (or more) entry-point search algorithm to determine visibility. At a high level, the system may take a hierarchical approach where larger beams (e.g., a coherent bundle of rays) are first cast to determine collision at a broader scale. Based on the hits/misses of the beams, more granular beams or rays may be cast until the visibility problem is solved. It should be noted that even though certain examples provided herein describe beams as representing coherent bundles of primary rays, this disclosure contemplates using beams to represent any type of rays (e.g., primary rays, specular reflection rays, shadow rays, etc.) whose coherent structure may be exploited by the embodiments described herein to achieve computational efficiency. In particular embodiments, the system may be implemented in a heterogeneous manner, with beam traversal occurring on the central processing unit (CPU) and ray-triangle intersection and shading occurring on the graphics processing unit (GPU). In other embodiments, every computation task may be performed by the same type of processing unit.

[0031] In order to improve performance, particular embodiments may use an acceleration structure to organize scene geometry. These structures may be based on space partitioning (grids, k-d or k-dimensional tree, binary space partitioning or BSP tree, octree) or object partitioning (bounding volume hierarchy or BVH). By organizing the geometry into spatial regions or bounding them in enclosing volumes, the structures allow a system to avoid testing rays with objects if the rays do not enter the volume bounding the object.

[0032] In particular embodiments, an axis-aligned bounding volume hierarchy is a hierarchical tree data structure that stores scene geometry (usually triangles) at the leaves of the tree and an axis-aligned bounding box at each node. The bounding box associated with each node may conservatively enclose all of the geometries associated with the node’s sub-tree. In particular embodiments, rays (or other visibility queries such as beams) may be traversed recursively through the tree from the root and tested against nodes’ children’s bounding volumes. Recursive traversal of a node’s children may only occur in the case of intersection, so rays/beams can avoid traversing portions of the tree whose parent nodes are miss by the rays/beams.

[0033] FIG. 1 illustrates an example of a BVH tree data structure 100. Each node (e.g., 110, 120-128, 130-136) in the tree 100 may be associated with a bounding volume in the 3D modeling space in which objects are defined. The tree 100 may have a root node 110 that is associated with a large bounding volume that encompasses the bounding volumes associated with the child nodes 120-128, 130-136. Node 120 may be associated with a bounding volume that contains the bounding volumes of its child nodes 121-128 but not the bounding volumes of nodes 130-136. Node 121 may be associated with a bounding volume that contains the bounding volumes of its child nodes 122-125 but not the bounding volumes of any of the other nodes. Node 122 may be associated with a bounding volume that contains geometries (e.g., triangles) but not any other bounding volume.

更多阅读推荐......