FAST SHEAR BOX CALCULATION FOR SCENE GEOMETRY

Eigendecomposition and shear matrix selection for scene geometry improve ray tracing efficiency by aligning bounding volumes to scene geometry, enabling real-time rendering.

DE102025128554A1Pending Publication Date: 2026-01-22NVIDIA CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE102025128554
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-14
Filing Date
2025-07-18
Publication Date
2026-01-22

AI Technical Summary

Technical Problem

Current ray tracing methods using axis-aligned bounding boxes are inefficient for real-time rendering due to their poor fit to scene geometry, and there is no efficient way to compute sheared boxes that better adapt to scene geometry.

Method used

Perform eigendecomposition on scene geometry to obtain eigenvectors, select a shear matrix from preconfigured matrices based on a representative eigenvector, and calculate a sheared box using the selected matrix.

Benefits of technology

Enables efficient and accurate ray tracing by adapting bounding volumes to scene geometry, facilitating real-time rendering with reduced computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Ray tracing simulates how light interacts with objects in a scene to render realistic images. Many ray tracing solutions compute a bounding volume around a geometry in the scene and test for ray intersections with this volume. For a ray that does not intersect the bounding volume, ray tracing for points within the volume can be skipped, saving significant processing time and speeding up the ray tracing performed for a given scene. Most current ray-object intersection tests rely on the use of axis-aligned bounding boxes, which are typically not accurately fitted to the actual geometry in the scene. However, using sheared boxes is computationally inefficient and impractical for use with real-time rendering.The present disclosure provides fast sheared-box calculations for scene geometry, which can better fit the box to the scene geometry while still being calculated efficiently to enable real-time rendering.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL AREA

[0001] The present disclosure relates to the calculation of sheared boxes for beam tracing. background

[0002] Ray tracing is a computer graphics process that simulates how light interacts with objects in a scene to render realistic images of that scene. Many ray tracing solutions calculate a bounding volume around a geometry in the scene and test for ray intersections with this volume. For a ray that does not intersect the bounding volume, ray tracing for points within the volume can be skipped, saving significant processing time and speeding up the ray tracing performed for a given scene.

[0003] Currently, axis-aligned bounding boxes are primarily used to test ray intersections. These boxes are organized in a hierarchy called a bounding volume hierarchy, which is a tree of nodes, each of which can hold a box. This allows for faster ray tracing. However, because an axis-aligned bounding box is a rectangular box in three-dimensional (3D) space with its edges aligned to the coordinate axes (x, y, and z), this type of box typically does not perfectly match the actual geometry of the scene being tested.While some modern graphics processing units (GPUs) allow the use of sheared boxes to test ray intersections that can be better adapted to scene geometry, there is no efficient way to compute which of over a thousand possible shear configurations to use for a given geometry. Consequently, sheared boxes are generally not feasible for use with real-time rendering.

[0004] There is therefore a need to address these problems and / or other problems associated with the state of the art. For example, there is a need to provide calculations for fast sheared boxes for scene geometry. SUMMARY

[0005] The invention is defined by the claims. To illustrate the invention, aspects and embodiments that may or may not fall within the scope of the claims are described below.

[0006] Ray tracing simulates how light interacts with objects in a scene to render realistic images. Many ray tracing solutions compute a bounding volume around a geometry in the scene and test for ray intersections with this volume. For a ray that does not intersect the bounding volume, ray tracing for points within the volume can be skipped, saving significant processing time and speeding up the ray tracing performed for a given scene. Most current ray-object intersection tests rely on the use of axis-aligned bounding boxes, which are typically not accurately fitted to the actual geometry in the scene. However, using sheared boxes is computationally inefficient and impractical for use with real-time rendering.The present disclosure relates to fast sheared box calculations for scene geometry, which can better adapt the box to the scene geometry while still being calculated efficiently to enable real-time rendering.

[0007] A method, a computer-readable medium, and a system for computing a sheared box for a geometry are disclosed. For a geometry, an eigendecomposition is performed to obtain several eigenvectors. Based on a representative eigenvector determined from the several eigenvectors, a shear matrix is ​​selected from several preconfigured shear matrices for use in computing a sheared box for the geometry. The sheared box is then computed for the geometry using the selected shear matrix.

[0008] The revelation extends to all novel aspects or features described and / or illustrated herein.

[0009] Further features of the disclosure are characterized by the independent and dependent claims.

[0010] Any feature in one aspect of the disclosure can be applied in any suitable combination to other aspects of the disclosure. In particular, procedural aspects can be applied to apparatus or system aspects and vice versa.

[0011] Furthermore, features implemented in hardware can be implemented in software and vice versa. Any reference to software and hardware features must be interpreted accordingly.

[0012] Each system or device feature, as described herein, can also be provided as a process feature, and vice versa. System and / or device aspects that are functionally described (including means-plus-function features) can alternatively be expressed in terms of their corresponding structure, such as a suitably programmed processor and associated main memory.

[0013] It is also understood that certain combinations of the various features described and defined in a particular aspect of the revelation may be implemented and / or provided and / or used independently of one another.

[0014] The disclosure also provides computer programs and computer program products comprising software code adapted, when executed on a data processing device, to perform any of the methods described herein and / or to embody any of the device and system features described herein, including any or all of the component steps of any of the methods.

[0015] The disclosure also provides a computer or computing system (including networked or distributed systems) with an operating system that supports a computer program for performing any of the methods described herein and / or for embodying any of the device or system features described herein.

[0016] The disclosure also provides a computer-readable medium on which any one or more of the aforementioned computer programs are stored.

[0017] The revelation also provides a signal that carries any one or more of the aforementioned computer programs.

[0018] The disclosure extends to methods and / or devices and / or systems as described herein with reference to the accompanying drawings.

[0019] Aspects and embodiments of the disclosure will now be described purely by way of example with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. Figure 1 illustrates a flowchart of a procedure for calculating a sheared box for a geometry according to one embodiment. Fig. Figure 2 illustrates examples of sheared boxes calculated for a different geometry, according to one embodiment. Fig. Figure 3 illustrates an exemplary use of edge alignment to calculate a sheared box for a geometry according to one embodiment. Fig. Figure 4 illustrates an exemplary use of a normal alignment to calculate a sheared box for a geometry according to one embodiment. Fig. Figure 5 illustrates a flowchart of a procedure for selecting a predefined orientation criterion to calculate a box for a geometry according to one embodiment. Fig. Figure 6 illustrates an example of clustering points of a geometry according to one embodiment. Fig. Figure 7 illustrates a flowchart of a method for rendering an image according to one embodiment. Fig. Figure 8 illustrates an exemplary computing system according to one embodiment. DETAILED DESCRIPTION

[0020] Fig. Figure 1 illustrates a flowchart of a method 100 for calculating a sheared box for a geometry according to one embodiment. In one embodiment, the method 100 can be performed by a device that may consist of a processing unit, a program, a custom circuit, or a combination thereof. In another embodiment, a system consisting of non-volatile memory containing instructions and one or more processors communicating with the memory can execute the instructions for performing the method 100. In yet another embodiment, a non-volatile, computer-readable medium can store computer instructions which, when executed by one or more processors of a device, cause the device to perform the method 100.

[0021] In a particular embodiment, method 100 can be performed in software. The software can be a shader composed of shader code that runs on a processor, such as a graphics processing unit (GPU). The software can be connected via an interface to hardware memory that stores image data for rendering. As described in further embodiments below, method 100 can be performed to facilitate ray tracing of the image data.

[0022] In step 102, an eigendecomposition is performed on a geometry to obtain multiple eigenvectors for the geometry. The geometry refers to an object or part thereof that is represented in image data. In one embodiment, the image data can represent a 3D scene composed of one or more objects.

[0023] In one embodiment, the geometry can be a set of polygons, triangles, line-swept spheres (LSS), or other objects. In another embodiment, the geometry can be represented by points obtained by clustering initial points on the geometry, such that the eigendecomposition is performed based on the points obtained by the clustering. In yet another embodiment, the clustering can involve averaging subsets of the initial points on the geometry, each subset comprising one or more initial points on the geometry that are within the same cell of a grid superimposed on the geometry. Embodiments of the clustering process are described below with reference to Fig. 6 described in more detail.

[0024] The eigendecomposition performed on the geometry involves a preconfigured operation that generates a representation of the geometry composed of multiple eigenvectors. In one embodiment, the eigendecomposition first computes eigenvalues ​​for the geometry and then computes the multiple eigenvectors from these eigenvalues. In another embodiment, the multiple eigenvectors form a coordinate basis for the geometry. Embodiments of the eigendecomposition operation are described below with reference to Fig. 2 described in more detail.

[0025] In step 104, based on a representative eigenvector determined from the multiple eigenvectors, a shear matrix is ​​selected from several preconfigured shear matrices for use in calculating a sheared box for the geometry. In one embodiment, the preconfigured shear matrices can be supported by a GPU (which, for example, performs ray tracing on the geometry). In another embodiment, each of the multiple preconfigured shear matrices can have one or more shear factors, each of which can take on a limited set of values. Examples of the multiple preconfigured shear matrices are given below with reference to Fig. 2 described in more detail.

[0026] As mentioned, the shear matrix used for calculating the sheared box for the geometry is selected based on a representative of several eigenvectors. The representative eigenvector refers to one of the several eigenvectors that has been determined (e.g., selected, chosen, etc.) based on a predefined criterion. In one embodiment, the representative eigenvector for use in selecting the shear matrix from several preconfigured shear matrices can be determined from among the several eigenvectors according to a predefined alignment criterion.

[0027] In one embodiment, the predefined alignment criterion can be an edge alignment. In another embodiment, according to the edge alignment, the representative eigenvector can be one of several eigenvectors corresponding to a largest eigenvalue. In an embodiment using edge alignment, the shear matrix that is selected can be a sheared box with an edge aligned closest to the representative eigenvector. Embodiments of using edge alignment to select a shear matrix are described below with reference to Fig. 3 described in more detail.

[0028] In another embodiment, the predefined alignment criterion can be a normal alignment. In one embodiment, according to the normal alignment, the representative eigenvector can be one of several eigenvectors corresponding to a smallest eigenvalue. In an embodiment using normal alignment, the selected shear matrix can represent a sheared box with a surface normal aligned most closely to the representative eigenvector.

[0029] In one embodiment, the predefined alignment criterion can be selected based on eigenvalues ​​corresponding to the eigenvectors, under edge alignment and normal alignment. For example, in one embodiment, normal alignment can be selected if a second-largest eigenvalue is greater than a first defined threshold, or if the ratio of a smallest eigenvalue to the second-largest eigenvalue is less than a second defined threshold, while edge alignment can be selected if the second-largest eigenvalue is less than or equal to the first defined threshold, and the ratio of the smallest eigenvalue to the second-largest eigenvalue is greater than or equal to the second defined threshold.In another embodiment, the predefined alignment criterion can be selected based on axis alignment, edge alignment, and normal alignment, with edge alignment and normal alignment resulting in the smallest possible coverage area. Axis alignment simply means that an axis-aligned boundary box is calculated.

[0030] Furthermore, Method 100 can optionally be applied only if either edge alignment or normal alignment is selected for calculating the sheared box. For example, in other embodiments, an axis-aligned boundary box can be used (i.e., calculated for the geometry) instead of the sheared box, such as when the smallest of the eigenvalues ​​is greater than a third predefined threshold, or when the axis-aligned boundary box covers a smaller area than the sheared box when edge and normal alignment are used. Embodiments for selecting an alignment criterion for a geometry are described below with reference to Fig. 5 described in more detail.

[0031] In step 106, the sheared box for the geometry is calculated using the selected shear matrix. In one embodiment, quantization can be performed on the selected shear matrix before calculating the sheared box for the geometry. The quantization can be performed to adjust the value of each of the one or more shear factors to a limited set of values ​​that the shear factor is configured to assume. In one embodiment, adjusting the value of the shear factor to the limited set of values ​​can involve replacing the value of the shear factor with the nearest value from the limited set of values. Embodiments for the quantization are described in more detail below.

[0032] In one embodiment, calculating the sheared box for the geometry using the selected shear matrix may include calculating an inverse transpose of the selected shear matrix to determine surface pair normals for the sheared box, and calculating a minimum and a maximum projection of each of the surface pair normals, wherein the minimum and the maximum projection of each of the surface pair normals together with the selected shear matrix represent the sheared box for the geometry.

[0033] For this purpose, Method 100 can be performed to compute a sheared box for a geometry. Method 100 determines, as described herein, which of the available shear matrices should be used to compute the sheared box for the geometry as a function of the multiple eigenvectors for the geometry, instead of requiring a brute-force approach where each shear matrix must be tested to determine the best fit to the geometry. In addition to Method 100, the sheared box can be output. In one embodiment, the sheared box can be output for use in rendering the geometry. In another embodiment, Method 100 can include using the sheared box with a bounding volume hierarchy of sheared boxes for rendering the geometry. Embodiments for rendering the geometry using a bounding volume hierarchy are described below with reference to Fig. 7 described in more detail.

[0034] Further embodiments are now provided in the description of the following figures. It is understood that the embodiments described here refer to Method 100 of Fig. 1 disclosed embodiments apply to each of the embodiments of the remaining figures below and / or can be used in combination with them. Statistical parameters for self-decomposition

[0035] Variance and covariance can be used to perform principal component analysis (PCA) using eigendecomposition. In PCA, an aligned ellipsoid is essentially fitted to the data, which represents a geometry. Furthermore, covariance between two variables, such as x and y, can be thought of as indicating how much x changes when y changes, which can refer to shear.

[0036] We denote the variance by v = (v x , v y , v z ), the covariance by c = (c xy , cxz, c yz ) and the mean as m = (m x , m y , m z The vertices or points used to calculate variance and statistics are called pi=pxi,pyi,pzi denoted by p, where p is a number between 0 and n-1. The points p iThe vertices of the polygons / triangles in the geometry can be, or a representative set of points in the geometry. The covariance matrix, which contains the variances on its diagonal and the covariances in its remaining elements, is symmetric and therefore has only 6 unique values ​​for a 3x3 matrix. For efficiency, a vector of variances and a vector of covariances are used, resulting in a total of 6 values ​​instead of the 9 values ​​of a covariance matrix. Note that sometimes the average is also needed, which requires three more values.

[0037] The variance for the x-components is defined by equation 1. vx=1n∑i=0n−1(pxi−mx)2

[0038] The covariance for x and y can be defined, for example, by equation 2. cxy=1n∑i=0n−1(pxi−mx)(pyi−my)

[0039] The average (or mean) for x can be defined by equation 3. mx=1n∑i=0n−1pxi

[0040] In the embodiments described below, the combination of m, v and c can be referred to as statistical parameters.

[0041] It should be noted that in one embodiment, it is preferable to avoid first calculating the average, which requires a loop over all vertices, and then calculating the variance and covariance in a further loop (see the equations above for average, variance, and covariance). Instead, both variance and covariance can be calculated in a single pass. This is expressed mathematically by equations 4-7. m=∑i=0n−1pi,s=∑i=0n−1(p*p),c=∑i=0n−1(pxipyi,pxipzi,pyipzi) v=1n(s−1nm*m) c:=1n(c−1n(mxmy,mxmz,mymz)) m:=1nm where p*p is an element-wise multiplication and := is an assignment operator, so m:=m / n would mean m=m / n in C++, for example. Note that equation 4 contains three sums and iterates through them as a single loop over all points p. i Equations 5 and 6 update the variance v and the covariance c, and they must be updated before equation 7, which updates the mean m, because they depend on m. Principal component analysis and eigendecomposition

[0042] Using the variances and covariances, a principal component analysis (PCA) can be calculated, which provides a coordinate system for a fitted, aligned ellipsoid. This is done by eigendecomposition, namely by first calculating eigenvalues ​​and then calculating eigenvectors from these, where the eigenvectors form the desired coordinate basis.

[0043] First, a symmetric covariance matrix is ​​created from the variances and covariances. As used here, the covariance matrix is ​​denoted by M. c The characteristic polynomial is then denoted as |λI - M c | = 0, where |·| is the determinant. This leads to a cubic polynomial λ. 3 + k2 λ 2 + k1 λ + k0 = 0. The solutions to this polynomial are the eigenvalues, and the largest (in absolute value) eigenvalue corresponds to the eigenvector that is the principal direction of the ellipsoid. To find the eigenvector for a given eigenvalue, λ, the system of equations described below, including equation 8, must be solved. (Mc−λI)v=0

[0055] where v is the corresponding eigenvector. One function can be used to compute the coefficients of the cubic polynomial, and then a second function can be used to solve the cubic polynomial and thus obtain the eigenvalues. Next, a third function can be used to compute the eigenvector for a given eigenvalue. The third function performs a simplified form of Gaussian elimination, since the above equation is homogeneous (i.e., it equals 0 and therefore always has the trivial solution v = (0, 0, 0)). The eigenvectors v0 and v1 corresponding to the two largest eigenvalues ​​λ0 and λ1 are computed using the third function, while the last eigenvector is computed as the cross product between the first two eigenvectors, i.e., v2 = v0 × v1, where v0 and v1 have been normalized beforehand.

[0044] The equation above can be expressed as M cv = λI can be rewritten, and a matrix can be created containing all three eigenvectors as column vectors, as well as a diagonal matrix L (where L is chosen based on the λs) with all eigenvalues ​​on the diagonal. Thus, the equations for all eigenvectors / values ​​can be expressed in matrix form as M. c V = VL can be summarized. The covariance matrix can then be represented as M c = VLV T written using the fact that V is an orthogonal matrix, i.e., V -1 = V T , i.e., the inverse is calculated using the transpose. The diagonal matrix can also be expressed as L=LL=SS S is a scaling matrix with the square roots of the eigenvalues ​​on the diagonal. This means that M c = VSSV T = VSS T V T = VS(VS) T .

[0045] It should be noted that in general S -1 ≠ S T, so that the expression above VS(VS) T ≠ I. However, given normally distributed data in a unit circle, to which a scaling matrix and a rotation matrix are applied, i.e., multiplied by VS, the corresponding covariance matrix M is obtained. c = VS(VS) T This means that the transformation of the data is specified by the rotation matrix V and S. Since V consists of the eigenvectors of M c consists of and S is made up of the eigenvalues ​​of M c It is important to perform a self-decomposition of M. c to carry out. Calculating the Ada-sheared box

[0046] The following description provides an overview of the shear matrices supported by the Ada GPU and other specific GPUs, as well as an explanation of how to calculate the normals of the surface pairs from these matrices. These normals are needed to determine the extents of the sheared boxes. The following description also presents a method for quickly calculating which Ada shear matrices to use and which shear values ​​to apply to obtain closely fitting sheared boxes. The Ada shear matrices

[0047] There are 12 types of shear matrices supported by the Ada GPU and certain other GPUs. The naming scheme is based on the matrix in Table 1 below.

[0048] The first set of matrices is defined in Table 2.

[0049] The second set of matrices is defined in Table 3.

[0050] The third set of matrices is defined in Table 4.

[0051] It should be noted that the shear factors s0 and s1 can only take on a small set of values, as described in more detail below with regard to the quantization of shear values. Calculating surface pair normals

[0052] To calculate the dimensions of a box consisting of a set of face pairs for a shear transformation that the GPU can support, the normals of the face pairs must be determined. These are found by calculating the inverse transpose of the shear matrix. For example, for S AB Normals that are determined according to the transformation shown in Table 5.

[0053] which means that once the inverse transpose has been calculated, the normals of the face pairs can be found in the columns of the resulting matrix, e.g. nAB0=(1,−s0−s0) and so on. It should be noted that in the case of Ada shear matrices, calculating the inverse transpose is straightforward, since the inverse of a shear is simply the same matrix with negated shear terms, and the transpose thus only shifts columns into rows. Alternatively, one could skip the transposition and simply extract the normals from the rows.

[0054] For S AB are the normal ones nAB0=(1,−s0−s0),nAB1=(0,1,0), and nAB2=(0,0,1), as shown above. This means that two of the normals are the same normals as for axis-aligned bounding boxes (AABBs), and therefore if an AABB has already been calculated, these dimensions can be used for nAB1 and n nAB2 instead of projecting all points onto these two normals and finding the minimum and maximum of the projections for each normal, this method can be used. Furthermore, projecting, for example, a point p onto nAB0nAB0⋅p=px−s0py−s1pz, which can be expressed as efficiently as FMA(-s1, p z , FMA(-s0, p y , p x )), where FMA is a fused multiply-and-add operation. Finding tightly fitting sheared boxes for Ada

[0055] Given the predefined range of values ​​available for the shear factors in the matrices for the Ada GPU, there are 1,056 different configurations. The present embodiments provide a method that determines which configuration is best suited to a geometry without trying each of the possible (i.e., 1,056) configurations. Each configuration consists of a selection of the shear matrix type and the shear value(s).

[0056] The key insight is that the eigendecomposition of the covariance matrix, also known as principal component analysis (PCA), provides us with a coordinate system for a fitted, aligned ellipsoid around the data used to compute the covariance matrix. Previously, this was used to compute oriented bounding boxes (OBBs), but the present embodiment uses eigenvectors to compute specially sheared boxes.

[0057] For a given geometry, variances and covariances are calculated. These variances and covariances are used for eigendecomposition, specifically to obtain the eigenvalues ​​and eigenvectors. The eigenvalues ​​and eigenvectors, representing the orientation and size of an ellipsoid, are then used to find a single shear matrix with a single set of shear factors. Using this single shear matrix and set of shear factors, a minimal sheared box is then found for the geometry. Fig. Figure 2 illustrates exemplary sheared boxes calculated using eigendecomposition for different geometries. As shown, each sheared box is closely fitted to its respective geometry. Alignment criterion for selecting a shear matrix

[0058] In embodiments, one of two different orientation criteria can be used to select one of the shear matrices for use in calculating the sheared box geometry. These different orientation criteria can include an edge orientation and a normal orientation, embodiments of which are described in detail below. Edge alignment

[0059] For edge alignment, the eigenvector corresponding to the largest eigenvalue, i.e., the principal axis of the ellipsoid, provides a direction to consider in the sheared transformation to provide a closely fitting sheared box. One method is to consider the edges of the sheared box and select one such that at least one of its edges is aligned as closely as possible with the principal axis. The ellipsoid is in Fig. 3(a) together with the principal eigenvector v0. The goal of edge alignment is to find an Ada-sheared box configuration with an edge e that is as similar to v0 as possible, as shown in Fig. 3(b) shown.

[0060] For example, we can use S BD transform an AABB of (0,0,0) into (1,1,1) by replacing the edges (1,0,0) and (0,0,1) with S BD multiplying, and this simply "extracts" the columns of the matrix, as shown in Table 6.

[0061] This means that the edge vectors for a sheared box, which is created using S BD are generated in parallel to eBD0, eBD1 and eBD2 This can be done in the same way for any matrix.

[0062] In one embodiment, an eigendecomposition of the variances and covariances is performed to obtain the eigenvectors v0, v1, and v2, which correspond to the sorted eigenvalues ​​λ0, λ1, and λ2, where λ0 ≥ λ1 ≥ λ2 ≥ 0. All eigenvalues ​​are positive or zero, since the covariance matrix is ​​a real, symmetric matrix and is positive definite. One way to construct a sheared box using the given shear matrices would be to attempt to extract one of the edges (e.g., eBD0, eBD1 and eBD2 for S BD ) of the sheared box to align with the principal eigenvector v0. To do this, a scaled version of v0 is divided by the component of v0 with the largest magnitude. This is expressed as illustrated in Table 7.

[0063] The result is a vector f where one component is +1, while the remaining two components of f have absolute values ​​that are ≤ 1. For example, f = (0, 3, -0, 2, 1). This vector resembles eBD2 Above, i.e., an edge of a sheared box can be aligned to f if, in this example, the BD shear matrix is ​​used and s0 = f x = 0.3 and s1 = f y = -0.2 can be chosen.

[0064] Similar to the above, this means that if f x If +1, then the CE transformation is used, and if f y +1, then the AF transformation is used, and finally, if f z If +1, the transformation BD is used. It should be noted that in another embodiment, when calculating f, an index to the largest component can be returned; that is, this index would be 0 if f x = 1 would be 1 if f yThe index would be +1, otherwise it would be 2.

[0065] Table 8 illustrates an example in pseudocode where edge alignment is used to select a shear matrix for a given geometry, where in the example f was calculated as described above and the index is called indexToMaxMagnitudeComponent.

[0066] Aligning the sheared box to an edge is an important step in providing a tightly fitting sheared box. As mentioned above, in one embodiment the shear factors s0 and s1 can only take on a small set of values, and in this case, s0 and s1 must be quantized to the allowable values. This is described in more detail below in relation to the quantization of shear values. However, prior to quantization, the matrices A, B, C, D, E, and F can be used for edge alignment.

[0067] In each of the if cases in Table 8 above, there is a possibility that the principal eigenvector lies sufficiently close to one of the principal axes, i.e., (1,0,0), (0,1,0), (0,0,1). For example, if S BD If S is chosen and the main axis is sufficiently close to (0,0,1), then it is not useful to select S BD to use, since the "power" of the shear matrix would be wasted if it were aligned to (0,0,1), to which many other matrices are already aligned. Therefore, if v0 is sufficiently close to (0,0,1), it must be the case that shearing is best performed in the xy-plane instead, i.e., S A or Sc can be used, both of which are e 2 = (0,0,1).

[0068] In the example above, it must therefore be determined whether the principal eigenvector lies sufficiently close to one of the principal axes, and then which of S A and to select Sc.

[0069] In the example above, f z= 1, and therefore f is sufficiently close to (0,0,1) if |f x | < δ and |f y | < δ, where δ is determined by how the shear values ​​are quantized. If this is the case, then the second largest eigenvector, v1, is used to calculate the shear factor. Since it is already known that v 0,z If it must be close to ±1, then v 1,z close to 0.0. If |v 1,x | > |v 1,y |, then a shear factor s = v 1,y / v 1,x calculated and the C-transformation selected, otherwise s = v 1,x / v 1,y The A-transformation was calculated and selected. The same applies to the x- and y-axes. This can be combined with the code above in Table 8, as shown in Table 9.

[0070] In one embodiment, once the shear matrix has been selected, a quantization is required, which is described below, and then all vertices are projected onto the normals of the sheared box. These can be calculated as described above with respect to calculating the surface pair normals. Normal alignment

[0071] Suppose that the vertices for which we want to compute the sheared matrix are distributed within a sphere compressed in a direction denoted as n. Then the principal eigenvector is orthogonal to n, and in general, the principal eigenvector can be essentially any vector orthogonal to n. Since there are no typically perfect spheres, the covariance and eigenvector computation can produce results that are quite unstable, which can tend to generate large (i.e., mismatched) sheared boxes. Instead, another approach can be taken in which one of the normals of the sheared box configuration is aligned to n as much as possible. Since there is approximately one compressed sphere (in one direction), this means that the smallest eigenvector v2 should be used as the vector to be aligned to. This is in Fig. Figure 4 illustrates where the two largest eigenvectors v0 and v1 have approximately the same length, and instead the goal is to find a sheared box configuration that has a normal n that is aligned as well as possible with the smallest eigenvector v2.

[0072] Similar to edge alignment, the smallest eigenvector v2 is divided by the component with the largest magnitude. This new vector is denoted as n, and it has one component that is exactly 1, and the other two have magnitudes less than or equal to 1. As before, the index to the component with the largest magnitude is calculated and stored in indexToMaxMagnitudeComponent.

[0073] This normal alignment approach is illustrated in the pseudocode in Table 10 below. Recall that the surface pair normals are obtained from the columns of the inverse transpose of the shear matrix, as described above. This means, for example, that to align to a vector (1, 0,2, 0,1), a matrix must be found whose inverse transpose has a column resembling (1, 0,2, 0,1). The first column of the inverse transpose of S AB is (1,-s0,-s1), which corresponds to the example vector here. Therefore, S can AB can be used and s0 = -n y and s1 = -n z be elected. Quantization of shear values

[0074] Quantization is simple for AF, BD, and CE. In one embodiment, there are 17 s0 and s1 values ​​to choose from. ±(18,28,38,48,58,68,78,1), and these are evenly distributed. Therefore, it's quite simple to "round" to the nearest valid value. For AB, CD, and EF, the valid values ​​are... ±[18,14,12,1]. To select the value that is closest to the calculated shear value, a process can be carried out according to the pseudocode in Table 11.

[0075] For all shear matrices with two shear values, i.e., matrices of types AF, BD, CE, AB, CD, and EF, setting one shear value to 0 means that the shear matrix type becomes one of A, B, C, D, E, or F, so one embodiment checks if this occurs and then simply changes the matrix type and possibly changes the quantization, since these modes have the same quantization type as AF, BD, and CE. Calculating the sheared box

[0076] From a representative (selected) shear matrix S, the sheared box can be calculated. In an example, a set of N points is used. The set of points can be from a triangular geometry or any primitive that can be projected onto a normal. The goal is to find the smallest sheared box containing the N points S, given S. This can be achieved by: (1) for a given S, finding the three normals to S; (2) labeling the normals by n0, n1, n2 (see "Computing Surface Pair Normals" described above); (3) and finding the minimum and maximum projections of the points for n0, n1, and n2, which yields six values ​​(a min and a max for n0, a min and a max for n1, and a min and a max for n2). Together with S, these values ​​describe the smallest sheared box around the N points.To find the minimum and maximum projections, a loop can be performed over all N points, calculating the dot product between n0, n1, n2 and each of the points, and keeping the min and max for each normal.

[0077] Table 12 gives an example of the process described above for calculating a sheared box.

[0078] Fig. Figure 5 illustrates a method 500 for selecting a predefined orientation criterion to calculate a box for a geometry according to one embodiment. The method 500 can be performed in the context of the embodiments described above. In particular, the method 500 can, according to one embodiment, select an edge orientation, normal orientation, and axis orientation to calculate a box for a geometry.

[0079] In step 502, an eigendecomposition is performed on a geometry to obtain several eigenvalues ​​and eigenvectors. In step 504, an alignment criterion is selected to calculate a box for the geometry based on the eigenvalues ​​and eigenvectors. As mentioned above, the alignment criteria can be selected from edge alignment, normal alignment, and axis alignment. Selection of alignment criteria - Procedure 1

[0080] In one embodiment, only one of the edge alignment or normal alignment is evaluated (not both). In this embodiment, eigenvalues ​​control which method is to be used. In particular, a vector s=(1,λ1 / λ0,λ2 / λ0), where λ0≥λ1≥λ2≥0.

[0081] If s z If it is relatively large, this indicates a spherical shape, and an axis orientation is selected. However, if s yis relatively large and s z / s y If the value is relatively small, this indicates a "compressed" sphere, and normal alignment is selected. Otherwise, edge alignment is selected. This is summarized in the pseudocode in Table 12 below.

[0082] In one embodiment, the thresholds can be optimized by searching for the best parameter settings for real data. Selection of alignment criteria - Procedure 2

[0083] In another embodiment, the eigendecomposition for the geometry is calculated, and then a shear matrix is ​​determined using edge alignment, and a shear matrix is ​​determined using normal alignment. The area of ​​an axis-aligned boundary box, the area for the sheared box calculated using edge alignment, and the area for the sheared box calculated using normal alignment are determined, and the alignment criterion that results in the smallest area is selected.

[0084] Once the alignment criterion is selected, the box for the geometry is calculated according to the alignment criterion in step 506. In the case of procedure 2 described above, the box for the geometry can be calculated as part of step 504. If axis alignment is selected, an AABB (All-Around Box) is calculated for the geometry. If edge alignment or normal alignment is selected, a sheared box is calculated for the geometry.

[0085] Fig. Figure 6 illustrates an example of clustering points of a geometry according to one embodiment. As above, with reference to the method of Fig. As described in 1, points on the geometry can be clustered before performing an eigendecomposition.

[0086] Calculating the variances and covariances for a large set of triangles (or other data) can yield misleading results. In one embodiment, a set of points can be found that are approximately uniformly arranged over an input mesh of the geometry. As in Fig. Figure 6(a) illustrates a 2D mesh for a geometry comprising vertices as solid circles. The outer AABB is also shown, represented by dashed 3x3 circles selected as initial cluster positions. These cluster positions simply form a grid evenly distributed across the AABB from the minimum corner to the maximum. Around each cluster position, there is a rectangle half the size of the AABB box in both x and y dimensions. Each such rectangle is visualized as clipped to the AABB.

[0087] The cluster step is in Fig. Figure 6(b) shows that the cluster points (now shown as solid circles) are the average of all vertices in (a) to the left within their respective rectangles. Note that a cluster point is removed if it has no vertices within its rectangle. The rectangle to the right of the center of (a) has two points (shown with a dashed ellipse), and in (b) its updated cluster point (solid circle) was calculated as the average of the two points from (a). Similar operations are performed for the remaining cluster points.

[0088] It should be noted that the assignment of each point to a cluster is done simultaneously, as the average point of this cluster is updated using an incremental average calculation, with only one pass over the points being performed.

[0089] In 3D, initial 3x3x3 cluster points are placed on the 3D AABB from the minimum to the maximum vertex. In some embodiments, the number of vertices can be reduced from 128 to a maximum of 3x3x3 = 27 cluster points. Variances and covariances can then be calculated using these cluster points.

[0090] Fig. Figure 7 illustrates a flowchart of a method 700 for rendering an image according to one embodiment. In step 702, boxes for the geometry in a scene are calculated. In one embodiment, the boxes may include sheared boxes. The sheared boxes may be calculated according to method 100 of Fig. 1 will be calculated.

[0091] In step 704, a bounding volume hierarchy is created using boxes. The bounding volume hierarchy is a tree-like structure designed to speed up ray tracing for the scene. It organizes geometries in the scene into a hierarchy of bounding volumes (e.g., sheared boxes), enabling efficient intersection testing by quickly eliminating objects that do not intersect a given query.

[0092] In step 706, an image of the scene is rendered using the bounding volume hierarchy. As noted above, the bounding volume hierarchy is used to perform ray tracing on the scene. Ray tracing can be performed to calculate pixel information for the image, such as the color and illumination of each pixel. The image can then be rendered according to this pixel information.

[0093] In step 708, the image is output. In one embodiment, the image can be output to a memory device. In another embodiment, the image can be output to a display device. In yet another embodiment, the image can be output to a downstream application for further processing, such as a virtual reality or augmented reality application that uses the image to create a virtual reality or augmented reality experience for a user.

[0094] Fig. Figure 8 illustrates an exemplary computing system 800 according to one embodiment. The exemplary computing system 800 can be implemented to perform any of the procedures described herein. For example, the exemplary computing system 800 can perform the boundary box calculations described above and, in some embodiments, can also perform the image rendering as described above.

[0095] As shown, the System 800 has at least one central processor 801 connected to a communication bus 802. The System 800 also has main memory 804 [e.g., random access memory (RAM), etc.]. The System 800 also has a graphics processor 806. In some embodiments, the System 800 has a display 808.

[0096] The System 800 may also include a Secondary Mass Storage Unit 810. The Secondary Mass Storage Unit 810 may, for example, include a hard disk drive and / or a removable storage drive, which may be a floppy disk drive, a magnetic tape drive, a compact disk drive, a flash drive, or other flash storage device, etc. The removable storage drive reads from and / or writes to a removable storage device in a known manner.

[0097] Computer programs or computer control logic algorithms can be stored in the main memory 804, the secondary mass storage 810, and / or any other storage device. When executed, such computer programs enable the System 800 to perform various functions, including, for example, image data decompression. The main memory 804, the mass storage 810, and / or any other mass storage device are possible examples of non-volatile, computer-readable media.

[0098] The System 800 may also include one or more Communication Modules 812. The Communication Module 812 may be operational to enable communication between the System 800 and one or more networks and / or with one or more devices (e.g., game consoles, personal computers, servers, etc.) through a variety of possible standard or proprietary wired or wireless communication protocols (e.g., via Bluetooth, Near Field Communication (NFC), cellular communication, etc.).

[0099] As also shown, in some embodiments the System 800 may include one or more input devices 814. The input devices 814 may be wired or wireless. In various embodiments, each input device 814 may include a keyboard, a touchpad, a touchscreen, a game controller, a remote control, or any other device that can be used by a user to provide input to the System 800.

[0100] The disclosure of the present application also includes the following numbered clauses. Clause 1. Procedure, comprehensive: on a device: Performing an eigendecomposition on a scene geometry to obtain multiple eigenvectors for the geometry; based on a representative eigenvector determined from the multiple eigenvectors, selecting a shear matrix from several preconfigured shear matrices for use in calculating a sheared box for the geometry; Calculating the sheared box for the geometry using the selected shear matrix; and Using a sheared box with a bounding volume hierarchy to render the geometry into an image. Clause 2. Method according to Clause 1, wherein the multiple preconfigured shear matrices are supported by a graphics processing unit (GPU) that renders the geometry into the image. Clause 3. Procedure, comprehensive: on a device: Performing an eigendecomposition on a geometry to obtain multiple eigenvectors for the geometry; based on a representative eigenvector determined from the multiple eigenvectors, selecting a shear matrix from several preconfigured shear matrices for use in calculating a sheared box for the geometry; Calculating the sheared box for the geometry using the selected shear matrix. Clause 4. Procedure according to Clause 3, wherein the representative eigenvector for use in selecting the one shear matrix from the several preconfigured shear matrices is determined among the several eigenvectors according to a predefined alignment criterion. Clause 5. Procedure according to Clause 4, wherein the predefined alignment criterion is an edge alignment. Clause 6. Procedure according to Clause 5, wherein, according to the edge alignment, the representative eigenvector is one of the several eigenvectors corresponding to a largest eigenvalue. Clause 7. Procedure according to Clause 6, wherein the shear matrix to be selected is a sheared box with an edge aligned closest to the representative eigenvector. Clause 8. Procedure according to one of Clauses 4 to 7, wherein the predefined alignment criterion is a normal alignment. Clause 9. Procedure according to Clause 8, wherein, according to the normal alignment, the representative eigenvector is one of the several eigenvectors corresponding to a smallest eigenvalue. Clause 10. Procedure according to Clause 9, wherein the shear matrix to be selected is a sheared box with a surface normal that is aligned closest to the representative eigenvector. Clause 11. Procedure according to one of clauses 4 to 10, wherein the predefined alignment criterion is selected based on eigenvalues ​​corresponding to the eigenvectors, under axis alignment, edge alignment and normal alignment. Clause 12. Procedure according to Clause 11, wherein: (a) Normal alignment is selected when: a second largest of the eigenvalues ​​is greater than a first defined threshold, or a ratio of a smallest of the eigenvalues ​​to the second largest of the eigenvalues ​​is less than a second defined threshold; and (b) Edge alignment is selected when: the second largest of the eigenvalues ​​is less than or equal to the first defined threshold, and the ratio of the smallest of the eigenvalues ​​to the second largest of the eigenvalues ​​is greater than or equal to the second defined threshold. Clause 13. Procedure according to Clause 11 or 12, wherein an axis-aligned bounding box is used instead of the sheared box if the smallest of the eigenvalues ​​is greater than a third predefined threshold. Clause 14. Procedure according to one of Clauses 4 to 13, wherein the predefined alignment criterion is selected based on the edge alignment and normal alignment that results in the smallest possible coverage. Clause 15. Procedure according to Clause 14, wherein an axis-aligned boundary box is used instead of the sheared box if the axis-aligned boundary box covers a smaller area than the sheared box when edge alignment and normal alignment are used. Clause 16. Method according to any of Clauses 3 to 15, wherein the multiple preconfigured shear matrices are supported by a graphics processing unit (GPU). Clause 17. Procedure according to any one of Clauses 3 to 16, wherein each shear matrix of the several preconfigured shear matrices has one or more shear factors, each of which can take on a limited set of values. Clause 18. Procedure according to any of Clauses 3 to 17, wherein the selected shear matrix is ​​quantized prior to calculating the sheared box for the geometry in order to match a value of each of the one or more shear factors to a limited set of values ​​that the shear factor is set up to assume. Clause 19. Procedure according to Clause 18, wherein adjusting the value of the shear factor to the limited set of values ​​includes replacing the value of the shear factor with a nearest value from the limited set of values. Clause 20. Procedure according to any of Clauses 3 to 19, wherein the geometry is represented by points obtained by clustering initial points on the geometry, such that the eigendecomposition is carried out on the basis of the points obtained by the clustering. Clause 21. Procedure according to Clause 20, wherein the clustering comprises averaging subsets of the initial points on the geometry, each of the subsets comprising one or more initial points on the geometry that are within the same cell of a grid placed on the geometry. Clause 22. Procedure according to any one of Clauses 3 to 21, comprising calculating the sheared box for the geometry using the selected shear matrix: Calculating an inverse transpose of the selected shear matrix to determine surface pair normals for the sheared box, and Calculating a minimum and a maximum projection of each of the surface pair normals, where the minimum and the maximum projection of each of the surface pair normals together with the selected shear matrix represent the sheared box for the geometry. Clause 23. Method according to any one of Clauses 3 to 22, further comprising, on the device: Using the sheared box with a bounding volume hierarchy of sheared boxes to render the geometry. Clause 24. System, comprehensive: a processor that executes code to: Performing an eigendecomposition on a geometry to obtain multiple eigenvectors for the geometry; based on a representative eigenvector determined from the multiple eigenvectors, selecting a shear matrix from several preconfigured shear matrices for use in calculating a sheared box for the geometry; and calculating the sheared box for the geometry using the selected shear matrix. Clause 25. Non-volatile, computer-readable medium that stores computer instructions which, when executed by one or more processors of a device, cause the device to: Performing an eigendecomposition on a geometry to obtain multiple eigenvectors for the geometry; based on a representative eigenvector determined from the multiple eigenvectors, selecting a shear matrix from several preconfigured shear matrices for use in calculating a sheared box for the geometry; and calculating the sheared box for the geometry using the selected shear matrix.

[0101] Although various embodiments have been described above, it is understood that these are merely examples and not limiting. Therefore, the width and scope of a preferred embodiment are not limited by any of the exemplary embodiments described above, but are defined according to the following claims and their equivalents.

[0102] It is understood that the aspects and embodiments described above are purely exemplary, and that modifications can be made within the scope of the claims.

[0103] Each device, method and feature disclosed in the description and (where applicable) the claims and drawings may be provided independently or in any suitable combination.

[0104] Reference numerals appearing in the claims are for illustrative purposes only and do not limit the scope of the claims.

Claims

[1] Procedure, encompassing: on a device: Performing an eigendecomposition on a scene geometry to obtain multiple eigenvectors for the geometry; based on a representative eigenvector determined from the multiple eigenvectors, selecting a shear matrix from several preconfigured shear matrices for use in calculating a sheared box for the geometry; Calculating the sheared box for the geometry using the selected shear matrix; and Using a sheared box with a bounding volume hierarchy to render the geometry into an image. [2] Method according to claim 1, wherein the multiple preconfigured shear matrices are supported by a graphics processing unit (GPU) that renders the geometry into the image. [3] Procedure, comprehensive: on a device: Performing an eigendecomposition on a geometry to obtain multiple eigenvectors for the geometry; based on a representative eigenvector determined from the multiple eigenvectors, selecting a shear matrix from several preconfigured shear matrices for use in calculating a sheared box for the geometry; Calculating the sheared box for the geometry using the selected shear matrix. [4] Method according to claim 3, wherein the representative eigenvector for use in selecting the one shear matrix from the several preconfigured shear matrices among the several eigenvectors is determined according to a predefined alignment criterion. [5] Method according to claim 4, wherein the predefined alignment criterion is an edge alignment. [6] Method according to claim 5, wherein, according to the edge orientation, the representative eigenvector is one of the several eigenvectors that corresponds to a largest eigenvalue. [7] Method according to claim 6, wherein the shear matrix selected is a sheared box with an edge that is aligned closest to the representative eigenvector. [8] Method according to any one of claims 4 to 7, wherein the predefined alignment criterion is a normal alignment. [9] Method according to claim 8, wherein, according to the normal alignment, the representative eigenvector is one of the several eigenvectors that corresponds to a smallest eigenvalue. [10] Method according to claim 9, wherein the shear matrix selected is a sheared box with a surface normal that is aligned closest to the representative eigenvector. [11] Method according to any one of claims 4 to 10, wherein the predefined alignment criterion is selected based on eigenvalues ​​corresponding to the eigenvectors, from axis alignment, edge alignment and normal alignment. [12] Method according to claim 11, wherein: (a) Normal alignment is selected when: a second largest of the eigenvalues ​​is greater than a first defined threshold, or a ratio of a smallest of the eigenvalues ​​to the second largest of the eigenvalues ​​is less than a second defined threshold; and (b) Edge alignment is selected when: the second largest of the eigenvalues ​​is less than or equal to the first defined threshold, and the ratio of the smallest of the eigenvalues ​​to the second largest of the eigenvalues ​​is greater than or equal to the second defined threshold. [13] Method according to claim 11 or 12, wherein an axis-aligned boundary box is used instead of the sheared box when the smallest of the eigenvalues ​​is greater than a third predefined threshold. [14] Method according to any one of claims 4 to 13, wherein the predefined alignment criterion is selected based on the edge alignment and the normal alignment which results in the smallest area being covered. [15] Method according to claim 14, wherein an axis-aligned boundary box is used instead of the sheared box if the axis-aligned boundary box covers a smaller area than the sheared box when edge alignment and normal alignment are used. [16] Method according to any one of claims 3 to 15, wherein the multiple preconfigured shear matrices are supported by a graphics processing unit (GPU). [17] Method according to any one of claims 3 to 16, wherein each shear matrix of the several preconfigured shear matrices has one or more shear factors, each of which can assume a limited set of values. [18] Method according to any one of claims 3 to 17, wherein the selected shear matrix is ​​quantized prior to calculating the sheared box geometry in order to align a value of each of the one or more shear factors to a limited set of values ​​that the shear factor is configured to assume. [19] Method according to claim 18, wherein adjusting the value of the shear factor to the limited set of values ​​comprises replacing the value of the shear factor with a nearest value from the limited set of values. [20] Method according to any one of claims 3 to 19, wherein the geometry is represented by points obtained by clustering initial points on the geometry, such that the eigendecomposition is carried out on the basis of the points obtained by clustering. [21] Method according to claim 20, wherein the clustering comprises averaging subsets of the initial points on the geometry, wherein each of the subsets comprises one or more initial points on the geometry that are located within the same cell of a grid placed on the geometry. [22] Method according to any one of claims 3 to 21, wherein the calculation of the sheared box for the geometry comprises using the selected shear matrix: Calculating an inverse transpose of the selected shear matrix to determine surface pair normals for the sheared box, and Calculating a minimum and a maximum projection of each of the surface pair normals, where the minimum and maximum projections of each of the surface pair normals together with the selected shear matrix represent the sheared box for the geometry. [23] Method according to any one of claims 3 to 22, further comprising, on the device: Using the sheared box with a bounding volume hierarchy of sheared boxes to render the geometry. [24] System, encompassing: a processor that executes code to: Performing an eigendecomposition on a geometry to obtain multiple eigenvectors for the geometry; based on a representative eigenvector determined from the multiple eigenvectors, selecting a shear matrix from several preconfigured shear matrices for use in calculating a sheared box for the geometry; and Calculating the sheared box for the geometry using the selected shear matrix. [25] Non-volatile, computer-readable medium that stores computer instructions which, when executed by one or more processors of a device, cause the device to: Performing an eigendecomposition on a geometry to obtain multiple eigenvectors for the geometry; based on a representative eigenvector determined from the multiple eigenvectors, selecting a shear matrix from several preconfigured shear matrices for use in calculating a sheared box for the geometry; and Calculating the sheared box for the geometry using the selected shear matrix.