Facilitating object intersection testing in ray tracing systems

By generating contained regions, the ray tracing system optimizes intersection testing within the ray tracing system, solving the problem of wasted computational resources and improving efficiency and performance, especially in complex scenes and non-closed objects.

CN121010686APending Publication Date: 2025-11-25IMAGINATION TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510664677.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-04-07
Filing Date
2025-05-22
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing ray tracing systems involve high computational costs when performing intersection tests, especially in parallel or breadth-first traversal accelerated structures. They struggle to effectively identify the closest hit between a ray and an object, leading to wasted computational resources and performance bottlenecks.

Method used

By generating a contained region, which is arranged in the ray tracing system to facilitate intersection testing, the method includes dividing the volume of the object into multiple voxels, classifying and selecting voxels with high occlusion utility as candidate voxels, expanding their volume to form a contained region, which is used to determine early whether rays intersect with the object.

Benefits of technology

It reduces the number of intersection tests, improves the efficiency of the ray tracing system, and reduces computational resource requirements and power consumption. In particular, it optimizes the performance of parallel and breadth-first traversal algorithms in complex scenes and non-closed objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121010686A_ABST
    Figure CN121010686A_ABST
Patent Text Reader

Abstract

The invention relates to a method and system for facilitating object intersection testing in a ray tracing system. A method is provided for generating contained regions for use in a ray tracing system, where the contained regions are arranged to facilitate determining whether a ray intersects an object of a scene, where the object is contained within one or more limited bounding regions forming part of an object segmentation hierarchy, and where the object is a continuous surface. The method comprises the following steps of: segmenting the volume inside one or more limited surrounding areas into a plurality of voxels; classifying the plurality of voxels, wherein the classifying includes identifying a subset of boundary voxels that lie within a range of a geometry defined by the object and intersect a continuous surface of the object; an occlusion utility metric is determined for each of the boundary voxels, where the occlusion utility metric includes a component that quantifies at least a maximum number of boundary voxels that intersect a continuous surface of the object located in a continuous chain in a single dimension, where the boundary voxels are members of the chain.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross Reference to Related Applications

[0002] This application claims priority from United Kingdom patent application GB2407459.3 filed 24 May 2024 and United Kingdom patent application GB2505216.8 filed 7 April 2025, both of which are incorporated herein in their entirety by reference. TECHNICAL FIELD

[0003] The present disclosure relates to techniques for performing intersection tests and traversing acceleration structures in a ray tracing system, in particular methods for generating zones contained within objects to facilitate intersection tests. BACKGROUND

[0004] Ray tracing is a computational rendering technique used to generate an image of a scene (e.g. a 3D scene) by tracing the path of light (‘rays’) through the scene, typically from the viewpoint of a camera but also as secondary rays from e.g. reflections off objects. Each ray is modelled as originating from the camera and entering the scene through a pixel. As the ray passes through the scene, it can intersect with objects within the scene, thus creating secondary rays. The interaction between the ray and the object can be modelled to create realistic visual effects. For example, in response to determining that a ray intersects with an object, a shader program (i.e. a part of computer code) can be executed for the intersection. A programmer can write the shader program to define how the system reacts to the intersection, which may, for example, cause one or more secondary rays to be emitted into the scene, e.g. to represent a reflection of the ray off the intersecting object or a refraction of the ray through the object (e.g. if the object is transparent or translucent). As another example, the shader program can cause one or more rays to be emitted into the scene for the purpose of determining whether the object is in shadow at the point of intersection, so-called ‘shadow rays’. The result of executing the shader program (and processing the related secondary rays) can be to calculate a colour value for the pixel through which the ray passed.

[0005] Rendering an image of a scene using ray tracing can involve performing many intersection tests, e.g., billions of intersection tests for rendering an image of a scene. To reduce the number of intersection tests that need to be performed, ray tracing systems often use an acceleration structure, sometimes abbreviated as 'AS', in which each node of the acceleration structure represents a region within the scene. A node can have successive generations of child nodes that represent successively smaller regions of the scene and that are within the region associated with the parent node. Thus, the acceleration structure is often hierarchical (e.g., has a tree structure) such that it includes multiple levels of nodes, with nodes near the top of the acceleration structure representing relatively large regions in the scene (e.g., a root node can represent the entire scene), and nodes near the bottom of the acceleration structure representing relatively small regions in the scene. A "tree node" refers to a node that has pointers (or references) to other nodes in the hierarchical acceleration structure, i.e., a tree node has child nodes in the hierarchical acceleration structure. A "leaf node" refers to a node that has one or more pointers to one or more primitives or primitive patches, i.e., a leaf node typically does not have further child nodes in the hierarchical acceleration structure. In other words, a leaf node of the acceleration structure represents a region that encloses one or more primitives of an object, and typically must be reached in the AS in order to process a ray accordingly.

[0006] In some examples, the nodes represent axis-aligned bounding boxes (AABBs) in a scene, where each AABB bounds some object or particular part of an object. Intersection tests are typically performed in a recursive manner, i.e. by first testing a ray against an intersection with the root node of an acceleration structure, and in response to a ‘hit’ testing each child node of the root node. If the ray ‘misses’ the parent node, intersection tests of the child nodes of the parent node can be avoided, saving computational effort. If the ray is found to intersect a leaf node, the ray can be tested against objects (i.e. primitives) within the region represented by the leaf node, to determine whether the object intersects the ray. Typically, the ray needs to be tested against the leaf node (i.e. primitive) of an object in order to determine that the ray intersects the object. Furthermore, typically, the leaf node needs to be reached in order to determine an intersection with the object, in order to reduce the so-called ‘maximum culling distance’ of the ray. This maximum culling distance represents the effective endpoint of the ray, and thus can represent the position at which the ray is occluded by some object in the scene. Thus, there is no need to test nodes corresponding to regions in the scene further away than the maximum culling distance for intersection. Thus, if the ray tracing system can determine that the object (or part thereof) associated with a distant node is occluded by an object of a closer node, there is no need to test the distant node for the ray. This is the case for intersection rays such as primary and secondary rays, for example, where it is desirable to find the ‘closest hit’ of the ray as soon as possible, as this is computationally efficient. However, finding the closest intersection with an object in the fewest possible steps is important, and in practice is not known in advance. For parallel testing node traversal algorithms, the ‘closest hit’ problem is exacerbated, as parallel traversal algorithms are more likely to perform tests on nodes representing objects that are in fact occluded than non-parallel searches.

[0007] The same problem also applies to other rays, such as shadow rays, where an ‘any hit’ identified between a shadow ray and an object would allow the shadow ray to be culled completely, and traversal of the AS for that shadow ray to be terminated immediately. Some disclosures have noted that for the case of shadow rays, it can be sufficient to know that there is an intersection with the ray to determine that the position is in shadow, i.e. it is ‘occluded’. These disclosures have proposed that when tracing shadow rays, the existing geometry is replaced with an approximate ‘occlusion’ geometry, which has fewer primitives and thus is cheaper to traverse. However, the approximate model typically results in unacceptable visual artefacts.

[0008] In "Accelerating ShadowRays Using Volumetric Occluders and Modified kd-Tree Traversal" (High Performance Graphics 2009), Djeu et al. identified scene objects known as solid, closed, and waterproof polygonal meshes. Within these meshes, they constructed a set of "volumetric occluders" from nodes of a kd-tree, considered opaque and located strictly within the closed interior of the mesh. It is assumed that for a given mesh, there are typically far fewer volumetric occluders than primitives. These occluders can be included in the acceleration structure, but are only considered for shadow rays. When testing shadow rays, the volumetric occluders of a given object can be tested earlier than the primitives of that given object. For this approach to work, the object type must be closed, solid, and waterproof, and the acceleration structure must be a spatially partitioned structure, such as a kd-tree.

[0009] GB application GB2407459.3 (incorporated herein by reference in its entirety) addresses some of these problems associated with how to more effectively identify intersections with objects. This application provides a solution that, for the 'closest hit' condition, reduces the chance of t by determining the existence of object intersections at significantly earlier points without needing to traverse down to the leaf nodes of the object and determine the intersections between rays and object primitives. max The value of (i.e., the maximum culling distance). Specifically, the solution involves using as few as two box intersection tests to determine the existence of an intersection with an object. The first test is between the ray and the object's enclosing region (e.g., AABB), and the second test is between the ray and the contained region, which is completely contained within the object and within the enclosing region. Therefore, GB application GB2407459.3 specifies that the existence of an intersection with an object can be determined without traversing down to the leaf nodes, thus eliminating the need to perform ray-primitive intersection tests with any of the primitives in the corresponding subtree. In the case of shadow rays, determining the existence of an intersection with the contained region completely avoids the need to perform intersection tests between the ray and the primitive.

[0010] In summary, the advantage of placing the contained region within an object is that if it can be determined that i) the ray intersects with the enclosing region surrounding the object, and ii) the ray intersects with the contained region completely contained within the object, then it can be confidently inferred that the ray intersects with the object.

[0011] The traversal method disclosed in GB2407459.3 is therefore more efficient (i.e., inferring intersection based on at least two box intersection tests). However, how to efficiently generate effective contained regions that provide good utility is a prominent issue. For example, it would be advantageous if a large portion of the object's internal volume could be occupied by contained regions to provide good utility (i.e., a high probability that rays will intersect with contained regions). Furthermore, determining whether one or more contained regions should be used, and if multiple contained regions are to be generated, how to determine their relative sizes, is an important issue. Moreover, not all objects are closed objects, and therefore, how to generate contained regions for non-standard and non-closed objects is a particularly important problem.

[0012] This disclosure relates to improved methods for accelerating the traversal of structures and improved methods for determining intersections with objects, with the aim of solving the aforementioned problems. Summary of the Invention

[0013] This summary is provided to introduce, in a simplified form, a series of concepts further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter.

[0014] This disclosure relates to methods and systems for facilitating intersection testing.

[0015] A method is provided for generating contained regions for a ray tracing system, wherein the contained regions are arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finite enclosing regions forming a hierarchy of object segmentation, and wherein the object is a continuous surface, the method comprising:

[0016] The volume within the one or more finite enclosed regions is divided into multiple voxels;

[0017] The plurality of voxels are classified, wherein the classification includes identifying a subset of boundary voxels that are located within the geometry defined by the object and intersect with the continuous surfaces of the object;

[0018] Determine an occlusion utility metric for each of the boundary voxels, wherein the occlusion utility metric comprises a component that quantifies at least a maximum number of boundary voxels intersecting the continuous surface of the object in a continuous chain located in a single dimension, wherein the boundary voxels are members of the chain.

[0019] Depending on the occlusion utility metric, boundary voxels are selected from the subset of boundary voxels as candidate voxels for transformation into the contained region;

[0020] The volume of the candidate voxel is expanded by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object;

[0021] The extended voxels are assigned as contained regions, wherein the contained regions are arranged to facilitate determining whether a ray intersects the object, depending on whether the ray intersects the contained region.

[0022] In an example implementation, the extent of the geometry defined by the object includes the outer boundary of the continuous surface.

[0023] In an example implementation, expanding the volume of the candidate voxel includes expanding along at least one dimension of the continuous chain that defines the occlusion utility metric of the candidate voxel.

[0024] In an example implementation, the method includes expanding the candidate voxel until the surface of the candidate voxel reaches the outer boundary of the surface.

[0025] In an example implementation, the candidate voxels are selected from the subset of boundary voxels based on determining that the candidate voxels have the highest maximum number of boundary voxels in the continuous chain as defined by the occlusion utility metric.

[0026] In an example implementation, the scene is a 3D scene represented in a 3D spatial coordinate system, and the plurality of boundary voxels are aligned with the axes of the 3D spatial coordinate system, wherein determining the occlusion utility metric for each of the boundary voxels includes determining: for each of the three axis-aligned dimensions, the maximum number of boundary voxels located in a continuous chain along the axis-aligned dimension; determining which axis-aligned dimension includes the maximum number of boundary voxels; and setting the maximum number of boundary voxels as the occlusion utility metric.

[0027] In an example implementation, it further includes: determining which axis alignment dimension includes a second maximum number of boundary voxels, and setting the second maximum number of bounding voxels as a median chain length, wherein expanding the candidate voxels includes simultaneously expanding the candidate voxels on two dimensions defined by the occlusion utility metric and the median chain length.

[0028] In an example implementation, the method further includes: determining which axis alignment dimension includes a minimum maximum number of boundary voxels, and setting the minimum maximum number as a minimum chain length, wherein the occlusion utility metric is defined based on a combination of the maximum number of boundary voxels in a continuous chain in any axis alignment direction, the median chain length, and the minimum chain length.

[0029] In an example implementation, the method further includes stopping the expansion of the candidate voxel in response to determining that the candidate voxel is about to expand to intersect with a voxel that is not a boundary voxel.

[0030] In an example implementation, the method further includes stopping the expansion of the candidate voxel in response to determining that the candidate voxel is about to expand beyond the range of the geometry defined by the outer boundary of the object.

[0031] In an example implementation, the continuous chain of boundary voxels intersecting the continuous surface defining the occlusion utility metric in a single dimension includes one or more boundary voxels that deviate from the axis of the continuous chain by a distance equal to that of a single boundary voxel.

[0032] In an example implementation, at least a portion of the continuous surface of the object is contained within the contained region, and wherein determining whether a ray intersects the object using the contained region includes: determining that the ray intersects the contained region at two intersection points, wherein the two intersection points represent an entry point and an exit point; determining that the entry point and the exit point are located on opposite faces of the contained region, wherein the opposite faces of the contained region are arranged on opposite sides of the portion of the continuous surface contained within the enclosure; and determining whether the ray intersects the object depends at least on determining that the entry point and the exit point are located on opposite faces of the enclosure.

[0033] In an example implementation, the portion of the continuous surface contained within the contained region has no gaps, and the contained region is divided into two distinct volumes by the portion of the continuous surface of the object.

[0034] In an example implementation, the surface of the contained region that intersects with the continuous surface defines an anomalous surface of the contained region, wherein determining whether the ray intersects the object using the contained region further includes: determining that the ray intersects the object in response to determining that the entry point and the exit point are not located on the anomalous surface of the enclosing body.

[0035] In an example implementation, the contained region is arranged such that the opposite faces of the contained region are aligned with the plane of the continuous surface, and each of the opposite faces has a larger surface area than each of the anomalous surfaces.

[0036] In an example implementation, the scene is a 3D scene represented in a 3D spatial coordinate system, and the contained region is aligned with the axes of the 3D spatial coordinate system.

[0037] In an example implementation, the method includes determining whether the ray intersects the object, at least depending on whether the ray intersects the contained region; and outputting an indication that the ray intersects the object, wherein the output indication is used in the ray tracing system to render an image of the scene.

[0038] In the example implementation, the selected boundary voxel is bisected by the continuous surface of the object.

[0039] A graphics processing system is also provided, configured to perform any of the methods disclosed herein. In an example embodiment, the graphics processing system is hardware-embodied on an integrated circuit.

[0040] Computer-readable code is also provided, which is configured to cause any of the methods disclosed herein to be executed when the code is run.

[0041] An integrated circuit definition dataset is also provided, which, when processed in an integrated circuit manufacturing system, configures the integrated circuit manufacturing system to manufacture a graphics processing system as disclosed herein.

[0042] Also provided is a non-transitory computer-readable storage medium storing a computer-readable description of a graphics processing system as disclosed herein, which, when processed in an integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture an integrated circuit embodying the graphics processing system.

[0043] A graphics processing module is provided for generating contained regions for a ray tracing system, wherein the contained regions are arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finitely enclosing regions forming a hierarchy of object segmentation, and wherein the object is a continuous surface, the module being configured to:

[0044] The volume within the one or more finite enclosed regions is divided into multiple voxels;

[0045] The plurality of voxels are classified, wherein the classification includes identifying a subset of boundary voxels that are located within the geometry defined by the object and intersect with the continuous surfaces of the object;

[0046] Determine an occlusion utility metric for each of the boundary voxels, wherein the occlusion utility metric comprises a component that quantifies at least a maximum number of boundary voxels intersecting the continuous surface of the object in a continuous chain located in a single dimension, wherein the boundary voxels are members of the chain.

[0047] Depending on the occlusion utility metric, boundary voxels are selected from the subset of boundary voxels as candidate voxels for transformation into the contained region;

[0048] The volume of the candidate voxel is expanded by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object;

[0049] The extended voxels are assigned as contained regions, wherein the contained regions are arranged to facilitate determining whether a ray intersects the object, depending on whether the ray intersects the contained region.

[0050] According to embodiments of this disclosure, a method for generating contained regions in a ray tracing system is also provided, wherein the contained regions are arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finite enclosing regions forming a hierarchy of object segments, the method comprising:

[0051] The volume within the one or more finite enclosed regions is divided into multiple voxels;

[0052] The plurality of voxels are classified, wherein the classification includes identifying a subset of internal voxels contained within a range of geometry defined by the object;

[0053] Determine an occlusion utility metric for each of the internal voxels, wherein the occlusion utility metric quantifies an estimate of the potential surface area of ​​an extended version of each internal voxel.

[0054] Depending on the occlusion utility metric, internal voxels are selected from the subset of internal voxels as candidate voxels for transformation into the contained region;

[0055] The volume of the candidate voxel is expanded by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object;

[0056] The extended voxels are assigned as contained regions, wherein the contained regions are arranged to facilitate determining whether a ray intersects the object, depending on whether the ray intersects the contained region.

[0057] According to embodiments of this disclosure, a method for selecting a plurality of contained regions for a ray tracing system is also provided, wherein each of the plurality of contained regions is arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finite enclosing regions forming a hierarchy of object segments, the method comprising:

[0058] Obtain geometric shape data of a defined object and a plurality of candidate contained regions, wherein each of the plurality of candidate contained regions is contained within the geometry defined by the object;

[0059] Select the target contained region from the plurality of contained regions;

[0060] Identify one or more occluded contained regions among the plurality of contained regions, wherein the target contained region at least partially occludes the one or more occluded contained regions;

[0061] Determine the surface area measurement of the region containing the target;

[0062] Determine whether the surface area measure of the target contained region satisfies one or more surface area utility criteria, wherein the one or more surface area utility criteria are defined based on at least one of: i) the surface area defined by the one or more shaded contained regions; and ii) the surface area defined by the object;

[0063] In response to determining that the surface area measure of the target contained region does not meet the one or more surface area utility criteria, the geometry data defining the target contained region is discarded to obtain a refined set of contained regions;

[0064] The refined set of contained regions is arranged to facilitate determining whether a ray intersects the object based on whether the ray intersects with at least one contained region in the refined set of contained regions.

[0065] The graphics processing module can be hardware-embodied on an integrated circuit. A method for manufacturing a graphics processing module in an integrated circuit manufacturing system can be provided. An integrated circuit definition dataset can be provided, which, when processed in the integrated circuit manufacturing system, configures the system to manufacture a graphics processing module. A non-transitory computer-readable storage medium can be provided storing a computer-readable description of the graphics processing module, which, when processed in the integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture an integrated circuit embodying the graphics processing module.

[0066] An integrated circuit manufacturing system may be provided, comprising: a non-transitory computer-readable storage medium storing a computer-readable description of a graphics processing module thereon; a layout processing system configured to process the computer-readable description to generate a circuit layout description of an integrated circuit embodying the graphics processing module; and an integrated circuit generation system configured to manufacture the graphics processing module according to the circuit layout description.

[0067] Computer program code for performing any of the methods described herein may be provided. A non-transitory computer-readable storage medium having computer-readable instructions stored thereon, which, when executed in a computer system, cause the computer system to perform any of the methods described herein.

[0068] As will be apparent to those skilled in the art, the above features can be appropriately combined and can be combined with any aspect of the examples described herein. Attached Figure Description

[0069] The example will now be described in detail with reference to the accompanying drawings, in which:

[0070] Figure 1 A ray tracing system according to an example described herein is shown;

[0071] Figure 2a A ray of light and a box are shown, where the ray begins in front of the box and ends outside the box;

[0072] Figure 2b A ray and a box are shown, with the start and end of the ray in front of the box;

[0073] Figure 3 The diagram shows the 2D representation of the interaction between light and three objects in the scene, as well as the enclosing region associated with the object representing part of the acceleration structure;

[0074] Figure 4a It shows a 2D representation of the interaction between light and objects and contained regions within objects;

[0075] Figure 4b It shows Figure 4a The scene is represented in 3D, where the bounding region is an axis-aligned bounding box;

[0076] Figure 4c An example is shown of a ray interacting with a contained region within an object that is contained in the union of multiple enclosing regions;

[0077] Figure 5 The 2D and 3D representations of a voxelized closed object according to an embodiment of the present invention are shown;

[0078] Figure 6a This illustrates a first example of behavior when a ray intersects with a contained region within a cavity object;

[0079] Figure 6b This illustrates a second example of behavior when a ray intersects with a contained region within a cavity-containing object;

[0080] Figure 7 A curved tube object having two open ends and surfaces and regions for ray tracing is shown according to an embodiment of the present invention;

[0081] Figure 8 An object having a concave surface in a 3D representation, and a 3D representation of a voxelized cross section of the object, are shown according to an embodiment of the present invention.

[0082] Figure 9The invention illustrates the relationship between the present invention and... Figure 8 The same object in 2D, with concave surfaces, different cross-sectional views, and voxelized;

[0083] Figure 10a An example of a 2D non-closed self-hiding object with a hidden area is shown;

[0084] Figure 10b It shows Figure 10a The 2D non-closed self-hiding in the example illustrates another instance of behavior where light intersects with the contained area within the hidden region of a non-waterproof object;

[0085] Figure 10c A method for identifying hidden regions of non-closed self-hiding objects according to an embodiment of the present invention is shown;

[0086] Figure 11a An example of a 3D non-closed self-hiding object with a hidden area is shown in a plan view;

[0087] Figure 11b An example of a 3D non-closed self-hiding object with a hidden area is shown;

[0088] Figure 11c An example of a 3D object resembling a non-jointed tube open at both ends is shown;

[0089] Figure 12a An example of a depth metric (occlusion utility metric for enclosed objects) according to an embodiment of the present invention is shown;

[0090] Figure 12b An example of a discounted depth metric (an occlusion utility metric for concave objects) according to an embodiment of the present invention is shown;

[0091] Figure 13 A 2D representation of a portion of a method for generating contained regions from voxels within a closed object according to an embodiment of the present invention is shown;

[0092] Figure 14a and Figure 14b A 2D representation of another part of a method for generating contained regions from voxels within a closed object according to an embodiment of the present invention is shown;

[0093] Figure 15a and Figure 15b A 2D representation of another part of a method for generating a contained region from a voxel within a cavity according to an embodiment of the present invention is shown;

[0094] Figure 16 A 2D representation of a method for replacing a contained region with a more efficient contained region according to an embodiment of the present invention is shown;

[0095] Figure 17 An isometric projection of a 3D object according to an embodiment of the present invention is shown;

[0096] Figure 18a A third example involving an object as a 3D surface is shown, along with a method for defining said object;

[0097] Figure 18b It shows how to handle and Figure 18a An example of a ray intersection test on a 3D surface object;

[0098] Figure 19 A partial 2D representation of a method for generating contained regions from voxels within an object that is a 3D surface is shown;

[0099] Figure 20a and Figure 20b A portion of a method for generating contained regions from voxels within an object that is a 3D surface, according to an embodiment of the present invention, is shown;

[0100] Figure 21 This is a flowchart of a method for generating a contained region within an object based on the examples and embodiments described herein;

[0101] Figure 22 This is a flowchart of a method for refining the set of contained regions based on the examples and embodiments described herein;

[0102] Figure 23 This is a flowchart of a method for generating contained regions on a continuous surface according to an embodiment of the present invention;

[0103] Figure 24 A computer system in which a graphics processing system is implemented is shown; and

[0104] Figure 25 An integrated circuit manufacturing system for generating integrated circuits that embody a graphics processing system is shown.

[0105] The accompanying drawings illustrate various examples. Those skilled in the art will understand that the element boundaries (e.g., boxes, groups of boxes, or other shapes) shown in the drawings represent one example of a boundary. In some examples, it may be that one element can be designed as multiple elements, or multiple elements can be designed as one element. Where appropriate, common reference numerals are used throughout the drawings to indicate similar features. Detailed Implementation

[0106] The following description is presented with the aid of examples to enable those skilled in the art to make and use the invention. The invention is not limited to the embodiments described herein, and various modifications to the disclosed embodiments will be apparent to those skilled in the art.

[0107] The embodiments will now be described using only examples.

[0108] Even with accelerated architectures, performing intersection tests in ray tracing systems remains a significant undertaking. For example, ray tracing is used to render images of 3D scenes, which can have approximately one million pixels. Rays can be traced once for each sample location. Furthermore, using supersampling, multiple rays can be generated per pixel. As graphics rendering techniques advance, the complexity of scenes to be rendered tends to increase, so it's not uncommon for scenes to contain thousands of objects, each represented by several thousand primitives. Moreover, the image being rendered can represent frames of a sequence of frames to be rendered in real-time, for example, for display to a user in real-time. For instance, a user might be playing a game, where the rendered image represents the user's 3D scene view while playing. To make the frame sequence appear continuous, many frames can be rendered per second, such as 24, 30, 60, or even 120 frames per second. Therefore, it's understandable that performing intersection tests in a ray tracing system for real-time scene rendering involves a considerable amount of work. This problem is complicated by the expectation of performing ray tracing on home computers and even mobile devices (such as tablets or smartphones), for which acceptable size and power consumption may be far lower than that of standard computers.

[0109] As described above, testing the intersection of rays with the bounding regions of nodes corresponding to acceleration structures is an extremely frequent operation in ray tracing systems. It should be understood that a bounding region refers to a generally n-dimensional closed region, which can be axis-aligned. Preferably, for 3D scenes, the bounding region is an axis-aligned bounding box (AABB) that can be efficiently tested using a box testing unit (BTU), or an oriented bounding box (OBB) that can provide stricter boundaries but may be more expensive to test. In particular, ray intersection tests with bounding regions typically constitute the majority of intersection tests performed on the image used to render the scene using ray tracing. Therefore, optimizations that reduce the number of these intersection tests will benefit the optimization of the ray tracing system in any or all of the following aspects: i) reducing execution time, ii) reducing power consumption, and iii) reducing the physical size of the ray tracing system.

[0110] As mentioned above, GB application GB2407459.3 (incorporated in its entirety) addresses these issues and provides an optimized approach to intersection testing, particularly in scenes containing a large number of occluded objects, and / or for objects containing a large number of primitives. The provided solution involves including so-called 'enclosed regions' (which can be volumes in 3D and can be axis-aligned, thus making them axis-aligned enclosed regions, AACB) within the object's mesh, and testing the ray against the geometry defining the enclosed region in a first instance before determining whether a ray intersects the mesh of the defined object. An advantage is that the intersection between the ray and the object can be inferred in advance. Before describing examples and embodiments of this disclosure, specific advantages and use cases for performing intersection with enclosed regions are briefly described for context. Examples and embodiments of this disclosure particularly relate to methods for generating enclosed regions and methods for selecting an optimized set of enclosed regions for intersection testing.

[0111] Motivation for inclusion zones

[0112] Typically, an acceleration structure called a Bounding Volume Hierarchy (BVH) is used. This involves a tree structure for a set of objects comprising a set of nodes, where each node relates to a bounding region (in a 3D scene, a bounding volume) for the object. An object can be defined by a single bounding region or multiple bounding regions. That is, an object may not be entirely contained within a single bounding region, but it can be entirely contained within a set of bounding regions (i.e., different bounding regions that define different or overlapping portions of the object). In other words, a region defined by the union of multiple bounding regions can completely contain the object. Child nodes contain successive smaller bounding regions, where the bounding regions of all child nodes are contained within the region of the parent node. Thus, a recursive structure is formed, where the 'leaf nodes' of the scene represent the endpoints of the tree. For a Top-Level Accelerated Structure (TLAS), a leaf node can represent the bounding region of an object. For a Bottom-Level Accelerated Structure (BLAS), the root can represent a leaf node of the TLAS, and a leaf node of the BLAS can represent the bounding region of one or more primitives containing the surface that defines the object. As mentioned in the examples in the background section, it is typically necessary to determine the intersections with the leaf nodes of a BLAS in order to determine if there is an intersection between a ray and an object. This necessity has two drawbacks: First, testing at the leaf nodes requires testing the primitives of the object, which necessitates triangle testing. Triangle testing is generally more computationally expensive and / or more time-consuming than box testing (and / or, in hardware systems, there may be fewer ray-triangle testing units than a ray-box tester). Second, to traverse to the leaf nodes, all consecutive parent nodes must be traversed, which, depending on the complexity of the object, can represent a large number of box intersection tests.

[0113] For reasons explained below, it is generally necessary to determine whether an intersection with an object exists for all types of rays, regardless of whether the closest hit needs to be identified. This is done to determine how to continue processing the ray. For example, the properties of the ray may be updated or modified, or the processing of the ray may be terminated entirely. Therefore, it would be advantageous if the existence of an intersection between a ray and an object could be determined more efficiently, for example, without having to traverse the entire BLAS to the leaf nodes. The advantage of determining intersections with objects more efficiently is particularly evident in scenarios with a large number of closed objects. This problem is further amplified for traversal algorithms that test nodes of an accelerated structure in a non-depth-first and non-sorted order (e.g., breadth-first order or a mixture thereof) or in parallel (i.e., simultaneously traversing different branches of the accelerated structure). For example, a set of intersection tests from adjacent branches of a BVH tree structure can be queued for sequential or parallel testing against a given ray or ray group. However, parallel testing can be performed in an unpredictable order.

[0114] A ray (r) can be defined as r = O + Dt, where O is the vector representing the origin of the ray, D is the vector representing the direction of the ray, and t represents the distance along the ray from the origin. Each ray is related to the maximum culling distance (also called t). max Relatedly, the maximum rejection distance typically defines the maximum distance at which testing needs to be performed (i.e., geometry testing does not require t). max (External implementation). In other words, t max This represents the maximum required test distance for the ray, or the current endpoint of the ray. Therefore, in cases where intersection tests are performed breadth-first or in parallel, and potentially in an unpredictable order, it may be unnecessarily necessary to test many nodes of the BVH. This testing can be a waste of computational resources, as objects associated with those nodes may actually be occluded by objects from another node still in the queue to be tested. The problem is that t cannot be updated until the closest hit has been found. max To reflect the 'true' endpoint of light, this means that unnecessary computing power may be wasted on testing occluded objects.

[0115] For this reason, it is particularly advantageous to reduce the chance of occurrence of t at an earlier point, for example, by providing a method that can determine the existence of intersections with objects more quickly with fewer tests. maxThe value of . For example, instead of traversing down to the leaf nodes of the object to determine the existence of an intersection, it would be particularly advantageous if the existence of the intersection could be determined solely based on box testing (which is computationally cheaper than triangle testing (i.e., testing between rays and primitives)). More generally, it would be particularly advantageous if the existence of the intersection could be determined at a higher level in the BVH (i.e., at nodes closer to the root node), thus significantly reducing the number of box tests that need to be performed. As mentioned above, ray and bounding area (e.g., AABB) testing can be considered a 'conservative hit test of rays against objects' that may return 'false positives' but never 'false negatives'. True hits can generally only be determined by traversing down the hierarchy to the primitive nodes and testing the primitive nodes. Compared to typical scene models, inferring object intersections in this way offers at least two advantages: i) determining the presence of object-ray intersections using tests between rays and the 'new type' of bounding regions instead of tests between rays and triangles / primitives; and ii) determining the presence of object-ray intersections with (potentially significantly) fewer intersection tests. This dual advantage provides improvements in ray tracing efficiency for algorithms that accelerate parallel or breadth-order traversal structures, as well as for ray traversal that is performed serially or depth-order. Furthermore, it offers significant advantages in any system for rays that only need to be hit, not the closest hit (e.g., shadow rays).

[0116] Figure 1A ray tracing system 100 is shown, including a ray tracing unit 102 and a memory 104. The ray tracing unit 102 includes a processing module 106, an intersection testing module 108, and processing logic 110. The intersection testing module 108 includes one or more box intersection testing units 112 and one or more triangle intersection testing units 114. In operation, the ray tracing unit 102 receives geometric data defining objects within a 3D scene. The geometric data may also contain any geometric data defining enclosing or contained regions for use in the intersection test, and any other geometric features of the objects that may be required (e.g., internal volume, cavity, convex hull, or convex defects / concave surfaces of the object). The ray tracing unit 102 also receives ray data defining the rays to be tested for intersection. Rays may be primary or secondary rays, such as shadow rays or reflected rays. The processing module 106 is configured to generate an acceleration structure based on the geometric data and send the acceleration structure to the memory 104 for storage. Alternatively, the acceleration structure may be a predetermined portion forming the geometric data. After the acceleration structure has been stored in memory 104, intersection testing module 108 can retrieve nodes of the acceleration structure (including data defining bounding volumes, such as axis-aligned boxes corresponding to nodes) from memory 104 to perform ray intersection tests on the retrieved nodes. To avoid reading the entire acceleration structure at once, intersection testing module 108 can retrieve a subset of boxes from a layer of acceleration structure from memory 104 at each stage based on the results of previous intersection tests. One or more box intersection testing units 112 perform intersection tests to determine whether a ray intersects with each of the bounding regions corresponding to the nodes of the acceleration structure (where a miss can eliminate large areas of the hierarchical acceleration structure). If leaf nodes intersect, appropriate ray-primitive tests are performed; for example, for triangles, one or more triangle intersection testing units 114 perform one or more triangle intersection tests to determine which object(s), if present, the ray intersects with. Other primitive types can use other testing units; for example, procedural models can be done using shader programs.

[0117] The use of one or more box intersection test units 112 extends to performing intersection tests to determine whether a ray intersects with an contained area within an object, as described in more detail below. In some embodiments, one or more box intersection test units 112 may be logically or physically divided into two box intersection test units (or two sets of units thereof), which perform intersection tests using enclosing and contained areas. In some examples, the same box intersection test unit (BTU) may be configured to test both enclosing and contained areas; in other words, a single box test unit may be used twice, once to test one or more enclosing areas and once to test one or more contained areas. In some examples, two or more box intersection test units are configured to operate in parallel: in this case, one BTU may test one or more enclosing areas while another BTU tests one or more contained areas. The results of the intersection tests can be used to infer the existence of an intersection with an object and to indicate which object in the scene the ray intersects with. Where the triangle test unit has determined an intersection, the results may also indicate the location of the intersection point on the object and the distance along the ray from which the intersection occurred. When a box test unit indicates an intersection with an object, the results typically do not reveal the exact location where the object intersects with the ray (in some cases, the box test unit or a specially modified box test unit can provide the exact location / coordinates of the intersection point). However, embodiments of the present invention are advantageous in that they are configured to infer the existence of an intersection with an object even without this information. Processing logic 110 is configured to receive the results of the intersection test. Processing logic 110 is configured to process the results of the intersection test to determine rendering values ​​representing an image of the 3D scene. The rendering values ​​determined by processing logic 110 can be returned to memory 104 for storage to represent the image of the 3D scene.

[0118] Figure 2a and Figure 2b This explains the maximum rejection distance t. max This is in contrast to the purpose of performing an intersection test with the bounding box aligned with the axis (although the general principle applies to bounding areas of suitable shape, and in 2D or 3D). Figure 2a An example is illustrated where an intersection is found between ray 202a and box 204a, in which case the box is an axis-aligned bounding box. A ray can be defined as r = O + Dt, where O is a vector representing the origin of the ray, D is a vector representing the direction of the ray, and t represents the distance along the ray from the origin. Therefore, the line defining the ray is, in principle, infinite. Thus, the ray itself is characterized by its minimum culling distance 210a and maximum culling distance 212a, the minimum culling distance conceptually defining the starting point of the ray, and the maximum culling distance conceptually defining the ending point of the ray. The minimum / maximum culling distance can also be referred to as the minimum / maximum effective distance of the ray.

[0119] Ray 202a intersects the boundary of the box at two locations 206a and 208a. It should be understood that elsewhere in this disclosure, the nearest intersection point 206a along the direction of the ray may be referred to as the 'first' or 'closest' intersection point between the ray and the box. Additionally, the closest intersection point 206a may be referred to as the intersection point where the ray 'enters' the box (i.e., since the ray vector can be conceptually considered as traveling from its starting point 210a to its endpoint 212a). Similarly, the farthest intersection point 208a along the direction of the ray may be additionally referred to as the 'second' or 'farthest' intersection point between the ray and the box, or the point where the ray 'leaves' the box. Figure 2a In the diagram, the two intersection points 206a and 208a with the bounding box are both located on the ray between the minimum and maximum rejection distances. Therefore, the maximum and minimum distance conditions are satisfied, and it will be found that the ray 202a intersects with the bounding box 204a.

[0120] Figure 2b This illustrates an example where no intersection will be found between ray 202b and enclosing region 204b. Furthermore, due to the distance condition, intersection tests between the ray (or, formally, the straight line defining the ray's path) and the box can be completely avoided. Ray 202b intersects the forward plane of box 204b at point 206b (i.e., enters the box) and intersects the backward plane of box 204b at point 208b (i.e., exits the box). Although the line defining ray 202b does intersect box 204b, due to the maximum culling distance 212b, t max The endpoints of the defined light rays are closer to the intersection points 206b and 208b along the direction of the light ray. Therefore, the box intersection test unit can determine that there is no intersection between light ray 202b and box 204b without having to perform an intersection test between the light ray and the box.

[0121] The disclosed method is applicable to various types of light rays. After determining the intersection with the object, the result of the light ray processing can vary depending on the type of light ray. More specifically, the result depends on the ray's 'exit condition'. Generally, this disclosure considers two types of light rays, each with a corresponding exit condition.

[0122] The first type of ray is the 'intersecting ray,' which is typically, and for the purposes of this disclosure, associated with the 'closest hit' exit condition. Closest hit is used to determine the first object (from t) where the rays intersect along the ray's direction. min(The starting point of the defined ray). This exit condition is typically associated with primary rays, reflected rays, and transmitted rays. A second type, including 'shadow rays,' is associated with the 'any hit' exit condition. Any hit is used for visibility testing between two points. For example, a shadow ray is cast from a surface when checking whether a point on a surface is directly illuminated by a light source. Similar types of rays are used, for example, for visibility estimation in ambient occlusion calculations. For this type of ray, no information other than the presence of a hit is needed, i.e., the location of the hit object—assuming it is at t... min t max Within a certain range—this is unnecessary and therefore the location is usually uncertain. Such rays may also be used for non-graphical purposes, such as pathfinding and / or character "AI". For simplicity, these rays will hereafter be referred to simply as shadow rays.

[0123] Figure 3 The diagram shows a 2D representation of ray 302 and three objects 308A, 308B, and 308C within the scene. The scene depicted can be a 2D scene, but it can also be a 3D scene. Ray 302 can be an intersecting ray or a shadow ray, and the results of both will be explained in more detail below. Each object is depicted as being contained within bounding areas 300A, 300B, and 300C. Within each object's bounding area are the left-hand and right-hand bounding areas corresponding to the first-generation child nodes. Therefore, the left-hand bounding areas 304A-L and right-hand bounding areas 304A-R represent the two child nodes of the object bounding area 300A of the first object 308A in the ray path. Furthermore, bounding areas 306A-L(1), 306A-L(2), and 306A-L(n) correspond to the second-generation child nodes contained within the left-hand bounding area 304A-L of the first object 308A. Therefore, Figure 3 Describe a set of bounding regions that recursively constitute a bounding volume hierarchy (BVH) of three objects.

[0124] The light ray is further defined by a starting point 310 and an ending point 312, where the starting point and ending point represent the minimum culling distance t, respectively. min and maximum rejection distance t max It can be seen that, for Figure 3In the example, ray 302 occludes object 308A (first object 308A) and object 308C (third object 308C). In the first example, it is assumed that the ray is the intersecting ray associated with the closest hit exit condition. The location of the maximum culling distance along the ray is farther than each of the objects and its corresponding bounding box. Therefore, ray 302 can be potentially tested against the bounding regions of all objects. In fact, because the ray intersects with the bounding regions of each of objects 300A, 300B, and 300C, the traversal algorithm can potentially traverse down the hierarchy of each object until it reaches a leaf node of one of the objects. As mentioned above, it is typically necessary to find intersections with the primitives of the object (contained in the leaf nodes of the BVH) to safely reduce the maximum culling distance. Therefore, in the worst-case scenario, the traversal algorithm first finds the intersection with the leaf nodes on object 308C, then traverses the portion of BVH associated with object 308B until it finds an intersection with a leaf node, and then traverses down again the portion of BVH associated with object 308A. Thus, this worst-case scenario involves many (wasted) intersection tests utilizing the enclosing regions associated with occluded objects 308B and 308C. Furthermore, in this inefficient scenario, the maximum culling distance will decrease by three times. In other worst-case scenarios, the maximum culling distance can decrease incrementally or even more than three times.

[0125] Furthermore, even if the BVH traversal algorithm decides (e.g., based on guided heuristics) to first traverse the portion of the BVH associated with object 308A, the algorithm will still need to traverse down to the leaf nodes (as shown, the leaf nodes will exist in the second-generation child nodes 306A-L(1)). During this traversal, rays can be well tested for enclosing regions that will not intersect (e.g., many regions contained within child nodes 304A-R). Therefore, even if the traversal algorithm traverses the BVH associated with the 'real' closest object 308A, there is still a possibility of many wasted intersection tests before reaching the leaf nodes containing intersections. This is because t can only be updated after the intersection with the object has been confirmed. max The position of t at this time max The position will be updated to the determined intersection point. Similarly, for shadow rays, the intersection needs to be determined before processing the terminateable ray. Therefore, although it is not necessary to update t for shadow rays... max The shadow ray still corresponds to the endpoint t, which is the maximum distance required for geometry testing. max Related. Therefore, in the case of t min and t max All objects between the defined minimum and maximum effective distances may be tested, which may be unnecessary (in the sense that rendering does not depend on intersections with more distant occluded objects).

[0126] Figure 4a and Figure 4b An embodiment of a method for more effectively determining intersections with objects is described. Figure 4a The 2D representation is shown, and Figure 4b This shows a 3D representation of the same scene. The scene shows a ray 402 intersecting a spherical / circular object 400. Object 400 is contained within a bounding area 404. Figure 4b As shown, the bounding region 404 is an axis-aligned bounding box 404, i.e., because the x, y, and z dimensions of the box are aligned with the x, y, and z axes of the coordinate system. It should be understood that any suitable bounding volume (or generally, an n-dimensional bounding region) can be suitable. Ray 402 has a starting point 410 and an ending point 412, which are respectively defined by minimum culling distances 410 and t. min and maximum rejection distance t max Limited. In Figure 4a and Figure 4b In the accompanying drawings, the enclosing region / volume and the contained region / volume are typically illustrated. For clarity, the region / volume may be expanded and / or reduced compared to the actual embodiment.

[0127] Object 400 is a closed object. For the purposes of this disclosure, a 'closed' object can be considered as an object without 'gaps' in the surfaces defining its ends, such that unbounded rays interacting with the closed object are guaranteed to intersect the object an even number of times (e.g., for a closed sphere, once 'entering' the object and once 'exiting' the object—grazing / tangential 'intersections' are ignored). As another example, a ray and a closed 3D torus will be guaranteed to intersect zero, two, or four times. It should be understood that the 'closed' characteristic of an object is independent of the object's visual properties (except for 'alpha test' geometry). For example, the ray tracing system does not necessarily consider a closed object to be 'opaque'. For example, a closed object can be opaque, translucent, transparent, or have any other properties that inform the rendered appearance of the object. Embodiments of the current method generally apply to all closed objects, regardless of the object's visual or property characteristics.

[0128] Figure 4a and Figure 4bThe object 400 is also defined by a 'contained region' 414. The contained region is completely contained within the outer surface of the object and is therefore smaller than the object 400. In this case, a single enclosing region 404 is used to contain the entire object, and it is therefore negligible that if the contained region is completely contained within the outer surface of the object 400, it is also completely contained within the enclosing region 404. However, it is readily understood that multiple enclosing regions can be used instead to completely define the object 400. For example, in this case, one enclosing region can be used to define the left side of the spherical object 400, while another enclosing region can be used to define the right side of the spherical object. In the case of multiple enclosing regions, the union of these enclosing regions defines a volume within which the contained region can be identified and defined (i.e., the contained region can extend beyond a single boundary region into another enclosing region, provided that it is completely contained by those enclosing regions). Therefore, in the example where two enclosing regions are used to define the two halves of the object 400, the same contained region 414 will still be valid, even if it extends across the interface between the two boundary regions. Figure 4c The document illustrates a specific example involving multiple enclosing regions.

[0129] Figure 4b The contained region in the scene is axis-aligned, but this is not mandatory. For example, the contained region can be a directed bounding box (OBB), meaning its axes are oriented in the 'instance space' coordinate system used to define the object. This contrasts with an axis-aligned bounding box (AABB), which is aligned with the axes of the coordinate system that defines the 'world space' of the scene. In practice, it would be preferred to use the same axis system to define both the contained region and the bounding volume. Furthermore, the contained region or contained volume of a 3D scene can be any suitable shape, such as a cuboid, sphere, prism, etc., provided that testing light rays is relatively inexpensive. The advantage of placing the contained region within a closed object is that if it can be determined that i) a light ray intersects the bounding region surrounding the object, and ii) a light ray intersects the contained region completely contained within the object, then the intersection of the light ray and the object can be inferred with certainty. Therefore, the existence of an intersection with the object can be determined based solely on two box intersection tests. The first test is between the light ray and the bounding region (e.g., an AABB), and the second test is between the light ray and the contained region (which can also be an axis-aligned box). Therefore, the existence of intersections can be determined without traversing down to the leaf nodes, thus eliminating the need to perform ray-primitive intersection tests with any of the primitives in the corresponding subtree. In the case of shadow rays, determining the existence of intersections with the contained region completely avoids the need to perform intersection tests between the ray and the primitive. Furthermore, this means that the existence of intersections with objects can be determined using only the box test unit 112 (BTU) instead of the triangle test unit 114 (TTU), which is computationally less efficient than the BTU 112.

[0130] For intersecting rays, when the existence of intersection with an object is determined, the maximum effective distance t of the ray is... max Reduce the maximum possible distance while still maintaining the integrity of the rendering process (i.e., preserving the waterproof or non-redundant waterproof characteristics of the rendering algorithm). For a typical rendering process, t... max The value is reduced to equal the point of intersection. In embodiments of the current method, this exact intersection point is not (initially) determined. Therefore, different criteria are typically applied to determine t. max To what extent should it be reduced? Typically, t max The value reduced to is no greater than the endpoint of the light ray (i.e., t). max The current value of t and the distance between the intersection point of t and the contained region. Specifically, t can be set. max The new, reduced value is such that the new value is no closer to the origin of the ray than the nearest intersection point with the contained region.

[0131] exist Figure 4a and Figure 4b As can be seen, ray 402 intersects the bounding box 404 at points 406 and 408 (corresponding to the entry and exit points of the ray based on its direction). It can also be seen that the ray intersects the contained region at points 416 and 418. Assuming the origin of the ray is outside the bounding region 404, it is not necessary to determine whether the origin of the ray is outside the contained region (because it must be by inference). However, for completeness, it should be noted that the ray intersects the contained region an even number of times, i.e., at points 416 and 418. Since ray 402 begins outside the bounding region 404 and intersects the contained region 414, it can be determined that the ray intersects the object 400. This is because it can be definitively inferred that the intersection point between the object 400 and ray 402 occurs somewhere between the first intersection with the bounding region 406 and the first intersection with the contained region 416. This inference is possible because the object is closed, the contained region is completely within the closed object, and the bounding region is completely outside the closed object.

[0132] Therefore, the goal is to achieve t given the supply area. max Reduce the maximum conservative amount. (Conservatively) reduce t to the permissible extent. max The motivation is to reduce the likelihood that ray 402 will be unnecessarily tested for distant occluded objects; additionally, it reduces the amount of testing required for geometry / boxes within the subtree corresponding to AABB 404 / object 400. Without further intersection testing, it is impossible to determine the exact location of the intersection point with the object. Therefore, t max This can be reduced to at most the intersection point 416 between the ray and the contained region, said intersection point being closest to the origin of the ray (i.e., the first intersection point 416 with the contained region). Therefore, t can be... maxUpdated to 'updated maximum culling distance' 420, which is... Figure 4a and Figure 4b The triangle is represented in the image.

[0133] In some embodiments described in detail below, it is determined whether the ray originates within the enclosing region and / or the contained region. In this respect, if the ray originates within the boundary defined by the enclosing region, the ray will necessarily intersect the contained (convex) region an odd number of times. Various different methods exist to determine whether the ray originates within the enclosing region. min Whether the starting point of the defined ray originates within the contained region. For example, in the case of a box, no more than six comparison tests (e.g., Xmin <= X <= Xmax, and the same for the Y and Z dimensions) can be performed with respect to the six planes of the defined box to determine intersection, which involves determining whether a portion of the infinite ray is contained within the box. The portions of the ray within the box can then be compared, i.e., by [t] enterbox ,t exitbox The defined portion is used to determine whether the starting point is located within the defined portion, i.e.: t enterbox ≤t min ≤t exitbox In another example, t can be... min Multiply by the ray direction and add the result to the ray origin to find the 3D location of the ray's starting point, which can then be compared to the boundary of the contained region.

[0134] While the contained region can be of any suitable shape or dimension, it may be particularly advantageous if the contained region is an axis-aligned contained box, referred to herein as an axis-aligned contained box (AACB). This is because the BTU works particularly efficiently for axis-aligned geometry. Furthermore, if the contained region is axis-aligned, existing hardware for the BTU can be used to perform tests on the contained box. In this regard, since the BTU can be used in embodiments to perform fast and computationally efficient intersection tests with axis-aligned bounding boxes (AABBs), the embodiments disclosed herein utilizing contained regions can also perform intersection tests on AACBs using exactly the same or very similar hardware. In this way, embodiments of the present method significantly accelerate the traversal of the BVH with virtually no additional hardware cost.

[0135] In other examples, the enclosing region can be non-axis-aligned, such as a directed bounding box (OBB), or a more general parallelepiped or convex polyhedron formed by the intersection of planar half-spaces. Advantageously, the enclosed region is based on the same orientation. Other embodiments may allow the enclosed region to be a sphere or even a cylinder. In some examples, the OBB can still be tested efficiently: that is, when using the OBB in some examples, the light rays can be transformed to a different coordinate space, so that the OBB can then be processed into an AABB. Therefore, in some examples, the OBB can also be able to take advantage of the efficiency of performing the fastest BTU when testing axis-aligned volumes.

[0136] Figure 4a and Figure 4b The contained region 414 within object 400 is merely illustrative of the concept of a contained region and therefore does not occupy the maximum amount of internal space within the object. However, it should be understood that the contained region should be constructed conservatively, i.e., preferably designed to completely avoid the possibility of 'false positive' hits. For the same reason, the enclosing regions of, for example, AABBs are typically constructed to be conservatively larger than their required size. Therefore, the contained region is preferably constructed to be conservatively smaller than the ends of the objects it contains. For example, the dimensions of the contained region can be intentionally reduced by a small value, such as a small absolute value, such as a 'unit in the last place' (ULP) or a multiple thereof. The result of this conservative construction is that no light rays will be found to intersect the contained region incorrectly, which would have the undesirable result of implying that the light rays intersect the object when in fact the light rays do not.

[0137] Figure 4c This illustrates another example of ray tracing behavior, this time involving a standard enclosed object but containing multiple bounding regions, or more specifically, contained within the union of multiple bounding regions. For example... Figure 4aAs explained, the circular object 400c is contained within two enclosing regions 404c-1 and 404c-2. Each enclosing region 404c-1 and 404c-2 contains only a portion of the object 400c, but the union of the overlapping enclosing regions 404c-1 and 404c-2 contains the entire object. Therefore, for the purpose of defining and testing the contained region, the union of multiple enclosing regions can be regarded as a single enclosing region. That is, the intersection with the contained region within one or more enclosing regions can be determined relative to the region defined by the union of one or more enclosing regions. This is advantageous because it allows the use of multiple overlapping boxes to effectively define objects with unusual or unstable shapes without unnecessarily limiting the extent of the contained region within the object. Furthermore, it will be observed that no single enclosing region contains the entire contained region 414c-1 and 414c-2. However, since the union of the overlapping enclosing regions 404c-1 and 404c-2 contains two contained regions 414c-1 and 414c-2, the contained regions operate in essentially the same way as in the case of a closed object with a single enclosing region.

[0138] For example, consider having t min 410c-1 and t max The first ray 402c-1 of 412c-1 is placed outside the union of enclosing regions 404c-1 and 404c-2, and intersects with the enclosing region at entry point 406c-1 and exit point 408c-1. The first ray 402c-1 intersects with one of the contained regions 414c-1 at entry point 420c-1 and exit point 418c-1. Because t min 410c-1 and t max 412c-1 lies outside the union of the enclosing regions, therefore t max The value of 412c-1 can be updated to the intersection point of the contained region along the direction of the ray, i.e., point 420c-1. This is equivalent to Figure 5 The only difference in behavior is that the union of enclosing regions is treated as a single enclosing region.

[0139] Now consider the second ray 402c-2, which has a starting point t inside the enclosing region 404c-1. min 410c-2, but t outside the union of the encircling regions 404c-1 and 404c-2 max 412c-2. The second ray 402c-2 intersects the enclosed region at the final exit point 420c-2. The second ray 402c-2 intersects one of the contained regions 414c-2 at the entry point 416c-2 and the exit point 418c-2. Due to t min 410c-1 lies within the region (in this 2D case, the perimeter) defined by the union of the enclosing regions, therefore t maxThe value of 412c-2 cannot be updated to the first intersection point with the contained region 416c-2. Instead, for conservatism, t max It can only be updated to the intersection with the union of the furthest enclosing region along the direction of the ray, i.e., the intersection point 420c-2. Note that the second ray 402c-2 also intersects the first enclosing region at the exit point 422c-2. This exit point 422c-2 is along the exit points of the union of rays earlier than the enclosing regions 420c-2. However, to ensure correct behavior, for conservatism, t max The value of t is preferably not updated to an earlier point 422c-2 (even though this point 422c-2 is technically the exit point of the enclosed region). This ensures that t max The value of point 420c-2 being updated is guaranteed not to cause any undesirable results. Similarly, this behavior is equivalent to... Figure 6a The behavior described in the code applies to the same enclosing object. Similarly, the only difference is that the region bounded by the union of enclosing regions is treated as a single enclosing region, and for updating t... max The purpose is to ignore portions of individual enclosing regions (e.g., point 422c-2) within the region / perimeter defined by the union of enclosing regions 404c-1 and 404c-2.

[0140] To avoid ambiguity, although multiple overlapping enclosing regions 404c-1, 404c-2 form a substantially rectangular area, there is no requirement for this, nor is there any particular advantage. The area defined by the union of multiple enclosing regions can be of any irregular shape, and part of the advantage of having multiple overlapping enclosing regions is that they can be combined / unified to form an irregular shape that compactly defines an irregular object.

[0141] In summary, the intersection between a ray and its contained region can be used to skip accelerated structure traversals and subsequently result in fewer primitive tests being invoked during ray-mesh intersection testing. By placing one or more contained regions high up in a subtree of a mesh, those contained regions can be tested earlier (i.e., before or instead of directly testing the mesh). In response to a confirmed hit, the result is either pruning the traversal branch by limiting the ray's t-max value or ending the traversal entirely.

[0142] As the applicant previously knew (this does not imply that the method is generally known, or even anticipated), the contained region can be pre-determined for each given object in the scene, or can be generated by the graphics engine or other parts of the ray tracing system. The construction will depend on the type of object. For example, for fixed-dimensional objects (i.e., where the geometry defining the object remains the same), the contained region can be pre-defined, for example, by the designer or algorithm / API that builds the object. Therefore, the geometry of the object can be associated with a contained region (or multiple contained regions) customized for said object. Thus, during ray tracing, the geometry of the contained region can serve as...Figure 1 The portion of the 'geometry data' indicated in the code is passed to the ray tracing unit 102. In other examples, contained regions can be dynamically generated once the accelerated structure / BVH has been built for a set of objects in the scene. However, manually building contained regions would consume a significant amount of designer time. It would be advantageous if designers did not have to manually build contained regions. Furthermore, it is highly unlikely that designers would be able to manually create the optimal set of contained regions with good utility.

[0143] Therefore, as the applicant previously knew (this does not imply that these methods are generally known or even anticipated), any suitable algorithm for generating contained regions within an enclosed object can, in principle, be employed. For example, in one approach, an average center point of the object can be determined, and a contained region is generated by expanding a region or volume around said center point until the region occupies as much space as possible within the area defined by the object's relevant geometry (e.g., the outer surface of the enclosed object). Algorithms such as 'flood fill' can also be used. Procedural generation and / or modification of contained regions can also be applied to contained regions within objects whose shape has changed (e.g., moving objects).

[0144] However, this naive algorithmic approach may still not produce better results than the designer's manual results, i.e., contained regions with good utility. In other words, contained regions (or multiple contained regions) produced in this way may not be optimal. In this disclosure, the reference to 'utility' of contained regions or the 'optimal' set of contained regions refers to contained regions that are capable of extracting the full potential of the advantages described above. Further details on how these advantages are extracted are explained below.

[0145] Typically, the primary goal of good utility for contained regions is that, given the interaction of a ray with an object containing the contained region, the contained region provides a high probability that the ray will also interact with one or more contained regions. In other words, for any ray that intersects an object, the probability that the ray will also intersect one or more contained regions should be as high as possible. This can be expressed as trying to maximize the conditional probability p(ray hits contained region | ray hits object). However, generating a set of AACBs that maximizes this value without generating so many contained regions that it degrades the performance of the intersection testing system (i.e., by generating too many regions that must be tested for intersection for every ray) is a critical issue.

[0146] Therefore, this disclosure provides a method for solving the problem of how to generate one or more effective and useful contained regions (i.e., regions with good utility). In addition to the aforementioned overcontrol objective, another implicit objective of the generated set of contained regions is that their use in the intersection testing method should, on average, save more time than the cost of performing intersection tests on additional contained regions (i.e., by culling the BVH branch in the case of the 'closest hit' condition, and / or completely culling the ray in the case of the 'any hit' condition). Contained regions are not a substitute for enclosing regions, because enclosing regions will always be tested first before reaching contained regions within the BVH.

[0147] Therefore, at a high level, the solution provided by this disclosure is to generate one or more contained regions, said one or more contained regions

[0148] i) Providing good utility by optimizing the ability to capture occluded objects, thus capturing a significant proportion of the light that actually intersects with the object; and

[0149] ii) Implement i) with a fairly small number of contained regions, such that, overall, the cost of performing intersection tests on the additional contained regions exceeds (preferably significantly exceeds) the time saved in the overall traversal.

[0150] As mentioned above, the contained region can be manually generated to solve the two problems mentioned above, but this is labor-intensive and therefore not desirable. Furthermore, manual methods are not feasible at runtime, for example, for non-static objects.

[0151] For the purposes of this disclosure, there are three different categories of objects that can utilize contained regions to improve ray tracing efficiency. All three different objects use the same basic methods to generate contained regions, but some variations apply to each specific case. The three types of objects are as follows:

[0152] 1) Closed Objects: These are objects whose meshes are completely connected and closed, meaning there are no gaps within the object's mesh. Therefore, light cannot penetrate the object's interior without intersecting the object's mesh. These objects can also be described as 'waterproof'. A convenient mathematical term to describe this closed mesh property is an object with a manifold mesh.

[0153] 2) Concave objects: Objects with convex areas that define cavities or basins.

[0154] 3) Continuous surface objects: Surfaces without holes but may not be closed. Note that all local areas of the mesh of a closed object represent continuous surfaces.

[0155] In the examples above, the Stanford bunny is used to illustrate the method for closed objects, the bowl is used to illustrate concave objects, and the flat portion of a mesh is used to illustrate continuous surface objects.

[0156] Voxelization of objects

[0157] Figure 5 The 2D and 3D representations of the enclosed object (in this case, the Stanford Rabbit 500) are shown. A common feature of all methods used in this disclosure to generate the enclosed region is the subdivision of the object into voxels in the first instance. Generally, a voxel is the three-dimensional counterpart of a pixel and represents a unit value on a regular grid in three-dimensional space. Typically, the size and position of a voxel can be predefined as part of the geometry of the scene. However, it should be understood that not all voxels disclosed in this specification must have a unit size, and in fact, not all voxels described herein need to be quantized to voxel unit values. For example, an 'extended voxel' as described herein can be any arbitrary size. Furthermore, a voxel hierarchy (voxelizing objects at different granularities) can be employed, in which case the voxels can be of different sizes.

[0158] Although many examples in this specification are 3D examples, and voxels are inherently 3D objects, it should be understood that the methods disclosed in this invention are also applicable to 2D cases involving closed objects, concave objects, and continuous surfaces. Therefore, for the purposes of this specification, voxels are not strictly limited to 3D objects, but may also represent 2D objects.

[0159] The decision to use voxels follows the observation that AABBs can be created by using a group of cuboids of voxels. This is because voxels in a 3D scene are typically aligned with the axes of the spatial coordinate system. Constraints can then be imposed on the AABBs, especially where they are positioned, thus turning them into valid AACBs. As a simple example, if we adopt a conservative solid voxelization of the mesh (i.e., strictly internal voxels within the mesh), then any AAB within those voxels will also be a valid AACB.

[0160] For closed objects, the first step is to identify and classify the different types of voxels that make up the object. For closed objects, the key type of voxels to be identified are those that are strictly within the object's mesh and do not intersect with the object. This type of voxel is called an 'internal voxel'. It is assumed here that the object has already been identified as closed. This is not always the case, and in some examples, the first step is to preprocess the mesh to determine if the object's mesh is closed. The mesh preprocessing steps are described in more detail below. Another type of voxel identified is the 'boundary voxel'. Boundary voxels are those voxels that intersect with the object's mesh.

[0161] At a high level, the steps involved in identifying 'internal voxels' and 'boundary voxels' are as follows:

[0162] i. Generate or identify a 'voxelised hull': In practice, this involves defining the extent / boundary of the enclosing object (i.e., determining that the mesh is a manifold mesh and therefore waterproof). For a region containing a mesh, each voxel intersecting the mesh is labeled as a 'boundary voxel'. The set of boundary voxels should then form a closed boundary, and this closed boundary defines the 'voxelised hull'.

[0163] ii. Fill the internal volume: Once the voxelized shell is identified, each voxel within the voxelized shell is marked as an internal voxel.

[0164] One way to perform step i) instead of starting with a (relatively) fine voxelization of the object is to use a voxel hierarchy. Starting with a (relatively) coarse voxelization, boundary voxels can be identified, and those identified voxels can then be subdivided to determine whether they are boundary voxels before re-evaluating smaller voxels. By repeating the process, the voxelization can be refined around a mesh to identify boundary voxels at the desired granularity. This can be an efficient way to identify and store boundary voxels because it avoids having to consider whether every voxel at the final / fineest voxelization granularity is a boundary voxel. This reduces memory usage because at each level in the voxel hierarchy, the only voxels that need to be considered are those within the voxels identified as boundary voxels at the next coarsest granularity level.

[0165] In practice, step ii) can be accomplished by performing a scan line pass of the voxel raster and marking all voxels located between the 'entry' and 'exit' boundary voxels as internal voxels. This is merely an example, and other methods for identifying internal voxels exist and are available. Solid voxelization is just one way to classify these voxels, and other voxelization methods are interchangeable here, as long as the result is a voxelized shell (boundary voxels) and a voxelized internal volume (internal voxels). For example, if different methods of voxelization that generate all the desired voxels are used, these can be separated by subtracting the easily computed voxelized shell: voxels inner =Volumetric all -voxel hull As another example, a voxel hierarchy approach similar to that discussed above for step i) can be used. In this case, memory usage efficiency again arises if internal voxels are identified at coarse levels, because voxels at finer levels can be assigned as internal voxels without explicitly considering them separately.

[0166] Figure 5A 2D Stanford Bunny object 500 and a 3D Stanford Bunny object 501 are shown, both voxels, with the voxels categorized as described above. The mesh boundaries of the objects are shown as solid black lines 502 in the 2D object 500. The mesh surface of the 3D object 501 is not shown, for clarity only. In both the 2D and 3D objects, as shown by the solid black lines 502 in the 2D object 500, the mesh surface of the 3D object 501 is not shown, for clarity only. In both the 2D and 3D objects, black squares represent internal voxels 508. It can be seen that these internal voxels are completely contained within the object's surface 502. White squares in the 2D object (and light gray squares in the 3D object) represent boundary voxels 506. For the 2D object, it can be seen that each of the white boundary voxels 506 intersects the line defining the object's surface 502.

[0167] All remaining voxels that are not classified as internal or boundary voxels are considered 'unclassified' or 'empty'. For this reason, it is not necessary to explicitly classify / label these voxels, as they can simply remain 'unclassified'. It is generally beneficial for these voxels to remain unclassified so that they can be later classified as 'concave' voxels (described below) if needed. Figure 5 The dark gray square in 2D object 500 represents unclassified voxel 504.

[0168] As described in more detail below, contained regions are generated starting from voxels classified as internal voxels. Theoretically, each individual 'internal voxel' is already a valid contained region without any further manipulation (specifically, AACBs, since they may be axis-aligned). This is because each internal voxel is contained within the geometry of the object (e.g., its outer surface for a closed object) and does not intersect with the object's mesh. However, 3D objects will contain a very large number of small voxels. Without further modification to these internal voxels, such a large number of small AACBs would be almost useless, as the ray tracing system would have to test so many boxes for every ray. This would be counterproductive, as the goal of using contained regions is to save overall time by performing fewer box intersection tests, thus saving traversal time, and therefore adding hundreds or thousands of AACBs to BVH would consume an undesirable amount of testing resources.

[0169] In some examples, to accelerate the entity voxelization step and later provide us with fast access to useful data, two types of auxiliary data structures can be generated during voxelization: a 'voxelated shell graph' and an 'occupancy mask'. A voxelated shell graph is a spatially partitioned data structure (e.g., a kd-tree) containing the locations of boundary voxels. This voxelated shell graph allows for fast lookups (O(log n)) of the nearest boundary voxel to any arbitrary voxel, enabling the rapid computation of voxel density metrics (an example of an occlusion utility metric). As described in more detail below, this metric is used to select which voxel to use to generate the contained region (e.g., AACB). An occupancy mask is a 2D bitmask of the voxel raster used for mesh projection, typically projected from the principal axis (i.e., the axis aligned with the 3D spatial coordinate system). The occupancy mask stores the minimum and maximum indices of the occupied voxels (i.e., voxels that have been classified as interior or boundary voxels) in the corresponding raster slice. Occupancy masks can be thought of as hierarchical z-buffers (HZBs) from the voxelized mesh of the principal axes (thus making them GPU-optimized). For the 3D case, three of these masks are generated (one for each principal axis), and they are subsequently used to 1) accelerate solid voxelization by restricting the start and end points of scanline passes (for identifying internal voxels between boundary voxels); and 2) calculate surface area utility criteria (described in more detail below). In short, surface area utility criteria include one or more criteria used during the generation and / or selection of occluded regions to determine whether to use an AACB. For example, surface area utility criteria can be used to reject highly occluded AACBs or to place AACBs that perform better than at least one existing AACB (sometimes by replacing another AACB).

[0170] Now turn to concave objects. Although these objects include openings that allow light to penetrate their cavities (e.g., the trough of a bowl, the interior of a vase, or the interior of a tube), in many cases it is still useful to define the contained region within the object's cavity (in some cases, the convex hull of the object). Before describing the voxelization process of concave objects, briefly describe their properties for the purpose of intersecting with the contained region.

[0171] Figure 6aA modified use of the contained region 614a for use with an object is shown. In this case, the object 600a includes an open cavity, and the 2D drawing is intended to represent a 3D mug or vase. The object is defined by a containment region 604a defined in a 'standard' manner, i.e., such that it contains the entire object. Additionally, within the standard containment region 604a is another containment region referred to as a 'partial containment region' 624a. The partial containment region 624a is configured to contain all portions of the object 600a that define the open cavity, i.e., the concave portion of the object (including both the outer and inner walls). The partial containment region is also configured to exclude portions of the object that define the 'opening' of the cavity: in this case, the lip of the vase-shaped object 600a. Because the partial containment region is specifically designed to exclude the 'open' portions of the object, the surface providing this exclusion function is viewed differently from the other surfaces of the region and is referred to as an 'abnormal surface' 630a. In this disclosure, the reference to 'abnormal surface' 630a refers to the surface of the contained region or the surface of the voxel that intersects with the mesh of the object.

[0172] It should be understood again that the enclosing region 604a, the contained region 614a, and the partially enclosing region 624a are also intended to represent 3D objects, i.e., boxes. In the case where the partially enclosing region 624a is a 3D partially enclosing box or a partially axis-aligned enclosing box, five of the six faces of the partially enclosing box 624a are 'standard' surfaces, and one face of the partially enclosing box 624a represents an 'abnormal surface' 630a. Any reference to 'standard' surfaces in this specification implies that the partially enclosing region is not a surface of an abnormal surface.

[0173] It should be understood that all examples shown in 2D in the specification may also relate to 3D examples, and vice versa. The 2D examples are primarily for illustrative purposes. Again, for consistency and clarity of terminology, the term 'surface' is used throughout this disclosure. However, the reference to 'surface' should not be construed as limiting it to the 3D embodiments. For example, in the 2D embodiments, as in... Figure 6a and Figure 6b In this context, the abnormal 'surface' is actually a line, namely the 'abnormal line'.

[0174] Given that object 600a has an open cavity (i.e., a substantially concave portion), the contained region utilizes space more effectively if it is allowed to occupy this open cavity 632a, rather than being constrained within the outer surface of the object (i.e., in this example, inside the wall of the vase). Therefore, the contained region is constructed to be contained within the outer surface of the object. The cavity / concave surface of the object can also be defined as a 'convex defect' of the object, which is a spatial region formed between the convex hull of the object and the outer contour of the object. The convex defect 632a in… Figure 6a Shadows in China and Canada.

[0175] Ray 602a is defined in a standard manner, that is, it has a starting point t with a defined minimum rejection distance. min And the endpoint t that limits the maximum removal distance. max The 'hit' with the standard bounding box 604a will also be determined in a standard manner. Following this determination, it will be determined whether ray 602a intersects with the partially bounding region 624a. If the ray intersects with the partially bounding region 624a, it will be determined whether the ray intersects with the contained volume 614a. In the standard 'closed object' scenario, t max It can be safely updated to the intersection closest to the contained region. For cavity objects, since the object has an open surface excluded by the 'abnormal surface' of the partially enclosed region, at least one additional test is included to determine the type of surface on the partially enclosed region with which the ray intersects. Generally, the following factors are used to determine whether or how the ray is updated. max (In this case, it is assumed that the origin and end points of the light ray are located outside the partially enclosed region (PBR), such as in...) Figure 6a middle):

[0176] 1) If the light Without If the area is contained, it cannot be safely determined whether the object has been hit by the light.

[0177] 2) Otherwise (i.e., light) Indeed If at least one contained region is hit, and the entry point on the PBR is a standard surface (regardless of the type of the PBR surface at the exit point), then t can be... max Adjust to the minimum of the following: i) the entry point of the contained region (e.g., 620a) and ii) the existing t max ;

[0178] 3) Otherwise, the entry point of the PBR must pass through an anomalous surface, and therefore t can be... max Adjust to the minimum of the following: the exit point of PBR and ii) the existing t max .

[0179] Therefore, in Figure 6a In this process, it is determined whether the closest intersection point between ray 602a and the partially enclosed region 624a lies on the anomalous surface 628a. Figure 6a From this, it can be seen that the closest intersection point 626a with the partially enclosed region 624a is the 'standard' surface. It can also be seen that the ray intersects with the contained region 614a. Therefore, it can be inferred that the ray passes through the object 604a by entering the outward-facing portion of the object (i.e., the surface of the object that is not close to the main concave surface 632a). Therefore, the intersection point between the ray 602a and the object 600a must be no further along the direction of the ray than the closest intersection point 616a with the contained region. This is in... Figure 6aThe solid line portion of ray 602a indicates the length of the ray that intersects the object. Based on this, t max It can be conservatively updated (i.e., as shown by triangle point 620a) to the intersection point 616a closest to the contained region. For completeness, it should be noted that even if the starting point 610a of the ray is located within the boundary of the standard enclosing region 604a, the update t... max The result will be the same, because it is still outside the partially enclosed area 624a.

[0180] exist Figure 6b For simplicity, the 'standard' bounding region is not shown, but its existence and the intersection of rays with the bounding region are assumed. Figure 6b In this context, the starting point 610b of the ray is located within a partially enclosed region. Given this, it is not easy to determine (i.e., without further traversing the hierarchy) whether the starting point of the ray is located before or after the outer surface of object 600b. However, it is possible to conservatively determine that at least one intersection with the open object 600b exists. Specifically, if it can be determined that the ray intersects with the contained region 614b, and the starting point of the ray is located outside the contained region, it is possible to reduce t. max To do this conservatively, it is necessary to determine what type of surface the ray intersects with on the partially enclosed region 624b in order to infer whether the ray exits the object via the object's principal concave surface. Therefore, another condition to be satisfied is whether the furthest intersection point 628b (or, in this case, the only intersection point) with the partially enclosed region lies on an anomalous surface. Since the ray does not intersect with anomalous surfaces, it can be inferred that an intersection with the object 600b must exist. Therefore, assuming its realization t max The overall decrease, t max It can be conservatively updated (i.e., as shown by triangle point 620b) to the farthest intersection point 628b with the partially enclosed region 624b. If the origin of ray 610b is... Figure 6b If the context is outside the partially enclosed region 624b, then t can be further reduced. max (Because in this case, it is possible to infer that the intersection with the object along the direction of the light ray will not occur further away than the closest intersection with the contained region).

[0181] For the sake of simplicity, the treatment of shadows and light is not shown here. However, at least for Figure 6a and Figure 6b The intersection type shown will cause the ray traversal to terminate immediately if the ray is a shadow ray (or any ray tested using the 'any hit' intersection exit condition).

[0182] Figure 7Another example of an object with a cavity is shown, in which case the tube 700 has a bend through its center and openings at both ends. For completeness, this example is included only to show another example of an object with a cavity and / or concave region. Similarly, there is light (not shown) that can pass unobstructed through one opening and exit from the other. Three contained regions 700, 714, and 715 that can be used in conjunction with the bend tube are shown in the upper right figure. As in other examples, the contained region should be contained within the outer surface of the tube and also within a partially enclosed region. In this example, contained regions 700, 714, and 715 are axis-aligned boxes. An example partially enclosed region 724 for use with the bend tube is shown in the lower figure. Because the tube has two openings, the upper and lower surfaces of the enclosed box 724 are considered anomalous surfaces 730-1 and 730-2, as both intersect the object mesh and thus exclude the openings of the tube. The upper anomalous surface 730-1 is shown. As previously mentioned, these anomalous surfaces 730-1 and 730-2 are used to exclude the opening of the pipe from the partially enclosed area.

[0183] from Figure 7 It should be obvious that, in order to infer the intersection between a ray and the tube object 700, the ray must intersect at least one 'standard' surface of the partially enclosed region. In this disclosure, a 'standard' surface is used to indicate a surface of the partially enclosed region that is not an anomalous surface. In other words, an intersecting ray that intersects the partially enclosed region only via an anomalous surface cannot be conservatively considered to intersect the object. This should be obvious because... Figure 7 In this case, light rays intersecting the two anomalous surfaces can pass through the center of the tube and therefore do not intersect with tube 700. Therefore, Figure 7 An example is provided whereby even if a ray intersects two faces of the enclosing region and one or more contained regions, the ray cannot always reduce its maximum effective distance (or, for shadow rays, terminate its processing).

[0184] like Figure 6a , Figure 6b and Figure 7 As shown, the contained region is placed within the concave region (e.g., convex hull) of the concave object. However, with Figure 5 Unlike the closed objects shown where the contained region is generated starting from the inner voxels, there are no inner voxels within the cavities of these open objects. This is because, in most cases, the inner voxels should completely enclose the mesh of the closed object and not intersect with the mesh; however, for some classification algorithms, this constraint can be relaxed (e.g., to include voxels from “hidden regions,” which will be discussed in more detail below). Therefore, in order to generate the contained region of a concave object, the inventors have developed a method for identifying the voxels that form the portion of the concave region of the object.

[0185] Generally, a 'concave voxel' is one that is not an internal voxel and is located within a 'concave sub-segment' of an object. A 'concave sub-segment' of an object can be defined in different ways. For example, at least two conditions are required to define a concave voxel: i) a voxel falling within the convex hull of the object, and ii) a voxel that is not an internal voxel. In some cases, other conditions may be required, such as the condition that a concave voxel is 'shielded' by anomaly surfaces and empty voxels. Therefore, it is possible that some voxels that would be classified as 'boundary' voxels can be classified as concave voxels. Thus, voxels can be classified as both boundary voxels and concave voxels. However, it is not possible to classify voxels as both internal voxels and concave voxels.

[0186] Therefore, the goal is to label all 'empty' voxels (i.e., 'unclassified' voxels that are neither interior nor boundary voxels) located within concave sub-segments of the grid as concave voxels. A concave surface is characterized by curvature, and thus a region surrounded by at least positive curvature can be considered 'concave' (this does not mean that certain regions with negative curvature cannot include concave voxels). Such regions can be quickly located within the voxel grid, for example, by checking whether this is orthogonally maintained, i.e., whether empty voxels are completely enclosed (in at least one cross-section) by non-empty voxels (boundary or interior voxels).

[0187] Figure 8 A 3D example of bowl 800 is shown. Bowl 800 is described by its mesh, and thus the surface exterior of the object is shown. The walls of the bowl are thick, and therefore, theoretically, internal voxels could be placed inside enclosed areas within the bowl's walls. However, the contained areas generated from these internal voxels would be highly limited in terms of surface area (and volume), and therefore would lack utility. It is better to identify concave voxels within the bowl's cavity. Figure 8 The right-hand side view shows the four equal sections 801 of the bowl. The dimensions of the four equal sections are indicated by dashed lines 802 on the grid 800. The outermost area (light gray) indicates the boundary voxel 806, i.e., the voxel intersecting the surface of the bowl. The black area within the bowl's walls represents the inner voxel 808. The largest area, which is a striped / shaded area, represents the concave voxel 810. As can be seen from the four equal sections 801, the area containing the concave voxel 810 currently represents the largest area in the bowl. Therefore, it would be advantageous to use these concave voxels to generate contained areas and thus place the contained areas within the space occupied by the concave voxels. Therefore, contained areas generated in this way will have a large probability of occluding the object and thus provide good utility.

[0188] Figure 9 This explains from Figure 8 The bowls shown are classified into voxels. Figure 9 The illustrations show the 2D cross-section of the bowl and its voxels from different perspectives. Figure 9This demonstrates how to use cross-sections of a 3D object to identify / classify concave voxels. Generally, identifying concave voxels may involve determining a subset of voxels within a cross-section enclosed by multiple boundary voxels in at least one dimension. One such method is to scan the object's cross-section from three orthogonal planes (aligned with the three principal axes).

[0189] For each scan, the set of 'empty' voxels (not classified as interior or boundary) contained entirely by 'occupied' voxels (i.e., those classified as interior or boundary) can be labeled as concave voxels. Figure 9 The Y-axis cross-section 900 of the bowl is shown (i.e., viewed from above). Here, each voxel within the bowl (representing the wall of the bowl) is fully enclosed by the curvature of the object at the scanned location and can therefore be labeled as a concave voxel. The scanning and labeling of the 2D cross-section is repeated in all three dimensions, preferably along the principal axis. A concave voxel is a voxel that is fully enclosed by the cross-section in any dimension, and therefore it is not necessary to enclose concave voxels in more than one dimension. As discussed above regarding internal voxels, a voxel hierarchy can be used in a similar manner to reduce memory usage when identifying concave voxels.

[0190] In another example, identifying concave voxels can be accomplished by performing a flood fill only on empty voxels at the edges of the grid. This will identify the non-enclosed areas of the cross section. This corresponds to finding all empty voxels on the outside of the disk. Any empty voxels not found by the flood fill can then be inferred to be inside the disk and can therefore be immediately labeled as concave voxels. Figure 9 The voxelized Y-axis cross-section 901 of the bowl on the right-hand side again shows three different voxel categories. It can be seen that the concave voxel 810 is directly adjacent to the inner voxel here. This is because some boundary voxels can also be classified as concave voxels. The only boundary voxel 806 shown in the voxelized Y-axis cross-section 901 is on the outermost edge of the bowl.

[0191] Figure 9 The lower left figure shows the voxelized z-axis cross-section of the bowl. It can be seen that the concave voxels do not extend beyond the upper surface of the bowl. This is a characteristic of concave voxels because, in order to effectively utilize the contained area (e.g., ... Figure 6a and Figure 6b As shown in the diagram, the partially enclosing region must exclude the portion of the object defining the opening. In other words, all contained regions must also exist along with the partially enclosing region, and therefore the concave voxel used to define the contained region must lie within the boundary defined by the anomalous surface of the partially enclosing region.

[0192] In the first example, the uppermost concave voxel 810 can also be used to define a partially enclosed region. For example, when identifying concave voxels, concave voxels immediately adjacent to 'empty' voxels can also be classified as being located on the boundary of the concave region. This boundary can then be used to place anomalous surfaces within the partially enclosed region. Figure 9 The lower right figure shows another z-axis cross-section 903 with a partial bounding box 924. It can be seen that the anomalous surface 930 of the partial bounding box 924 is at the upper boundary of the concave voxel.

[0193] Since the cross-sectional scanning method takes into account the principal axis, the object should preferably be axis-aligned. This is advantageous because voxels are typically axis-aligned, and therefore anomalous surfaces are also typically axis-aligned and located in the XY, XZ, and YZ planes. However, it should be noted that in some embodiments, both the enclosing region and the contained region can be aligned with the orientation of the object, i.e., thereby defining an oriented bounding box (OBB) and an oriented contained box (OCB). This approach also relies on voxel labeling that has been performed, i.e., such that the inner voxels and boundary voxels are labeled. Therefore, in other examples, other axes for scanning can also be considered, such as diagonals rather than just orthogonal directions.

[0194] Another type of object can utilize contained areas in a similar way to enclosed objects, although the object is not technically enclosed in fact. This object is called a non-enclosed self-hidden object with hidden areas. The object's own mesh can be waterproof (i.e., it does not contain cracks or gaps), but the object contains some openings or slots. Generally speaking, a self-hidden object means an object that has internal areas that behave like enclosed objects. More specifically, in this context, a 'hidden area' within a self-hidden non-enclosed object means an area within the object (which can be 2D or 3D), said area:

[0195] i) Not completely enclosed by a closed boundary, i.e., it can be entered by some curved or multi-step path from the outside of the object (although separated from non-closed objects, as explained above, some fully closed objects can be considered as having hidden areas that cannot be entered by any path); and

[0196] ii) Completely hidden from view from the outside of the object, i.e., no straight line can intersect any part of the hidden area through any opening, hole or gap in the object.

[0197] Practical examples of such non-closed self-hiding objects could be a seashell, a mailbox, or a tunnel with multiple sharp bends. In other words, the hidden area is occluded from all possible views outside the non-closed self-hiding object. It should be understood that some objects can be considered as having hidden areas within concave surfaces rather than being closed (although these objects are essentially equivalent for ray tracing purposes).

[0198] Figure 10a A 2D example of a non-closed self-hidden object 1000 with a hidden area is illustrated. This object 1000 is curved around itself such that it encloses a hidden area 1001. It should be understood that not all non-closed self-hidden objects are suitable for the aforementioned category of objects. For example, in order for a non-closed self-hidden object to be treated as if it were a closed object for intersection testing purposes, at least one condition must be satisfied: for a suitable bounding body (e.g., AABB) surrounding the object's entity, any ray (i.e., a straight line) must be impossible to intersect with both the outer bounding body and the hidden area without striking the object's surface upon entry and exit. In other words, for an object that begins and ends outside the bounding body (i.e., has a t... min and t max Furthermore, the light rays that intersect the hidden area must ensure that the light rays intersect the object at least twice (i.e., upon entry and exit).

[0199] However, for the case of a closed object, the t of the light... min It can begin within the enclosing region 1704. Assuming the ray still intersects the hidden region, even if the ray begins inside the enclosing region 1704, it is guaranteed that the ray will intersect the object at least once (i.e., at least after its point of intersection with the hidden region). Therefore, similar to the case of a closed object, if the ray's t... min Starting inside the enclosed area, the maximum value can be t. max The position is updated to the intersection point with the enclosing area furthest along the light ray, i.e. Figure 17 Point 1708 in the middle.

[0200] Figure 10a This rule is illustrated by showing the enclosing body 1004 and the incident ray 1003 entering the opening in the object 1000. Even if this ray 1003 penetrates as far into the object as possible (assuming it begins outside the enclosing body 1004), it cannot reach the hidden area 1001. Therefore, as mentioned above, the hidden area is defined as the area where any ray incident on the object is completely impassable. To avoid ambiguity, Figure 10a The hidden region 1001 shown is not a complete hidden region (for clarity). In fact, the hidden region does not have to be a uniform polygon or polyhedron. However, for the purpose of conservative intersection testing, it is sufficient for a suitable contained region (e.g., an axis-aligned contained volume, but generally any suitable contained region or volume) to be completely contained within the hidden region.

[0201] Figure 10b This demonstrates how, for a non-closed self-hiding object with a hidden area, a ray can be used in a way equivalent to culling a closed object. max The way to reduce t max An example. The intersection test behaves in the same way as the closing object because the hidden region behaves exactly like the closing object. InFigure 10b In the middle, the contained area 1014 is completely contained within the hidden area 1001. Figure 10b (Not shown in the image). The contained region 1014 can be the same size as the hidden region itself, but it should be understood that, for clarity, a different size is used. Figure 10b The shape of region 1014. It should also be understood that the effectively contained region can even extend into the adjacent solid wall of the object, provided that the contained region is still completely contained within the outermost outermost part of the object's wall.

[0202] Figure 10b Light ray 1002 intersects bounding box 1004 at entry point 1006 and exit point 1008 (based on ray direction). It can also be seen that the ray intersects contained region 1014 at points 1016 and 1018. Assuming the origin of the ray is outside bounding region 1004, it is not necessary to determine whether the origin of the ray is outside the contained region (because it must be by inference). For completeness, it should be noted that the ray intersects the contained region an even number of times, i.e., at points 1016 and 1018, even if the ray terminates within bounding box 1004 or contained region 1014 (i.e., t...). max (position), t max The value can still be updated to intersect the entry point of the contained region at 1716. Since ray 1002 begins outside the enclosing region 1004 and intersects the contained region 1014, it can be determined that the ray intersects the object 1000, as it is also known that the contained region is within the object's hidden region. This is because it can be definitively inferred that the intersection point between the object 1000 and ray 1002 occurs somewhere between the first intersection with the enclosing region 1006 and the first intersection with the contained region 1016. This inference is possible because, from the perspective of the hidden region, the object appears closed, with the contained region completely within the hidden region and the enclosing region completely outside the object.

[0203] and Figure 4a The enclosed object example shown is the same, so t can be... max Reduce the maximum conservative amount. (Conservatively) reduce t to the permissible extent. max The motivation is to reduce the likelihood that ray 502 will unnecessarily test further and occluded objects, or even other parts of object 1000 itself. It should be understood that if object 1000 has a non-trivial (i.e., large) number of primitives / triangles, it can form a large subtree of BVH, therefore it is worthwhile to 'prune' portions of said subtree as early as possible. Therefore, t max This can be reduced to at most the intersection point 1016 between the ray and the contained region, said intersection point being closest to the origin of the ray (i.e., the first intersection point 1016 with the contained region). Therefore, t can be... max Updated to 'updated maximum culling distance' 1020, which is... Figure 10b The triangle is represented in the image.

[0204] The same applies to 3D objects that are non-closed self-hiding objects with hidden areas, as 2D examples of such objects exist. Figure 11a A 2D cross-sectional view of a mailbox-type object 1100a is shown, which includes a 'slot' entry point and a hidden area 1101 within the cavity of the object. Figure 11b The mailbox object 1100b is shown in 3D, with the entry slot visible from the front. The 'hidden area' 1101 cannot be seen in... Figure 11b As shown, it is hidden from the external view by definition because no single ray of light can enter the hidden area from the outside of the object.

[0205] Figure 11c This illustrates another type of non-closed self-hiding object that the inventors of this case also envisioned, which is Figure 10a and Figure 10b The 2D non-closed self-hidden object 1000 shown is a direct 3D extension. If this object 1000 extends beyond the plane of the viewing plane, it forms an extension tube 1100c open at either end, as... Figure 11c As shown, but not in the same way that the tube would be enclosed. In other words, a conventional tube (open at both ends, e.g.) Figure 7 The tube object 700 shown has a toroidal topology, while non-closed self-hidden objects do not have a closing loop. Therefore, Figure 11c The 3D object 1900 shown resembles a non-jointed tube, which will be made of Figure 10a The non-closed self-hidden 'hidden area' object 1000 extends from the non-closed tube object 1100c. The non-jointed tube object 1100c is not joined and does not contain a hidden area. As can be seen from the image, light can reach every part of the interior of the non-closed tube object 1100c. However, light entering from the large opening on either side can only reach the interior of the tube, and no light can penetrate the interior of the tube through the small slot-like opening. Therefore, the non-jointed tube can still be processed in the same way as a normal tube, provided that an appropriate partial enclosure with an anomalous surface is used.

[0206] Specifically, the enclosed area is similar to... Figure 7 The partially enclosing region 724 can be constructed around the non-jointed tube 1100c, having two anomalous surfaces (corresponding to) the main opening of the tube at either end. Figure 7 The two anomalous surfaces 730-1 and 730-2 are shown in the diagram. Since light can only enter the contained region through the main opening, the anomalous surfaces can be selected such that they exclude only the two 'main' openings of the object, without excluding the slotted opening. Therefore, one or more contained regions can be contained within the main lumen of the tube and within a partially enclosed region. Then, it can be combined with... Figure 7The contained regions within non-joined tubes are treated in the same way as the contained regions for intersection testing purposes. In other words, with Figure 7 As in the example, in order to infer the intersection between the ray and the non-joint tube object 1200, the ray should intersect at least one 'standard' surface (i.e., non-abnormal surface) and at least one contained area of ​​the partially enclosed region.

[0207] Return to the object with the hidden area. Figure 10c A method for identifying hidden regions, for example, within non-closed self-hidden objects, is illustrated. It is assumed that the object's voxels have been properly labeled as internal voxels, concave voxels, and boundary voxels. The most naive way to identify the set of concave voxels forming hidden regions would simply be to iterate over the concave voxels and, for each concave voxel, check if all rays from the voxel are occluded by the mesh. If all rays do not escape from any anomalous surface in any possible direction, then the voxel belongs to a hidden region. However, this would be very time-consuming and is not considered a feasible route for identifying hidden regions.

[0208] A better way to identify hidden areas is to only test light rays that actually travel in the direction of the anomalous surface. If a ray does not travel towards the anomalous surface, it is guaranteed to be occluded by the mesh, so testing it is meaningless. However, this can be further improved because only sub-segments of the anomalous surface can actually border openings of non-closed self-hidden objects.

[0209] The first step is to identify voxels (both boundaries and concave surfaces) located on anomalous surfaces. Figure 10c Partially enclosed region 1024 and anomalous surface 1030 are shown. Although the anomalous surface extends across the upper side of object 1000, only a small portion of the anomalous surface (enclosed between the tips of the arrows 1005 defining the frustum) is exposed to the opening of the object. In other words, only a small portion of the anomalous surface is adjacent to the concave voxel, as most of the anomalous surface intersects with the boundary voxel. Therefore, the portion of the anomalous surface that needs to be considered for the purpose of identifying hidden areas includes only the portion of the anomalous surface adjacent to i) the concave voxel adjacent to the empty space and ii) the boundary voxel adjacent to the concave voxel (specifically, in the case where the surface within the boundary voxel has a hole).

[0210] Once this region of the anomalous surface has been identified (i.e., the portion of the cavity that allows light to enter the object), for a specific voxel, we only need to examine the occlusion between the frustum defined by said voxel and the region of the anomalous surface. The frustum formed between the concave voxel 1007 and the identified region of the anomalous surface is... Figure 10cThe two arrows 1005 are shown in the diagram. Therefore, the most efficient test for identifying hidden regions is to determine, for each concave voxel and for each identified frustum, whether any light rays originating from the voxel within the frustum are blocked by any surface of the object. If all such light rays within the frustum 1005 are blocked, the concave voxel belongs to a hidden region. (As shown in...) Figures 10a to 10c As can be seen, all rays originating from the concave voxel 1007 and defined within the frustum 1005 must intersect the object 1000. Therefore, the concave voxel 1007 is located within the hidden region 1001. In this way, the ray direction that needs to be examined for the concave voxel 1007 is then reduced from the hemisphere (e.g., a test ray with a positive y-component) to the direction of the frustum 1005.

[0211] Once the hidden region of a non-closed self-hidden object is identified, all concave voxels that form the hidden region can be considered as internal voxels for the purpose of generating the contained region.

[0212] Voxel selection

[0213] Various types of objects and different voxels used to define the space around an object have now been described. The following description explains in detail how these voxels are used to select and generate candidate contained regions starting from a voxel.

[0214] Generally, finding the optimal set of n AACBs for an object is a difficult problem. Therefore, a preferred approach is an efficient but greedy search algorithm for the set of n AACBs that nicely fills the space of the object, followed by a pruning and selection process. The greedy search and pruning strategy aims to obtain only marginal differences in utility (compared to the theoretically optimal utility), offering the benefit of significantly reduced computational complexity. In this disclosure, the terms 'candidate contained region' or 'candidate AACB' can be used to refer to the AACBs generated using a greedy search in the first instance. As the greedy search proceeds, the set of candidate AACBs can be pruned and / or replaced, resulting in a refined set of contained regions / AACBs that provides good utility for intersection testing purposes.

[0215] The inventors have determined that, since the contained area is used for ray tracing, the objective is not (primarily) simply to occupy the largest voxelized volume with the fewest AABBs. Instead, the objective is to maximize the amount of projected / visible surface area of ​​the AABB in any view direction, and therefore maximize the amount of AABBs between the set and the object. To give a simple example, the largest 2D square (with zero volume) that can be placed inside a sphere can (assuming the projection direction is perpendicular to the plane of the square) occlude a larger portion of the sphere's projected area than the largest cube that can be fitted inside the sphere. More specifically, three orthogonal squares placed inside the sphere can occlude a larger portion of the sphere's projected area for any ray direction compared to the largest cube that can be fitted inside the sphere. Therefore, the assumption that the largest single cube that can be fitted inside the sphere will provide the best occlusion utility for spherical objects is not always correct. This is where the generation of AABBs differs from the automatic generation of box occluders in rasterization methods. Besides the fact that raster-based methods ultimately transform occlusion boxes into polygons, they also offer the option to rasterize many boxes and therefore often employ hierarchical / clustering methods, which may not be sufficient to reduce the practicality of ray tracing tests. For example, a large number of AACBs not only leads to an overburden of intersection tests (which is counterproductive to the primary goal of using AACBs, which is to reduce the amount of intersection tests involved in traversing rays), but also produces a set of AACBs whose goal is to occupy the largest volume may not provide optimal occlusion.

[0216] In contrast, the solution proposed by the inventors in this case allows for the offline generation of up to n AACBs, where the goal is to increase the proportion of occluded objects. Considering that we typically only want a small number of AACBs (so that the GPU's box tester units are not overloaded), the problem of generating n AACBs can also be solved in real-time for some simpler use cases. It is also worth noting that the algorithms currently provided are generally designed to work with static meshes. Full support for dynamic (e.g., skinned) meshes would require extending the algorithm (if using a coarse voxel raster) to ensure that computations can be efficiently parallelized on the GPU. As yet another alternative, a set of AACBs for each keyframe animation state of a dynamic mesh can be generated offline, and then selected from them during online BVH generation.

[0217] However, the process of generating AACBs involves increasing the number of voxels because there is a correlation between surface area and volume. Specifically, an inner AACBα (i.e., an inner AACB without anomalous surfaces, because it does not intersect the object mesh) is 'optimal' if it can occupy the maximum volume (and therefore surface area) given its position within the mesh's inner volume. However, if another inner AACBβ exists, where... That is, if the volume of α can be completely contained within a larger AACBβ, then α is not optimal. If β itself is optimal, then β is called the optimal parent of α. In other words, if the inner AACB can be expanded without intersecting the mesh, then the AACB is not optimal. As a result, all optimal inner AACBs should have at least two vertices that are precisely placed on the surface of the mesh (for the specific case where the object is a closed object). In practice, an ε tolerance will be included to account for floating-point inaccuracies. Furthermore, in the current embodiment, for computational efficiency and to ensure that the contained region is conservative (i.e., it cannot intersect with the object and produce false positives), the optimal contained region is considered to be a region adjacent to two or more boundary voxels (but not intersecting with the boundary voxels).

[0218] Conversely, for any non-optimal internal AACBα, there must exist at least one optimal parent β, where Therefore, the optimal parent β can be found by extending α until it intersects the mesh in any degree of freedom. It is preferable to use the optimal parent rather than its suboptimal offspring. This is because the optimal parent and its suboptimal offspring have the same intersection test cost, but the optimal parent necessarily has a larger surface area and therefore will occlude a larger proportion of objects, and thus intersect better with continuous ray sets. Advantageously, this means that by using the optimal parent, there will be more opportunities to apply ergodic optimization with fixed-box test costs. Furthermore, AACBs that are more tightly coupled with mesh primitives can generally also more aggressively constrain t-max (e.g., Figure 4a and Figure 4b (As explained in the document), this leads to better optimization for rays with the closest hit-and-run conditions.

[0219] To obtain a useful selection of AACBs, an internal voxel must be chosen as a promising 'starting point' and then scaled up to occupy as much volume as possible within the object (initially). Simply put, the set of all possible optimal AACBs for the raster can be generated by expanding all occupied voxels (from the mesh's internal volume). However, as mentioned above, this would be very inefficient, as many voxels would expand to the same AACB. Therefore, we can speed up the process by observing that, in order for two expansions to produce different AACBs, one box should capture new voxels not captured by the other box. Thus, we can start expanding only from the uncaptured internal voxels, so that a different optimal box is obtained with each iteration.

[0220] The first step involves selecting a starting voxel. For closed objects, this is based on determining which inner voxel has occlusion utility. The occlusion utility of a voxel quantifies an estimate of the potential surface area of ​​the expanded version of each inner voxel. In other words, the occlusion utility metric quantifies an estimate of the lower bound of the surface area of ​​each inner voxel when expanded and transformed into an contained region. Therefore, the occlusion utility metric estimates the potential utility of each inner voxel in occluding the object once expanded into the contained region. The occlusion utility metric depends on the type of object. However, for all objects, the occlusion utility metric is calculated for all voxels available to generate the contained region (inner voxels for closed objects; concave voxels for concave objects; and boundary voxels for continuous surface objects).

[0221] For enclosed objects, the preferred occlusion utility metric is referred to as the 'voxel density heuristic,' or elsewhere in the specification as the 'depth metric.' The voxel density heuristic is used to rank internal voxels, prioritizing the highest-ranked internal voxels to generate the contained region. Voxel density ρ v Limited to:

[0222] ρ v =dot(min(position) voxel -Location boundary ),1)

[0223] This corresponds to calculating the minimum 'Manhattan distance' to the boundary voxel. This is a relatively fast test, especially when the boundary voxel has already been calculated, and particularly when the voxel has been spatially partitioned (in any case, this test is significantly faster than a test for all 'empty' voxels). Intuitively, this corresponds to sorting the 'deepest' interior voxels within the interior, hence the use of the term 'depth' in the heuristic nomenclature. Therefore, interior voxels are selected based on their voxel density sorting to be amplified into candidate AACBs.

[0224] The computation of the minimum Manhattan distance to the nearest boundary voxel can be accelerated by spatially partitioning the boundary voxels using a data structure (such as a "Kd-tree") to make the search particularly fast. This allows us to quickly and accurately locate the nearest boundary voxel using a divide-and-conquer type approach, rather than having to examine all boundary voxels to determine which is the closest for each given voxel.

[0225] The use of a voxel density heuristic (i.e., a depth metric) to select inner voxels for magnification is based on the following observations. First, the innermost voxel within the inner voxel set, i.e., the deepest voxel, typically expands to the largest and most uniform box. Second, these voxels can be expanded to the maximum extent before reaching constrained voxels (i.e., boundary or empty voxels). In this disclosure, a 'constrained voxel' is a voxel that cannot be expanded to, i.e., a voxel with which the contained region is prohibited from overlapping. Third, boxes with large and fairly uniform surface areas (i.e., similar size across all dimensions and therefore close to a cube) will be able to intersect with a higher proportion of incident rays on the mesh (ray projection is typically slightly continuous). This allows for the application of more ergodic optimizations, thereby improving the performance of the intersection test algorithm.

[0226] Figure 12a The voxel density metric for a simple cube object 1200 is described. Each voxel is an inner voxel 1208, and for this simple example, there are no boundary voxels. The number in each voxel represents the voxel density metric. Voxels adjacent to the boundary of object 1200 have a value of 1. The deepest voxel (shaded) has a voxel density metric of 3. Therefore, in the first iteration of the AACB generation algorithm, preferably, the innermost voxel with a value of 3 will be selected first for expansion.

[0227] Figure 12b This illustrates a more realistic example where the object is Figure 8 The same concave bowl object 800 is shown. For concave objects, the extent of the object's geometry that limits the calculation of the voxel density metric needs to include something beyond the object's boundaries because of the presence of open cavities. For concave objects, instead of choosing inner voxels to extend, concave voxels are chosen. Therefore, the density metric is still based on which concave voxel is the most concave voxel. In other words, the voxel density metric for a concave object involves calculating the minimum 'Manhattan distance' to the boundary voxel or empty voxel (i.e., the anomalous surface). Thus, it can be seen that... Figure 12b The concave voxel 1210 of the anomalous surface 1230 adjacent to the partially enclosed region 1224 has a voxel density metric of 1. For the two deepest concave voxels within the set of concave voxels, the highest voxel density metric is a value of 2. Therefore, in this simplified example, the voxel with a voxel density metric of 2 will be selected first for AACB generation.

[0228] In summary, the voxel magnification system can therefore be performed in a manner similar to that of a closed object, where, instead of the internal voxel, a 'concave voxel' is now chosen as the starting point for voxel magnification. Furthermore, the portion of the boundary used for magnification is now defined by one or more anomalous surfaces of the outer AACB, rather than by 'boundary voxels'. In other words, the concave AACB extends within a boundary defined by a combination of boundary voxels and one or more anomalous surfaces.

[0229] However, a modified heuristic can be used to more appropriately rank concave voxels. This modified heuristic / metric arrangement is designed to consider the surface area of ​​anomalous surfaces. This is considered because anomalous surfaces effectively reduce the 'value' of AACB within concave regions. This is partly because each concave region requires the overhead of a partially enclosed region in which AACBs are placed. Essentially, this is a reduced voxel density heuristic. Reduce ρ v The ratio of (surface area of ​​one or more anomalous surfaces) to (surface area of ​​non-anomalous surfaces), i.e.

[0230]

[0231] Where ESA is the surface area of ​​the anomalous surface 1230, and SA is the total surface area of ​​the partially enclosed region. Concave voxels can then be selected based on their reduced voxel density sorting to enlarge them to form AACBs, as explained below.

[0232] Inclusion zone generation

[0233] Initially, voxels are selected for expansion based on their corresponding occlusion utility metrics. It should be noted that more than one occlusion utility metric can be computed for each voxel. For example, a reduced voxel density heuristic can be generated for concave voxels within a concave object. and voxel density heuristic ρ v Both. If more than one occlusion utility metric has been computed for each voxel in the voxel set, the maximum value from any metric is used to select the voxel. However, in practice, the reduced voxel density heuristic is used. It can be prioritized over voxel density heuristics ρ v In practice, the voxel density heuristic is typically used only for internal voxels. However, a more practical example of multiple occlusion utility metrics is that both concave voxels and boundary voxels can utilize the reduced voxel density heuristic. This is categorized by another metric known as 'reduced maximum chain length', which is described in more detail below. At a high level, the expansion of selected voxels preferably involves two stages:

[0234] i. Expand the voxel uniformly in all dimensions until it reaches the portion of the boundary, and

[0235] ii. If further expansion is possible after step i), then expand / extend non-uniformly in any dimension where further expansion / extending is possible, and expand until further expansion is no longer possible.

[0236] The expected result is that the extended voxel will have a large surface area (implying that it will also occupy a large space / volume). This will allow the extended voxel to intersect with most of the rays that also intersect with the same object. The result of voxel extension performed in this way is that at least two edges / vertices / faces of the extended voxel will contact the constrained areas of the object (e.g., boundary voxels, empty voxels, or the actual surface mesh of the object).

[0237] Figure 13 The first stage of expansion, namely uniform expansion, is illustrated. The object 1300 shown is again a 2D representation of the Stanford Rabbit. While the voxel expansion method is applicable to 2D examples, it is preferably applicable to 3D objects. As explained above, the first stage is the selection of voxel 1307 for expansion. Voxel 1307 is selected based on its occlusion utility metric, for example, based on which voxel has the highest occlusion utility metric, which is preferably determined by the voxel density metric ρ. v Limitations. Once a voxel is selected, voxel 1307 expands uniformly, that is, at the same rate in all dimensions. Figure 13 In this context, this corresponds to uniformly expanding voxels by 1302 along two dimensions (along the x-axis and y-axis). In the 3D example, uniform expansion would be performed voxel-by-voxel along all three dimensions.

[0238] Performing this uniform expansion first ensures that the contained region (at least partially) intersects with a large, continuous segment of light on each axis (i.e., for any given direction of those light rays). The result is an enlarged voxel 1304 occupying a 9×9 voxel region. In this case, uniform expansion continues until the expanding voxel encounters a constrained region, in this case, a boundary voxel. Although in some examples the voxel can be expanded until it contacts the mesh surface 502 of the defined object, preferably (in order to produce a conservative contained region) the voxel is expanded until it reaches the boundary voxel. Figure 13 As can be seen, the expanding voxels have reached several different boundary voxels 506, but have not yet expanded into the space they occupy. Although allowing voxels to expand towards the mesh would provide better utility (because it would occupy more volume, and therefore there would be more effective occlusion between the contained region and the object), it is advantageous to consider only the boundary voxels and not the mesh when expanding voxels. This is because when voxels are allowed to expand only into other inner voxels, it is guaranteed that the voxels will never intersect the mesh (which would invalidate the contained region), and therefore this does not need to be explicitly checked.

[0239] The second step of nonuniform expansion involves either expansion, which increases the volume by stepping forward by one voxel step at an edge or vertex, or extension, which increases the volume by stepping forward by one voxel step at a face. Nonuniform expansion is always checked / performed first before extension. This is because expansion in the direction of an edge or vertex results in the simultaneous increase of more than one dimension, leading to a more uniform expansion, which results in a larger volume and surface area of ​​the resulting voxel. In contrast, extension in the direction of a face causes expansion only in a single dimension.

[0240] When determining whether to perform voxel expansion or extension, the flags and / or masks for each possible expansion axis are tracked to maintain a record of whether further expansion / extension is possible in a given dimension. An axis flag is de-set as long as there is no possibility of further magnification along that axis. Non-uniform expansion and extension are performed iteratively by looping through the expansion and extension flags in turn until all flags / bits are de-set. The result is an AACB that maximizes the volume it can occupy within the object's boundaries.

[0241] In a detailed example, at the implementation level, two masks are stored, each with six Boolean flags; one mask per principal axis, positive and negative: {+x,+y,+z} and {-x,-y,-z}. These two masks are...

[0242] 1) Expansion Mask: This stores which axes can be freely expanded (i.e., expanded via corners and edges); and

[0243] 2) Extension mask: This stores which axes can be extended freely (i.e., only via the face, in a single dimension).

[0244] For example, a 3D voxel capable of uniform expansion in all directions will have the following expansion mask before expansion: {+x,+y,+z}, {-x,-y,-z}: (111), (111). During expansion, if the voxel encounters a wall of a boundary voxel in the positive x-direction, this flag will be de-set to indicate that the voxel can no longer expand in the positive x-direction. Therefore, after the initial stage of uniform expansion, the voxel will have the following expansion mask: {+x,+y,+z}, {-x,-y,-z}: (011), (111). In the case of mask bits being de-set, the axes corresponding to those bits are not considered for further inspection (i.e., when inspecting non-uniform expansion directions). The expansion steps are repeated until all mask bits are de-set, where the result will be an AACB (quantization relative to the unit voxel grid) close to the optimal AACB.

[0245] Figure 14a and Figure 14bThis illustrates a specific example of the steps involved in performing non-uniform expansion after uniform expansion, and the resulting AACB is contained within the area. The same Stanford Rabbit object as the 2D representation is shown, where contour 502 represents the mesh surface. Only a few selected boundary voxels 1406 are shown, i.e., those boundary voxels that interact with the expanding voxels. It should be understood that the voxels are not shown to scale, but only for clarity. In this case, the starting voxel 1407 is located at different positions within the object, where uniform expansion is only possible in small amounts. The expansion and extension masks of the starting voxel before uniform expansion are as follows:

[0246] Masking +x +y -x -y Expansion 1 1 1 1 Extension 1 1 1 1

[0247] After the initial uniform expansion, the resulting expanded voxel 1404a reaches two boundary voxels, namely, at its lower left and part of its corner, and at its upper right corner. Therefore, the voxel can no longer expand simultaneously in the positive y and x directions. Furthermore, the voxel can no longer expand in the negative x direction at all. Therefore, the expansion and extension mask of the uniformly expanded voxel 1404a is:

[0248] Masking +x +y -x -y Expansion 1 1 0 1 Extension 1 1 0 1

[0249] It should be understood that the extended mask of -y is not de-set here, because given that the mask of -x is completely de-set, the obstacle in -x is no longer important.

[0250] The extension mask used to extend voxel 1404a indicates the remaining three possible extensions. These are extensions of voxel 1404a in the +x direction 1408a-1, the +y direction 1408a-2, or the -y direction 1408a-3. Each of these possible extension directions is defined by... Figure 14a The shadow / striped boxes (1408a-1, 1408a-2, 1408a-3) are indicated in the diagram. Preferably, one or more extensions that result in the largest box will be selected, as this will result in the largest box, thus having the largest surface area and the largest shading effect.

[0251] In this scenario, a deadlock can be observed between the different expansion options. For example, a voxel is constrained at its top-right corner by boundary voxel 1406, and therefore can only expand in the +x or +y dimension, not both simultaneously. It can also be seen that a voxel can expand in the -y direction, and this can be performed concurrently with +x expansion. Generally, this applies to both 2D and 3D cases. Figure 14aIn some cases, there may be two or more adjacent faces that can be extended individually but not simultaneously. For example, if the edge of a 3D voxel hits the edge of a boundary voxel, the voxel cannot be extended further, and therefore one of the two faces adjacent to the constrained edge of the voxel must be chosen for extension. As explained above, it is generally worthwhile to prioritize the uniformity of the box, as this results in the largest volume and therefore the largest average occlusion effect across multiple different projection directions.

[0252] Therefore, the preference is to discard as few axes as possible, thus extending the voxel across as many dimensions as possible (resulting in a larger and more uniform box), rather than extending the box only in one dimension, which would make the AACB longer (but smaller in volume). In practice, this might involve performing multiple expansion 'tests' based on different combinations of axes: for example, first testing combinations of axes with the fewest axis 'drops' (corresponding to a more uniform expansion), rather than expansions / stretches where many axes are dropped (corresponding to a more non-uniform expansion, or expansion in a single dimension). In other words, expansion tests that result in uniform expansion along multiple axes are prioritized. Thus, deadlock can be resolved when combinations of axes that can be expanded are found.

[0253] Back Figure 14a For uniformly expanded voxel 1404a, the following combinations of expansion are possible:

[0254] 1) Only the +y axis (1408a-2);

[0255] 2) Only the +x axis (1408a-1);

[0256] 3) Only the -y axis (1408a-3);

[0257] 4) Simultaneous application of +y-axis and -y-axis (1408a-2 and 1408a-3);

[0258] 5) Simultaneous addition of the x-axis and subtraction of the y-axis (1408a-1 and 1408a-3).

[0259] Prioritizing multiple extensions will discard the first three options that favor option 4) or 5), each resulting in two simultaneous extensions. From Figure 14a As can be seen, the combination of the +y and -y axes will produce an elongated box, which will not have optimal occlusion effectiveness. However, the combination of the +x and -y axes will result in a large expansion because there is a large amount of space (i.e., internal voxels) in both the +x and -y directions.

[0260] Figure 14bThe result is shown by expanding simultaneously in both the +x and -y directions, starting with a uniformly expanded voxel 1404a. The result is another expanded voxel 1404b, which is again uniform, since all dimensions of the square voxel have been expanded. The new expanded voxel 1404b has reached another obstacle below it, meaning it can no longer expand in the -y direction. Furthermore, voxel 1404b can no longer expand in the +y direction. Therefore, these bits can be de-set, and thus the expansion and extension mask for the secondary uniformly expanded voxel 1404b is:

[0261] Masking +x +y -x -y Expansion 0 0 0 0 Extension 1 0 0 0

[0262] Therefore, the only remaining option for extending the secondary uniformly extended voxel 1404b is an extension in the +x direction 1408b, which in Figure 14b The area is illustrated with shaded / striped regions. This will be the final possible extension of this voxel, and the result will be a rectangular voxel. The result of fully extending the voxel is as the contained region of the AACB. Since the voxel undergoes replacement by another voxel (i.e., with better occlusion utility), the voxel may be referred to as a 'test voxel' or 'candidate' voxel.

[0263] After each expansion to generate a trial AACB, all internal voxels occupied by the trial AACB (or, in the case of a concave object, all concave voxels) are 'de-set' so that they cannot be selected for the next voxel expansion. Therefore, after each expansion to generate candidate contained regions, the next voxel selected for expansion (again based on selecting the voxel with the highest occlusion utility metric (e.g., voxel density metric)) will not be within any existing candidate contained regions. This is done to help prevent the generation of multiple identical AACBs, thus ensuring that each candidate AACB captures at least some new surface area for better object coverage.

[0264] Alternatively, another possibility is to recalculate the occlusion utility metric for each inner / concave voxel after generating each candidate contained region. For example, the voxel density metric could be recalculated based on the assumption that all candidate contained regions are also considered constrained regions. Thus, the innermost voxel in an object containing one or more candidate contained regions will be different from the innermost voxel in an object without candidate contained regions.

[0265] However, each expansion is allowed to extend into the volume occupied by the existing AACBs, such that multiple expanding voxels will spatially intersect each other. The expansion proceeds iteratively until multiple candidate contained regions are obtained. One or more metrics or conditions may exist to determine when to stop generating new contained regions. An implicit condition is the existence of at least one inner voxel (for enclosing objects) or concave voxel (for concave objects or regions) from which new candidate contained regions are generated. Another metric may simply be a threshold number of contained regions, i.e., terminating iterative voxel selection and expansion after a certain number of contained regions have been generated. Generally, after multiple voxel expansions, the set of candidate contained regions may significantly overlap each other. Therefore, the next step (described in detail below) is to select the optimal set of AACBs from the set of spatially intersecting trial AACBs.

[0266] Figure 15a and Figure 15b This illustrates how voxel expansion of a concave object 800 is performed. In this case, an occlusion utility metric is calculated for each concave voxel. For example, this could be a reduced voxel density heuristic. Preferably, a concave voxel with the highest voxel density heuristic value is selected as the starting point, which in Figure 15a In the case of a concave voxel, 1510. This extends uniformly until it reaches the constrained region. In the case of a concave object, the constrained region comprises the boundary voxel of the object's surface, or the 'empty' voxel 1504. Back Figure 8 In the cross-sectional (quadrangular) view of the bowl, it can be seen that the unique voxel 806, labeled as the unique boundary voxel of the bowl, is located on the (convex) exterior of the bowl. Besides being labeled as boundary voxels, voxels intersecting the (concave) inner surface of the bowl can also be labeled as concave voxels (because they are concave portions). From... Figure 8 As can be seen, the concave voxel 810 is completely adjacent to the inner voxel 808 formed within the thick wall of the bowl. An advantageous result of this is that the extending voxel can extend 'through' the (concave) inner surface of the bowl until it reaches the constrained boundary voxel 806. In this case, the constrained boundary voxel 806 is the boundary voxel that intersects with the (convex) outer surface of the bowl. This is why... Figure 15a In the middle, the extended voxel 1510 extends until it reaches the outer surface of the bowl and appears to 'pass through' the concave surface.

[0267] The result of uniform expansion is Figure 15a and Figure 15b The extended voxel 1502 shown in both cases. In this case, the constrained voxel preventing further extension of extended voxel 1502 in the -y direction is the outermost boundary voxel of object 800 (i.e., those not also labeled as concave voxels), such as Figure 8As shown, the constrained voxel preventing further expansion of the extended voxel 1502 in the +y direction is the empty voxel 1504. To indicate how the candidate contained region 1502 is positioned relative to the partially enclosed region 1524, Figure 15b The image shows a portion of the enclosed region 1524 and its anomalous surface 1530.

[0268] The examples discussed above have considered voxel expansion in relation to all (starting) voxels of the same size. However, a voxel hierarchy can also be advantageously used during voxel expansion (mentioned above in the section on classifying voxels). Specifically, using a voxel hierarchy allows certain expansion steps to be skipped. For example, for an expansion step performed within a coarse inner voxel (at the fine voxel level), it can be inferred that the expansion will not hit a voxel (at the fine voxel level) and should not extend at least until the expansion has been performed through the coarse voxel. In other words, at this point, the expansion can be performed efficiently at once (at the fine voxel level), rather than having to complete each of those steps one by one.

[0269] Inclusion zone refinement

[0270] As previously mentioned, it is extremely difficult (because there is no polynomial-time solution) to find the 'optimal' set of AACBs a priori. Furthermore, the 'optimal' set cannot be defined by any analytical criterion, as the optimal set is subjective. In any case, the content of the optimal set constituting the AACB can be highly dependent on the orientation of the AACB and the object compared to the incident ray (which is unknown beforehand). For example, the set of AACBs might obscure a high proportion of the object in one projection direction but obscure substantially fewer objects in another.

[0271] Therefore, the iterative contained region generation described above is a 'greedy' algorithm that generates many AACBs, which are then pruned / refined to obtain a better set. Clearly, reducing the number of AACBs will inevitably reduce overall occlusion. However, as explained above, the optimal set of contained regions should strike a balance between the proportion of occluded objects in a range of different projection directions and the number of contained regions. There should be enough contained regions to provide good occlusion utility, but not so many that testing multiple contained regions (and thus accelerating the traversal of the structure) takes too long. Specifically, a large number of AACBs will necessarily increase the number of nodes in the BVH, potentially making raybox intersection testing less efficient than desired.

[0272] The problem with greedy algorithms is that, although they provide a set of well-occluded regions (which is the goal of AACB: i.e., to provide good utility to cull light rays as early and as frequently as possible or reduce t), they are ultimately flawed. maxHowever, this generates a large number of contained regions / AACBs. Furthermore, the greedy voxel selection and expansion algorithm may easily produce contained regions with a large number of spatial intersections, thus making at least some contained regions redundant. In some examples, the greedy algorithm can continue to select new voxels for expansion as long as both conditions are met:

[0273] 1) Retain suitable voxels within the object for expansion; and

[0274] 2) The maximum allowed number of voxels (a predefined number) has not yet been reached.

[0275] As mentioned above, select a new voxel that is not in the space already occupied by the expanded AACB.

[0276] Therefore, the inventors in this case have identified the set of candidate contained regions that need to be refined due to the greedy algorithm. As mentioned, if two AACBs occupy substantially the same volume, they will inevitably also have similar surface areas and will therefore substantially occlude the same portion of the object. In this instance, only one of the two such AACBs should be retained. It should be understood that AACBs can 'overlap' in more than one sense. Two AACBs do not need to intersect spatially to be redundant, except for physical spatial intersection. For example, two AACBs can occlude each other at least in the projection direction. AACBs that occlude each other in one projection direction can also be redundant, since only one of the two AACBs can be used to provide occlusion of the object.

[0277] Based on these two different types of overlapping contained regions, at least the following mechanisms are provided for removing / replacing boxes:

[0278] 1) Remove the contained region based on the occlusion utility metric of the contained region;

[0279] 2) Remove the contained region based on its spatial intersection with another contained region;

[0280] 3) If measured by a suitable surface area utility standard, the contained area is removed based on shading.

[0281] It should be understood that all the mechanisms described in this paper for AACB selection and refinement can be performed concurrently with the greedy search (i.e., disallowing new AACBs or replacing new AACBs with older ones) or after generating a set of candidate AACBs. However, it is more advantageous to perform AACB replacement on a continuous basis and concurrently with the AACB search phase, as fewer box replacement tests will be required overall.

[0282] It should also be understood that, due to the fact that most occlusion utility measures limit the lower bound of the potential maximum uniform AACB size, the maximum size of the contained region is typically underestimated once it has undergone both uniform and non-uniform expansion as described above. In other words, the occlusion utility measure used to select voxels for expansion is merely an estimate of the probability that said voxels will occlude the object once expanded. Therefore, once candidate AACBs are actually generated, their true occlusion utility should preferably be re-evaluated.

[0283] Furthermore, especially in the case of voxel density metrics, the densest voxels in a typical convex mesh tend to be more conservative relative to non-uniform expansion because they are typically bounded similarly on all three axes (i.e., approximately equidistant from the mesh surface on all three axes). Less 'dense' voxels are typically the opposite: they may often be heavily skewed along one or two axes. When encountering a less dense voxel that is not so tightly bounded on one axis, it is common to find a less conservative contained region that may perform better than those found among the densest voxels in the grid. The resulting observation is that greedy algorithms will generally place conservative contained regions, for which we will later find less conservative alternatives that perform better. Therefore, the optimality of greedy search can be improved by allowing conservative contained regions considered redundant to be replaced when generating or identifying candidate contained regions that perform better.

[0284] In some examples, tests for removing and / or replacing contained regions may be based on comparisons with predetermined values. Generally, a suitable surface area metric is calculated for each candidate AACB. In one example, the surface area metric is the combined surface area of ​​all sides of the target contained region. In other words, the total surface area of ​​a voxel (for a 2D voxel, it is simply the area) is the metric used for the contained region. Therefore, the surface area utility criterion used to measure a candidate contained region may simply be a predetermined minimum surface area, which defines the minimum surface area of ​​the combined surface area of ​​all sides of the contained region. Thus, in some examples, if a candidate contained region does not have a surface area that satisfies a predetermined minimum surface area threshold, it may be discarded and replaced by another candidate contained region that satisfies or exceeds the minimum surface area threshold, or simply not placed as a candidate AACB in the first instance (i.e., during the expansion phase).

[0285] In other examples, the refinement process may consider only any occlusion utility metric or surface area utility metric to determine whether to place a new AACB. Specifically, the occlusion utility metric extended to the original voxel within the contained region can be used to determine whether to remove the contained region. For example, a simple way to perform this tracking would be to determine the origin voxel associated with the AACB and whether the maximum occlusion utility metric associated with that voxel (since more than one occlusion utility metric can be defined) is within a heuristic range proportional to the current minimum heuristic of all current candidate AACBs. For example, a simple test for a given candidate region could be to determine whether the maximum occlusion utility metric of the candidate AACB is greater than half the value of the current minimum occlusion utility metric. If this test is not met, the candidate contained region can be discarded or not placed in the first position.

[0286] More complex tests are also available, taking into account the actual occlusion imposed by the candidate contained region. One such test involves determining the spatial intersection between two candidate contained regions. If the spatial intersection is above a certain threshold, the box with the best utility (e.g., having a larger volume or surface area) can be preferentially retained. Generally, when testing a candidate contained region relative to another candidate contained region, a candidate region may be referred to as a 'target' candidate region, where the goal is to determine whether the candidate contained region should replace the 'target' candidate region. In this specification, the reference to a 'target' contained region refers to the contained region being tested to determine whether it should be discarded / removed.

[0287] It is advantageous to compare the spatial intersection tests between two candidate contained regions because an AACB that is initially considered conservative (i.e., occupies a large proportion of the object volume and thus has high occlusion utility) may perform worse than another AACB that does not appear to be conservative.

[0288] The mechanism used to decide whether to replace the target box with a candidate box (which may be a newly created candidate) is based on one or more of the following criteria:

[0289] i) The overlap of the projection areas between the target box and the candidate box is higher than a predetermined threshold.

[0290] ii) If i) is 'yes', is the total combined surface area of ​​the target boxes less than the surface area of ​​the candidate boxes?

[0291] If ii) is true, then consider replacing the target box with a candidate box.

[0292] iii) There exists another candidate region (i) with a projection region that overlaps with the candidate above the threshold and ii) with a surface area greater than the candidate (i.e., a third AACB)?

[0293] If iii) is 'yes', then the original candidate box should not be placed.

[0294] Therefore, these steps define one example of a suitable surface area utility criterion for testing candidate contained regions.

[0295] Figure 16 Some considerations for this method are illustrated. Projection region overlap refers to the overlap between one contained region and another contained region for a given projection direction. Figure 16 In this context, the overlapping projection regions are indicated as stripe regions 1602, which are formed by the overlap between the first contained region 1614-1 and the second contained region 1614-2. In this case, the projection direction is along the principal z-axis. Therefore, the test set outlined above considers whether the overlapping region 1602 is above a certain predetermined threshold in step i). The 'combined total surface area' tested in step ii) above is the total surface area of ​​all faces of the voxel (i.e., the area of ​​the 2D voxel and the sum of all faces of the 3D voxel).

[0296] As mentioned above, another major factor affecting the utility of contained regions is projective occlusion (regardless of whether AACBs intersect spatially). When two mutually occluded AACBs intersect with a very similar set of rays, only one intersection between the ray and the AACB is required to guarantee that the ray will intersect the object. However, an intersection test is performed for each contained region. For two mutually occluded AACBs, this makes one of the AACBs effectively redundant. The occlusion utility metric used for selecting voxels (i.e., density-based metrics) cannot account for mutual occlusion between different contained regions. Therefore, it is advantageous to impose constraints on whether a contained region is actually accepted, discarded, or replaced by determining the overlap between i) the projected surface area of ​​the target contained region and ii) the projected surface area of ​​another candidate contained region. Analytically calculating the occlusion between two contained regions would be very expensive, i.e., because it would involve calculating integrals, such as integrating over the surface area of ​​the contained region over samples of occluded rays. Therefore, a faster approximation of the occlusion between two candidate contained regions is provided, which is projectively dependent.

[0297] Therefore, the inventors in this case have designed one or more other surface area utility standards that take into account the utility of mutually occluded AACBs (but not necessarily intersecting). Reconsidering... Figure 16 Let the object 1600 shown be a 2D representation of a 3D object. In this case, the two contained regions 1614-1 and 1614-2, both AACB, do not necessarily intersect in space. However, in the projection direction along the z-axis (e.g., Figure 16 As shown in the diagram, the two contained regions 1614-1 and 1614-2 partially obscure each other. For this purpose, it is not important which of the two regions is in front of the other. The inventors of this case have designed some surface area utility criteria that quantify the utility / redundancy of the contained regions based on two quantities:

[0298] 1) The proportion of the unobstructed projected surface area; and

[0299] 2) The value of the unoccluded projected surface area relative to the size of the object mesh.

[0300] The proportion of the unoccluded projected surface area represents the proportion of the target candidate region that is not occluded by another candidate contained region. The magnitude of the unoccluded projected surface relative to the size of the object mesh represents the proportion of the object mesh projected that is occluded by the unoccluded portion of the candidate contained region.

[0301] As described above, while the overlap of projected surface areas between two boxes can be calculated analytically (i.e., using integration), it becomes excessive when considering the overlap between multiple pairs of boxes. Therefore, the inventors of this invention provide a method for efficiently tracking the area of ​​the contained region for each pair of intersecting overlaps. One way to achieve this is to mark and count the pixels of a pre-computed axis-aligned bitmask of the object mesh. This pre-computed axis-aligned bitmask can be computed during the initial voxelization process. Alternatively, the projection of the object can be considered at the resolution of voxels already identified for the object (i.e., internal voxels, concave voxels, and / or boundary voxels).

[0302] Returning to the definition of the surface area utility criterion, the overall goal of a 'good' contained region with high occlusion utility is to maximize both 1) and 2) above. In other words, the pairwise occlusion between two AACBs should be low / minimum, meaning that the portion of the target AACB not occluded by the other AACB should be high. The occlusion of the AACB on the mesh surface of the object should also be high / maximum. In particular, the occlusion of the portion of the AACB not occluded by the other contained region on the mesh of an object should be high. The specific surface area metric calculated for a particular 'target' contained region being considered for removal / replacement, compared with another candidate contained region, is called the weighted projected surface area metric SA. WP The surface area utility criterion for comparison is then a predetermined threshold.

[0303] Weighted projected surface area measure SA WP It is limited to the following products:

[0304]

[0305] in:

[0306] SA unoccluded Define the surface area of ​​the target region that is not occluded by the first occluded region;

[0307] SA total The projected surface area of ​​the area containing the target is defined.

[0308] SA objectThe projected surface area of ​​the object is limited.

[0309] by Figure 16 For example, let the target-enclosed region be the shaded region 1614-1, and the candidate-enclosed region be 1614-2. Therefore, SA total It is the surface area of ​​region 1614-1. If SA overlap SA is the surface area of ​​the fringe region 1602, that is, the overlap between 1614-1 and 1614-2 in the z-direction projection. unoccluded =SA total -SA overlap . Limited SA unocluded The district is composed of Figure 16 The irregular dashed area in the text is indicated by 1604. SA object It is the surface area within the mesh outline 502. In other words, it is the weighted projected surface area metric SA. WP It is the unobstructed projected surface area p(SA) unoccluded The ratio of the unobstructed projected surface area to the object mesh |SA unoccluded The product of the magnitudes of |

[0310]

[0311] as well as

[0312]

[0313] Therefore, p(SA) unccluded The area of ​​the unshaded (shadowed) region 1604 is expressed as a proportion of the total area of ​​the contained region 1614-1, and |SA unoccluded The area of ​​the unshaded (shadow) region 1604 is expressed as a proportion of the area within the object outline 502.

[0314] Therefore, the weighted projected surface area is used for candidate AACBs by comparing this weighted projected surface area with a predetermined threshold. Thus, if the weighted projected surface area (SA) of a candidate box is higher than a certain value, it is not placed as an AACB. In other words, if the value SA of the target AACB is higher than a certain threshold, it is not placed as an AACB. WP If the value of a candidate AACB is not higher than a certain value, but the value of another candidate AACB is higher than a certain value, then the target should be replaced to benefit the other candidate AACB.

[0315] To date, the weighted projected surface area measure SA WP It is represented by only a single projection. However, in other projection directions, SA WPThe values ​​can vary considerably. Furthermore, considering only the principal axes (i.e., projections in the X, Y, and Z directions) does not adequately represent the degree of occlusion between two AACBs. Moreover, there is no reason for rays to align with the principal axes, and therefore it would be beneficial to calculate a weighted projected surface area measure of the various projections that are not aligned with the principal axes.

[0316] Therefore, in order to generate a more representative measure of surface area utility, the weighted projected surface area measure SA is used. WP This should be applied to a representative set of directions. The inventors have determined that 13 different representative directions can provide favorable results without requiring the testing of a very large number of projections.

[0317] A) The three directions used for orthogonal projection along the principal axis (i.e., the unit vector directions z[0,0,1], y[0,1,0], x[1,0,0]).

[0318] B) Six directions for orthogonal projection along the edge (i.e., unit vector directions xy[1,1,0], -xy[-1,1,0], xz[1,0,1], -xz[-1,0,1], yz[0,1,1], -yz[0,-1,1]).

[0319] C) The four directions used for orthogonal projection aligned with the corner, i.e., equidistant projection (i.e., [1,1,1], [-1,1,1], [1,-1,1], [-1,-1,1]).

[0320] These orientations are not arbitrarily chosen. They have the advantage that any given voxel will completely occlude voxels of the same size along the same viewing direction, provided that these voxels are directly in front or behind, and that the bitmask generated from the projection is sampled around the center point of the voxel. Typically, using these views makes it possible to create bitmasks with a regular spatial structure that precisely covers the 'silhouette' of the voxel raster and anything placed (quantized) within it. Therefore, the combined weighted projected surface area measure... It can be calculated as SA for multiple different projections. WP The sum of, for example, the 13 projections provided above.

[0321] It should be understood that the surface area utility metric described above can also be applied in a very similar way to contained regions generated within concave objects. One difference is that, in the case of projection-captured anomalous surfaces, these are not counted for projected surface area overlap, because they cannot be used to optimize incident rays in the same way as for closed objects. In other words, |SA| is considered in relation to the projected overlap between the unoccluded area of ​​the candidate contained region and the object mesh. unoccluded The value of | only considers the overlap with the portion of the object projection that does not include the abnormal surface.

[0322] Figure 17 An example of an isometric projection 1700 (i.e., one of [1,1,1], [-1,1,1], [1,-1,1], [-1,-1,1]) is shown. An example of a candidate contained region 1702 is shown inside the silhouette of a Stanford rabbit object. This figure illustrates that for any voxel of the same size in front of or behind the example contained region 1702, assuming sampling has been performed around the center of the voxel, the voxel will be completely occluded. Therefore, isometric projection provides an advantageous way to measure potential occlusion between voxels. Additionally, it should be understood that isometric views (such as...) Figure 17 (As seen in the image) Each voxel is represented as a set of 6 triangles (which in...) Figure 17 (As explained in voxel 1702). An isometric projection can be represented as a 'bit mask', where each triangle is a 'bit'. Therefore, in an isometric projection, the hexagonal silhouette generated by each voxel will occlude 6 triangles corresponding to 6 'bits' in each plot.

[0323] Separated from multiple projections, voxels are (usually) inherently axis-aligned, so voxels are typically extended and therefore candidate contained regions are also axis-aligned. This can potentially slightly reduce the efficiency of occlusion analysis, as some objects may have poorly axis-aligned surfaces, and therefore AACBs do not provide optimal space filling. For example, a square object rotated 45 degrees relative to a square voxel is even poorly occluded by the largest square voxel that can fit inside the square object. However, boxes aligned with alternative axes can be intentionally created, for example, corresponding to the orientation of the object's surfaces. These contained regions will then be 'oriented' as needed and may be referred to as 'directed bounding boxes' or OCBs. When testing these OCBs against rays during traversal / intersection tests, an instance transformation can be applied to rotate any rays being tested into the desired projection aligned with the OCB. Thus, OCBs not aligned with the principal axes of the spatial coordinate system can still be tested efficiently, as the OCBs can still take advantage of the efficiency of the fastest box test unit (BTU) when testing axis-aligned volumes.

[0324] Furthermore, it should be noted that the axis-aligned XYZ voxelization method disclosed above can still be (initially) used to generate non-axis-aligned OCBs. In other words, using axis-aligned voxels allows for the generation of OCBs, for example, by conservatively defining the OCB within the vertices of the voxels determined to be internal voxels (e.g., such that the OCB does not extend beyond the boundaries of the internal voxels). As an example, for a square-shaped object rotated 45° around an axis to a voxel grid, this method can generate a better contained region than the 'optimal' (i.e., largest) square contained region defined along the voxel's axis. The same principle applies equivalently to cube voxels inside a cube object.

[0325] Continuous surface objects

[0326] In the objects described above, some internal regions are identified, within which the contained region is extended. For closed objects, this is the object interior; for concave objects, it is the region occupied by concave voxels (e.g., the object's convex hull); and for some non-closed self-hidden objects, it is the so-called 'hidden region'. However, another class of objects can utilize the voxel selection and extension methods disclosed above. Slightly different occlusion utility and surface area utility metrics are applied to the contained regions developed for continuous surface objects. For the purposes of surface objects, the contained regions are called 'surface-dependent AACB' or 'surface-dependent contained regions' because they are specifically derived for the joint portions of the surface. To provide some context for this type of object, some background is provided to explain the utility of surface-dependent contained regions around continuous surface objects in ray tracing methods and systems. In the section on... Figure 18a and Figure 18b In the following description, the term “partially enclosed region” refers to “surface-dependent AACB”, and therefore these terms are considered interchangeable in this context.

[0327] Figure 18a This illustrates how to construct a partially enclosed region intersecting with a surface (i.e., a surface-dependent AACB). This allows for the inference of the existence of an intersection with a continuous surface even when the exact intersection coordinates with the enclosed region are uncertain. Figure 16 In this particular example, the triangle forming surface object 1600 is partially enclosed by axis-aligned box 1804.

[0328] Figure 18a Object 1800 is composed of a triangular mesh. In this specific case, the triangular mesh has been selected from a much larger surface and is continuous and waterproof (i.e., without gaps). A bounding body 1804 is used here to enclose a specific portion of the mesh object 1800. In this case, the bounding body 1804 is considered a partial bounding body because it does not completely contain the surface object 1800. In fact, the partial bounding body 1804 has the following characteristics:

[0329] i. Two opposing faces contain continuous portions of the surface (i.e., the contained portions of the surface have no gaps). In this example, the front and back faces, i.e., the front and back faces located in the yx plane, contain continuous portions of the surface.

[0330] ii. The remaining four surfaces are set as 'abnormal' surfaces because they intersect with the surface and are arranged to exclude the edge / outer boundary 1801 of the surface. Figure 18a The two anomalous surfaces shown in the left-hand side diagram are designated as 1830-1 and 1830-2.

[0331] In other words, the partial enclosing body 1804 is arranged relative to the surface 1800 to ensure that the edge / boundary 1801 of the primitive is not contained within any part of the enclosing body 1804. This can be seen from the right-hand side view, which shows the partial enclosing body viewed along the z-axis and illustrates that the partial enclosing body 1804 is arranged relative to the surface 1800 such that the surface completely bisects the partial enclosing body 1804. The boundary edge 1801, defined by the unpaired edges of the triangle, is indicated by dashed lines and can be seen to fall outside the partial enclosing body 1804. Therefore, the partial enclosing body 1804 comprises two separate volumes separated by the surface 1800, and there is no gap in the portion of the surface 1800 contained within the partially enclosing region 1804.

[0332] The front and back surfaces of the bounding box 1804, i.e., the surfaces located in the yx plane, are considered the 'standard' surfaces of the bounding box (because they do not intersect with the surface). In this example, these surfaces are chosen to be the narrowest dimensions perpendicular to the surface object 1800. The positions of the anomalous surfaces can be set such that opposite sides are separated as far apart as possible, but each of the anomalous surfaces is divided / bisected by a subset of the triangles forming the surface object 1800. Each of the four anomalous surfaces surrounding 1804 (shown in dashed lines) is divided into (at least) two non-intersecting regions. Therefore, any straight line drawn from the front surface (in the yx plane) to the back surface (in the yx plane) of the bounding box 1804 must necessarily intersect the surface object 1800 (provided there are no holes in the triangular mesh forming the object 1800).

[0333] Preferably, the opposing faces of the 'standard' (i.e., non-abnormal) surfaces can be set as close together as possible (in a conservative manner), provided that the contained portion of the triangle does not intersect with those surfaces of the enclosing body 1804. The following section discusses... Figure 19 , Figure 20a and Figure 20b Describe how this is achieved for surface dependencies being contained within regions.

[0334] It should now be understood that if a ray enters through any of the non-abnormal surfaces partially surrounding body 1804 and exits through another non-abnormal surface, then the ray must intersect at least one of the selected triangles forming the portion of surface 1800. The t of the ray can then be... max The value is adjusted to the intersection exit point on the far side of the enclosing region 1804. However, if light enters or exits through an anomalous surface, the existence of an intersection cannot be immediately determined.

[0335] Figure 18b It clearly explains how it can be used. Figure 18a Partial bounding volume / surface-dependent AACB is used to handle intersecting rays. Figure 18bThe surface object 1800 and the bounding body 1804 are shown from a new perspective (i.e., a view along the negative y-axis), such that only the uppermost anomalous surface 1830-1 of the bounding body 1804 is visible. Figure 18a (as shown in the image). Figure 18b The maximum effective distance t is shown for passing through surface object 1800. max 1812 and minimum effective distance t min Light ray 1802 of 1810. The light ray also passes through the relatively non-abnormal surfaces of the partial enclosure 1804 via entry point 1806 and exit point 1808. As explained above, since the enclosure 1804 is arranged to contain only a portion of the surface, where the contained portion of the surface does not include gaps, it is possible to infer the intersection with the surfaces for light rays passing through the two non-abnormal surfaces of the partial enclosure 1804. This situation is... Figure 18b The instructions are in order. Therefore... Figure 18b Explain the t of light max The value is updated (i.e., as shown at triangle point 1820) to the furthest intersection exit point along the direction of the ray between the ray and the enclosing region (i.e., exit point 1808 of the partial enclosing region 1804). If Figure 18b If the light ray in the image is a shadow ray, then the processing of the shadow ray can be terminated immediately based on the above intersection criteria.

[0336] In this example, the surface object 1800 formed by the triangle is exactly perpendicular to the principal axis (in this case, the z-axis). In other examples, when encountering more 'tilted' surfaces that are not substantially perpendicular to the principal axis of the spatial coordinate system, a directed box might be chosen for the partial bounding volume 1804. In this case, the directed box would be a box with one dimension aligned with the approximate mean plane of the surface object.

[0337] To determine the region containing surface dependence, for example Figure 18a Region 1804, as shown, considers some new features of voxels. The overall goal for generating surface-dependent AACBs is to maximize the area of ​​non-abnormal surfaces and minimize the area of ​​anomalous surfaces. This is because the points of surface-dependent AACBs are where non-abnormal surfaces should trap light (and thus present large surfaces), and anomalous surfaces should not trap light (because if they trap light, it is impossible to infer the intersection with the surface object of said light). This can be achieved by constructing surface-dependent AACBs around substantially flat regions of the object or around substantially flat continuous surfaces. Such 'flat' regions can be identified by determining chains of voxels that intersect with the surface of the object.

[0338] To determine this metric, a 'voxel anomalous surface' is defined. In other words, it is necessary to identify continuous lines extending from the voxel grid that intersect with the object surface, which corresponds to identifying 'chains' of boundary voxels (since boundary voxels are defined as voxels that intersect with the grid of the surface). These boundary voxel chains can be identified by determining the continuity of such boundary voxels. Furthermore, if the continuity / chain of boundary voxels can be identified, then the continuity / chain can be quantized. Therefore, advantageously, the performance of the boundary voxels forming the chain can be estimated by quantifying the continuity / chain. In other words, the occlusion utility metric for boundary voxels used to form surface-dependent AACBs can be based on the quantization of the continuity / chain of boundary voxels located on the surface.

[0339] Figure 19 An example of an object 1900 with a substantially flat base is shown. This object is again the Stanford Rabbit. Similarly, the following examples are illustrated in 2D, but apply to both the 2D and 3D examples. A voxel grid is shown, where, as previously stated, boundary voxels 1906 are those voxels that intersect with the object grid 502. Figure 19 Also shown are 'voxel anomalous surfaces' 1902, which are specific faces / edges of voxels intersecting the mesh. These voxel anomalous surfaces 1902 are indicated by square dashed lines. Voxel anomalous surfaces are a means of identifying continuity within a voxel grid. Individual faces of voxels intersecting triangles are marked, indicating that a surface passes through them. In the case of a continuous chain of voxel anomalous surfaces along a specific axis, it can therefore be determined that a flat surface must exist along said axis. Thus, chains of voxel anomalous surfaces (corresponding to chains of boundary voxels) help identify flat regions of the mesh around which surface-dependent contained regions can be generated.

[0340] Voxel anomalous surfaces can be easily calculated in at least two ways. The first is analytical: that is, by modifying the triangle-box intersection routine used in voxelization to also identify which faces of the voxel intersect the mesh (and, for non-closed meshes, also to check that the regions are fully connected, i.e., continuous). A simple way to do this is by testing the voxels as six individual planes. The second method is approximate: that is, by analyzing the voxelized shell diagram of the voxelized mesh (i.e., boundary voxels). Generally speaking, the face located between two adjacent boundary voxels will be the voxel anomalous surface.

[0341] The method for quantifying the length of a series of voxel anomalous surfaces 1902 uses the concept of axial chain length. In short, the number of 'jumps' that can be counted along a given principal axis from one voxel anomalous surface to another is the 'axial chain length' of the voxel along that axis. Figure 19 The axial chain length in the x-direction is shown to be 8, because there are 8 consecutive voxel anomalous surfaces in a straight line along the x-axis. Figure 19It is also shown that the axial chain length in the y direction is 2, because there are only 2 consecutive voxel anomalous surfaces in a straight line along the y-axis.

[0342] However, in reality, complex surfaces are often not perfectly flat, but contain shallow zigzag curves. Depending on the voxel resolution / grid size, these shallow curves can be captured by the straight lines of the boundary voxels, although this is not always the case. In some cases, the axial chain length of the surface will be underestimated by strictly limiting the voxel anomalous surface jumps to a single axis and disallowing deviations in orthogonal directions. Therefore, we can account for these small deviations by allowing a predetermined amount of deviation away from the principal axis under consideration to account for gradually curving surfaces. This allows for a small number of orthogonal jumps away from the principal axis direction, the amount of which is proportional to the current length of the chain. For example, in Figure 19 As can be seen, the lower right boundary voxel intersects the mesh surface 502 in the line above the lowest voxel line. However, since this is only a deviation of a single voxel, this is permissible.

[0343] In some examples, coefficients can be used to determine how much deviation is allowed. The coefficient used to calculate the number of these orthogonal jumps we allow can be limited to n. jumps = k × d, where d is the length of the 'jump' that lies strictly in a straight line, and k is a coefficient that can be arbitrarily determined. The inventors have found that a value of k of approximately ~0.05 performs well for the most typical meshes. It should be understood that this parameter can be adjusted to any suitable value to obtain the desired behavior from the voxel generation algorithm.

[0344] Any given voxel will be associated with chain lengths along three axes (for 3D scenes, in...). Figure 19 In the 2D example shown, only two chain lengths are depicted, i.e., one chain length per axis alignment direction. This represents the size of the chain in which the voxel resides along said axis. Therefore, a occlusion utility metric based on the chain length can be obtained from the maximum value of the chain lengths along the three axes of the voxel. For example, the occlusion utility metric for the boundary voxels in the chains of an 8-voxel anomalous surface could be 8. In this disclosure, the three chain lengths calculated for each voxel for each principal axis may be referred to as the maximum chain length, the median chain length, and the minimum / lowest chain length.

[0345] It should be understood that once grown from boundary voxels, the maximum chain length represents the lower limit of the maximum size of the surface-dependent contained region. However, anomalous surfaces that are part of the surface-dependent contained region cannot be used; therefore, their area should preferably be considered when determining the shading utility metric of boundary voxels.

[0346] Therefore, the maximum chain length can be reduced based on the estimated anomalous surface area, which can be inferred from the median and minimum chain lengths of the voxels. While better results can be provided by calculating the occlusion utility metric based on the expected non-anomalous surface area (i.e., from the two maximum chain lengths), it is preferable to use only one chain length to keep the metric a linearly scaled value rather than a polynomially scaled one. However, the linearly scaled chain length metric has the advantage that it can be directly compared with other occlusion utility metrics described herein (i.e., voxel density metrics). In other words, to keep the metric comparable to other metrics, the dimension is intentionally chosen to be linear, i.e., proportional to a single axial chain length. However, the axial chain length metric is described by the following construction for chain lengths in all directions:

[0347]

[0348] 'x', 'y', and 'z' represent the maximum chain length, median chain length, and minimum chain length of a given voxel, respectively. This particular occlusion utility measure based on the axial chain length can be called 'reduced maximum chain length', where 'reduction' refers to the portion of the equation that indicates the proportion of the anomalous surface area.

[0349] Figure 20a and Figure 20b This illustrates how to select and extend boundary voxels intersecting a surface to form the contained region. The selection of suitable voxels follows the same process as selecting inner voxels for extension within a closed object or concave voxels for extension within a concave object: that is, selecting voxels with the highest (or equal to the highest) occlusion utility metric. The preferred occlusion utility metric for boundary voxels is the maximum axial chain length or the reduced maximum chain length.

[0350] Figure 20a Mesh 502 of object 2000 is the base of the Stanford Rabbit object. Voxel anomalous surface 1902 is shown again to indicate where the boundary voxel chain is located. In addition to the requirement of selecting boundary voxels for expansion, an additional condition is usually imposed: the boundary voxel should be completely bisected by a surface (such boundary voxels will almost always exist). In other words, the boundary voxel should include four voxel anomalous surfaces that bisecte the voxel (for 3D voxels). For 2D voxels, only two voxel anomalous surfaces will exist. It can be seen that boundary voxel 1907 is indeed bisected by surface mesh 502, and correspondingly, it contains two voxel anomalous surfaces. In contrast, boundary voxel 1908 contains only a single voxel anomalous surface, and it is not bisected by mesh 502. Therefore, in this case, boundary voxel 1907 is selected (although we cannot see what the z-axis axial chain length of said voxel would be in a 3D scene).

[0351] The expansion of the boundary voxel follows the same general objective as in the first instance, which attempts to expand uniformly to maximize the surface area. However, as mentioned above, the surface-dependent AACB has four anomalous surfaces (i.e., surfaces intersecting the object surface), which are practically useless. This is because the traversal of a ray cannot be optimized in any way if it intersects the anomalous surfaces of the surface-dependent region / AACB. Therefore, the objective of expanding the surface-dependent AACB is applied uniformly only to dimensions aligned with the surface, not to dimensions perpendicular to the object surface (because expanding perpendicular to the object surface corresponds to increasing the size of the anomalous surfaces).

[0352] Therefore, the maximum and median axial chain lengths indicate the location where the non-abnormal surface will reach, and thus the size by which the voxel should expand in the first instance. This increases the surface area of ​​the non-abnormal surface while minimizing one or more surface areas of the anomalous surface (which is associated with the minimum chain length).

[0353] exist Figure 20a In the 2D example 2000, the maximum chain length represents the x-direction, and the minimum chain length represents the y-direction. Extending this to a 3D object, the median chain length would be in the z-direction. Therefore, as in... Figure 20a As indicated by the arrow, the selected boundary voxel 1907 extends along the x-axis chain. In 3D, the voxel will extend simultaneously along both the x-axis and z-axis chains (i.e., the maximum chain length and the median chain length). This extension pattern makes the extended voxels as uniform as possible in the non-abnormal surface plane.

[0354] The 'end' of an AACB must always contain an anomalous surface, so once it is determined that further expansion will cause the anomalous surface of the voxel to become a standard surface, the expansion can be terminated. Figure 20b The extended voxel 1904 is shown, which is the result of extending the original boundary voxel 1907 in the x-axis. It can be seen that both ends of the extended voxel 1904 include anomalous surfaces 1930 intersecting the object mesh 502. This is no longer the case if the extended voxel 1904 were to extend by one more voxel in the +x or -x direction, and the voxel would no longer have a valid surface-dependent AACB. In some examples, it might be desirable to extend the voxel non-uniformly in the minimum axial chain length dimension after extending in the maximum chain length and median chain length dimensions. This can be done to capture shallow curves in the surface, thus allowing the voxel to extend further in the maximum chain length and median chain length directions.

[0355] More specifically, regarding the termination conditions for voxel expansion, the expansion is constrained, as in the closed object example, with the concept of 'constrained' voxels. However, the constraints on continuous surfaces differ from the previous example. For instance, to ensure the generation of valid surface-dependent AACBs, expansion should terminate under the following conditions:

[0356] i) There is no complete set of boundary voxels that span the plane defined by the edge of the maximum chain length (in the 2D case) or the maximum chain length and the intermediate chain length (in the 3D case). In other words, an extended edge should have boundary voxels that span and are adjacent to the boundary voxels in the existing box edge.

[0357] ii) Boundary voxels in the extended edge have standard voxel surfaces aligned with the extended direction (i.e., non-voxel anomalous surfaces). This would correspond to the extended edge passing through a continuous surface (e.g., if anomalous surface 1930 no longer intersects mesh 502).

[0358] It should be understood that multiple distinct surface-dependent AACBs can be generated for a surface, and they can overlap in the same way as other object types, i.e., intersect each other spatially. Furthermore, the set of surface-dependent AACBs can be refined into smaller sets using the same surface area utility metric described above. However, since the surface-dependent AACBs include four anomalous surfaces, projecting the surface-dependent AACBs becomes a simpler problem, as the projected surface area will only need to be calculated along the least axial chain direction (thus excluding anomalous surfaces). In other words, the surface-dependent AACBs will not require projection in multiple different directions.

[0359] Another aspect of contained region generation methods is mesh preprocessing, which in some examples may be necessary to identify closed objects and different types of voxels. Some degree of preprocessing is typically required to help label voxels with the correct category, as this cannot always be done before the mesh itself has been processed to determine connectivity. More broadly, preprocessing is performed to identify which objects are truly 'closed' (i.e., waterproof), making it possible to identify first-generation cases and generate AACBs.

[0360] The three typically performed steps involved in mesh preprocessing are as follows:

[0361] 1) 'Mesh optimization'. This involves ensuring that vertices intended to be connected are actually connected (e.g., merging copies).

[0362] 2) 'Instance Segmentation'. This involves identifying which parts of the mesh are intended to be distinct objects. The meshes containing the identified distinct objects are then classified into separate sub-meshes. Sub-meshes can be classified as sets of vertices that form connected undirected graphs.

[0363] 3) 'Closed Classification'. After step 2), each submesh can be classified as closed or open. For 'open' meshes, the classification of internal voxels can be skipped, but these can still be considered as concave objects.

[0364] For open meshes, the contained region of the surface-dependent AACB type can be applied. Concave voxels can also be applied to open meshes, provided that some curvature exists. It should also be understood that surface-dependent AACB can be applied to all types of objects, provided that at least a portion of the object's surface is continuous (i.e., without gaps / holes).

[0365] Figure 21 This is a flowchart illustrating an example method for generating contained regions within an object according to embodiments disclosed in this invention. This method applies to all types of objects described herein, namely closed objects, open (concave) objects, continuous surfaces, and non-closed self-hidden objects. For the purposes of this method, it should be understood that contained regions are arranged to facilitate determining whether a ray intersects with an object in the scene, and that the object is contained within one or more finite enclosing regions (e.g., within a region defined by the union of one or more enclosing regions) that form a hierarchical structure of object segmentation.

[0366] Step S102 involves dividing the volume within one or more finitely enclosed regions into multiple voxels. An example of this division is described regarding the voxelization of an object. In some cases, voxelization will produce a set of voxels defined by a voxel grid aligned with the principal axis, thus aligning each voxel axis. However, this is not always the case. The voxel grid may have another orientation. Furthermore, as described above, voxels can be reoriented to generate a directed enclosed box (OCB).

[0367] Step S104 involves classifying multiple voxels, wherein the classification includes identifying a subset of internal voxels contained within the range of the geometry defined by the object. In the example, this involves classifying voxels according to one or more of the following voxel types: internal voxels, boundary voxels, concave voxels, and 'empty' voxels. Furthermore, for non-closed self-hiding objects, if a voxel initially classified as a concave voxel is found to reside within a 'hidden area,' that voxel may also be considered / labeled as an internal voxel. As described herein, the range of the geometry defined by the object depends on the type of object.

[0368] Step S106 involves determining an occlusion utility measure for each of the internal voxels, wherein the occlusion utility measure quantifies an estimate of the potential surface area of ​​the expanded version of each internal voxel. More than one occlusion utility measure may be determined for each voxel. Preferably, the occlusion utility measure quantifies an estimate of the lower bound of the surface area of ​​each internal voxel when expanded and transformed into an contained region, and thereby estimates the potential utility of each internal voxel in occluding an object once expanded into a contained region. In the example, the occlusion utility measure is a scalar value, such as a one-dimensional scalar estimate of surface area, which advantageously allows for quick and (mathematically) direct comparisons with other occlusion utility measures that are also limited to scalar values.

[0369] Step S108 involves selecting internal voxels from a subset of internal voxels as candidate voxels for transformation into the contained region, depending on the occlusion utility metric. It should be understood that when more than one occlusion utility metric has been calculated for a voxel, the voxel can be selected based on any of the occlusion utility metrics (preferably based on whichever has the highest value).

[0370] Step S110 involves expanding the volume of a candidate voxel by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object. As described above, this preferably involves first expanding uniformly until the constrained region / voxel is reached, followed by non-uniform expansion or extension. Preferably, and if possible, non-uniform expansion involves simultaneous extension in more than one dimension.

[0371] Step S112 involves assigning an extended voxel as a contained region, wherein the contained region is arranged to facilitate determining whether a ray intersects an object, depending on whether the ray intersects the contained region. This step may optionally involve performing a test based on the utility of the extended voxel to determine whether the assigned voxel is retained, and / or whether an existing contained region is replaced with the extended voxel. Suitable surface area utility metrics, such as weighted projected surface area measures, have been described above. Throughout this specification, for example, regarding… Figures 4a to 4c , Figure 6a , Figure 6b , Figure 7 , Figures 10a to 10c , Figures 11a to 11c , Figure 17 , Figure 18a and Figure 18b It describes how contained regions can facilitate intersection testing.

[0372] Figure 23 This is a flowchart illustrating an example method for selecting from a plurality of contained regions to obtain a refined set according to embodiments disclosed in the present invention. In other words, the method involves pruning the set of contained regions to obtain a better set of contained regions that provides a better balance between occlusion utility and intersection testing cost. For the purposes of this method, it should be understood that each of the plurality of contained regions is arranged to facilitate the determination of whether a ray intersects with an object in the scene, wherein the object is contained within one or more finite enclosing regions that form a hierarchy of object segmentation.

[0373] Step S202 involves obtaining geometrical data of a defined object and a plurality of candidate contained regions, wherein each of the plurality of candidate contained regions is contained within the geometry defined by the object.

[0374] Step S204 involves selecting a target contained region from a plurality of contained regions. The selection can be arbitrary, for example, random. Alternatively, it can be based on an occlusion utility metric determined for the voxel. For example, a contained region with the lowest occlusion utility metric or an occlusion utility metric below a certain threshold can be selected as the target contained region.

[0375] Step S206 involves identifying one or more occluded contained regions among a plurality of contained regions, wherein the target contained region at least partially occludes the one or more occluded contained regions. It should be understood that this occlusion includes occlusion solely by projection, without spatial intersection. Occlusion also includes spatial intersection, which would also involve at least partial occlusion.

[0376] Step S208 involves determining a surface area metric for the target-enclosed region. This metric may be based solely on the target region, or it may involve a metric determined based on the target-enclosed region and the object, and / or it may involve a metric determined based on the target-enclosed region and another enclosed region. In some cases, the surface area metric may simply be the occlusion utility associated with the voxel being expanded to generate the target-enclosed region.

[0377] Step S210 involves determining whether a surface area measure of the target contained region satisfies one or more surface utility criteria, wherein the one or more surface utility criteria are defined based on at least one of: i) the surface area defined by one or more occluded contained regions; and ii) the surface area defined by the object. Suitable examples of surface utility criteria have been described above. Surface utility criteria may include one or more thresholds and / or one or more comparative tests.

[0378] Step S212 involves discarding the geometry data that defines the target contained region in response to the determination that the surface area metric of the contained region does not meet one or more surface area utility criteria, to obtain a refined set of contained regions.

[0379] exist Figure 18a Following the steps outlined herein, the refined set of contained regions is arranged to facilitate determining whether a ray intersects with an object, depending on whether the ray intersects with at least one contained region in the refined set of contained regions. Throughout this specification, for example regarding... Figure 18b , Figure 24 , Figure 1 , Figure 25 , Figure 25 , Figure 25 , Figure 25 , ​ and ​ It describes how a refined set of contained regions can facilitate intersection testing.

[0380] The refined set of contained regions contains one less contained region than a plurality of contained regions, where the removed target contained region is discarded because it does not meet some surface area utility criteria. Therefore, the refined set of contained regions has been derived such that it provides better utility overall. For a simple example, assume that the discarded target contained region does not obscure any unique part of any projected object, nor is it obscured by the union of the refined set of contained regions. Therefore, the refined set of contained regions has lower intersection cost (because it tests one less contained region) but has the exact same obscuring utility as before removing the target contained region. Thus, advantageously, the refined set of contained regions can be used more efficiently, and therefore has improved utility.

[0381] ​ This is a flowchart illustrating an example method for generating contained regions for a continuous portion of a continuous surface or object surface according to embodiments disclosed in the present invention. For the purposes of this method, it should be understood that the contained regions are arranged to facilitate determining whether a ray intersects with an object in the scene, wherein the object is contained within one or more finite enclosing regions forming a hierarchical structure of object segmentation, and wherein the object is a continuous surface.

[0382] Step S302 involves dividing the volume within one or more finitely enclosed regions into multiple voxels.

[0383] Step S304 involves classifying multiple voxels, wherein the classification includes identifying a subset of boundary voxels that lie within a range of geometry defined by the object and intersect with continuous surfaces of the object.

[0384] Step S306 involves determining an occlusion utility measure for each of the boundary voxels, wherein the occlusion utility measure comprises a component that quantifies at least a maximum number of boundary voxels intersecting the continuous surface of the object in a continuous chain in a single dimension, wherein the boundary voxels are members of the chain.

[0385] Step S308 involves selecting boundary voxels from a subset of boundary voxels as candidate voxels for transformation into the contained region, depending on the occlusion utility metric. Preferably, the selected boundary voxels are squared by a continuous surface, wherein the bisecting plane is aligned with the dimension of the continuous chain in a single dimension that defines the maximum number of boundary voxels.

[0386] Step S310 involves expanding the volume of the candidate voxel by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the geometry defined by the object. In this case, the geometry defined by the object is preferably defined by the outer boundary of a continuous surface. In some cases, the continuous surface may be a portion of the closed object. Thus, in some examples, the geometry defined by the object (which contains the expanded voxel) may be defined by the plane spanning the boundary voxel.

[0387] Step S312 involves assigning extended voxels as contained regions, wherein the contained regions are arranged to facilitate determining whether a ray intersects an object, depending on whether the ray intersects the contained region. Regarding ​ and ​ Describe how such extended voxels can facilitate intersection testing.

[0388] ​ A computer system in which the graphics processing system described herein can be implemented is shown. The computer system includes a CPU 2402, a GPU 2404, memory 2406, a neural network accelerator (NNA) 2408, and other devices 2414, such as a display 2416, a speaker 2418, and a camera 2422. A processing block 2410 (corresponding to processing logic 110) is implemented on the GPU 2404. In other examples, one or more of the depicted components may be omitted from the system, and / or the processing block 2410 may be implemented on the CPU 2402 or within the NNA 2408. Components of the computer system can communicate with each other via a communication bus 2420. A storage device 2412 (corresponding to storage device 104) is implemented as part of memory 2406.

[0389] ​ The graphics processing system is shown as comprising multiple functional blocks. This is merely illustrative and not intended to define a strict division between different logical elements of such an entity. Each functional block may be provided in any suitable manner. It should be understood that the intermediate values ​​described herein as being formed by the graphics processing modules need not be physically generated by the graphics processing modules at any point, and may only represent logical values ​​that conveniently describe the processing performed by the graphics processing modules between their inputs and outputs.

[0390] The graphics processing module described herein may be implemented in hardware on an integrated circuit. The graphics processing module described herein may be configured to perform any of the methods described herein. Generally, any of the functions, methods, techniques, or components described above may be implemented in software, firmware, hardware (e.g., fixed logic circuitry), or any combination thereof. The terms “module,” “function,” “component,” “element,” “unit,” “block,” and “logic” may be used herein to generally denote software, firmware, hardware, or any combination thereof. In the case of a software implementation, a module, function, component, element, unit, block, or logic represents program code that, when executed on a processor, performs a specified task. The algorithms and methods described herein may be executed by one or more processors that execute code that causes the processor to perform the algorithm / method. Examples of computer-readable storage media include random access memory (RAM), read-only memory (ROM), optical disk, flash memory, hard disk storage, and other memory devices that may use magnetic, optical, and other techniques to store instructions or other data and are accessible by a machine.

[0391] As used herein, the terms computer program code and computer-readable instructions refer to any kind of executable code for a processor, comprising code expressed in machine language, interpreted language, or scripting language. Executable code includes binary code, machine code, bytecode, code defining integrated circuits (e.g., hardware description languages ​​or netlists), and code expressed in programming languages ​​such as C, Java, or OpenCL. Executable code can be, for example, any kind of software, firmware, script, module, or library that, when properly executed, processed, interpreted, compiled, or run in a virtual machine or other software environment, causes the processor of a computer system supporting the executable code to perform tasks specified by said code.

[0392] A processor, computer, or computer system can be any kind of device, machine, or special-purpose circuit, or a collection or part thereof, having processing capabilities that enable it to execute instructions. A processor can be or includes any kind of general-purpose or special-purpose processor, such as a CPU, GPU, NNA, system-on-a-chip, state machine, media processor, application-specific integrated circuit (ASIC), programmable logic array, field-programmable gate array (FPGA), etc. A computer or computer system may contain one or more processors.

[0393] This invention also intends to cover software defining the configuration of hardware as described herein, such as hardware description language (HDL) software, for designing integrated circuits or for configuring programmable chips to perform desired functions. That is, a computer-readable storage medium on which computer-readable program code in the form of an integrated circuit definition dataset is encoded may be provided, which, when processed (i.e., executed) in an integrated circuit manufacturing system, configures the system to manufacture a graphics processing module configured to perform any of the methods described herein, or to manufacture a graphics processing module including any of the devices described herein. The integrated circuit definition dataset may, for example, be an integrated circuit description.

[0394] Therefore, a method for manufacturing a graphics processing module as described herein can be provided at an integrated circuit manufacturing system. Furthermore, an integrated circuit definition dataset can be provided, which, when processed in the integrated circuit manufacturing system, causes the method for manufacturing the graphics processing module to be executed.

[0395] Integrated circuit definition datasets can be in the form of computer code, such as netlists, code for configuring programmable chips, hardware description languages ​​defining hardware suitable for manufacturing at any level in integrated circuits, including register-transfer level (RTL) code, high-level circuit representations (such as Verilog or VHDL), and low-level circuit representations (such as OASIS(RTM) and GDSII). Higher-level representations (e.g., RTL) that logically define hardware suitable for manufacturing in integrated circuits can be processed at a computer system configured to generate manufacturing definitions of integrated circuits within the context of a software environment that includes definitions of circuit elements and rules for combining those elements to generate the manufacturing definition of the integrated circuit so defined by that representation. As is typically the case where software executes at a computer system to define the machine, one or more intermediate user steps (e.g., providing commands, variables, etc.) may be required to configure the computer system to generate the manufacturing definition of the integrated circuit, executing code that defines the integrated circuit to generate the manufacturing definition of said integrated circuit.

[0396] Now about ​ This describes an example of processing an integrated circuit definition dataset at an integrated circuit manufacturing system in order to configure the system to manufacture a graphics processing module.

[0397] ​An example of an integrated circuit (IC) manufacturing system 1002 is shown, configured to manufacture a graphics processing module as described in any of the examples herein. Specifically, IC manufacturing system 2502 includes a layout processing system 2504 and an integrated circuit generation system 2506. IC manufacturing system 2502 is configured to receive an IC definition dataset (e.g., defining a graphics processing module as described in any of the examples herein), process the IC definition dataset, and generate an IC (e.g., embodying a graphics processing module as described in any of the examples herein) based on the IC definition dataset. The processing of the IC definition dataset configures IC manufacturing system 2502 to manufacture an integrated circuit embodying a graphics processing module as described in any of the examples herein.

[0398] The layout processing system 2504 is configured to receive and process an IC definition dataset to determine a circuit layout. Methods for determining a circuit layout based on an IC definition dataset are known in the art and may involve, for example, synthesizing RTL code to determine a gate-level representation of the circuit to be generated, for example, in relation to logic components (e.g., NAND, NOR, AND, OR, MUX, and FLIP-FLOP components). By determining the location information of the logic components, the circuit layout can be determined from the gate-level representation of the circuit. This can be done automatically or with user intervention to optimize the circuit layout. Once the layout processing system 2504 has determined the circuit layout, it can output the circuit layout definition to the IC generation system 2506. The circuit layout definition may be, for example, a circuit layout description.

[0399] As is known in the art, IC generation system 2506 generates ICs according to a circuit layout definition. For example, IC generation system 2506 may implement a semiconductor device manufacturing process for generating ICs, which may involve a multi-step sequence of photolithography and chemical processing steps, during which electronic circuits are gradually formed on a wafer made of semiconductor material. The circuit layout definition may be in the form of a mask, which can be used in a photolithography process for generating ICs according to the circuit definition. Alternatively, the circuit layout definition provided to IC generation system 2506 may be in the form of computer-readable code, which IC generation system 2506 can use to form a suitable mask for generating ICs.

[0400] The various processes performed by the IC manufacturing system 2502 can all be implemented in one location, for example, by one party. Alternatively, the IC manufacturing system 2502 can be a distributed system, allowing some processes to be performed at different locations and by different parties. For example, some of the following stages can be performed in different locations and / or by different parties: (i) synthesizing RTL code representing an IC definition dataset to form a gate-level representation of the circuit to be generated, (ii) generating a circuit layout based on the gate-level representation, (iii) forming a mask based on the circuit layout, and (iv) using the mask to manufacture the integrated circuit.

[0401] In other examples, processing of an integrated circuit definition dataset at an integrated circuit manufacturing system can configure the system to manufacture graphics processing modules without processing the IC definition dataset to determine circuit layout. For example, an integrated circuit definition dataset can define the configuration of a reconfigurable processor such as an FPGA, and processing of the dataset can configure the IC manufacturing system (e.g., by loading configuration data into the FPGA) to generate a reconfigurable processor with that defined configuration.

[0402] In some implementations, when processed in an integrated circuit manufacturing system, the integrated circuit manufacturing definition dataset can enable the integrated circuit manufacturing system to generate devices as described herein. For example, the integrated circuit manufacturing definition dataset, as described above... ​ The described method configures an integrated circuit manufacturing system to produce devices as described in this article.

[0403] In some examples, an integrated circuit definition dataset may contain software running on hardware defined at the dataset, or software running in combination with hardware defined at the dataset. ​ In the example shown, the IC generation system may be further configured by the integrated circuit definition dataset to load firmware onto the integrated circuit according to program code defined at the integrated circuit definition dataset during the manufacturing of the integrated circuit, or otherwise provide the integrated circuit with program code for use with the integrated circuit.

[0404] Compared to known implementations, concrete implementations of the concepts set forth in this application in devices, apparatuses, modules, and / or systems (and in the methods implemented herein) can improve performance. Performance improvements may include one or more of increased computational performance, reduced latency, increased throughput, and / or reduced power consumption. During the fabrication of such devices, apparatuses, modules, and systems (e.g., in integrated circuits), trade-offs can be made between performance improvements and physical implementation methods, thereby improving the fabrication process. For example, a trade-off can be made between performance improvements and layout area to match the performance of known implementations but using less silicon. This can be accomplished, for example, by reusing functional blocks serially or sharing functional blocks among elements of a device, apparatus, module, and / or system. Conversely, the concepts set forth in this application that cause improvements in the physical implementation of devices, apparatuses, modules, and systems (e.g., reduced silicon area) can be traded against performance improvements. This can be accomplished, for example, by fabricating multiple instances of a module within a predefined area budget.

[0405] The applicant has independently disclosed each individual feature described herein, as well as any combination of two or more such features, to the extent that such features or combinations can be implemented based on the specification as a whole, in view of the common knowledge of those skilled in the art, regardless of whether such features or combinations of features solve any problem disclosed herein. In light of the foregoing description, those skilled in the art will understand that various modifications can be made within the scope of this invention.

[0406] Based on the examples provided in this disclosure, the following provisions relate to methods and systems for generating contained regions of objects:

[0407] 1. A method for generating contained regions in a ray tracing system, wherein the contained regions are arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finite enclosing regions forming a hierarchy of object segments, the method comprising:

[0408] The volume within the one or more finite enclosed regions is divided into multiple voxels;

[0409] The plurality of voxels are classified, wherein the classification includes identifying a subset of internal voxels contained within a range of geometry defined by the object;

[0410] Determine an occlusion utility metric for each of the internal voxels, wherein the occlusion utility metric quantifies an estimate of the potential surface area of ​​an extended version of each internal voxel.

[0411] Depending on the occlusion utility metric, internal voxels are selected from the subset of internal voxels as candidate voxels for transformation into the contained region;

[0412] The volume of the candidate voxel is expanded by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object;

[0413] The extended voxels are assigned as contained regions, wherein the contained regions are arranged to facilitate determining whether a ray intersects the object, depending on whether the ray intersects the contained region.

[0414] 2. The method according to Clause 1 further includes:

[0415] Determine the surface area metric of the extended voxel; and

[0416] Depending on whether the surface area metric used to determine the extended voxel satisfies one or more surface area utility criteria, the extended voxel is assigned as a contained region.

[0417] 3. The method according to Clause 1 or 2, wherein the classification further includes identifying a subset of boundary voxels intersecting with the surface of the object.

[0418] 4. The method according to Clause 3, wherein the object is a closed object, and the extent of the geometry of the object is the outer surface of the object.

[0419] 5. The method according to Clause 4, wherein expanding the volume of the candidate voxel comprises uniformly expanding the candidate voxel until the surface of the candidate voxel reaches one or more boundary voxels.

[0420] [The surface of the candidate voxel may include the face, edge, or vertex of the candidate voxel.]

[0421] 6. The method according to Clause 5, further comprising, after uniformly expanding the candidate voxel, non-uniformly extending the voxel in one or more dimensions, wherein the resulting extended voxel includes at least one dimension whose size differs from at least one other dimension.

[0422] 7. The method according to Clause 6, wherein non-uniformly extending the voxel comprises:

[0423] It was determined that after uniform expansion of the candidate voxels, uniform expansion of the voxels was no longer possible;

[0424] It was determined that the candidate voxels could extend in multiple different dimensions;

[0425] Select from the plurality of different dimensions a set of one or more dimensions that can be simultaneously extended by the candidate voxels, wherein the set of one or more dimensions includes a maximum number of possible simultaneous extensions.

[0426] 8. The method according to any of the preceding clauses, wherein the occlusion utility metric is a depth metric that quantifies the shortest distance from each internal voxel to the outer surface of the object.

[0427] 9. The method according to Clause 3, wherein the object includes an open concave region, and wherein identifying the subset of internal voxels contained within the range of the geometry defined by the object includes identifying a subset of voxels enclosed by a plurality of boundary voxels within a cross section in at least one dimension.

[0428] 10. The method according to Clause 9, wherein classifying the plurality of voxels further includes classifying any voxel that is not an inner voxel or a boundary voxel as an empty voxel, and wherein the extent of the geometry of the object containing the contained region is defined by an enclosing region defined by the union of the boundary voxels and the empty voxels.

[0429] 11. The method according to Clause 10, wherein expanding the volume of the candidate voxel comprises uniformly expanding the candidate voxel until the surface of the candidate voxel reaches one or more boundary voxels or empty voxels.

[0430] 12. The method according to Clause 11, comprising, after uniformly expanding the candidate voxel, non-uniformly extending the voxel in one or more dimensions, wherein the resulting extended voxel includes at least one dimension whose size differs from at least one other dimension.

[0431] 13. The method according to any one of Clauses 10 to 12, wherein the occlusion utility metric is a modified depth metric defined by: i) quantizing the shortest distance from each inner voxel to any portion of the enclosure defined by the union of the boundary voxels and the empty voxel, and ii) weighting the quantization in i) by a value representing an estimated proportion of incident rays that will intersect the enclosure through the opening of the open concave region.

[0432] 14. The method according to Clause 1 or 2, wherein the object is a non-closed self-hiding object containing a hidden area, wherein the hidden area is completely contained within the interior of the non-closed self-hiding object, the hidden area being defined by occluding all possible viewpoints from the outside of the non-closed self-hiding object, and wherein the occlusion utility metric is a depth metric that quantifies the shortest distance from each interior voxel to the outer surface of the object.

[0433] 15. The method according to Clause 14, wherein identifying the subset of internal voxels includes identifying a set of voxels contained within the hidden region, and expanding the volume of the candidate voxels includes uniformly expanding the candidate voxels until the surface of the candidate voxels reaches the boundary of the hidden region.

[0434] 16. The method according to clause 1 or 2, wherein the object is a continuous surface, and wherein the extent of the geometry defined by the object includes the outer boundary of the continuous surface, and wherein identifying the subset of internal voxels contained within the extent of the geometry defined by the object includes determining a set of voxels intersecting the continuous surface.

[0435] 17. The method according to Clause 16, wherein the occlusion utility metric for each internal voxel is defined based on the maximum number of internal voxels that intersect the continuous surface of the object in a continuous chain in a single dimension, wherein the internal voxels are members of the chain.

[0436] 18. The method according to Clause 17, wherein expanding the volume of the candidate voxel comprises expanding along at least one dimension of the continuous chain defining the occlusion utility metric of the candidate voxel, and expanding until the surface of the candidate voxel reaches the outer boundary of the surface.

[0437] 19. The method according to any one of Clauses 2 to 15, when attached to Clause 2, wherein the surface area metric determined for the extended voxel defines the combined surface area of ​​all sides of the extended voxel, wherein the surface area utility criterion includes one or both of: i) a threshold defined by a predetermined surface area and ii) a threshold defined by the combined surface area of ​​all sides of the previously generated contained region.

[0438] 20. The method according to Clause 19, wherein determining that the surface area measure of the extended voxel satisfies the one or more surface area utility criteria includes determining that the combined surface area of ​​all sides of the extended voxel is equal to or greater than the combined surface area of ​​all sides of the previously generated contained region.

[0439] 21. The method according to any one of Clauses 2 to 15, wherein, when attached to Clause 2, the surface area metric comprises: i) a first component defining the proportion of projection overlap between the extended voxel and the previously generated contained region; and ii) a second component defining the proportion of projection overlap between the extended voxel and the projection of the object, and wherein the surface area utility metric comprises a predetermined value defined using the same metric as the surface area metric.

[0440] 22. The method according to Clause 21, wherein the surface area measure is a weighted projected surface area measure SA WP Limited to

[0441]

[0442] Where, for a given projection direction:

[0443] SA unoccluded Define the surface area of ​​the extended voxel that is not obscured by the previously generated projection of the contained region;

[0444] SA total The projected surface area of ​​the extended voxel is defined;

[0445] SA object Define the projected surface area of ​​the object.

[0446] 23. The method according to Clause 22, wherein the weighted projected surface area metric comprises a combination of individual weighted projected surface areas, each weighted projected surface area being calculated for projection directions among a plurality of projection directions.

[0447] 24. The method according to any of the preceding clauses, further comprising:

[0448] Select one or more additional internal voxels to transform into one or more additional contained regions, wherein the additional one or more internal voxels are selected from a subset of the subset of internal voxels not included in the contained regions allocated from the extended voxels, and are selected based on the occlusion utility metric of each internal voxel in the additional subset; and

[0449] One or more additional contained regions are generated by expanding the volume of each of the other one or more internal voxels by at least one dimension, wherein each or more additional contained regions are contained within and smaller than the range of the geometry defined by the object.

[0450] 25. The method according to any of Clause 24, when attached to Clause 2, wherein the surface area metric is the occlusion utility metric for generating the inner voxel of the extended voxel, and wherein the surface area utility metric includes a threshold based on the current minimum of the occlusion utility metric associated with any previously generated contained region.

[0451] 26. The method according to any one of clauses 3 to 25, wherein, when attached to clause 3, identifying the subset of internal voxels contained within the range of the geometry defined by the object comprises:

[0452] Obtain a mesh that at least defines the objects in the scene;

[0453] The portion of the mesh defining the object is identified as a separate submesh comprising connected vertices;

[0454] The identified sub-mesh forms a waterproof, sealed object;

[0455] Determine the boundary voxels that intersect with the sub-mesh defining the surface of the object;

[0456] All voxels located within the enclosed region defined by the boundary voxels are identified as internal voxels.

[0457] 27. The method according to any of the preceding clauses, further comprising:

[0458] Whether the ray intersects the object depends at least on determining whether the ray intersects the contained region; and

[0459] Output an indication of where the ray intersects the object, wherein the output indication is used in the ray tracing system to render an image of the scene.

[0460] 28. A graphics processing system configured to perform the method according to any one of clauses 1 to 27.

[0461] 29. The graphics processing system according to Clause 28, wherein the graphics processing system is embodied in hardware on an integrated circuit.

[0462] 30. A computer-readable code configured to cause the method according to any one of clauses 1 to 27 to be performed when the code is executed.

[0463] 31. An integrated circuit definition dataset, which, when processed in an integrated circuit manufacturing system, configures the integrated circuit manufacturing system to manufacture a graphics processing system as described in clause 28 or 29.

[0464] 32. A non-transitory computer-readable storage medium storing a computer-readable description of a graphics processing system according to claim 29 or 30, which, when processed in an integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture an integrated circuit embodying the graphics processing system.

[0465] 33. A graphics processing module for generating contained regions in a ray tracing system, wherein the contained regions are arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finitely enclosing regions forming a hierarchy of object segments, the module being configured to:

[0466] The volume within the one or more finite enclosed regions is divided into multiple voxels;

[0467] The plurality of voxels are classified, wherein the classification includes identifying a subset of internal voxels contained within a range of geometry defined by the object;

[0468] Determine an occlusion utility metric for each of the internal voxels, wherein the occlusion utility metric quantifies an estimate of the potential surface area of ​​an extended version of each internal voxel.

[0469] Depending on the occlusion utility metric, internal voxels are selected from the subset of internal voxels as candidate voxels for transformation into the contained region;

[0470] The volume of the candidate voxel is expanded by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object;

[0471] The extended voxels are assigned as contained regions, wherein the contained regions are arranged to facilitate determining whether a ray intersects the object, depending on whether the ray intersects the contained region.

[0472] Based on the examples provided in this disclosure, the following provisions are provided, relating to methods and systems for refining multiple AACBs to obtain a more efficient set of AACBs / enclosed regions:

[0473] 1. A method for selecting a plurality of contained regions for a ray tracing system, each of the plurality of contained regions being arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finite enclosing regions forming a hierarchy of object segments, the method comprising:

[0474] Obtain geometric shape data of a defined object and a plurality of candidate contained regions, wherein each of the plurality of candidate contained regions is contained within the geometry defined by the object;

[0475] Select the target contained region from the plurality of contained regions;

[0476] Identify one or more occluded contained regions among the plurality of contained regions, wherein the target contained region at least partially occludes the one or more occluded contained regions;

[0477] Determine the surface area measurement of the region containing the target;

[0478] Determine whether the surface area measure of the target contained region satisfies one or more surface area utility criteria, wherein the one or more surface area utility criteria are defined based on at least one of: i) the surface area defined by the one or more shaded contained regions; and ii) the surface area defined by the object;

[0479] In response to determining that the surface area measure of the target contained region does not meet the one or more surface area utility criteria, the geometry data defining the target contained region is discarded to obtain a refined set of contained regions;

[0480] The refined set of contained regions is arranged to facilitate determining whether a ray intersects the object based on whether the ray intersects with at least one contained region in the refined set of contained regions.

[0481] 2. The method according to Clause 1, wherein one or more surface area utility criteria define a minimum overlap between the following for at least one projection direction: i) the projected surface area of ​​the target contained region; and ii) the projected surface area of ​​the first occluded contained region among the one or more occluded contained regions.

[0482] 3. The method according to Clause 2, wherein the surface area measure is the combined surface area of ​​all sides of the target contained region, and the one or more surface area utility criteria include a predetermined minimum surface area, the predetermined minimum surface area defining the minimum surface area of ​​the combined surface area of ​​all sides of the contained region.

[0483] 4. The method according to Clause 3, wherein determining that the surface area measure of the target-containing area does not meet the one or more surface area utility criteria includes:

[0484] Determine i) that the overlap between the projected surface area of ​​the target-enclosed region and ii) the projected surface area of ​​the first occluded enclosed region exceeds the minimum overlap amount; and

[0485] The combined surface area of ​​all sides of the area containing the target is determined to be no more than the predetermined minimum surface area.

[0486] 5. The method according to Clause 4, wherein determining that the surface area measure of the target-containing area does not meet the one or more surface area utility criteria further includes:

[0487] Determine i) that the overlap between the projected surface area of ​​the first occluded included region and ii) the projected surface area of ​​the second occluded included region exceeds the minimum overlap amount; and

[0488] The combined surface area of ​​all sides of the second shaded contained area is determined to exceed the predetermined minimum surface area.

[0489] 6. The method according to any of the preceding clauses, wherein for a given projection direction, the surface area measure includes:

[0490] The first component defines i) the overlap ratio between the projection of the target contained region and ii) the first occluded contained region among the one or more occluded contained regions; and

[0491] And a second component, which defines the overlap ratio between i) the projection of the target-containing region and ii) the projection of the object.

[0492] The one or more surface area utility criteria include predetermined values ​​defined using the first component and the second component.

[0493] 7. The method according to Clause 6, wherein the surface area measure is a weighted projected surface area measure, SA WP It is the product of the first component and the second component, and is limited to...

[0494]

[0495] in:

[0496] SA unoccluded Define the surface area of ​​the target contained region that is not obscured by the first obscured contained region;

[0497] SA total The projected surface area of ​​the region containing the target is defined;

[0498] SA object Define the projected surface area of ​​the object.

[0499] 8. The method according to Clause 7, wherein the weighted projected surface area metric comprises a combination of individual weighted projected surface areas, each weighted projected surface area being calculated for projection directions selected from a plurality of different projection directions.

[0500] 9. The method according to Clause 8, wherein the scene is a 3D scene represented in a 3D spatial coordinate system, and the plurality of contained regions are aligned with the axes of the 3D spatial coordinate system, and wherein the plurality of different projection directions include:

[0501] Along the three orthogonal directions of the three principal axes;

[0502] Six orthogonal projections aligned with the edge of the contained region;

[0503] Four equidistant projections aligned with the vertices of the contained region.

[0504] 10. The method according to any one of Clauses 6 to 9, wherein determining that the surface area measure of the target contained area does not meet the one or more surface area utility criteria includes determining that the surface area measure of the target contained area does not exceed the predetermined value defined using the first component and the second component.

[0505] 11. The method according to any of the preceding clauses, wherein the surface area utility criterion includes a threshold intersection amount, the threshold intersection amount being defined as the spatial intersection amount with a shaded contained region, and wherein determining that the surface area metric of the target contained region does not satisfy the one or more surface area utility criteria includes determining that the spatial intersection amount between the target contained region and a first shaded contained region among the one or more shaded contained regions exceeds the threshold intersection amount.

[0506] 12. The method according to any of the preceding clauses, wherein each of the plurality of contained regions is associated with an occlusion utility metric, the occlusion utility metric quantifying an estimate of the likelihood that the contained region occludes the object, wherein the surface area metric is an occlusion utility metric associated with the target contained region, and wherein the surface area utility metric includes a threshold based on the current minimum value of the occlusion utility metric associated with the one or more occluded contained regions.

[0507] 13. The method according to any of the preceding clauses, wherein the surface area utility criterion includes a maximum number of permissible contained areas, and wherein determining that the surface area measure of the target contained area does not satisfy the one or more surface area utility criteria includes determining that the number of contained areas among the plurality of contained areas exceeds the maximum number of permissible contained areas.

[0508] 14. The method according to any of the preceding clauses, wherein at least two of the contained regions intersect spatially.

[0509] 15. The method according to any of the preceding clauses, wherein each of the plurality of contained regions is generated in the following manner:

[0510] The volume within the one or more finite enclosed regions is divided into multiple voxels;

[0511] The plurality of voxels are classified, wherein the classification includes identifying a subset of internal voxels contained within a range of geometry defined by the object;

[0512] Determine an occlusion utility metric for each of the internal voxels, wherein the occlusion utility metric quantifies an estimate of the potential surface area of ​​an extended version of each internal voxel.

[0513] Depending on the occlusion utility metric, internal voxels are selected from the subset of internal voxels as candidate voxels for transformation into the contained region;

[0514] The volume of the candidate voxel is expanded by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object;

[0515] The expanded voxel is assigned as a new contained region, wherein the new contained region is arranged to facilitate determining whether a ray intersects the object depending on whether the ray intersects the contained region.

[0516] 16. The method according to Clause 15, wherein the new contained region is the target contained region, and wherein in response to determining that the target contained region does not meet the one or more surface area utility criteria, the geometry data defining the target contained region is discarded, thereby determining that the target contained region is redundant relative to the one or more occluded contained regions.

[0517] 17. The method according to any of the preceding clauses, further comprising: in response to generating a new contained region, assigning the new contained region as the target contained region; and determining whether the surface area measure of the target contained region satisfies the one or more surface area utility criteria.

[0518] 18. The method according to any of the preceding clauses, wherein the object is a closed object, and the extent of the geometry of the object is the outer surface of the object.

[0519] 19. The method according to any one of clauses 1 to 17, wherein the object includes an open concave region, and wherein the extent of the geometry of the object defining the region containing the contained region is the outward-facing surface of the object.

[0520] 20. The method according to any one of clauses 1 to 17, wherein the object is a non-closed self-hiding object containing a hidden area, wherein the hidden area is completely contained within the interior of the non-closed self-hiding object, the hidden area being defined by being occluded from all possible viewpoints outside the non-closed self-hiding object, and wherein the range defining the geometry of the object containing the contained area is the hidden area.

[0521] 21. The method according to any one of clauses 1 to 17, wherein the object is a continuous surface, and wherein the extent of the geometry defined by the object includes the outer boundary of the continuous surface.

[0522] 22. The method according to any of the preceding clauses, comprising determining whether the ray intersects the object based at least on determining that the ray intersects with at least one contained region in the refined set of contained regions; and

[0523] Output an indication of where the ray intersects the object, wherein the output indication is used in the ray tracing system to render an image of the scene.

[0524] 23. A graphics processing system configured to perform the method according to any one of clauses 1 to 22.

[0525] 24. A computer-readable storage medium having computer-readable code encoded thereon, the computer-readable code being configured to cause the method according to any one of clauses 1 to 22 to be performed when the code is executed.

[0526] 25. An integrated circuit definition dataset, which, when processed in an integrated circuit manufacturing system, configures the integrated circuit manufacturing system to manufacture a graphics processing system as described in Clause 23.

[0527] 26. A non-transitory computer-readable storage medium storing a computer-readable description of a graphics processing system according to claim 23, the computer-readable description, when processed in an integrated circuit manufacturing system, causing the integrated circuit manufacturing system to manufacture an integrated circuit embodying the graphics processing system.

[0528] 27. A graphics processing module for selecting a plurality of contained regions in a ray tracing system, each of the plurality of contained regions being arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finitely enclosing regions forming a hierarchy of object segmentation, the module being configured to:

[0529] Obtain geometric shape data of a defined object and a plurality of candidate contained regions, wherein each of the plurality of candidate contained regions is contained within the geometry defined by the object;

[0530] Select the target contained region from the plurality of contained regions;

[0531] Identify one or more occluded contained regions among the plurality of contained regions, wherein the target contained region at least partially occludes the one or more occluded contained regions;

[0532] Determine the surface area measurement of the region containing the target;

[0533] Determine whether the surface area measure of the target contained region satisfies one or more surface area utility criteria, wherein the one or more surface area utility criteria are defined based on at least one of: i) the surface area defined by the one or more shaded contained regions; and ii) the surface area defined by the object;

[0534] In response to determining that the surface area measure of the target contained region does not meet the one or more surface area utility criteria, the geometry data defining the target contained region is discarded to obtain a refined set of contained regions;

[0535] The refined set of contained regions is arranged to facilitate determining whether a ray intersects the object based on whether the ray intersects with at least one contained region in the refined set of contained regions.

Claims

1. A method for generating contained regions for a ray tracing system, wherein the contained regions are arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finite enclosing regions forming a hierarchy of object segmentation, and wherein the object is a continuous surface, the method comprising: The volume within the one or more finite enclosed regions is divided into multiple voxels; The plurality of voxels are classified, wherein the classification includes identifying a subset of boundary voxels that are located within the geometry defined by the object and intersect with the continuous surfaces of the object; Determine an occlusion utility metric for each of the boundary voxels, wherein the occlusion utility metric comprises a component that quantifies at least a maximum number of boundary voxels intersecting the continuous surface of the object in a continuous chain located in a single dimension, wherein the boundary voxels are members of the chain. Depending on the occlusion utility metric, boundary voxels are selected from the subset of boundary voxels as candidate voxels for transformation into the contained region; The volume of the candidate voxel is expanded by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object; The extended voxels are assigned as contained regions, wherein the contained regions are arranged to facilitate determining whether a ray intersects the object, depending on whether the ray intersects the contained region.

2. The method of claim 1, wherein the extent of the geometry defined by the object includes the outer boundary of the continuous surface.

3. The method of claim 1 or 2, wherein expanding the volume of the candidate voxel comprises expanding along at least one dimension of the continuous chain defining the occlusion utility metric of the candidate voxel.

4. The method of claim 1 or 2, further comprising expanding the candidate voxel until the surface of the candidate voxel reaches the outer boundary of the surface.

5. The method of claim 1 or 2, wherein the candidate voxels are selected from the subset of boundary voxels based on determining that the candidate voxels have the highest maximum number of boundary voxels in the continuous chain as defined by the occlusion utility metric.

6. The method of claim 1 or 2, wherein the scene is a 3D scene represented in a 3D spatial coordinate system, and the plurality of boundary voxels are aligned with the axes of the 3D spatial coordinate system, and wherein determining the occlusion utility metric for each of the boundary voxels includes determining: For each of the three axis alignment dimensions, the maximum number of boundary voxels located in a continuous chain along the axis alignment dimension; Determine which axis alignment dimension includes the maximum number of boundary voxels, and set the maximum number of bounding voxels as the occlusion utility metric.

7. The method of claim 6, further comprising: Determine which axis alignment dimension includes the second maximum number of boundary voxels, and set the second maximum number of boundary voxels as the median chain length, wherein expanding the candidate voxels includes simultaneously expanding the candidate voxels on two dimensions defined by the occlusion utility metric and the median chain length.

8. The method of claim 6, further comprising: Determine which axis alignment dimension includes the minimum maximum number of boundary voxels, and set the minimum maximum number as the minimum chain length, wherein the occlusion utility metric is defined based on a combination of the maximum number of boundary voxels in a continuous chain in any axis alignment direction, the median chain length, and the minimum chain length.

9. The method of claim 1 or 2, further comprising stopping the expansion of the candidate voxel in response to determining that the candidate voxel is about to expand to intersect with a voxel that is not a boundary voxel.

10. The method of claim 1 or 2, further comprising stopping the expansion of the candidate voxel in response to determining that the candidate voxel is about to expand beyond the range of the geometry defined by the outer boundary of the object.

11. The method of claim 1 or 2, wherein the continuous chain of boundary voxels intersecting the continuous surface defining the occlusion utility metric in a single dimension includes one or more boundary voxels that deviate from the axis of the continuous chain by a distance equal to that of a single boundary voxel.

12. The method of claim 1 or 2, wherein at least a portion of the continuous surface of the object is contained within the contained region, and wherein using the contained region to determine whether a ray intersects the object comprises: The light ray is determined to intersect the contained region at two intersection points, wherein the two intersection points represent the entry point and the exit point; The entry point and the exit point are located on opposite faces of the contained region, wherein the opposite faces of the contained region are arranged on opposite sides of the portion of the continuous surface contained within the enclosing body; as well as Whether the ray intersects the object depends at least on determining that the entry point and the exit point are located on opposite surfaces of the enclosing body.

13. The method of claim 12, wherein the portion of the continuous surface contained within the contained region is free of gaps, and wherein the contained region is divided into two distinct volumes by the portion of the continuous surface of the object, wherein the surface of the contained region intersecting the continuous surface defines an anomalous surface of the contained region, wherein using the contained region to determine whether the ray intersects the object further comprises: In response to determining that the entry point and the exit point are not located on the anomalous surface of the enclosing body, it is determined that the ray intersects the object, and wherein the contained region is arranged such that the opposite faces of the contained region are aligned with the plane of the continuous surface, and wherein each of the opposite faces has a larger surface area than each of the anomalous surfaces.

14. The method according to claim 1 or 2, wherein the scene is a 3D scene represented in a 3D spatial coordinate system, and the contained region is aligned with the axis of the 3D spatial coordinate system.

15. The method of claim 1 or 2, further comprising determining whether the ray intersects the object based at least on determining that the ray intersects the contained region; and Output an indication of where the ray intersects the object, wherein the output indication is used in the ray tracing system to render an image of the scene.

16. The method of claim 1 or 2, wherein the selected boundary voxel is bisected by the continuous surface of the object.

17. A graphics processing system configured to perform the method according to claim 1 or 2.

18. A non-transitory computer-readable storage medium having computer-readable code stored thereon, the computer-readable code being configured to cause the method according to claim 1 or 2 to be executed when the code is run.

19. A non-transitory computer-readable storage medium storing a computer-readable description of a graphics processing system according to claim 17, wherein the computer-readable description, when processed in an integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture an integrated circuit embodying the graphics processing system.

20. A graphics processing module for generating contained regions in a ray tracing system, wherein the contained regions are arranged to facilitate determining whether a ray intersects with an object in a scene, wherein the object is contained within one or more finite enclosing regions forming a hierarchy of object segmentation, and wherein the object is a continuous surface, the module being configured to: The volume within the one or more finite enclosed regions is divided into multiple voxels; The plurality of voxels are classified, wherein the classification includes identifying a subset of boundary voxels that are located within the geometry defined by the object and intersect with the continuous surfaces of the object; Determine an occlusion utility metric for each of the boundary voxels, wherein the occlusion utility metric comprises a component that quantifies at least a maximum number of boundary voxels intersecting the continuous surface of the object in a continuous chain located in a single dimension, wherein the boundary voxels are members of the chain. Depending on the occlusion utility metric, boundary voxels are selected from the subset of boundary voxels as candidate voxels for transformation into the contained region; The volume of the candidate voxel is expanded by at least one dimension to obtain an expanded voxel, wherein the expanded voxel is contained within and smaller than the range of the geometry defined by the object; The extended voxels are assigned as contained regions, wherein the contained regions are arranged to facilitate determining whether a ray intersects the object, depending on whether the ray intersects the contained region.