CN106462993B - Rendering system and method for generating rays - Google Patents

Rendering system and method for generating rays Download PDF

Info

Publication number
CN106462993B
CN106462993B CN201580023530.0A CN201580023530A CN106462993B CN 106462993 B CN106462993 B CN 106462993B CN 201580023530 A CN201580023530 A CN 201580023530A CN 106462993 B CN106462993 B CN 106462993B
Authority
CN
China
Prior art keywords
ray
primary
memory
response
information related
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201580023530.0A
Other languages
Chinese (zh)
Other versions
CN106462993A (en
Inventor
金璟洙
李在雄
赵仁相
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Priority claimed from PCT/KR2015/003942 external-priority patent/WO2015167159A1/en
Publication of CN106462993A publication Critical patent/CN106462993A/en
Application granted granted Critical
Publication of CN106462993B publication Critical patent/CN106462993B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/06Ray-tracing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/60Shadow generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Image Generation (AREA)

Abstract

A rendering system and a method for generating rays are provided. The method for performing a rendering process of a rendering system includes: generating a primary ray to render an image; determining whether the primary ray is capable of generating at least one secondary ray; in response to determining that the primary ray is capable of generating at least one secondary ray, storing information related to the primary ray in a reference memory; and generating at least one secondary ray based on the stored information related to the primary ray.

Description

Rendering system and method for generating rays
Technical Field
Apparatuses and methods consistent with exemplary embodiments relate to generating rays and rendering them, and more particularly, to managing a memory for generating rays and rendering them.
Background
Ray tracing refers to a method of back-tracking light along a ray to each pixel in a virtual screen and generating an image in a camera viewpoint.
Ray tracing generally includes the following operations: ray generation, accelerated structure traversal, intersection testing, and coloring. After obtaining information about the intersection by accelerating the structure traversal operation and the intersection testing operation, the final color of the generated ray in the ray generator is determined by the shading operation. Secondary rays (such as reflected rays, refracted rays, or shadow rays) are derived from the primary rays generated by the ray generator, depending on the medium of intersection. The ray generator stores the secondary rays to perform the accelerated structure traversal operation and subsequent operations associated with the secondary rays.
However, for a variety of light sources and objects, the space for storing rays may often be insufficient. In this case, the performance of the rendering system may be degraded due to memory stalls relative to the entire rendering system.
Therefore, a method of reducing memory load to improve performance of a rendering system is needed.
Disclosure of Invention
Technical problem
The exemplary embodiments solve at least the above problems and/or disadvantages and other disadvantages not described above. Additionally, the exemplary embodiments are not required to overcome the above disadvantages, and the exemplary embodiments may not overcome any of the above disadvantages.
One or more exemplary embodiments provide a rendering system for efficiently using a memory by controlling an amount of information about a ray to be stored in the memory and for improving performance of the rendering system, and a method for generating the ray.
Solution to the problem
According to an aspect of an exemplary embodiment, there is provided a method for performing a rendering process of a rendering system, the method including: generating a primary ray to render an image; determining whether the primary ray can generate at least one secondary ray; in response to determining that the primary ray may generate at least one secondary ray, storing information related to the primary ray in a memory; and generating at least one secondary ray based on the information about the primary ray stored in the memory.
Determining whether the primary ray may generate at least one secondary ray may include: in response to the primary ray intersecting the object and not being a shadow ray, determining the primary ray may generate at least one secondary ray.
The method may further comprise: in response to determining that the primary ray cannot generate at least one secondary ray, information related to the primary ray is deleted from the memory.
The method may further comprise: in response to determining that at least one secondary ray generated a shadow ray and not a refracted or reflected ray, information related to the primary ray is deleted from memory.
The method may further comprise: determining whether the memory includes any information related to the ray; and in response to determining that the memory includes the plurality of pieces of information, generating a secondary ray based on information about the ray that was most recently stored in the memory, among the plurality of pieces of information.
The method may further comprise: in response to the primary ray being a shadow ray, the rendering result of the primary ray is stored as a color value in a frame buffer.
The method may further comprise: in response to the memory not including any information about the ray, the rendering process is terminated.
The information related to the primary ray may include information related to a direction vector of the primary ray.
According to another aspect of exemplary embodiments, there is provided a rendering system including an ray generator, a renderer, a memory, and a controller, wherein the ray generator is configured to generate a primary ray; the renderer is configured to render an image based on the generated primary ray; and the controller is configured to: determining whether the primary ray can generate at least one secondary ray; in response to determining that the primary ray may generate at least one secondary ray, storing information related to the primary ray in a memory; and generating at least one secondary ray based on the stored information about the primary ray stored in the memory.
The controller may be further configured to: in response to the primary ray intersecting the object and not being a shadow ray, determining the primary ray may generate a secondary ray.
The controller may be further configured to: in response to determining that at least one secondary ray does not generate a secondary ray, information related to the primary ray is deleted from memory.
The controller may be further configured to: determining whether the memory includes any information related to the ray; and in response to determining that the memory includes the plurality of pieces of information, generating a secondary ray based on information about the ray that is most recently stored in the memory among the plurality of pieces of information.
The controller may be further configured to: in response to the primary ray being a shadow ray, a rendering result of the primary ray is stored in a frame buffer.
The controller may be further configured to: determining whether the memory includes any information related to the ray; and terminating the rendering process of the rendering system in response to the memory not including any information related to the ray.
The information related to the primary ray may include information related to a direction vector of the primary ray.
According to another aspect of exemplary embodiments, there is provided a method of performing a rendering process of a rendering system, including: generating a primary ray to render an image; storing information related to the primary ray in response to the primary ray being able to generate a derivable secondary ray; and deleting information related to the primary ray in response to the primary ray failing to generate additional derivable secondary rays.
The derivable secondary rays may correspond to refracted or reflected rays that intersect the object.
The derivable secondary ray may be one of a plurality of secondary rays generated by the primary ray, and storing information related to the primary ray may include: storing the derivable secondary rays in a main stack of memory; and storing a plurality of secondary rays in a secondary stack of the memory in addition to the derivable secondary rays and the shadow ray.
The derivable secondary ray is a refracted or reflected ray derived from the primary ray, and storing information related to the primary ray includes: storing information related to the refracted rays or information related to the reflected rays in a main stack of a memory; storing information relating to the refracted ray in a secondary stack of the memory in response to the reflected ray being stored in the primary stack; and storing information relating to the reflected ray in the secondary stack in response to the refracted ray being stored in the primary stack.
The method may further comprise: loading information about refracted rays or information about reflected rays stored in the secondary stack into the primary stack; and determining whether a refracted ray or a reflected ray corresponding to the loaded information generates a secondary ray.
According to another aspect of exemplary embodiments, there is provided a non-transitory computer-readable storage medium storing a program executable by a computer to perform a method of performing a rendering process of a rendering system.
Advantageous effects of the invention
According to exemplary embodiments, a user can use a rendering system that efficiently uses a memory by controlling the amount of information about a ray to be stored in the memory, thereby improving the performance of the rendering system.
Drawings
The above and/or other aspects will become more apparent by describing certain exemplary embodiments with reference to the attached drawings, in which:
FIG. 1 is a block diagram illustrating the structure of a rendering system according to an exemplary embodiment;
FIG. 2 is a diagram used to describe a configuration for generating secondary rays in accordance with an exemplary embodiment;
fig. 3 and 4 are views illustrating an order in which secondary rays are generated and a method of storing secondary rays according to the order, according to an exemplary embodiment;
FIG. 5 is a flowchart depicting a sequence in which secondary rays are generated in accordance with an illustrative embodiment;
FIG. 6 is a flowchart used in describing the order in which recursive secondary rays are generated in accordance with an illustrative embodiment;
fig. 7 and 8 are views showing a configuration of a rendering system according to an exemplary embodiment; and
FIG. 9 is a flowchart used to describe a sequence for generating rays in accordance with an exemplary embodiment.
Detailed Description
Certain exemplary embodiments are described in more detail below with reference to the accompanying drawings.
In the following description, the same reference numerals are used for the same elements even in different drawings. Matters defined in the description such as a detailed construction and elements are provided to assist in a comprehensive understanding of the exemplary embodiments. However, the exemplary embodiments may be practiced without those specifically defined matters. In other instances, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail.
Fig. 1 is a block diagram illustrating the structure of a rendering system 100 according to an exemplary embodiment. As shown in fig. 1, the rendering system 100 includes a ray generator 110, a reference memory 120, a renderer 130, a controller 140, and a frame buffer 150.
The ray generator 110 generates rays. The ray generator 110 may generate at least one ray based on the ray generation information. That is, the ray generator 110 may generate the primary ray and generate the secondary ray based on the stored ray generation information. The ray generation information will be described below. Additionally, secondary rays may include shadow rays, refracted rays, and reflected rays. To generate secondary rays, the ray generator 110 may first generate shadow rays. After rendering the shadow rays, ray generator 110 may generate refracted rays and reflected rays.
The reference memory 120 stores information about the ray. That is, the reference memory 120 may store information required to generate the secondary ray. The reference memory 120 may be a stack or a queue, but this is merely an example and the type of the reference memory is not limited.
The information about the ray stored in the reference memory 120 may include information about a direction vector of the ray. In particular, the reference memory 120 may include information related to a trigonometric index, a depth of the ray, a direction from which the ray was derived, a location of the ray, and a location at which the object intersected.
The renderer 130 renders the rays generated via the ray generator 110. That is, the renderer 130 may include all components except the ray generator 110 among components necessary for performing a rendering operation.
For example, the renderer 130 may include components for traversing the acceleration structure used in ray tracing, testing intersections, and performing shading operations.
The controller 140 controls the overall operation of the rendering system 100. In particular, the controller 140 may determine whether a secondary ray is generated from the generated ray. In addition, the controller 140 may control to store information about the ray in the reference memory 120 according to the determination result.
That is, in response to the generated ray being not a shadow ray and intersecting the object, the controller 140 may determine that the ray is a ray that may generate a secondary ray. The shadow ray does not generate a secondary ray. Unless a ray intersects an object, it does not generate a secondary ray even if the ray is not a shadow ray. Thus, in response to the generated ray being not a shadow ray and intersecting the object, the controller 140 may determine that the ray may generate a secondary ray.
In response to determining that the generated ray is a ray that may generate secondary rays, the controller 140 may control to store information related to the generated ray in the reference memory 120. In addition, the controller 140 may control the ray generator 110 to generate secondary rays based on the information about the rays stored in the reference memory 120.
In response to the generated ray being a shadow ray, the controller 140 may control to record a color value based on a rendering result of the generated ray in the frame buffer. That is, the shadow ray does not generate a secondary ray, and thus, the controller 140 may store color values based on the rendering results of the shadow ray in the frame buffer to terminate the rendering operation for the ray. In addition, the controller 140 may determine whether the reference memory 120 includes information related to the ray. In response to determining that the reference memory 120 does not include the information, the controller 140 may terminate the rendering operation.
In response to at least one secondary ray being sequentially generated by a ray and no further secondary rays being generated by the at least one generated secondary ray, the controller 140 may delete the information relating to the ray stored in the reference memory 120. That is, in response to determining that a secondary ray is no longer being generated by a ray, the controller 140 may delete information related to the ray from the reference memory 120.
In addition, in response to determining that the reference memory 120 includes information after deleting information related to the first ray from the reference memory 120, the controller 140 may generate another secondary ray based on the information most recently stored in the reference memory 120.
That is, in response to the information related to the rays being sequentially stored in the reference memory 120, the controller 140 may determine whether a secondary ray may be generated based on the most recently stored information. In response to determining that the most recently stored ray may generate a secondary ray, the controller 140 may generate another secondary ray based on information related to the determined ray.
A method for storing information about a ray in the reference memory 120 and deleting the information from the reference memory 120 will be described below.
With the above-described rendering system 100, a user can use a rendering system that efficiently manages memory and performs rendering operations using a smaller amount of memory.
Hereinafter, a method for storing information related to a ray in the reference memory 120 and performing a rendering operation by the rendering system 100 will be described in detail with reference to fig. 2 to 4.
Fig. 2 is a diagram used to describe a configuration for generating secondary rays according to an exemplary embodiment. That is, the primary ray 200 may generate at least one of a shadow ray (shdn)210, a refracted ray (refr)220, and a reflected ray (refl) 230. In particular, the primary ray 200 may first generate a shadow ray 210, and then generate a refracted ray 220 or a reflected ray 230.
The shadow ray 210 no longer generates secondary rays. However, the refracted ray 220 and the reflected ray 230 may generate at least one secondary ray. For example, refracted ray 220 may generate shadow ray 240, refracted ray 250, and reflected ray 260 as secondary rays. Additionally, the reflected ray 230 may generate a shadow ray 270, a refracted ray 280, and a reflected ray 290 as secondary rays.
In addition, as secondary rays of the refracted rays 250 and 280 and the reflected rays 260 and 290, at least one of shadow rays, refracted rays, and reflected rays may be generated from the refracted rays 250 and 280 and the reflected rays 260 and 290.
As a result, the number of secondary rays rapidly increases as shown in fig. 2. Accordingly, in response to information related to the generated secondary rays being sequentially stored in a memory (such as a stack or queue), the capacity of the memory may be insufficient, causing a portion of the rays to be lost or agglomerations to occur in the rendering system. In addition, the number of rays generated is not fixed, so the workload of the renderer 130 may vary considerably.
FIG. 3 illustrates a method for generating and storing secondary rays in accordance with an exemplary embodiment.
As secondary rays of the primary ray 310, a first shadow ray 320, a first refracted ray 330, and a first reflected ray 410 are generated from the primary ray 310. In addition, as secondary rays of the first refracted ray 330, a second shadow ray 340, a second refracted ray 350, and a second reflected ray 370 are generated from the first refracted ray 330. As a secondary ray to the second refracted ray 350, a third shadow ray 360 is generated from the second refracted ray 350. Fourth shadow ray 380 and fourth refracted ray 390 are generated from second reflected ray 370. Additionally, a fifth shadow ray 400 is generated from fourth refracted ray 390.
Although fig. 3 only depicts the originally generated ray 310 as a primary ray, any ray that generates a secondary ray may be referred to as a primary ray (relative to its secondary ray). For example, in terms of the relationship between the first and second refracted rays 330 and 350, the first refracted ray 330 may be referred to as a primary ray.
Fig. 4 is a view showing a storage state of the reference memory 120 according to the ray generation order. In response to the generation of the primary ray 310 by the ray generator 110, the controller 140 may determine whether the generated primary ray 310 is a shadow ray. If the primary ray 310 is not a shadow ray, the controller 140 may determine whether the primary ray 310 intersects an object.
In response to determining that the generated primary ray 310 is not a shadow ray and intersects an object, a secondary ray may be generated from the primary ray 310. Accordingly, the controller 140 may control the reference memory 120 to store information related to the primary ray 310.
In particular, the information related to the ray may include information related to a direction vector of the ray.
The ray generator 110 may generate secondary rays based on information stored in the reference memory 120 relating to the primary ray 310. Among the secondary rays, a shadow ray may be generated first. That is, the ray generator 110 may first generate a shadow ray as a secondary ray and then generate a refracted ray or a reflected ray.
Thus, in response to generating the first shadow ray 320 as a secondary ray, the controller 140 may control such that information related to the first shadow ray 320 is not stored in the reference memory 120 because the first shadow ray 320 no longer generates a secondary ray. As a result, the reference memory 120 after the first shadow ray 320 is generated may not change compared to the reference memory 510 before the first shadow ray 320 is generated.
In addition, the controller 140 may store color values based on rendering results of the first shadow ray 320 in the frame buffer 150.
In addition, the controller 140 may determine whether the reference memory 120 includes information related to the ray. If the reference memory 120 includes information related to the primary ray 310, the controller 140 may control the ray generator 110 to generate a secondary ray based on the information related to the primary ray 310.
In response to generating the first refracted ray (1st FL)330 as the secondary ray, the controller 140 may determine whether the generated secondary ray is a shadow ray. Since the first refracted ray 330 is not a shadow ray, the controller 140 may determine whether the first refracted ray 330 intersects the object. In response to determining that the first refracted ray 330 intersects the object, more secondary rays may be generated from the first refracted ray 330 and, thus, the controller 140 may store information related to the first refracted ray 330 in the reference memory 120.
In response to generating the second shadow ray 340 as a secondary ray by the ray generator 110 based on the information about the first refracted ray 330 stored in the reference memory 120, the secondary ray is no longer generated by the second shadow ray 340, and thus the controller 140 may not store the information about the generated second shadow ray 340. Accordingly, the state of the reference memory at time T540 (when the second shadow ray 340 is generated as a secondary ray) may not change as compared to the state of the reference memory 120 at time T530 (the time before the second shadow ray 340 is generated).
According to an example embodiment, the reference memory 120 may also include a secondary stack. In this case, the remaining area of the reference memory 120 (except for the secondary stack) may be referred to as the primary stack. Alternatively, the secondary stack may be implemented in a storage device separate from the reference memory 120. The controller 140 may store the first reflected ray 410 in the secondary stack at time T530. When the controller 140 finishes processing all secondary rays derived from the primary ray 310 at T530, the controller 140 may reference the secondary stack to determine what data the controller 140 will process after T530.
The controller 140 may control to store color values based on the rendering operation on the second shadow ray 340 in the frame buffer 150.
In addition, the controller 140 may determine whether the reference memory 120 includes information related to the ray. In response to determining that the reference memory 120 includes information related to the ray, the controller 140 may control the ray generator 110 to generate the secondary ray.
However, no information is stored regarding the second shadow ray 340. Thus, the information that is most recently stored in the reference memory 120 is the information related to the first refracted ray 330. Accordingly, the controller 140 may control to generate the secondary ray based on the information related to the first refracted ray 330.
In response to generating, by the ray generator 110, the second refracted ray 350 as a secondary ray based on the information about the first refracted ray 330 stored in the reference memory 120, the controller 140 may determine whether the generated second refracted ray 350 is a shadow ray. If the second refraction ray 350 is not a shadow ray, the controller 140 may determine whether the second refraction ray 350 intersects the object. More secondary rays may be generated by the second refracted ray 350 in response to the second refracted ray 350 intersecting the object. Accordingly, the controller 140 may store information related to the second refraction ray 350 in the reference memory 120 at time T550.
Further, the controller 140 may store the second reflected ray (2nd FL)370 in the secondary stack at time T550 such that the second reflected ray 370 is stacked on the first reflected ray 410. When the controller 140 completes processing all secondary rays derived from the first refracted ray 330 at T550, the controller 140 may reference the secondary stack to determine what data the controller 140 will process at T560.
In response to generating, by the ray generator 110, the third shadow ray 360 as a secondary ray based on the information about the second refraction ray 350 stored in the reference memory 120, the controller 140 may store a color value based on a rendering result of the third shadow ray 360 in the frame buffer 150. The stored second refracted rays 350 no longer require processing and, therefore, the controller 140 may delete the stored information related to the second refracted rays 350 at time T560. Accordingly, the reference memory 120 may store only information related to the first refracted ray 330 and the primary ray 310 at time T560.
The controller 140 may determine whether the reference memory 120 includes information related to the ray. In response to determining that the reference memory 120 includes information related to the ray, the controller 140 may control the ray generator 110 to generate the secondary ray.
Since the information about the second refracted ray 350 is deleted, the latest information stored in the reference memory 120 at the time T560 is the information about the first refracted ray 330. Accordingly, the controller 140 may control to generate the secondary ray based on the information about the first refracted ray 330.
The ray generator 110 may generate the secondary rays based on information about the first refracted ray 330 stored in the reference memory 120. In particular, the ray generator 110 generates the second reflected ray 370 as a secondary ray based on the information about the first refracted ray 330 stored in the reference memory 120.
Accordingly, in response to the second reflected ray 370 being generated as a secondary ray by the ray generator 110, the controller 140 may determine whether the generated second reflected ray 370 is a shadow ray. If the second reflected ray 370 is not a shadow ray, the controller 140 may determine whether the second reflected ray 370 intersects the object.
In response to determining that the second reflected ray 370 intersects the object, more secondary rays may be generated from the second reflected ray 370. Accordingly, controller 140 may store information related to second reflected ray 370 in reference memory 120 at time T570.
At time T570, the controller 140 may reference the secondary stack to determine which has not been processed between the second refracted ray 350 and the second reflected ray 370. As shown in fig. 4, the secondary stack indicates that the second reflected ray 370 is to be processed at time T570, and the controller 140 may load the second reflected ray 370 from the secondary stack and store it in the primary stack of the reference memory 120 at time T570.
In response to determining that the second reflected ray 370 is a refracted ray or a reflected ray rather than a shadow ray and that the refracted ray or the reflected ray does not intersect the object, the controller 140 may not store information related to the second reflected ray 370 in the reference memory 120.
In addition, the controller 140 may control the ray generator 110 to generate the secondary ray based on information about the second reflected ray 370 stored in the reference memory 120.
Ray generator 110 may first generate a fourth shadow ray 380 as a secondary ray via a second reflected ray 370. The controller 140 may determine whether the generated ray is a shadow ray. Additionally, because the fourth shadow ray 380 is no longer generating secondary rays, the controller 140 may not store information related to the fourth shadow ray 380 at time T580. Accordingly, the state of reference memory 120 at time T580 (when fourth shadow ray 380 is generated as a secondary ray) is unchanged from the state of reference memory 120 at time T570 (the time before fourth shadow ray 380 is generated).
The controller 140 may determine whether the reference memory 120 includes any information related to the ray. In response to determining that the reference memory 120 includes this information, the controller 140 may control the ray generator 110 to cause it to generate secondary rays.
In addition, in response to determining that the fourth refracted ray 390 was generated by the ray generator 110 based on the information about the second reflected ray 370 stored in the reference memory 120 and that the second reflected ray 370 no longer generated a secondary ray, the controller 140 may control the reference memory 120 to delete the information about the second reflected ray 370.
Accordingly, as a result of the rendering operation for the fourth refracted ray 390, the reference memory 120 may delete information related to the second reflected ray 370 at time T590 by controlling the controller 140.
In addition, controller 140 may determine whether fourth refracted ray 390 is a shadow ray. If fourth refracted ray 390 is not a shadow ray, controller 140 may determine whether fourth refracted ray 390 intersects an object. In response to determining that fourth refracted ray 390 intersects the object, ray generator 110 may generate a secondary ray through fourth refracted ray 390. Ray generator 110 may first generate shadow rays as secondary rays. Accordingly, in response to the fifth shadow ray 500 being generated as a secondary ray, the controller 140 may control to store color values according to rendering results of the fifth shadow ray 500 in the frame buffer 150. In addition, since the first refracted ray 330 no longer generates a secondary ray, the controller 140 may control the reference memory 120 to delete information related to the first refracted ray 330 at time T600.
In addition, the controller 140 may determine whether the reference memory 120 includes any information related to the ray. As shown in fig. 4, the primary ray 310 is stored in the reference memory 120 at time T600, and thus, the ray generator 110 may generate a secondary ray based on information related to the stored primary ray 310.
Accordingly, the controller 140 may generate the first reflected ray 410 as the secondary ray based on the information about the primary ray 310 stored in the reference memory 120. For example, the controller 140 may load the first reflected ray 410 from the secondary stack after time T600 and store it in the primary stack of the reference memory 120. Thus, the controller 140 may determine that the first reflected ray 410 has not been processed between the first refracted ray 330 and the first reflected ray 410 and proceed with the first reflected ray 410 after time T600. In addition, the rendering system 100 may perform a rendering operation for the secondary ray through the above-described process by the first reflection ray.
In response to performing the rendering operation on all secondary rays and the reference memory 120 not including any other information related to the rays, the rendering system 100 may terminate the rendering operation.
In the above exemplary embodiment described with reference to fig. 4, the controller 140 determines that the process uses the secondary stack, but this is merely an example. The controller 140 may use various methods to determine the process. For example, when the information about the first refraction ray 330 is deleted from the memory 120, the controller 140 may separately record the information about the deletion in the memory 120 and determine the next process by proceeding with the process without any deletion record with reference to the information. In this case, no separate secondary stack is required.
FIG. 5 is a flowchart depicting a sequence in which secondary rays are generated in accordance with an illustrative embodiment. The rendering system 100 generates a first ray (operation S610), and renders the generated first ray (operation S620).
In response to determining that the first ray is capable of generating a secondary ray (operation S630 — yes), the rendering system 100 stores information related to the first ray in the reference memory 120 (operation S640). In particular, if the generated ray is not a shadow ray and intersects an object, the rendering system 100 may determine that the ray may generate a secondary ray. In addition, in response to determining that the generated ray is capable of generating a secondary ray, the rendering system 100 may store information related to the generated ray in the reference memory 120.
The rendering system 100 generates a second ray based on the stored information about the first ray and renders the generated second ray (operation S650). The information related to the ray may include a direction vector of the ray. Accordingly, the rendering system 100 may generate a second ray that is a secondary ray of the first ray based on information about the direction vector of the stored ray. In particular, the rendering system 100 may first generate shadow rays among the secondary rays. After generating the shadow rays, the rendering system 100 may generate refracted rays or reflected rays as secondary rays.
FIG. 6 is a flowchart detailing a recursive sequence for generating recursive secondary rays in accordance with an exemplary embodiment.
The rendering system 100 generates a ray (operation S700), and renders the generated ray (operation S710). In addition, the rendering system 100 determines whether the generated ray is a shadow ray (operation S720).
In response to determining that the ray does not intersect the object, a secondary ray is not generated even though the ray is not a shadow ray. Accordingly, the rendering system 100 determines whether the ray intersects the object (operation S730).
In response to determining that the ray intersects the object (operation S730-YES), the rendering system 100 stores information related to the ray in the reference memory 120 to generate a secondary ray for the ray. Additionally, the rendering system 100 may generate the ray based on information related to the ray stored in the reference memory 120. In this case, the rendering system 100 may first generate shadow rays of the secondary rays. For example, in response to the rendering system 100 generating shadow rays and refracted rays as secondary rays, the rendering system 100 may first generate shadow rays.
In response to determining that the generated ray is a shadow ray (operation S720 — yes), the rendering system 100 stores the rendering result in the frame buffer 150 (operation S750). In addition, the rendering system 100 determines whether the reference memory 120 is empty (operation S760).
In addition, if it is determined that the ray does not intersect the object and is not a shadow ray, the rendering system 100 may determine whether the reference memory 120 is empty (operation S760).
In addition, in response to determining that the ray is no longer generating secondary rays, the rendering system 100 may delete information related to the ray from the reference memory 120.
Accordingly, the rendering system 100 may control the amount of rays generated by the ray generator 110 to be constant.
FIG. 7 shows a rendering system 1000 that includes a reference memory 830 that uses a stack structure or stack-based memory distribution. However, this is merely an example, and various types of memory structures or memory allocation methods (including queues) may be used.
The rendering system 1000 may generate rays by a ray generator 800 as illustrated in fig. 7. In addition, with respect to the generated rays, the rendering system 1000 may traverse the acceleration structure, test intersections, and perform rendering operations by the renderer 810 in which the components for performing shading are included.
Mem magager)820 may determine whether secondary rays may be generated from the generated rays. In response to determining that the generated ray may generate a secondary ray, the reference memory manager 820 may store information related to the generated ray in the reference memory 830.
If the ray is not a shadow ray and intersects an object, the reference memory manager 820 may determine that the ray may generate a secondary ray.
In response to performing the rendering operation on the shadow rays, the rendering system 1000 may store rendering results for the shadow rays in the frame buffer 150. That is, rendering system 1000 may store color values for shadow rays in frame buffer 150.
In response to determining that a secondary ray for which a rendering operation is to be performed is no longer generated from the ray, the reference memory manager 820 may control the reference memory 830 to delete information related to the ray.
Fig. 8 is a view illustrating a rendering system 2000 according to another exemplary embodiment. The rendering system 2000 of fig. 8 may also generate rays by the ray generator 900. In addition, with respect to the generated rays, the rendering system 2000 may traverse the acceleration structure, test intersections, and perform rendering operations through the renderer 910, which includes components for performing shading.
In addition, the rendering system 2000 may manage information related to the ray through the ray reference manager 920. In particular, the reference data calculator 930 may determine whether the generated ray may generate a secondary ray. In response to determining that the generated ray may generate a secondary ray, the reference data calculator 930 may calculate information related to the generated ray and store the calculated information in the reference memory 940. If the generated ray is not a shadow ray and intersects an object, the reference data calculator 930 may determine that the ray may generate a secondary ray and calculate information about the generated ray. For example, in the case of the generated ray, the reference data calculator 930 may calculate a trigonometric index, a ray depth, a direction in which the ray is obtained, a position of the ray, and a position at which the ray intersects the object.
Additionally, in response to performing a rendering operation on the shadow rays, rendering system 2000 may store rendering results of the shadow rays in frame buffer 150. That is, rendering system 2000 may store color values for shadow rays in frame buffer 150.
In response to determining that the rendered ray no longer generates secondary rays, canceller 950 may control reference memory 940 to delete information related to the ray. That is, the canceller 950 may drag out the information about the ray stored in the reference memory 940 and delete the information. For example, in response to the rendered ray generating only a shadow ray as a secondary ray, the canceller 950 may delete the ray-related information stored in the reference memory 940.
Accordingly, with the rendering system 2000 as shown in fig. 8, a user can use the rendering system 2000, the rendering system 2000 effectively manages a memory and performs a rendering operation using the reference memory 940.
FIG. 9 is a flowchart depicting the generation of rays for a rendering system in accordance with an exemplary embodiment. The rendering system 100 generates a ray (operation S1000), and renders the generated ray (operation S1010). In addition, the rendering system 100 may store color values according to rendering results for the generated rays in the frame buffer 150 to complete the rendering operation for the rays.
The rendering system 100 determines whether the generated ray is a shadow ray (operation S1020). In response to determining that the generated ray is not a shadow ray (operation S1020 — no), the rendering system 100 may determine whether the generated ray intersects an object (operation S1040).
In response to determining that the generated ray intersects the object (operation S1040 — yes), the rendering system 100 calculates information about the generated ray (operation S1050). In addition, the rendering system 100 stores the calculated information in the reference memory (operation S1060). If the generated ray is not a shadow ray and intersects an object, a secondary ray may be generated. Accordingly, the rendering system 100 may store the calculated information in the reference memory to generate the secondary ray.
In response to the generated ray being a shadow ray (operation S1020 — yes), the rendering system 100 stores the rendering result in the frame buffer 150 (operation S1030). That is, the rendering system 100 may store the color values of the rendering result according to the shadow ray in the frame buffer 150. Then, the rendering system 100 determines whether the reference memory is empty (operation S1070). In addition, in response to the generated ray not intersecting the object, the system 100 may determine whether the reference memory is empty even if the generated ray is not a shadow ray (operation S1070).
In response to determining that the reference memory is empty (operation S1070 — yes), the rendering system 100 may terminate the rendering operation. In response to determining that the reference memory is not empty (operation S1070-no) or that the calculated information is included in the reference memory (operation S1060), the rendering system 100 obtains information that is most recently stored among the information stored in the reference memory (operation S1080) and determines whether secondary rays other than shadow rays may be generated (operation S1090). In this case, a case where a secondary ray other than a shadow ray can be generated may refer to a case where a ray in which information is stored intersects with an object.
In response to determining that secondary rays other than shadow rays cannot be generated (operation S1090 — no), the rendering system 100 deletes the obtained information (operation S1100).
In particular, the rendering system 100 may delete the obtained information in response to the ray associated with the obtained information no longer generating a secondary ray (such as a reflected ray or a refracted ray). In addition, even when the ray related to the obtained information generates only a shadow ray as a secondary ray, the rendering system 100 may delete the ray related to the obtained information when generating and rendering the shadow ray.
In response to determining that secondary rays other than shadow rays may be generated (operation S1090 — yes), the rendering system 100 may generate rays based on the obtained information (operation S1000). That is, the rendering system 100 may generate rays in a recursive manner until all of the information stored in the reference memory is deleted.
According to exemplary embodiments, a user can use a rendering system that efficiently uses a memory by controlling the amount of information about a ray to be stored in the memory, thereby improving the performance of the rendering system.
One or more exemplary embodiments may be implemented as computer readable code on a computer readable recording medium, but are not limited thereto. The computer readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. Also, the exemplary embodiments can be written as computer programs that are transmitted via a computer-readable transmission medium (such as a carrier wave) and received and implemented in a general-purpose or special-purpose digital computer executing the programs. Further, it is understood that in exemplary embodiments, one or more units of the above-described apparatuses and devices may include circuits, processors, microprocessors, etc., and may execute computer programs stored in computer readable media.
The foregoing embodiments and advantages are merely exemplary and are not to be construed as limiting the present inventive concept. The teachings of the present disclosure are readily applicable to other types of devices. In addition, the description of the exemplary embodiments is intended to be illustrative, and not to limit the scope of the claims, and many alternatives, modifications, and variations will be apparent to those skilled in the art.

Claims (11)

1. A method for performing a rendering process of a rendering system, the method comprising:
generating a primary ray to render an image;
determining whether the primary ray is capable of generating at least one secondary ray;
in response to determining that the primary ray is capable of generating the at least one secondary ray, storing information related to the primary ray in a memory;
generating the at least one secondary ray based on information about the primary ray stored in the memory;
storing information relating to the at least one secondary ray in the memory in response to determining that the at least one secondary ray is capable of generating at least one third ray; and
in response to determining that the last ray stored in the memory generated only shadow rays or that the last ray stored in the memory failed to generate at least one additional ray, deleting information related to the last ray stored in the memory,
wherein determining whether the primary ray is capable of generating at least one secondary ray comprises: in response to the primary ray intersecting an object and the primary ray not being a shadow ray, determining that the primary ray is capable of generating the at least one secondary ray.
2. The method of claim 1, further comprising:
in response to determining that the at least one secondary ray generated a shadow ray and not a refracted or reflected ray, deleting information related to the primary ray from the memory.
3. The method of claim 2, further comprising:
determining whether the memory includes information related to a ray; and
in response to determining that the memory includes a plurality of pieces of information, a secondary ray is generated based on ray-related information that was most recently stored in the memory of the plurality of pieces of information.
4. The method of claim 1, further comprising:
in response to the primary ray being a shadow ray, a rendering result of the primary ray is stored as a color value in a frame buffer.
5. The method of claim 1, further comprising:
in response to the memory not including any information related to the ray, terminating the rendering process.
6. The method of claim 1, wherein the information related to the primary ray comprises information related to a direction vector of the primary ray.
7. A rendering system, comprising:
a ray generator configured to generate primary rays;
a renderer configured to render an image based on the generated primary ray;
a memory; and
a controller configured to: determining whether the primary ray is capable of generating at least one secondary ray; in response to determining that the primary ray is capable of generating the at least one secondary ray, storing information related to the primary ray in the memory; generating the at least one secondary ray based on the information related to the primary ray stored in the memory, the information related to the at least one secondary ray being stored in the memory in response to determining that the at least one secondary ray is capable of generating at least one third ray; and in response to determining that the last ray stored in the memory generated only shadow rays or that the last ray stored in the memory failed to generate at least one additional ray, deleting information related to the last ray stored in the memory,
wherein the controller is configured to determine that the primary ray is capable of generating the at least one secondary ray in response to the primary ray intersecting an object and the primary ray not being a shadow ray.
8. The rendering system of claim 7, the controller further configured to: determining whether the memory includes information related to a ray; and in response to determining that the memory includes a plurality of pieces of information, generating a secondary ray based on information about a ray that was most recently stored in the memory among the plurality of pieces of information.
9. The rendering system of claim 7, the controller further configured to: in response to the primary ray being a shadow ray, a rendering result of the primary ray is stored in a frame buffer.
10. The rendering system of claim 7, wherein the controller is further configured to: determining whether the memory includes information related to a ray; and in response to the memory not including any information related to the ray, terminating a rendering process of the rendering system.
11. The rendering system of claim 7, wherein the information related to the primary ray comprises information related to a direction vector of the primary ray.
CN201580023530.0A 2014-05-02 2015-04-21 Rendering system and method for generating rays Expired - Fee Related CN106462993B (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
KR20140053472 2014-05-02
KR10-2014-0053472 2014-05-02
KR1020140108366A KR102201834B1 (en) 2014-05-02 2014-08-20 Rendering system for manufacturing ray and method thereof
KR10-2014-0108366 2014-08-20
PCT/KR2015/003942 WO2015167159A1 (en) 2014-05-02 2015-04-21 Rendering system and method for generating ray

Publications (2)

Publication Number Publication Date
CN106462993A CN106462993A (en) 2017-02-22
CN106462993B true CN106462993B (en) 2020-06-19

Family

ID=54605729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201580023530.0A Expired - Fee Related CN106462993B (en) 2014-05-02 2015-04-21 Rendering system and method for generating rays

Country Status (3)

Country Link
JP (1) JP6665112B2 (en)
KR (1) KR102201834B1 (en)
CN (1) CN106462993B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102439862A (en) * 2009-05-29 2012-05-02 斯里考纳特斯公司 Ray tracing device and method
CN102915556A (en) * 2011-06-30 2013-02-06 梦工厂动画公司 Point-based guided importance sampling
CN103080981A (en) * 2010-08-27 2013-05-01 矽锂铬艺术有限公司 Method for selecting MIP-map level and system for texture mapping using same

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8018457B2 (en) * 2006-09-19 2011-09-13 Caustic Graphics, Inc. Ray tracing system architectures and methods
US8593458B2 (en) * 2008-09-22 2013-11-26 Caustic Graphics, Inc. Systems and methods of multidimensional query resolution and computation organization
KR101511281B1 (en) * 2008-12-29 2015-04-13 삼성전자주식회사 Apparatus and method for enhancing ray tracing speed
US8189001B2 (en) * 2010-01-04 2012-05-29 Adshir Ltd. Method and apparatus for parallel ray-tracing employing modular space division

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102439862A (en) * 2009-05-29 2012-05-02 斯里考纳特斯公司 Ray tracing device and method
CN103080981A (en) * 2010-08-27 2013-05-01 矽锂铬艺术有限公司 Method for selecting MIP-map level and system for texture mapping using same
CN102915556A (en) * 2011-06-30 2013-02-06 梦工厂动画公司 Point-based guided importance sampling

Also Published As

Publication number Publication date
CN106462993A (en) 2017-02-22
KR102201834B1 (en) 2021-01-12
JP2017517806A (en) 2017-06-29
KR20150126264A (en) 2015-11-11
JP6665112B2 (en) 2020-03-13

Similar Documents

Publication Publication Date Title
US10909654B2 (en) Management of graphics processing units in a cloud platform
JP6073533B1 (en) Optimized multi-pass rendering on tile-based architecture
US9575657B2 (en) Dataset replica migration
US20150091895A1 (en) Method and apparatus for accelerating ray tracing
US11150949B2 (en) Resource release method, resource allocation method, devices, and computer program products
US8797322B2 (en) Systems and methods of defining rays for ray tracing rendering
CN111142669B (en) Interaction method, device, equipment and storage medium from two-dimensional interface to three-dimensional scene
US9104457B2 (en) Virtual machine-to-image affinity on a physical server
US10740153B2 (en) Generating duplicate apparatuses for managing computing resources based on number of processing tasks
US9390545B2 (en) Apparatus and method for traversing hierarchical acceleration structure
CN110990014A (en) Method and device for generating page code of skeleton screen, server and storage medium
CN110555900B (en) Rendering instruction processing method and device, storage medium and electronic equipment
CN110851285B (en) Resource multiplexing method, device and equipment based on GPU virtualization
CN112764668B (en) Method, electronic device and computer program product for expanding GPU memory
US11729379B2 (en) String matching with a single value from reference locations
CN110222410B (en) Electromagnetic environment simulation method based on Hadoop MapReduce
CN105718304A (en) Virtual machine management method and system
CN114820272A (en) Data interaction method and device, storage medium and electronic equipment
US20140028666A1 (en) Method and apparatus for ray tracing
CN106462993B (en) Rendering system and method for generating rays
KR102176511B1 (en) Apparatus and Method for processing image
US10186071B2 (en) Rendering system and method for generating ray
US20170154037A1 (en) Readiness checker for content object movement
CN112506592A (en) Method, device, equipment and storage medium for determining page loading duration
CN118605959A (en) Resource loading method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200619