Multi-volume heat map rendering method, storage medium and equipment

By grouping and sorting volume data through calculation shaders, combined with light stepping parameters and blue noise textures, the transparency sorting problem and rendering occlusion errors in multi-volume heat map rendering are solved, and efficient multi-volume heat map rendering is achieved.

CN118736077APending Publication Date: 2024-10-01BEI JING YOU NUO KE JI GU FEN YOU XIAN GONG SI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310329634.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing technology cannot effectively render heat maps of multiple volumes, and suffers from transparency sorting problems and rendering occlusion errors, especially when the 3D scene changes with the camera perspective.

Method used

Compute shaders are used to quickly group and sort volumetric data, and ray stepping parameters and blue noise textures are used for intersection detection and blending to achieve transparency sorting and depth testing.

Benefits of technology

It greatly improves rendering efficiency, eliminates unnecessary calculations, and can efficiently render multi-volume heat maps that support transparent sorting and depth testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736077A_ABST
    Figure CN118736077A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-volume heat map rendering method, a storage medium and equipment. The method comprises the following steps: acquiring scene hotspot data, volume data and scene buffer data; performing grid grouping on the screen space to obtain a plurality of grid units, processing the volume data by using a calculation shader to obtain volume data contained in the current grid unit, and sorting the volume data in the current grid unit; performing intersection detection on the sorted volume data in the grid unit where the current pixel is located by utilizing a calculation shader and a light stepping parameter, and performing light stepping on the current pixel according to a detection result to obtain a current pixel color; and mixing the current pixel color and the scene color by using the scene buffer data and the blue noise texture, and outputting the mixture to a user display page. According to the method, the calculation shader is used for rapidly grouping and sequencing the volume data, and the multi-volume heat map supporting transparent sequencing and depth testing can be efficiently rendered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, storage medium and device for multi-volume heat map rendering based on a computational shader. Background Art

[0002] Common heat maps are colored based on the surface of the mesh model, which cannot reflect the heat distribution inside the model. Or ordinary volume heat maps are limited by rendering efficiency and can only render one volume at a time. There are also transparency sorting problems between multiple volumes. When rendering 3D scenes, as the camera perspective changes, varying degrees of rendering occlusion errors will occur between volume renderings. Summary of the invention

[0003] In view of this, the present invention proposes a method, storage medium and device for rendering a multi-volume heat map based on a compute shader, which utilizes a compute shader to quickly group and sort volume data, and can efficiently render a multi-volume heat map that supports transparent sorting and depth testing.

[0004] The first aspect of the present invention provides a method for rendering a multi-volume heat map, which includes: obtaining scene hotspot data, volume data and scene buffer data, setting ray stepping parameters and blue noise texture; grid grouping the screen space to obtain multiple grid units, using a compute shader to process the volume data to obtain volume data contained in the current grid unit, and sorting the volume data in the current grid unit; using the compute shader and ray stepping parameters to perform intersection detection on the sorted volume data in the grid unit where the current pixel is located, and performing ray stepping on the current pixel according to the detection result to obtain the current pixel color; using the scene buffer data and the blue noise texture to mix the current pixel color and the scene color and output them to a user display page.

[0005] Furthermore, the acquisition of scene hotspot data, volume data and scene buffer data, and setting of ray stepping parameters and blue noise texture include: acquiring scene hotspot data and volume data set by a user, and storing them in a constant buffer of a graphics processor, wherein the scene hotspot data include a hotspot position, a hotspot radiation radius and a hotspot radiation weight; setting downsampling parameters, and passing in a blue noise texture; acquiring scene buffer data provided by a renderer, wherein the scene buffer data include a scene color buffer and a scene depth buffer; constructing a grouping container and a sorting container of a graphics processor; and setting ray stepping parameters, wherein the ray stepping parameters include a camera world coordinate, a camera direction and a ray stepping distance.

[0006] Furthermore, the process of processing the volume data using a compute shader to obtain the volume data contained in the current grid unit includes: traversing the volume data to construct a detection model for each volume; performing intersection detection on the current grid unit based on the detection model for each volume, obtaining the volume data contained in the current grid unit and storing it in a sorting container and a grouping container.

[0007] Furthermore, traversing the volume data and constructing a detection model for each volume includes: traversing each volume in the volume data, transforming the center point of each volume to the screen space, and obtaining the center point of each volume in the screen space; transforming the world coordinates of multiple vertices of each volume to the screen space, and calculating the maximum distance between the multiple vertices of each volume in the screen space and the center point; constructing a circle corresponding to each volume with the center point of each volume in the screen space as the center and the maximum distance as the radius, and using the circle as the detection model of the volume.

[0008] Furthermore, the detection model based on each volume performs intersection detection on the current grid unit, obtains the volume data contained in the current grid unit and stores it in the sorting container and the grouping container, including: using the detection model corresponding to each volume to perform intersection detection on the current grid unit to determine whether the two have an intersection; if the detection model and the current grid unit have an intersection, it indicates that the volume data corresponding to the detection model is contained in the current grid unit, calculates the scene depth of the center of the volume, and stores the volume data, volume sequence number and scene depth in the sorting container, and accumulates the number of volumes contained in the current grid unit and stores them in the grouping container.

[0009] Furthermore, the sorting of the volume data in the current grid unit includes: generating multiple threads using a compute shader; using each thread to obtain the number of volumes contained in the current grid unit from a grouping container, obtaining the volume data in the current grid unit and the scene depth of the volume center from the sorting container, and sorting the volume data in the current grid unit in descending order according to the scene depth of the volume center.

[0010] Further, the method of using a compute shader and a ray stepping parameter to perform an intersection check on the sorted volume data in the grid unit where the current pixel is located, and performing ray stepping on the current pixel according to the detection result to obtain the current pixel color includes: generating multiple threads using a compute shader; determining the minimum volume depth of the current pixel according to the sorted volume data in the grid unit where the current pixel is located; using each thread to perform a ray-direction bounding box intersection check on each volume in the grid unit where the current pixel is located according to the camera world coordinates and the camera direction, and obtaining two intersection points of the ray entry and exit direction bounding boxes; performing ray stepping on the current pixel using the acquired scene depth buffer and the minimum volume depth of the current pixel until the minimum volume depth of the current pixel is less than the scene depth buffer, then stopping the ray stepping; sampling the stepping path of the current pixel ray between the two intersection points according to the ray stepping distance to obtain multiple sampling points; using each sampling point to perform an inverse distance difference calculation on the hotspot position in the acquired scene hotspot data to obtain a sampling coefficient; accumulating all sampling coefficients on the ray stepping path of the current pixel to obtain a total sampling coefficient; and setting the current pixel color and the current pixel transparency according to the total sampling coefficient.

[0011] Furthermore, the use of the scene buffer data and the blue noise texture to mix the current pixel color and the scene color and output them to the user display page includes: using the current pixel transparency to perform linear interpolation calculations on the scene color buffer and the current pixel color to obtain a new color; using the blue noise texture to process the new color, and outputting the processed color to the user display page.

[0012] A second aspect of the present invention provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps in the method for multi-volume thermal map rendering as described above.

[0013] A third aspect of the present invention provides a multi-volume thermal map rendering device, which includes: a processor and a memory; the memory stores a computer-readable program that can be executed by the processor; when the processor executes the computer-readable program, it implements the steps in the method for multi-volume thermal map rendering as described above.

[0014] The above-mentioned multi-volume heat map rendering method quickly groups and sorts volume data based on compute shaders, eliminates a large number of unnecessary calculations, greatly improves the subsequent ray step sampling rate, and can efficiently render multi-volume heat maps that support transparent sorting and depth testing. BRIEF DESCRIPTION OF THE DRAWINGS For purposes of illustration and not limitation, the present invention will now be described in terms of preferred embodiments thereof, with particular reference to the accompanying drawings, in which:

[0015] Figure 1 It is a flowchart of a method for rendering a multi-volume heat map provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0016] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0017] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0019] The specific implementation scheme of a multi-volume heat map rendering method proposed in an embodiment of the present invention is described in detail below with reference to the accompanying drawings. Figure 1 is a flow chart of a method for rendering a multi-volume heat map provided by an embodiment of the present invention. Figure 1 , the method comprises the following steps:

[0020] S100, obtaining scene hotspot data, volume data and scene buffer data, and setting light stepping parameters and blue noise texture.

[0021] In the embodiment of the present invention, scene hotspot data H and volume data V set by the user are obtained, ray stepping parameters are set, scene buffer data provided by the renderer is obtained, and a grouping container Cb and a sorting container Sb of a graphics processing unit (GPU) are constructed. In some embodiments, the specific implementation of step S100 is as follows:

[0022] S110, obtaining scene hotspot data H set by the user and storing it in a constant buffer of a graphics processing unit (GPU).

[0023] In the embodiment of the present invention, the scene hotspot data H includes a hotspot position Hp, a hotspot radiation radius Hr and a hotspot radiation weight Hw. The hotspot position Hp, hotspot radiation radius Hr and hotspot radiation weight Hw in the acquired scene hotspot data H are stored in a constant buffer of a graphics processing unit (GPU).

[0024] S120, obtaining volume data V set by the user and storing it in a constant buffer of a graphics processing unit (GPU).

[0025] In an embodiment of the present invention, the volume data V is divided into AABB (axis-aligned bounding box) or OBB (oriented bounding box) format, the volume data V is converted into OBB data format, and the organized volume data V in OBB data format is stored in a constant buffer of a graphics processing unit (GPU).

[0026] Among them, AABB (axis-aligned bounding box) is equivalent to a special OBB (orientation bounding box) with a rotation of 0. In the embodiment of the present invention, the volume data V in the OBB data format can better fit the 3D model in the scene.

[0027] S130, setting downsampling parameters and inputting blue noise texture B.

[0028] The blue noise texture B is used to neutralize the side effects of downsampling jagged edges, and the downsampling parameter is used as the sampling scaling factor of the blue noise texture B.

[0029] In the embodiment of the present invention, by setting the downsampling parameters, the rendering consumption can be effectively reduced. For example, when the 4K rendering resolution is downsampled to 0.5 times, the actual calculation amount is only 25% of 4K. After the downsampling parameters are set, the downsampling parameters set are passed into the blue noise texture B that is subsequently used to neutralize the downsampling jagged side effects.

[0030] S140, obtaining scene buffer data.

[0031] In an embodiment of the present invention, the scene buffer data includes a scene color buffer C and a scene depth buffer D. In some embodiments, the scene color buffer C and the scene depth buffer D provided by the renderer are acquired.

[0032] S150: construct a grouping container and a sorting container of a graphics processing unit (GPU).

[0033] In the embodiment of the present invention, a grouping container Cb of a graphics processing unit (GPU) and a sorting container Sb of a graphics processing unit (GPU) are constructed, wherein the grouping container Cb and the sorting container Sb are unordered access views (UAVs) created through a graphics interface (DirectX11 / 12).

[0034] In the embodiment of the present invention, a grouping container Cb and a sorting container Sb of a graphics processing unit (GPU) are constructed to allocate space on a video memory for storing the results of volume data grouping and sorting.

[0035] S160, set the light stepping parameters.

[0036] In the embodiment of the present invention, the set light stepping parameters include the camera world coordinate Ro, the camera direction Rd and the light stepping distance Rs. The camera world coordinate Ro is the coordinate value of the light emitted; the camera direction Rd is the direction of the light emitted; and the light stepping distance Rs is the length of a single light step.

[0037] In an embodiment of the present invention, hotspot data and volume data of a scene are first obtained, downsampling parameters and a blue noise texture are set, a scene color buffer and a scene depth buffer are obtained, a counting buffer and a grouping container are constructed, and finally, ray stepping parameters are set to facilitate subsequent volume data intersection detection, ray stepping sampling, and rendering.

[0038] S200, grid grouping the screen space to obtain a plurality of grid units, processing the volume data using a compute shader, obtaining and storing the volume data contained in the current grid unit. In some embodiments, the specific implementation of step S200 is as follows:

[0039] S210, grid grouping the screen space to obtain a plurality of grid units T.

[0040] In the embodiment of the present invention, based on the rendering resolution (such as 1280x720), the screen space is divided into 40x23 grid units T, and the pixel size of each grid unit T is 32x32. For each grid unit T, the coordinate of the upper left corner of the grid is Tmin, the coordinate of the lower right corner of the grid is Tmax, and the sequence number of the grid is TId.

[0041] S220, using a compute shader to process the volume data to obtain the volume data contained in the current grid unit, and accumulating the number of volumes contained in the current grid unit and storing them in a grouping container, and storing the volume data in a sorting container.

[0042] In the embodiment of the present invention, a compute shader is used to generate 40x23 groups, each group has 1x1 threads, and a volume (directional bounding box) fast rasterization algorithm is executed in parallel with each grid unit T as a unit, and the volume data contained in the current grid unit is detected, and the number of volumes contained in the current grid unit is accumulated and stored in the grouping container Cb, and the volume data is stored in the sorting container Sb. In some embodiments, the specific implementation of step S220 is as follows:

[0043] S221, traverse the volume data and build a detection model for each volume. In the embodiment of the present invention, the detection model may be a circle C. The specific implementation method of traversing the volume data and constructing the detection model is as follows: Traverse each volume V' in the volume data V, transform the center point P of each volume V' to the screen space, and obtain the center point P' of each volume V' in the screen space; Transform the world coordinates of the eight vertices provided by each volume V' to the screen space, and calculate the maximum distance R between the eight vertices of each volume V' and the center point P' in the screen space;

[0044] Taking the center point P' of each volume V' in the screen space as the center point and the maximum distance R as the radius, a circle C corresponding to each volume is constructed and the circle C is used as the detection model.

[0045] S222: Based on the detection model of each volume, perform intersection detection on the current grid unit, obtain the volume data contained in the current grid unit and store it in the sorting container and the grouping container. In some embodiments, the specific implementation of the intersection detection on the current grid unit is as follows: Use the circle C corresponding to each volume to perform intersection detection on the current grid unit T to determine whether the two have an intersection;

[0046] If the circle C and the current grid unit T have an intersection, it means that the volume data corresponding to the circle C is contained in the current grid unit T. The scene depth d at the center of the volume is calculated, and the serial number VId and scene depth d of the volume V' are stored in the sorting container Sb, and the number of volumes with serial number TId in the grouping container Cb is increased by one.

[0047] If the circle C and the current grid unit T have no intersection, it indicates that the volume V′ corresponding to the circle C is not contained in the current grid unit T.

[0048] In the embodiment of the present invention, a compute shader is used to group and sort volume data based on grid units, which greatly reduces the amount of calculation required for subsequent ray stepping for each pixel in the grid and greatly improves rendering efficiency.

[0049] S300, sorting the volume data in the current grid unit by using a compute shader.

[0050] In the embodiment of the present invention, the volume data in the current grid unit detected in step S200 is sorted in descending order using a compute shader according to the scene depth d at the center of the volume (in computer graphics, the closer the object is to the screen, the greater the depth value). In some embodiments, the specific implementation of step S300 is as follows: S310, using compute shaders to generate 40x23 groups, each with 1x1 threads;

[0051] S320, using each thread to obtain the number of volumes contained in the current grid unit T from the grouping container Cb, obtain the volume data in the current grid unit T and the scene depth d of the volume center from the sorting container Sb, and sort the volume data in the current grid unit T in descending order according to the scene depth d of the volume center.

[0052] S400, using a compute shader and ray stepping parameters to perform intersection detection on the sorted volume data in the grid unit where the current pixel is located, and ray stepping on the current pixel according to the detection result to obtain the color and transparency of the current pixel.

[0053] In the embodiment of the present invention, a compute shader is used to generate multiple threads, and each thread performs an intersection check on the sorted volume data in the grid unit where the current pixel is located according to the ray stepping parameters set in step S160; if the intersection test result is passed, ray stepping and sampling are performed on the current pixel to obtain the current pixel color Pc and the current pixel transparency Pt. In some embodiments, the specific implementation of step S400 is as follows:

[0054] S410, using the compute shader to generate 40x23 groups, each group has 32x32 threads.

[0055] In the embodiment of the present invention, a compute shader is used to generate 40x23 groups, each with 32x32 threads, to perform intersection detection and ray marching for each pixel in the current grid unit. A GPU general compute shader can parallelize up to tens of thousands of threads, while the actual number of parallel threads of an ordinary CPU is about 10.

[0056] S420, according to the ray stepping parameters, use each thread to perform intersection detection on the sorted volume data in the grid unit T where the current pixel is located, and perform ray stepping and sampling on the current pixel according to the detection result to obtain the current pixel color value and the current pixel transparency.

[0057] In the embodiment of the present invention, each thread uses the camera world coordinate Ro and the camera direction Rd in the ray marching parameters to perform a ray-direction bounding box intersection test on the sorted volume data in the grid unit T where the current pixel is located in units of pixels; if they intersect, the test result is a pass, and the current pixel is shaded and sampled using the ray marching algorithm to obtain the current pixel color value Pc and the current pixel transparency Pt, and the minimum volume depth Pd of the current pixel is recorded. In some embodiments, the specific implementation of step S420 is as follows: S421, determining the minimum volume depth Pd of the current pixel according to the sorted volume data in the grid unit T where the current pixel is located; S422, using each thread to perform ray-direction bounding box intersection detection on each volume V' in the grid unit T where the current pixel is located according to the camera world coordinate Ro and the camera direction Rd, obtain two intersection points t0 and t1 of the ray entry and exit direction bounding boxes, and determine whether the intersection point t0 is less than the minimum volume depth Pd of the current pixel. If so, set the minimum volume depth Pd of the current pixel to t0; S423, performing ray stepping on the current pixel using the scene depth buffer D obtained in step S140 and the minimum volume depth Pd of the current pixel, and stopping ray stepping when the minimum volume depth Pd of the current pixel is less than the scene depth buffer D; S424, taking the light stepping distance Rs as the distance of each step to sample the stepping path of the current pixel light from point t0 to point t1, to obtain a plurality of sampling points sp; S425, using each sampling point sp to perform inverse distance difference calculation on the hotspot position Hp in the hotspot data obtained in step S120 (only retaining the data where the distance is less than the hotspot radiation radius Hr), obtains a sampling coefficient f, and multiplies the sampling coefficient f by the hotspot radiation weight Hw; S426, accumulating all sampling coefficients f on the light stepping path of the current pixel to obtain a total sampling coefficient F, and stopping the light stepping after the total sampling coefficient F exceeds 1;

[0058] S427, using the total sampling coefficient F (ranging from 0 to 1) obtained by ray stepping, the current pixel color Pc is set to a gradient from green to red, and the transparency Pt of the current pixel is set to F.

[0059] In the embodiment of the present invention, the volume data sorted by the compute shader is used to perform intersection detection and ray stepping, thereby solving the transparent sorting problem between multiple volumes.

[0060] S500 , using the scene color buffer C and the blue noise texture B, the current pixel color and the scene color are mixed and output to the user display page.

[0061] In the embodiment of the present invention, the scene color buffer C obtained in step S140 and the blue noise texture B set in step S130 are used in the pixel shader to mix the current pixel color and the scene color and output the mixed color to the user display page. In some embodiments, the specific implementation of step S500 is as follows:

[0062] S510 , using the current pixel color transparency Pt, perform linear interpolation calculation on the scene color buffer C and the current pixel color Pc to obtain a new color C′.

[0063] In the embodiment of the present invention, the scene color buffer C obtained in step S140 and the current pixel color Pc are linearly interpolated using the current pixel color transparency Pt to obtain a new color C'.

[0064] S520, using the blue noise texture B to process the new color C', and outputting the processed color C' to the user display page.

[0065] In the embodiment of the present invention, the blue noise texture B set in step S120 is used to perform disturbance processing on the color C' to eliminate the jagged feeling of downsampling and output it to the user display page. The method of using the blue noise texture B to process the color C' is as follows:

[0066] The red and green channels of the blue noise texture B are sampled using the current screen coordinate value as the two-dimensional offset direction Df (disturbance direction); before interpolating the scene color C and the current pixel color Pc, the current pixel is offset, and the color of the corresponding pixel position after the offset is used to quickly eliminate the aliasing effect.

[0067] In the embodiment of the present invention, the blue noise texture B set in step S120 is used to perform disturbance processing on the color C' to eliminate the jagged feeling caused by downsampling and the slicing feeling caused by light stepping, and then output to the user display page.

[0068] The above-mentioned multi-volume heat map rendering method quickly groups and sorts volume data based on compute shaders, eliminates a large number of unnecessary calculations, greatly improves the subsequent ray step sampling rate, and can efficiently render multi-volume heat maps that support transparent sorting and depth testing.

[0069] In addition, an embodiment of the present invention also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method of multi-volume thermal map rendering as described in any of the above technical solutions.

[0070] An embodiment of the present invention also provides a multi-volume thermal map rendering device, comprising: a processor and a memory; the memory stores a computer-readable program that can be executed by the processor; when the processor executes the computer-readable program, it implements the steps in the method for screen space thermal map rendering as described in any one of the above technical solutions.

[0071] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0072] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for rendering a multi-volume heat map, characterized in that: include: Get scene hotspot data, volume data and scene buffer data, set ray stepping parameters and blue noise texture; Grid grouping is performed on the screen space to obtain a plurality of grid units, the volume data is processed by using a calculation shader to obtain the volume data contained in the current grid unit, and the volume data in the current grid unit is sorted; Use the compute shader and ray-stepping parameters to perform intersection detection on the sorted volume data in the grid cell where the current pixel is located, and perform ray-stepping on the current pixel based on the detection result to obtain the current pixel color; The scene buffer data and the blue noise texture are used to mix the current pixel color and the scene color and output them to a user display page.

2. The method for rendering a multi-volume heat map according to claim 1, characterized in that: The obtaining of scene hotspot data, volume data and scene buffer data, and setting of light stepping parameters and blue noise texture include: Obtain scene hotspot data and volume data set by the user, and store them in a constant buffer of the graphics processor, wherein the scene hotspot data includes a hotspot position, a hotspot radiation radius, and a hotspot radiation weight; Set the downsampling parameters and pass in the blue noise texture; Acquire scene buffer data provided by the renderer, wherein the scene buffer data includes a scene color buffer and a scene depth buffer; Constructing grouping containers and sorting containers for GPUs; Set ray stepping parameters, where the ray stepping parameters include camera world coordinates, camera direction, and ray stepping distance.

3. The method for rendering a multi-volume heat map according to claim 2, characterized in that: The process of processing the volume data by using a compute shader to obtain the volume data contained in the current grid unit includes: Traverse the volume data and build a detection model for each volume; Based on the detection model of each volume, an intersection detection is performed on the current grid unit to obtain the volume data contained in the current grid unit and store it in the sorting container and the grouping container.

4. The method for rendering a multi-volume heat map according to claim 3, characterized in that: The traversing volume data and constructing a detection model for each volume includes: Traverse each volume in the volume data, transform the center point of each volume to the screen space, and obtain the center point of each volume in the screen space; Transform the world coordinates of multiple vertices of each volume into the screen space, and calculate the maximum distance between the multiple vertices of each volume and the center point in the screen space; With the center point of each volume in the screen space as the center and the maximum distance as the radius, a circle corresponding to each volume is constructed and the circle is used as the detection model of the volume.

5. The method for rendering multi-volume heat maps according to claim 3, characterized in that: The detection model based on each volume, performing intersection detection on the current grid unit, obtaining volume data contained in the current grid unit and storing it in the sorting container and the grouping container includes: Use the detection model corresponding to each volume to perform intersection detection on the current grid unit to determine whether there is an intersection between the two; If the detection model and the current grid unit have an intersection, it means that the volume data corresponding to the detection model is contained in the current grid unit. The scene depth of the volume center is calculated, and the volume data, volume sequence number and scene depth are stored in the sorting container. The number of volumes contained in the current grid unit is accumulated and stored in the grouping container.

6. The method for rendering multi-volume heat maps according to claim 5, characterized in that: The sorting of the volume data in the current grid cell includes: A plurality of threads are generated by using a compute shader; each thread is used to obtain the number of volumes contained in the current grid cell from the grouping container, obtain the volume data in the current grid cell and the scene depth of the volume center from the sorting container, and sort the volume data in the current grid cell in descending order according to the scene depth of the volume center.

7. The method for rendering a multi-volume heat map according to claim 2, characterized in that: The method of using the compute shader and the ray stepping parameters to perform intersection detection on the sorted volume data in the grid unit where the current pixel is located, and performing ray stepping on the current pixel according to the detection result to obtain the current pixel color includes: Use compute shaders to spawn multiple threads; Determine the minimum volume depth of the current pixel according to the sorted volume data in the grid unit where the current pixel is located; Use each thread to perform ray-direction bounding box intersection detection on each volume in the grid unit where the current pixel is located according to the camera world coordinates and camera direction, and obtain the two intersection points of the bounding box of the light entering and exiting the direction; Use the obtained scene depth buffer and the minimum volume depth of the current pixel to perform ray stepping on the current pixel until the minimum volume depth of the current pixel is less than the scene depth buffer, then stop ray stepping; The stepping path of the current pixel light between the two intersection points is sampled according to the light stepping distance to obtain multiple sampling points; Using each sampling point, the inverse distance difference calculation is performed on the hotspot position in the acquired scene hotspot data to obtain the sampling coefficient; Accumulate all sampling coefficients on the current pixel ray stepping path to obtain the total sampling coefficient; Set the current pixel color and the current pixel transparency according to the total sampling coefficient.

8. The method for rendering multi-volume heat maps according to claim 7, characterized in that: The mixing of the current pixel color and the scene color by using the scene buffer data and the blue noise texture and outputting the mixed color to the user display page comprises: Using the current pixel transparency, linear interpolation is performed on the scene color buffer and the current pixel color to obtain a new color. The new color is processed using the blue noise texture, and the processed color is output to a user display page.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method for multi-volume thermal map rendering according to any one of claims 1-8.

10. A multi-volume thermal map rendering device, characterized in that: include: Processor and memory; The memory stores a computer-readable program that can be executed by the processor; when the processor executes the computer-readable program, the steps in the method for multi-volume thermal map rendering according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Screen space thermodynamic diagram rendering method, storage medium and equipment

    CN116385613A

  • A method, storage medium, and device for screen space heat map rendering

    CN116385613B