Art resource detection methods, devices, electronic equipment and storage media

By generating target comparison images through the detection renderer, the problem of existing tools being unable to detect art resources is solved, improving detection efficiency and game smoothness.

CN115908334BActive Publication Date: 2026-03-06NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-25
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing performance analysis tools are unable to intuitively detect specific problems with art assets, resulting in low detection efficiency for art assets, which affects game rendering time and player experience.

Method used

By detecting and rendering specified parameters, a target comparison image is generated, which visually displays non-compliant art resources in the comparison image, thereby improving detection efficiency.

Benefits of technology

It improves the efficiency of art asset detection, enabling art production staff to quickly identify and correct non-compliant assets, reduce game rendering time, and enhance the player experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908334B_ABST
    Figure CN115908334B_ABST
Patent Text Reader

Abstract

This invention relates to the field of graphics processing technology, and discloses a method, apparatus, electronic device, and storage medium for detecting art resources. It is used to detect specified parameters using a detection renderer, visually displaying non-compliant art resources in a comparison image, thereby improving the efficiency of art resource detection. The method includes: receiving a resource detection instruction, the resource detection instruction indicating performance detection of the current frame image; responding to the resource detection instruction, calling a preset detection renderer to render at least one scene detection image corresponding to the current frame image; determining whether the at least one scene detection image meets preset parameter requirements; if not, generating at least one target comparison image based on at least one problematic image and the current frame image, the target comparison image indicating art resources affecting rendering time, the problematic image being a scene detection image that does not meet preset parameter requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of graphic processing technology, and in particular to a method, apparatus, electronic device, and storage medium for detecting art resources. Background Technology

[0002] The rendering time per frame in a 3D game significantly impacts the player experience. Assuming 30 frames per second, the rendering time per frame must be less than 33.33 milliseconds; otherwise, users will experience lag. Therefore, to improve game smoothness, it's necessary to monitor rendering time and determine if it meets production standards. Furthermore, many factors influence rendering time, and substandard art assets are a common issue.

[0003] In existing solutions, performance analysis tools are often used to identify art assets that increase rendering time. However, existing performance analysis tools can only statistically display the game's running costs from the engine and hardware level, making it difficult to intuitively show specific problems with art assets, resulting in low detection efficiency. Summary of the Invention

[0004] This invention provides a method, apparatus, electronic device, and storage medium for detecting art resources. It is used to detect specified parameters through a detection renderer and to visually display non-compliant art resources in a comparison image, thereby improving the detection efficiency of art resources.

[0005] A first aspect of this invention provides a method for detecting art resources, comprising: receiving a resource detection instruction, the resource detection instruction being used to instruct performance detection of a current frame image; responding to the resource detection instruction, invoking a preset detection renderer to render at least one scene detection image corresponding to the current frame image; determining whether the at least one scene detection image meets preset parameter requirements; if not, generating at least one target comparison image based on at least one problem image and the current frame image, the target comparison image being used to indicate art resources affecting rendering time, the problem image being a scene detection image that does not meet preset parameter requirements.

[0006] A second aspect of the present invention provides an art resource detection device, comprising: a receiving module for receiving a resource detection instruction, the resource detection instruction being used to instruct performance detection of a current frame image; a rendering module for responding to the resource detection instruction by calling a preset detection renderer to render at least one scene detection image corresponding to the current frame image; a judging module for judging whether the at least one scene detection image meets preset parameter requirements; and a generating module for, if not, generating at least one target comparison image based on at least one problem image and the current frame image, the target comparison image being used to indicate art resources affecting rendering time, the problem image being a scene detection image that does not meet preset parameter requirements.

[0007] A third aspect of the present invention provides an electronic device, including: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the electronic device to perform the above-described art resource detection method.

[0008] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described art resource detection method.

[0009] In the technical solution provided by this invention, a resource detection instruction is received, which instructs performance testing of the current frame image. In response to the resource detection instruction, a preset detection renderer is invoked to render at least one scene detection image corresponding to the current frame image. It is then determined whether the at least one scene detection image meets preset parameter requirements. If not, at least one target comparison image is generated based on at least one problematic image and the current frame image. The target comparison image indicates art resources affecting rendering time, and the problematic image is a scene detection image that does not meet the preset parameter requirements. This invention, by rendering at least one scene detection image using a preset detection renderer and detecting corresponding parameters in the at least one scene detection image, visually displays the problematic image that does not meet the corresponding parameter specifications and the normally rendered current frame image in the target comparison image, thereby improving the detection efficiency of art resources. Attached Figure Description

[0010] Figure 1 This is a schematic diagram of one embodiment of the art resource detection method in this invention;

[0011] Figure 2 This is a schematic diagram of another embodiment of the art resource detection method in this invention;

[0012] Figure 3 This is a schematic diagram illustrating the scaling of the layered texture in an embodiment of the present invention;

[0013] Figure 4 This is a schematic diagram of an embodiment of the first scene rendering image in the present invention;

[0014] Figure 5 This is a schematic diagram of another embodiment of the art resource detection method in this invention;

[0015] Figure 6 This is a schematic diagram of an embodiment of the second scene rendering image in the present invention;

[0016] Figure 7 This is a schematic diagram of another embodiment of the art resource detection method in this invention;

[0017] Figure 8 This is a schematic diagram of an embodiment of the rendering image of the third scene in this invention;

[0018] Figure 9 This is a schematic diagram of another embodiment of the art resource detection method in this invention;

[0019] Figure 10 This is a schematic diagram of an embodiment of the first target comparison image in the present invention;

[0020] Figure 11 This is a schematic diagram of an embodiment of the second target comparison image in the present invention;

[0021] Figure 12 This is a schematic diagram of an embodiment of the third target comparison image in the present invention;

[0022] Figure 13 This is a schematic diagram of one embodiment of the art resource detection device in this invention;

[0023] Figure 14 This is a schematic diagram of one embodiment of the electronic device in this invention. Detailed Implementation

[0024] This invention provides a method, apparatus, electronic device, and storage medium for detecting art resources. It is used to detect specified parameters through a detection renderer and to visually display non-compliant art resources in a comparison image, thereby improving the detection efficiency of art resources.

[0025] It is understood that this invention can be applied to electronic devices, which may be servers or terminals, and no specific limitation is made here.

[0026] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] In existing solutions, performance analysis tools can only collect statistical data based on the underlying hardware and software. For example, the problem might be that a certain function takes too long, or the fragment shader has too much computation. However, this is still not intuitive for artists and makes it difficult to pinpoint the specific problem with the art assets. For instance, the detection result might indicate that a target type function takes too long, but it's impossible to know which target type function is taking too long and needs adjustment; or the detection result might indicate that there are too many triangles being rendered, but it's impossible to know which models should be modified to reduce the number of triangles. The art asset detection method provided by this invention improves the detection efficiency by comparing non-compliant images with normally rendered images on the same comparison image. This allows artists to find non-compliant art assets by examining the images, thus improving the efficiency of finding non-compliant art assets.

[0028] The art resource detection method disclosed in one embodiment of this application can run on a local terminal device or a server. When the art resource detection method runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0029] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and operation of art resource detection methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0030] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.

[0031] In one possible implementation, this invention provides a method for detecting art resources, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interactive system.

[0032] Please see Figure 1 A flowchart of an art resource detection method provided in this embodiment of the invention specifically includes:

[0033] 101. Receive resource detection command. The resource detection command is used to instruct the current frame image to perform performance detection.

[0034] The resource detection command can include three detection types: layer map detection, triangle detection, and overdraw detection. The resource detection command can specify at least one of these three detection types. In this embodiment, the resource detection command can specify any one detection type, any two detection types, or all detection types.

[0035] It should be noted that new detection types can be added to the resource detection command. Simply add a new renderer and output the corresponding detection results.

[0036] It is understandable that the performance testing involved in this embodiment is performed online during game operation. Because the operating environments of offline testing and online testing are different, the offline testing results cannot accurately reflect the real operating environment, which may still cause lag during game operation. Therefore, online art resource testing is performed directly to find problems and avoid lag during game operation caused by inaccurate offline testing results.

[0037] 102. In response to the resource detection command, call the preset detection renderer to render at least one scene detection image corresponding to the current frame image.

[0038] It should be noted that in this embodiment, the detection renderer is based on the Unity engine's RenderFeature function, which is added to Unity's programmable rendering pipeline and can be flexibly enabled and disabled.

[0039] In this embodiment, the preset detection renderers include a mipmap detection renderer, a triangle detection renderer, and an overdraw detection renderer, all of which are disabled by default. They are enabled only when the resource detection command instructs that detection be performed. When the corresponding detection renderer is enabled, it will render the corresponding scene detection image according to the specified detection type.

[0040] 103. Determine whether at least one scene detection image meets the preset parameter requirements.

[0041] It should be noted that the parameter requirements for scene detection images rendered by different renderers are also different. For example, when the scene detection image is rendered by a layer map detection renderer, it is necessary to detect the pixel ratio of the target layer map in the scene detection image; when the scene detection image is rendered by a triangle detection renderer, it is necessary to detect the pixel ratio of the micro triangles in the scene detection image; when the scene detection image is rendered by an overdraw detection renderer, it is necessary to detect the pixel ratio of overdraw in the scene detection image.

[0042] 104. If not, generate at least one target comparison image based on at least one problem image and the current frame image. The target comparison image is used to indicate the art resources that affect the rendering time. The problem image is a scene detection image that does not meet the preset parameter requirements.

[0043] Understandably, different detection types have different parameter standards. For example, for mipmap detection, the percentage of pixels using level 0 mipmaps on the screen needs to exceed 50%. A percentage below 50% indicates the model texture at the current screenshot location is too large; in other words, a percentage below 50% is considered non-compliant. For overdraw detection, the percentage of pixels rendered more than 10 times on the screen needs to be less than 5%; a percentage above 5% is considered non-compliant. For triangle detection, the percentage of pixels corresponding to triangles on the screen needs to be less than 5%; a percentage above 5% is considered non-compliant.

[0044] When any scene detection image does not meet the preset parameter requirements, a target comparison image will be synthesized based on the problem image that does not meet the preset parameter requirements and the current frame image. Similarly, when multiple scene detection images do not meet the preset parameter requirements, the multiple problem images that do not meet the preset parameter requirements will be synthesized with the current frame image to form a target comparison image.

[0045] In this embodiment of the invention, at least one scene detection image is rendered by a preset detection renderer, and corresponding parameters in the at least one scene detection image are detected. Problem images that do not conform to the corresponding parameter specifications and the normally rendered current frame image are intuitively displayed in the target comparison image, thereby improving the detection efficiency of art resources.

[0046] Please see Figure 2 Another flowchart of the art resource detection method provided in this embodiment of the invention specifically includes:

[0047] 201. Receive resource detection command. The resource detection command is used to instruct the current frame image to perform performance detection.

[0048] Step 201 is similar to step 101, and will not be repeated here.

[0049] 202. In response to the resource detection command, the preset layer map detection renderer is invoked to render the opaque objects in the current frame image to obtain the first scene detection image.

[0050] Specifically, a preset layered texture detection renderer is invoked to generate a first rendered image, which includes the opaque objects to be rendered in the current frame image; the textures in the first rendered image are classified by layer to obtain a first scene detection image.

[0051] It should be noted that different levels output different feature colors. For example, level 0 outputs red, level 1 outputs green, level 2 outputs blue, level 3 outputs yellow, and so on. Level 0 corresponds to the original texture size, level 1 corresponds to a texture size that is half the original size in length and width, and so on. The proportional changes in texture size are as follows: Figure 3 As shown in the figure, the texture size transformation from level 0 to level 6 is illustrated. Assuming the size of level 0 is 80*80, then the size of level 1 is 40*40, level 2 is 20*20, level 3 is 10*10, level 4 is 5*5, level 5 is 2.5*2.5, and level 6 is 1.25*1.25. The unit of size can be set according to the actual situation, for example, it can be centimeters, or other units, which are not limited here.

[0052] In one feasible implementation, the step of performing hierarchical classification on the textures in the first rendered image to obtain the first scene detection image specifically includes:

[0053] Determine the actual texture size of each texture in the first rendered image; determine the corresponding layer color based on the actual texture size of each texture, wherein the layer color corresponding to each actual texture size is different; generate the first scene detection image based on the layer color corresponding to each texture.

[0054] For example, by setting different textures to different layer colors, the first scene rendering image is obtained, such as... Figure 4 As shown, Figure 4 The fewer level 0 colors (i.e., red, which is a grayscale image in this embodiment, so the difference is made by the shade of gray), the more the original size of the texture exceeds the actual required size, and the less it meets the parameter requirements.

[0055] 203. Determine whether the first scene detection image meets the preset parameter requirements.

[0056] Specifically, each pixel in the first scene detection image is traversed according to the preset first reference color to obtain the first target quantity. The first target quantity is used to indicate the number of pixels whose layer color is the same as the first reference color. The ratio of the first target quantity to the total number of pixels in the first scene detection image is calculated to obtain the first ratio. When the first ratio is less than the first threshold, the first scene detection image is determined to be a problem image that does not meet the preset parameter requirements. The first threshold is used to indicate the pixel ratio threshold of the target texture size. The target texture size corresponds to the first reference color.

[0057] For example, the first reference color can be red, represented by RGB=(1.0,0,0), and the first threshold can be set to 50%, which means that the pixel ratio of the original texture size is 50%. The first reference color and the first threshold can be set according to the actual situation, and there is no specific limitation here.

[0058] 204. If not, generate at least one target comparison image based on at least one problem image and the current frame image. The target comparison image is used to indicate the art resources that affect the rendering time. The problem image is a scene detection image that does not meet the preset parameter requirements.

[0059] For mipmap detection, the percentage of pixels using level 0 mipmaps on the screen needs to exceed 50%. A percentage below 50% indicates that the model texture at the current screenshot location is too large; in other words, a percentage less than 50% can be considered non-compliant with parameter requirements. If the first scene detection image does not meet the preset parameter requirements, it is input into the first region of the first target comparison image, and the current frame image is output into the second region of the first target comparison image to generate the first target comparison image. The first target comparison image is an output image that is twice the screen width and once the screen height.

[0060] Understandably, when the first scene detection image is detected to not meet the preset parameter requirements, the game needs to be paused. First, a comparison image with twice the screen width and once the screen height is created. The first scene detection image is copied to the first region (e.g., the left region) of the first target comparison image. Then, the hierarchical texture detection renderer is turned off, the current frame image is copied to the second region (e.g., the right region) of the first target comparison image, the comparison image is saved to disk, the hierarchical texture detection renderer is turned on again, and the game resumes.

[0061] In this embodiment of the invention, a first scene detection image is rendered by a preset layer texture detection renderer, and the corresponding layer texture parameters in the first scene detection image are detected. Problem images that do not conform to the corresponding parameter specifications and the normally rendered current frame image are intuitively displayed in the target comparison image, thereby improving the detection efficiency of art resources.

[0062] Please see Figure 5 Another flowchart of the art resource detection method provided in this embodiment of the invention specifically includes:

[0063] 501. Receive resource detection instruction. The resource detection instruction is used to instruct the current frame image to perform performance detection.

[0064] Step 501 is similar to step 101, and will not be repeated here.

[0065] 502. In response to the resource detection command, the preset triangle detection renderer is invoked to render the opaque objects in the current frame image, and the second scene detection image is obtained.

[0066] Specifically, a preset triangle detection renderer is invoked to generate a second rendered image, which includes the opaque objects to be rendered in the current frame image; the triangles in the second rendered image are classified to obtain a second scene detection image.

[0067] In one feasible implementation, the step of classifying triangles in the second rendered image to obtain a second scene detection image specifically includes:

[0068] Calculate the pixel area of ​​each triangle on the screen in the second rendered image; classify each triangle according to a second threshold to obtain a first type of triangle and a second type of triangle, the second threshold being used to indicate the pixel area threshold of the triangle; generate a second scene detection image based on the first type of triangle and the second type of triangle, the second scene detection image being a wireframe image, the first type of triangle and the second type of triangle having different colors.

[0069] For example, triangles with an area greater than 10 pixels (or other values, not limited here) are designated as type I triangles, and triangles with an area less than or equal to 10 pixels are designated as type II triangles (i.e., miniature triangles), resulting in the second scene rendering image, such as... Figure 6 As shown, Figure 6 The first type of triangle is set to black, and the second type of triangle is set to red (in this embodiment, a grayscale image is used, so the difference is made schematically by varying the shades of gray). Figure 6 The higher the proportion of red pixels, the more miniature triangles with an area of ​​less than 10 pixels there are, which is less likely to meet the parameter requirements. The first and second types of triangles can also be set to other colors, as long as they are different; no specific restrictions are imposed here.

[0070] 503. Determine whether the detected image of the second scene meets the preset parameter requirements.

[0071] Specifically, each pixel in the second scene detection image is traversed according to the preset second reference color to obtain the second target quantity. The second target quantity is used to indicate the number of pixels whose pixel color is the same as the second reference color. The ratio of the second target quantity to the total number of pixels in the second scene detection image is calculated to obtain the second ratio. When the second ratio is greater than the second threshold, the second scene detection image is determined to be a problem image that does not meet the preset parameter requirements. The second threshold is used to indicate the proportion threshold of the triangle.

[0072] For example, the second reference color can be red, represented by RGB = (1.0, 0, 0), and the second threshold can be set to 5%, where 5% indicates that the pixel proportion of the miniature triangles is 5%. The second reference color and the second threshold can be set according to actual conditions; specific settings are not limited here. The second reference color is the same as the color of the second type of triangle. When the color of the first type of triangle is black and the color of the second type of triangle is red, the second scene detection image is an image with only a black background and a red outline. If the current frame image does not render triangles with a screen area smaller than 10 pixels, then the second scene detection image is a completely black image.

[0073] 504. If not, generate at least one target comparison image based on at least one problem image and the current frame image. The target comparison image is used to indicate art assets that affect rendering time. The problem image is a scene detection image that does not meet the preset parameter requirements.

[0074] For triangle detection, the pixel percentage corresponding to the triangle on the screen needs to be less than 5%. If the pixel percentage is greater than 5%, it is considered to fail to meet the parameter requirements. If the second scene detection image does not meet the preset parameter requirements, the second scene detection image is input into the first region of the second target comparison image, and the current frame image is output into the second region of the second target comparison image to generate the second target comparison image. The second target comparison image is an output image that is twice the screen width and once the screen height.

[0075] Understandably, when the second scene detection image is detected to not meet the preset parameter requirements, the game needs to be paused. First, a comparison image with twice the screen width and once the screen height is created. The second scene detection image is copied to the first region (e.g., the left region) of the second target comparison image. Then, the triangle detection renderer is turned off, the current frame image is copied to the second region (e.g., the right region) of the second target comparison image, the second target comparison image is saved to disk, the triangle detection renderer is turned on again, and the game resumes.

[0076] In this embodiment of the invention, a second scene detection image is rendered by a preset triangle detection renderer, and the corresponding triangle parameters in the second scene detection image are detected. Problem images that do not conform to the corresponding parameter specifications and the normally rendered current frame image are intuitively displayed in the target comparison image, thereby improving the detection efficiency of art resources.

[0077] Please see Figure 7 Another flowchart of the art resource detection method provided in this embodiment of the invention specifically includes:

[0078] 701. Receive resource detection instruction. The resource detection instruction is used to instruct the current frame image to perform performance detection.

[0079] Step 701 is similar to step 101, and will not be repeated here.

[0080] 702. In response to the resource detection command, the preset overdraw detection renderer is invoked to render the semi-transparent objects in the current frame image to obtain the third scene detection image.

[0081] Specifically, a preset overdraw detection renderer is invoked to generate a third rendered image, which includes the semi-transparent objects that need to be rendered in the current frame image; the overdrawn pixels in the third rendered image are classified to obtain a third scene detection image.

[0082] In one feasible implementation, the step of classifying overdrawn pixels in the third rendered image to obtain a third scene detection image specifically includes:

[0083] Generate a background image corresponding to the third rendered image, with the background image having a first preset color; set the color value of the semi-transparent object in the background image to the first color value; adjust the actual superimposed color of each pixel based on the superimposed number of the semi-transparent object in the background image and the first color value to obtain the third scene detection image, with the preset number used to indicate the superimposed number threshold corresponding to overdraw.

[0084] For example, pixels with more than 9 stacking times (or other values, not limited here) are identified as overdrawn pixels, indicating that the semi-transparent object on that pixel is stacked more than 9 times, resulting in the third scene rendered image, such as... Figure 8 As shown, Figure 8 Overdrawn pixels are displayed in red (in this example, a grayscale image is used, so the difference is indicated by the shade of gray). Figure 8 The darker the actual superimposed color of the target pixel, the more times the target pixel is drawn, which is less in line with the parameter requirements.

[0085] 703. Determine whether the detected image of the third scene meets the preset parameter requirements.

[0086] Specifically, each pixel in the third scene detection image is traversed according to the preset third reference color to obtain the third target number. The third target number is used to indicate the number of pixels whose pixel color is the same as the third reference color. The ratio of the third target number to the total number of pixels in the third scene detection image is calculated to obtain the third ratio. When the third ratio is greater than the third threshold, the third scene detection image is determined to be a problem image that does not meet the preset parameter requirements. The third threshold is used to indicate the threshold of the proportion of overdrawn pixels.

[0087] For example, the third reference color can be red, represented by RGB=(1.0,0,0), and the third threshold can be set to 5%, where 5% indicates that the percentage of overdrawn pixels is 5%. The third reference color and the third threshold can be set according to the actual situation, and there are no specific restrictions here. The redder the pixel, the more times the pixel is superimposed.

[0088] 704. If not, generate at least one target comparison image based on at least one problem image and the current frame image. The target comparison image is used to indicate art assets that affect rendering time. The problem image is a scene detection image that does not meet the preset parameter requirements.

[0089] For overdraw detection, the percentage of pixels rendered more than 10 times on the screen must be less than 5%. If the percentage exceeds 5%, it is considered to fail to meet the parameter requirements. If the third scene detection image does not meet the preset parameter requirements, it is input into the first region of the third target comparison image, and the current frame image is output into the second region of the third target comparison image to generate the third target comparison image. The third target comparison image is an output image that is twice the screen width and once the screen height.

[0090] Understandably, when the detected third scene image does not meet the preset parameter requirements, the game needs to be paused. First, a comparison image twice the screen width and once the screen height is created. The detected third scene image is copied to the first region (e.g., the left region) of the third target comparison image. Then, the triangle detection renderer is turned off, the current frame image is copied to the second region (e.g., the right region) of the third target comparison image, the third target comparison image is saved to disk, the triangle detection renderer is turned on again, and the game resumes.

[0091] In this embodiment of the invention, a third scene detection image is rendered by a preset overdraw detection renderer, and overdrawn pixels in the third scene detection image are detected. Problem images that do not conform to the corresponding parameter specifications and the normally rendered current frame image are intuitively displayed in the target comparison image, thereby improving the detection efficiency of art resources.

[0092] Please see Figure 9 Another flowchart of the art resource detection method provided in this embodiment of the invention specifically includes:

[0093] 901. Receive resource detection command. The resource detection command is used to instruct the current frame image to perform performance detection.

[0094] Step 901 is similar to step 101, and will not be described again here.

[0095] 902. In response to the resource detection command, call the preset detection renderer to render at least one scene detection image corresponding to the current frame image.

[0096] Specifically, in response to a resource detection command, a preset layer map detection renderer is invoked to render opaque objects in the current frame image to obtain a first scene detection image; or, a preset triangle detection renderer is invoked to render opaque objects in the current frame image to obtain a second scene detection image; or, a preset overdraw detection renderer is invoked to render semi-transparent objects in the current frame image to obtain a third scene detection image.

[0097] The process of generating the first scene detection image is similar to step 202, the process of generating the second scene detection image is similar to step 502, and the process of generating the third scene detection image is similar to step 702. The specifics will not be repeated here.

[0098] It should be noted that, depending on the resource detection instructions, at least one of the following can be generated: a first scene detection image, a second scene detection image, and a third scene detection image.

[0099] 903. Determine whether at least one scene detection image meets the preset parameter requirements.

[0100] It should be noted that the parameter requirements for scene detection images rendered by different renderers are also different. For example, when the scene detection image is rendered by a layer map detection renderer, it is necessary to detect the pixel ratio of the target layer map in the scene detection image; when the scene detection image is rendered by a triangle detection renderer, it is necessary to detect the pixel ratio of the micro triangles in the scene detection image; when the scene detection image is rendered by an overdraw detection renderer, it is necessary to detect the pixel ratio of overdraw in the scene detection image. The process of determining whether at least one scene detection image meets the preset parameter requirements is similar to step 203, or step 503, or step 703, and will not be elaborated here.

[0101] 904. If not, output at least one problematic image that does not meet the preset requirements to the first region of at least one target comparison image, output the current frame image to the second region of at least one target comparison image, and generate at least one target comparison image. The target comparison image is used to indicate the art resources that affect the rendering time. The problematic image is a scene detection image that does not meet the preset parameter requirements.

[0102] It should be noted that when there is more than one problem image, a comparison image corresponding to the corresponding detection type is generated. For example, if there are three problem images that do not meet the preset requirements, then three comparison images need to be generated to show the non-compliance of the hierarchical texture, triangles, and overdraw. For example, the first target comparison image showing the problem of the original hierarchical texture having an insufficient proportion is as follows. Figure 10 As shown; a second target comparison image illustrating the problem of too many miniature triangles, such as... Figure 11 As shown; a third-target comparison image illustrating the pixel over-drawing problem, such as... Figure 12 As shown.

[0103] It should be noted that this solution requires detection during game runtime, taking into account the game scene and camera position, to ensure accurate results. Three detection methods are illustrated below:

[0104] For hierarchical texture size detection: Traditional detection methods use a fixed texture size (e.g., 1024x1024 pixels) and compare it one by one with all textures in the scene to determine if any exceed the size limit. This can introduce errors because models closer to the camera may require a 2048x2048 texture to ensure accuracy, while models farther from the camera may only need a 128x128 texture. This invention avoids this error by comprehensively determining the texture size of models near and far based on the camera distance during runtime.

[0105] For overdraw detection: Traditional detection methods check the overdraw of each effect individually. However, in actual games, multiple effects are often used together. For example, a campfire might use three effects: flame, sparks, and smoke. Even if the overdraw of each effect is within the acceptable range, using them simultaneously can still result in overdraw exceeding the limit. This invention detects overdraw during game runtime, accurately determining the actual state of the game.

[0106] For micro-triangle detection: Traditional detection methods determine whether the number of triangle faces in each model exceeds a fixed value (e.g., 5000). However, in actual game scenes, models closer to the camera require more triangles to represent details, while models farther from the camera only need fewer triangles to represent the outline. This invention performs detection during game runtime, fully considering factors such as scene creation and camera usage to avoid errors.

[0107] In this embodiment of the invention, at least one scene detection image is rendered by a preset layer texture detection renderer, triangle detection renderer and overdraw detection renderer, and the corresponding parameters in the at least one scene detection image are detected. Problem images that do not conform to the corresponding parameter specifications and the normally rendered current frame image are intuitively displayed in the target comparison image, thereby improving the detection efficiency of art resources.

[0108] The art resource detection method in the embodiments of the present invention has been described above. The art resource detection device in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 13 One embodiment of the art resource detection device in this invention includes:

[0109] The receiving module 1301 is used to receive a resource detection instruction, which is used to instruct the current frame image to perform performance detection.

[0110] The rendering module 1302 is used to respond to the resource detection instruction by calling a preset detection renderer to render at least one scene detection image corresponding to the current frame image;

[0111] The judgment module 1303 is used to determine whether the at least one scene detection image meets the preset parameter requirements;

[0112] The generation module 1304 is configured to, if not, generate at least one target comparison image based on at least one problem image and the current frame image, wherein the target comparison image is used to indicate art resources that affect rendering time, and the problem image is a scene detection image that does not meet the preset parameter requirements.

[0113] In one feasible implementation, the rendering module 1302 includes:

[0114] The first rendering unit 13021 is configured to, in response to the resource detection command, invoke a preset layered texture detection renderer to render opaque objects in the current frame image, thereby obtaining a first scene detection image; or,

[0115] The second rendering unit 13022 is used to call a preset triangle detection renderer to render opaque objects in the current frame image, thereby obtaining a second scene detection image; or,

[0116] The third rendering unit 13023 is used to call a preset overdraw detection renderer to render the semi-transparent objects in the current frame image to obtain a third scene detection image.

[0117] In one feasible implementation, the first rendering unit 13021 is specifically used for:

[0118] A preset layer map detection renderer is invoked to generate a first rendered image, which includes the opaque objects to be rendered in the current frame image.

[0119] The textures in the first rendered image are classified hierarchically to obtain the first scene detection image.

[0120] In one feasible implementation, the first rendering unit 13021 is further configured to:

[0121] Determine the actual texture size of each texture in the first rendered image;

[0122] The corresponding layer color is determined based on the actual texture size of each texture, and the layer color is different for each actual texture size.

[0123] The first scene detection image is generated based on the layer color corresponding to each texture.

[0124] In one feasible implementation, the second rendering unit 13022 is specifically used for:

[0125] A preset triangle detection renderer is invoked to generate a second rendered image, which includes the opaque objects to be rendered in the current frame image.

[0126] The triangles in the second rendered image are classified to obtain the second scene detection image.

[0127] In one feasible implementation, the second rendering unit 13022 is further configured to:

[0128] Calculate the pixel area of ​​each triangle on the screen in the second rendered image;

[0129] Each triangle is classified according to a second threshold to obtain a first type of triangle and a second type of triangle. The second threshold is used to indicate the pixel area threshold of the triangle.

[0130] A second scene detection image is generated based on the first type of triangle and the second type of triangle. The second scene detection image is a wireframe image, and the first type of triangle and the second type of triangle have different colors.

[0131] In one feasible implementation, the third rendering unit 13023 is specifically used for:

[0132] A preset overdraw detection renderer is invoked to generate a third rendered image, which includes the semi-transparent objects that need to be rendered in the current frame image;

[0133] The overdrawn pixels in the third rendered image are classified to obtain the third scene detection image.

[0134] In one feasible implementation, the third rendering unit 13023 is further configured to:

[0135] Generate a background image corresponding to the third rendered image, wherein the background image is a first preset color;

[0136] In the background image, the color value of the semi-transparent object is set to the first color value;

[0137] Based on the number of times the semi-transparent objects in the background image are superimposed and the first color value, the actual superimposed color corresponding to each pixel is adjusted to obtain a third scene detection image. The preset number is used to indicate the superimposed number threshold corresponding to overdraw.

[0138] In one feasible implementation, when the resource detection instruction indicates that layer texture detection should be performed, the judgment module 1303 is specifically used for:

[0139] Based on a preset first reference color, each pixel in the first scene detection image is traversed to obtain a first target number, which is used to indicate the number of pixels whose layer color is the same as the first reference color.

[0140] Calculate the ratio of the number of the first target to the total number of pixels corresponding to the first scene detection image to obtain the first ratio;

[0141] When the first ratio is less than the first threshold, the first scene detection image is determined to be a problem image that does not meet the preset parameter requirements. The first threshold is used to indicate the pixel ratio threshold of the target texture size, and the target texture size corresponds to the first reference color.

[0142] In one feasible implementation, when the resource detection instruction indicates that triangle detection should be performed, the judgment module 1303 is specifically used for:

[0143] The second target quantity is obtained by traversing each pixel in the second scene detection image according to the preset second reference color. The second target quantity is used to indicate the number of pixels whose pixel color is the same as the second reference color.

[0144] Calculate the ratio of the number of the second target to the total number of pixels corresponding to the second scene detection image to obtain the second ratio;

[0145] When the second ratio is greater than the second threshold, the second scene detection image is determined to be a problem image that does not meet the preset parameter requirements. The second threshold is used to indicate the proportion threshold of the triangle.

[0146] In one feasible implementation, when the resource detection instruction indicates overdraw detection, the judgment module 1303 is specifically used for:

[0147] The number of third targets is obtained by traversing each pixel in the third scene detection image according to a preset third reference color. The number of third targets is used to indicate the number of pixels whose pixel color is the same as the third reference color.

[0148] Calculate the ratio of the number of the third target to the total number of pixels corresponding to the third scene detection image to obtain the third ratio;

[0149] When the third ratio is greater than the third threshold, the third scene detection image is determined to be a problem image that does not meet the preset parameter requirements. The third threshold is used to indicate the percentage threshold of overdrawn pixels.

[0150] In one feasible implementation, the generation module 1304 is specifically used for:

[0151] If not, output at least one problematic image that does not meet the preset requirements to the first region of at least one target comparison image, and output the current frame image to the second region of the at least one target comparison image to generate at least one target comparison image.

[0152] In this embodiment of the invention, at least one scene detection image is rendered by a preset detection renderer, and corresponding parameters in the at least one scene detection image are detected. Problem images that do not conform to the corresponding parameter specifications and the normally rendered current frame image are intuitively displayed in the target comparison image, thereby improving the detection efficiency of art resources.

[0153] Figure 14 This is a schematic diagram of the structure of an electronic device 1400 provided in an embodiment of the present invention. The electronic device 1400 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 1410 (e.g., one or more processors) and a memory 1420, and one or more storage media 1430 (e.g., one or more mass storage devices) for storing application programs 1433 or data 1432. The memory 1420 and storage media 1430 can be temporary or persistent storage. The program stored in the storage media 1430 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the electronic device 1400. Furthermore, the processor 1410 may be configured to communicate with the storage media 1430 and execute the series of instruction operations in the storage media 1430 on the electronic device 1400.

[0154] Electronic device 1400 may also include one or more power supplies 1440, one or more wired or wireless network interfaces 1450, one or more input / output interfaces 1460, and / or one or more operating devices 1431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 14 The illustrated electronic device structure does not constitute a limitation on the electronic device and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0155] As an example, and not a limitation, electronic device 1400 may be a server or a terminal.

[0156] This invention provides an electronic device, including: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the electronic device to execute the above-described art resource detection method, the specific method steps of which include:

[0157] The system receives a resource detection command, which instructs the current frame image to undergo performance testing. In response, it invokes a preset detection renderer to render at least one scene detection image corresponding to the current frame image. It then determines whether the at least one scene detection image meets preset parameter requirements. If not, it generates at least one target comparison image based on at least one problematic image and the current frame image. The target comparison image indicates art resources affecting rendering time, and the problematic image is the scene detection image that does not meet the preset parameter requirements. By rendering at least one scene detection image using the preset detection renderer and detecting the corresponding parameters in the at least one scene detection image, the system visually displays the problematic image that does not meet the corresponding parameter specifications and the normally rendered current frame image in the target comparison image, thus improving the efficiency of art resource detection.

[0158] The above-mentioned response to a resource detection command involves calling a preset detection renderer to render at least one scene detection image corresponding to the current frame image. This includes: calling a preset layer map detection renderer to render opaque objects in the current frame image to obtain a first scene detection image; or calling a preset triangle detection renderer to render opaque objects in the current frame image to obtain a second scene detection image; or calling a preset overdraw detection renderer to render semi-transparent objects in the current frame image to obtain a third scene detection image. This method provides different detection renderers and different detection methods depending on the detection type, thus improving detection efficiency.

[0159] The above-mentioned method of calling a preset hierarchical texture detection renderer to render opaque objects in the current frame image to obtain a first scene detection image includes: calling the preset hierarchical texture detection renderer to generate a first rendered image, which includes the opaque objects to be rendered in the current frame image; and performing hierarchical classification on the textures in the first rendered image to obtain the first scene detection image. This method, by performing hierarchical classification on the first rendered image generated by the hierarchical texture detection renderer, provides a way to detect opaque objects and improves detection efficiency.

[0160] The above-described hierarchical classification of textures in the first rendered image to obtain a first scene detection image includes: determining the actual texture size of each texture in the first rendered image; determining the corresponding hierarchical color based on the actual texture size of each texture, wherein the hierarchical color corresponding to each actual texture size is different; and generating the first scene detection image based on the hierarchical color corresponding to each texture. This method refines the specific process of hierarchical classification, uses flexible texture sizes for comparison with scene textures, reduces errors caused by fixed texture sizes exceeding limits, and improves detection accuracy.

[0161] The above-described method of calling a preset triangle detection renderer to render opaque objects in the current frame image to obtain a second scene detection image includes: calling the preset triangle detection renderer to generate a second rendered image, which includes the opaque objects to be rendered in the current frame image; and classifying the triangles in the second rendered image to obtain the second scene detection image. This method, by classifying triangles in the second rendered image generated by the triangle detection renderer, provides an alternative way to detect opaque objects and improves detection efficiency.

[0162] The above-described classification of triangles in the second rendered image to obtain a second scene detection image includes: calculating the pixel area of ​​each triangle on the screen in the second rendered image; classifying each triangle according to a second threshold to obtain a first type of triangle and a second type of triangle, where the second threshold indicates the pixel area threshold of the triangle; and generating a second scene detection image based on the first and second type of triangles. The second scene detection image is a wireframe image, and the first and second type of triangles have different colors. This method refines the specific process of triangle detection, determines the detection criteria of triangles based on the distance of the viewing angle, reduces the error caused by a large number of fixed triangles, and improves the detection accuracy.

[0163] The above-described method of calling a preset overdraw detection renderer to render semi-transparent objects in the current frame image to obtain a third scene detection image includes: calling the preset overdraw detection renderer to generate a third rendered image, which includes the semi-transparent objects to be rendered in the current frame image; and classifying the overdrawn pixels in the third rendered image to obtain the third scene detection image. This method performs overdraw detection on the third rendered image generated by the overdraw detection renderer, providing a way to detect semi-transparent objects and improving detection efficiency.

[0164] The above-described method for classifying overdrawn pixels in the third rendered image to obtain a third scene detection image includes: generating a background image corresponding to the third rendered image, wherein the background image is a first preset color; setting the color value of semi-transparent objects in the background image to the first color value; adjusting the actual overlay color corresponding to each pixel based on the number of times the semi-transparent objects are overlaid in the background image and the first color value, thereby obtaining the third scene detection image. The preset number of times is used to indicate the overlay threshold corresponding to overdraw. This method refines the specific process of overdraw detection, performs overall detection of overdraw during actual operation, avoids multiple non-excessive effects being overlaid together, thus preventing overdraw from exceeding the limit and improving detection accuracy.

[0165] When a resource detection command instructs the performance of hierarchical texture detection, the aforementioned determination of whether at least one scene detection image meets preset parameter requirements includes: traversing each pixel in the first scene detection image according to a preset first reference color to obtain a first target quantity, where the first target quantity indicates the number of pixels whose hierarchical color is the same as the first reference color; calculating the ratio of the first target quantity to the total number of pixels corresponding to the first scene detection image to obtain a first ratio; and when the first ratio is less than a first threshold, determining the first scene detection image as a problem image that does not meet the preset parameter requirements, where the first threshold indicates the pixel ratio threshold of the target texture size, and the target texture size corresponds to the first reference color. This method provides a way to determine whether the proportion of the target hierarchical texture in a hierarchical texture exceeds the limit, improving detection efficiency.

[0166] When a resource detection command instructs triangle detection, the aforementioned determination of whether at least one scene detection image meets preset parameter requirements includes: traversing each pixel in the second scene detection image according to a preset second reference color to obtain a second target quantity, where the second target quantity indicates the number of pixels whose pixel color is the same as the second reference color; calculating the ratio of the second target quantity to the total number of pixels corresponding to the second scene detection image to obtain a second ratio; and when the second ratio is greater than a second threshold, determining the second scene detection image as a problem image that does not meet the preset parameter requirements, where the second threshold indicates the proportion threshold of triangles. This method provides a way to determine whether the proportion of pixels corresponding to miniature triangles exceeds the standard, improving detection efficiency.

[0167] When a resource detection command instructs overdraw detection, the aforementioned determination of whether at least one scene detection image meets preset parameter requirements includes: traversing each pixel in the third scene detection image according to a preset third reference color to obtain a third target quantity, where the third target quantity indicates the number of pixels whose pixel color is the same as the third reference color; calculating the ratio of the third target quantity to the total number of pixels corresponding to the third scene detection image to obtain a third ratio; and determining the third scene detection image as a problem image that does not meet the preset parameter requirements when the third ratio is greater than a third threshold, where the third threshold indicates the overdrawn pixel percentage threshold. This method provides a way to determine whether the percentage of overdrawn pixels exceeds the limit, improving detection efficiency.

[0168] If the above is not true, then at least one target comparison image is generated based on at least one problem image and the current frame image, including: if not, outputting at least one problem image that does not meet the preset requirements to a first region of at least one target comparison image, and outputting the current frame image to a second region of at least one target comparison image, thereby generating at least one target comparison image. This method provides a way to draw comparison images, improving detection efficiency.

[0169] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the art resource detection method. The steps specifically include:

[0170] The system receives a resource detection command, which instructs the current frame image to undergo performance testing. In response, it invokes a preset detection renderer to render at least one scene detection image corresponding to the current frame image. It then determines whether the at least one scene detection image meets preset parameter requirements. If not, it generates at least one target comparison image based on at least one problematic image and the current frame image. The target comparison image indicates art resources affecting rendering time, and the problematic image is the scene detection image that does not meet the preset parameter requirements. By rendering at least one scene detection image using the preset detection renderer and detecting the corresponding parameters in the at least one scene detection image, the system visually displays the problematic image that does not meet the corresponding parameter specifications and the normally rendered current frame image in the target comparison image, thus improving the efficiency of art resource detection.

[0171] The above-mentioned response to a resource detection command involves calling a preset detection renderer to render at least one scene detection image corresponding to the current frame image. This includes: calling a preset layer map detection renderer to render opaque objects in the current frame image to obtain a first scene detection image; or calling a preset triangle detection renderer to render opaque objects in the current frame image to obtain a second scene detection image; or calling a preset overdraw detection renderer to render semi-transparent objects in the current frame image to obtain a third scene detection image. This method provides different detection renderers and different detection methods depending on the detection type, thus improving detection efficiency.

[0172] The above-mentioned method of calling a preset hierarchical texture detection renderer to render opaque objects in the current frame image to obtain a first scene detection image includes: calling the preset hierarchical texture detection renderer to generate a first rendered image, which includes the opaque objects to be rendered in the current frame image; and performing hierarchical classification on the textures in the first rendered image to obtain the first scene detection image. This method, by performing hierarchical classification on the first rendered image generated by the hierarchical texture detection renderer, provides a way to detect opaque objects and improves detection efficiency.

[0173] The above-described hierarchical classification of textures in the first rendered image to obtain a first scene detection image includes: determining the actual texture size of each texture in the first rendered image; determining the corresponding hierarchical color based on the actual texture size of each texture, wherein the hierarchical color corresponding to each actual texture size is different; and generating the first scene detection image based on the hierarchical color corresponding to each texture. This method refines the specific process of hierarchical classification, uses flexible texture sizes for comparison with scene textures, reduces errors caused by fixed texture sizes exceeding limits, and improves detection accuracy.

[0174] The above-described method of calling a preset triangle detection renderer to render opaque objects in the current frame image to obtain a second scene detection image includes: calling the preset triangle detection renderer to generate a second rendered image, which includes the opaque objects to be rendered in the current frame image; and classifying the triangles in the second rendered image to obtain the second scene detection image. This method, by classifying triangles in the second rendered image generated by the triangle detection renderer, provides an alternative way to detect opaque objects and improves detection efficiency.

[0175] The above-described classification of triangles in the second rendered image to obtain a second scene detection image includes: calculating the pixel area of ​​each triangle on the screen in the second rendered image; classifying each triangle according to a second threshold to obtain a first type of triangle and a second type of triangle, where the second threshold indicates the pixel area threshold of the triangle; and generating a second scene detection image based on the first and second type of triangles. The second scene detection image is a wireframe image, and the first and second type of triangles have different colors. This method refines the specific process of triangle detection, determines the detection criteria of triangles based on the distance of the viewing angle, reduces the error caused by a large number of fixed triangles, and improves the detection accuracy.

[0176] The above-described method of calling a preset overdraw detection renderer to render semi-transparent objects in the current frame image to obtain a third scene detection image includes: calling the preset overdraw detection renderer to generate a third rendered image, which includes the semi-transparent objects to be rendered in the current frame image; and classifying the overdrawn pixels in the third rendered image to obtain the third scene detection image. This method performs overdraw detection on the third rendered image generated by the overdraw detection renderer, providing a way to detect semi-transparent objects and improving detection efficiency.

[0177] The above-described method for classifying overdrawn pixels in the third rendered image to obtain a third scene detection image includes: generating a background image corresponding to the third rendered image, wherein the background image is a first preset color; setting the color value of semi-transparent objects in the background image to the first color value; adjusting the actual overlay color corresponding to each pixel based on the number of times the semi-transparent objects are overlaid in the background image and the first color value, thereby obtaining the third scene detection image. The preset number of times is used to indicate the overlay threshold corresponding to overdraw. This method refines the specific process of overdraw detection, performs overall detection of overdraw during actual operation, avoids multiple non-excessive effects being overlaid together, thus preventing overdraw from exceeding the limit and improving detection accuracy.

[0178] When a resource detection command instructs the performance of hierarchical texture detection, the aforementioned determination of whether at least one scene detection image meets preset parameter requirements includes: traversing each pixel in the first scene detection image according to a preset first reference color to obtain a first target quantity, where the first target quantity indicates the number of pixels whose hierarchical color is the same as the first reference color; calculating the ratio of the first target quantity to the total number of pixels corresponding to the first scene detection image to obtain a first ratio; and when the first ratio is less than a first threshold, determining the first scene detection image as a problem image that does not meet the preset parameter requirements, where the first threshold indicates the pixel ratio threshold of the target texture size, and the target texture size corresponds to the first reference color. This method provides a way to determine whether the proportion of the target hierarchical texture in a hierarchical texture exceeds the limit, improving detection efficiency.

[0179] When a resource detection command instructs triangle detection, the aforementioned determination of whether at least one scene detection image meets preset parameter requirements includes: traversing each pixel in the second scene detection image according to a preset second reference color to obtain a second target quantity, where the second target quantity indicates the number of pixels whose pixel color is the same as the second reference color; calculating the ratio of the second target quantity to the total number of pixels corresponding to the second scene detection image to obtain a second ratio; and when the second ratio is greater than a second threshold, determining the second scene detection image as a problem image that does not meet the preset parameter requirements, where the second threshold indicates the proportion threshold of triangles. This method provides a way to determine whether the proportion of pixels corresponding to miniature triangles exceeds the standard, improving detection efficiency.

[0180] When a resource detection command instructs overdraw detection, the aforementioned determination of whether at least one scene detection image meets preset parameter requirements includes: traversing each pixel in the third scene detection image according to a preset third reference color to obtain a third target quantity, where the third target quantity indicates the number of pixels whose pixel color is the same as the third reference color; calculating the ratio of the third target quantity to the total number of pixels corresponding to the third scene detection image to obtain a third ratio; and determining the third scene detection image as a problem image that does not meet the preset parameter requirements when the third ratio is greater than a third threshold, where the third threshold indicates the overdrawn pixel percentage threshold. This method provides a way to determine whether the percentage of overdrawn pixels exceeds the limit, improving detection efficiency.

[0181] If the above is not true, then at least one target comparison image is generated based on at least one problem image and the current frame image, including: if not, outputting at least one problem image that does not meet the preset requirements to a first region of at least one target comparison image, and outputting the current frame image to a second region of at least one target comparison image, thereby generating at least one target comparison image. This method provides a way to draw comparison images, improving detection efficiency.

[0182] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0183] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0184] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0185] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0186] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An art resource detection method characterized by comprising: The method comprises the steps of: receiving a resource detection instruction, the resource detection instruction being used to indicate performance detection on a current frame image; in response to the resource detection instruction, calling a preset detection renderer to render at least one scene detection image corresponding to the current frame image; determining whether the at least one scene detection image meets preset parameter requirements; if not, generating at least one target comparison image according to at least one problem image and the current frame image, the target comparison image being used to indicate art resources affecting rendering time consumption, the problem image being a scene detection image that does not meet the preset parameter requirements.

2. The art resource detection method according to claim 1, characterized in that, The step of in response to the resource detection instruction, calling a preset detection renderer to render at least one scene detection image corresponding to the current frame image comprises the steps of: in response to the resource detection instruction, calling a preset level map detection renderer to render opaque objects in the current frame image to obtain a first scene detection image; or calling a preset triangle detection renderer to render opaque objects in the current frame image to obtain a second scene detection image; or calling a preset overdraw detection renderer to render translucent objects in the current frame image to obtain a third scene detection image.

3. The art resource detection method according to claim 2, characterized in that, The step of calling a preset level map detection renderer to render opaque objects in the current frame image to obtain a first scene detection image comprises the steps of: calling a preset level map detection renderer to generate a first rendering image, the first rendering image comprising opaque objects that need to be rendered in the current frame image; performing hierarchical classification on maps in the first rendering image to obtain the first scene detection image.

4. The art resource detection method according to claim 3, characterized in that, The step of performing hierarchical classification on maps in the first rendering image to obtain the first scene detection image comprises the steps of: determining actual map sizes of each map in the first rendering image; determining corresponding hierarchical colors according to the actual map sizes of each map, wherein the hierarchical colors corresponding to each actual map size are different; generating the first scene detection image according to the corresponding hierarchical colors of each map.

5. The art resource detection method according to claim 2, wherein The step of calling a preset triangle detection renderer to render opaque objects in the current frame image to obtain a second scene detection image comprises the steps of: calling a preset triangle detection renderer to generate a second rendering image, the second rendering image comprising opaque objects that need to be rendered in the current frame image; performing classification on triangles in the second rendering image to obtain the second scene detection image.

6. The art resource detection method according to claim 5, wherein The step of performing classification on triangles in the second rendering image to obtain the second scene detection image comprises the steps of: calculating pixel areas of each triangle in the second rendering image on a screen; classifying each triangle according to a second threshold value to obtain first-class triangles and second-class triangles, the second threshold value being used to indicate a pixel area threshold value of a triangle; generating the second scene detection image according to the first-class triangles and the second-class triangles, the second scene detection image being a wireframe diagram, and the first-class triangles and the second-class triangles having different colors.

7. The art resource detection method according to claim 2, wherein The step of calling a preset overdraw detection renderer to render translucent objects in the current frame image to obtain a third scene detection image comprises the steps of: Call the preset overdraw detection renderer to generate a third rendering image, the third rendering image including a semi-transparent object that needs to be rendered in the current frame image; Classify the overdraw pixels in the third rendering image to obtain a third scene detection image.

8. The art resource detection method according to claim 7, characterized in that, The classification of the overdraw pixels in the third rendering image to obtain a third scene detection image includes: Generate a background image corresponding to the third rendering image, the background image being a first preset color; Set the color value of the semi-transparent object in the background image to a first color value; Adjust the actual overlay color corresponding to each pixel based on the number of overlays of the semi-transparent object in the background image and the first color value to obtain a third scene detection image, the preset number indicating an overlay number threshold corresponding to overdraw.

9. The art resource detection method according to claim 2, wherein When the resource detection instruction indicates to perform hierarchical map detection, the determination of whether the at least one scene detection image meets the preset parameter requirement includes: Traverse each pixel in the first scene detection image according to a preset first reference color to obtain a first target number, the first target number indicating a number of pixels with a hierarchical color same as the first reference color; Calculate a ratio of the first target number to a total number of pixels corresponding to the first scene detection image to obtain a first ratio; When the first ratio is less than a first threshold value, determine that the first scene detection image is a problem image that does not meet the preset parameter requirement, the first threshold value indicating a pixel proportion threshold of a target map size corresponding to the first reference color.

10. The art resource detection method according to claim 2, wherein When the resource detection instruction indicates to perform triangle detection, the determination of whether the at least one scene detection image meets the preset parameter requirement includes: Traverse each pixel in the second scene detection image according to a preset second reference color to obtain a second target number, the second target number indicating a number of pixels with a color same as the second reference color; Calculate a ratio of the second target number to a total number of pixels corresponding to the second scene detection image to obtain a second ratio; When the second ratio is greater than a second threshold value, determine that the second scene detection image is a problem image that does not meet the preset parameter requirement, the second threshold value indicating a proportion threshold of a triangle.

11. The art resource detection method according to claim 2, wherein When the resource detection instruction indicates to perform overdraw detection, the determination of whether the at least one scene detection image meets the preset parameter requirement includes: Traverse each pixel in the third scene detection image according to a preset third reference color to obtain a third target number, the third target number indicating a number of pixels with a color same as the third reference color; Calculate a ratio of the third target number to a total number of pixels corresponding to the third scene detection image to obtain a third ratio; When the third ratio is greater than a third threshold value, determine that the third scene detection image is a problem image that does not meet the preset parameter requirement, the third threshold value indicating a pixel proportion threshold of overdraw.

12. The art resource detection method according to any one of claims 1-11, characterized in that, When the resource detection instruction indicates to perform hierarchical map detection, the determination of whether the at least one scene detection image meets the preset parameter requirement includes: Traverse each pixel in the first scene detection image according to a preset first reference color to obtain a first target number, the first target number indicating a number of pixels with a hierarchical color same as the first reference color; Calculate a ratio of the first target number to a total number of pixels corresponding to the first scene detection image to obtain a first ratio; When the first ratio is less than a first threshold value, determine that the first scene detection image is a problem image that does not meet the preset parameter requirement, the first threshold value indicating a pixel proportion threshold of a target map size corresponding to the first reference color. When the resource detection instruction indicates to perform triangle detection, the determination of whether the at least one scene detection image meets the preset parameter requirement includes: Traverse each pixel in the second scene detection image according to a preset second reference color to obtain a second target number, the second target number indicating a number of pixels with a color same as the second reference color; Calculate a ratio of the second target number to a total number of pixels corresponding to the second scene detection image to obtain a second ratio; When the second ratio is greater than a second threshold value, determine that the second scene detection image is a problem image that does not meet the preset parameter requirement, the second threshold value indicating a proportion threshold of a triangle. When the resource detection instruction indicates to perform overdraw detection, the determination of whether the at least one scene detection image meets the preset parameter requirement includes: Traverse each pixel in the third scene detection image according to a preset third reference color to obtain a third target number, the third target number indicating a number of pixels with a color same as the third reference color; Calculate a ratio of the third target number to a total number of pixels corresponding to the third scene detection image to obtain a third ratio; When the third ratio is greater than a third threshold value, determine that the third scene detection image is a problem image that does not meet the preset parameter requirement, the third threshold value indicating a pixel proportion threshold of overdraw. When the resource detection instruction indicates to perform hierarchical map detection, the determination of whether the at least one scene detection image meets the preset parameter requirement includes: Traverse each pixel in the first scene detection image according to a preset first reference color to obtain a first target number, the first target number indicating a number of pixels with a hierarchical color same as the first reference color; Calculate a ratio of the first target number to a total number of pixels corresponding to the first scene detection image to obtain a first ratio; When the first ratio is less than a first threshold value, determine that the first scene detection image is a problem image that does not meet the preset parameter requirement, the first threshold value indicating a pixel proportion threshold of a target map size corresponding to the first reference color. If not, output at least one problem image not meeting preset requirements to a first region of at least one target contrast image, output the current frame image to a second region of the at least one target contrast image, and generate the at least one target contrast image.

13. An art resource detection device, characterized by comprising: Comprise: A receiving module configured to receive a resource detection instruction, the resource detection instruction being used to instruct performance detection on a current frame image; A rendering module configured to, in response to the resource detection instruction, call a preset detection renderer to render at least one scene detection image corresponding to the current frame image; A judging module configured to judge whether the at least one scene detection image meets preset parameter requirements; A generating module configured to, if not, generate at least one target contrast image according to at least one problem image and the current frame image, the target contrast image being used to indicate art resources affecting rendering time consumption, and the problem image being a scene detection image not meeting preset parameter requirements.

14. An electronic device, comprising: The electronic device comprises a memory and at least one processor, the memory has instructions stored therein, and the memory and the at least one processor are interconnected through a circuit; The at least one processor calls the instructions in the memory, so that the electronic device executes the art resource detection method in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer readable storage medium has instructions stored therein, and when the instructions are executed by the processor, the art resource detection method in any one of claims 1-12 is implemented.

Citation Information

Patent Citations

  • Page fluency detection method and device

    CN110764986A

  • Page test method and device, electronic equipment and computer readable storage medium

    CN112667519A