Intersection testing for ray tracing
AssigneeImagination Technologies Limited
InventorDaniel Barnard
Life of this patent
Estimating the term…
Abstract
A system and method for performing intersection testing of rays in a ray tracing system. The ray tracing system uses a hierarchical acceleration structure comprising a plurality of nodes, each identifying one or more elements able to be intersected by a ray. The system makes use of a serial-mode ray intersection process, in which, when a ray intersects a bounding volume, a limited number of new ray requests are generated.
Claims16
A computer-implemented method of performing intersection testing between one or more rays and elements by nodes of a hierarchical acceleration structure, wherein:
- a ray is defined by ray information;
- a node identifies one or more elements for intersection testing, wherein at least some of the elements identified by the overall hierarchical acceleration structure are represented by a further node of the hierarchical acceleration structure;
- wherein the computer-implemented method comprises:
- defining each of a plurality of rays as either a serial-mode ray or a parallel-mode ray, wherein a mode defines a processing path or process performed on a ray;
- and
- performing an iterative intersection testing process comprising:
- obtaining one or more ray requests, each ray request identifying a ray and a node of the hierarchical structure that identifies elements for which the ray of the ray request will undergo intersection testing;
- processing the one or more ray requests and the hierarchical acceleration structure to identify, for each ray request, any intersections between the ray of the ray request and the elements identified by the node of the ray request;
- and
- for each ray request:
- if any intersections are identified between the ray of the ray request and elements that represent a further node of the hierarchical structure, generating, for a next iteration of the intersection testing process, one or more new ray requests, each new ray request identifying the ray of the ray request and a further node that represents an element intersected by the ray of the ray request,
- wherein, if the ray of the ray request is defined as a serial mode ray, the number of new ray requests is restricted to being no greater than a first predetermined number;
- and
- wherein, if the ray of the ray request is defined as a parallel-mode ray, the number of new ray requests is permitted to be greater than the first predetermined number.
An intersection testing system for performing intersection testing between one or more rays and elements identified by nodes of a hierarchical acceleration structure, wherein:
- a ray is defined by ray information;
- a node identifies one or more elements for intersection testing, wherein at least some of the elements identified by the overall hierarchical acceleration structure are represented by a further node of the hierarchical acceleration structure;
- each of a plurality of rays is defined as either a serial-mode ray or a parallel-mode ray, wherein a mode defines a processing path or process performed on a ray;
- and
- wherein the intersection testing system comprises:
- a ray request processor configured to iteratively obtain one or more ray requests, each ray request identifying a ray and a node of the hierarchical structure identifying elements for which the ray of the ray request will undergo intersection testing;
- an intersection test processor configured to, for each iteratively obtained ray request:
- process the one or more ray requests and the hierarchical acceleration structure to identify, for each ray request, any intersections between the ray of the ray request and the elements identified by the node of the ray request;
- and
- for each ray request:
- if any intersections are identified between the ray of the ray request and elements that represent a further node of the hierarchical structure, generate, for a next iteration of the intersection testing process, one or more new ray requests, each new ray request identifying the ray of the ray request and a further node that represents an element intersected by the ray of the ray request,
- wherein, if the ray of the ray request is defined as a serial mode ray, the number of new ray requests is restricted to being no greater than a first predetermined number;
- and
- wherein, if the ray of the ray request is defined as a parallel-mode ray, the number of new ray requests is permitted to be greater than the first predetermined number.
A non-transitory computer readable storage medium having stored thereon computer readable code configured to cause to be performed, when the code is run, a method of performing intersection testing between one or more rays and elements by nodes of a hierarchical acceleration structure, wherein:
- a ray is defined by ray information;
- a node identifies one or more elements for intersection testing, wherein at least some of the elements identified by the overall hierarchical acceleration structure are represented by a further node of the hierarchical acceleration structure;
- wherein the computer-implemented method comprises:
- defining each of a plurality of rays as either a serial-mode ray or a parallel-mode ray, wherein a mode defines a processing path or process performed on a ray;
- and
- performing an iterative intersection testing process comprising:
- obtaining one or more ray requests, each ray request identifying a ray and a node of the hierarchical structure that identifies elements for which the ray of the ray request will undergo intersection testing;
- processing the one or more ray requests and the hierarchical acceleration structure to identify, for each ray request, any intersections between the ray of the ray request and the elements identified by the node of the ray request;
- and
- for each ray request:
- if any intersections are identified between the ray of the ray request and elements that represent a further node of the hierarchical structure, generating, for a next iteration of the intersection testing process, one or more new ray requests, each new ray request identifying the ray of the ray request and a further node that represents an element intersected by the ray of the ray request,
- wherein, if the ray of the ray request is defined as a serial mode ray, the number of new ray requests is restricted to being no greater than a first predetermined number;
- and
- wherein, if the ray of the ray request is defined as a parallel-mode ray, the number of new ray requests is permitted to be greater than the first predetermined number.
Dependencies are inferred from the claim text.