Modeling rendering method and system based on independent process

By creating an independent rendering control process in the game, centralized management and execution of styling rendering tasks have solved the problem of repeating the same task of multiple game processes, and realizing the smoothness of the game and the improvement of user experience.

CN119367768APending Publication Date: 2025-01-28DUOYI NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411340966.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the prior art, the game process initiates and executes styling rendering tasks themselves, causing multiple game processes to execute the same tasks simultaneously or repeatedly, increasing logic and rendering time, resulting in game stuttering.

Method used

By creating an independent rendering control process, centralized management and execution of the styling rendering tasks initiated by multiple game processes, use the task identification parameter matching and reuse rendering results to avoid repeated calculations.

Benefits of technology

Reduce the logic and rendering time of game threads, avoid game stuck, and improve the smoothness of the game and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119367768A_ABST
    Figure CN119367768A_ABST
Patent Text Reader

Abstract

The invention provides a modeling rendering method and system based on an independent process. The method comprises the following steps: creating a rendering control process; controlling the rendering control process to obtain a task identification parameter of a modeling rendering task initiated by a first game process; the rendering control process is controlled to execute a modeling rendering task initiated by the first game process, and a rendering result is obtained and returned to the first game process; controlling the rendering control process to obtain a task identification parameter of a modeling rendering task initiated by a second game process; and matching the task identification parameter of the modeling rendering task initiated by the first game process with the task identification parameter of the modeling rendering task initiated by the second game process, and if the task identification parameters are the same, controlling the rendering control process to return a rendering result to the second game process. Therefore, the modeling rendering task of the game process is moved to the rendering control process from the game process, the situation that multiple game processes repeatedly execute the same modeling rendering task is avoided, and the game fluency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game modeling rendering, and in particular to a modeling rendering method and system based on an independent process. Background Art

[0002] The loading, calculation and rendering of modeling rendering tasks in games consume the most of the system performance. In the prior art, modeling rendering tasks are often initiated by the game process itself, and then the game process creates its own thread to execute. Therefore, when a user starts multiple game processes, multiple game processes often execute the same modeling rendering task simultaneously or repeatedly. As a result, multiple game processes execute the same modeling rendering task simultaneously or repeatedly, which greatly increases the logic time and rendering time of the game thread, causing the game to freeze and fail to run smoothly, causing users or players to lose their sense of game experience. Summary of the invention

[0003] Based on this, the purpose of the present invention is to provide a modeling rendering method and system based on an independent process to solve the technical problems existing in the above-mentioned prior art, improve the smoothness of game operation, and enhance the user or player's experience of the game.

[0004] The purpose of the present invention can be achieved by the following technical solutions:

[0005] A modeling rendering method based on an independent process includes the following steps: creating a rendering control process; in response to a modeling rendering task initiated by a first game process, controlling the rendering control process to obtain a task identification parameter of the modeling rendering task initiated by the first game process; controlling the rendering control process to execute the modeling rendering task initiated by the first game process, obtaining a rendering result, and returning the rendering result to the first game process; in response to a modeling rendering task initiated by a second game process, controlling the rendering control process to obtain a task identification parameter of the modeling rendering task initiated by the second game process; matching the task identification parameter of the modeling rendering task initiated by the first game process with the task identification parameter of the modeling rendering task initiated by the second game process; if the matching results are the same, controlling the rendering control process to return the rendering result to the second game process; if they do not match, controlling the rendering control process to execute the modeling rendering task initiated by the second game process, obtaining a rendering result, and returning the rendering result to the second game process.

[0006] A modeling rendering system based on an independent process, comprising: a rendering control process creation unit, used to create a rendering control process; a first task identification parameter acquisition unit, used to control the rendering control process to acquire the task identification parameter of the modeling rendering task initiated by the first game process in response to the modeling rendering task initiated by the first game process; a rendering task execution unit, used to control the rendering control process to execute the modeling rendering task initiated by the first game process, obtain the rendering result, and return the rendering result to the first game process; a second task identification parameter acquisition unit, used to control the rendering control process to acquire the task identification parameter of the modeling rendering task initiated by the second game process in response to the modeling rendering task initiated by the second game process; a task identification parameter matching unit, used to match the task identification parameter of the modeling rendering task initiated by the first game process with the task identification parameter of the modeling rendering task initiated by the second game process, if the matching results are the same, control the rendering control process to return the rendering result to the second game process, if they do not match, control the rendering control process to execute the modeling rendering task initiated by the second game process, obtain the rendering result, and return the rendering result to the second game process.

[0007] Compared with the prior art, the method described in the present invention firstly creates an independent rendering control process to centralize the modeling rendering tasks that need to be executed by multiple game processes; secondly, the task identification parameters of the modeling rendering tasks corresponding to different game processes are obtained by controlling the rendering control process; finally, the rendering results corresponding to the modeling rendering tasks with the same task identification parameters are returned to the corresponding game process. Therefore, the method described in the present invention avoids multiple game processes from repeatedly executing the same modeling rendering tasks, realizes the real-time reuse of the rendering results of the same modeling rendering tasks, reduces the logic time and rendering time of the game thread, avoids game freezes, and improves the fluency of the game.

[0008] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 A flowchart of the steps of the modeling rendering method based on independent processes provided by the present invention;

[0010] Figure 2 A flowchart of the steps of returning corresponding rendering results according to the rendering accuracy requirements of the modeling rendering task initiated by the game process in the modeling rendering method based on the independent process provided by the present invention;

[0011] Figure 3A flowchart of the steps of returning corresponding rendering results according to the rendering progress requirement of the modeling rendering task initiated by the game process in the modeling rendering method based on the independent process provided by the present invention;

[0012] Figure 4 A flowchart of the steps of storing and removing rendering results of the modeling rendering method based on an independent process provided by the present invention;

[0013] Figure 5 A schematic diagram of a modeling rendering system based on an independent process provided by the present invention. DETAILED DESCRIPTION

[0014] The present invention provides a modeling rendering method and system based on an independent process. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0015] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0016] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0017] The invention is further described below by describing embodiments in conjunction with the accompanying drawings.

[0018] Example 1

[0019] Please refer to Figure 1 , Figure 1A flowchart of a modeling rendering method based on an independent process provided by the present invention. The method comprises the following steps:

[0020] S10, creating a rendering control process;

[0021] S20, in response to the modeling rendering task initiated by the first game process, controlling the rendering control process to obtain a task identification parameter of the modeling rendering task initiated by the first game process;

[0022] S30, controlling the rendering control process to execute the modeling rendering task initiated by the first game process, obtaining a rendering result, and returning the rendering result to the first game process;

[0023] S40, in response to the modeling rendering task initiated by the second game process, controlling the rendering control process to obtain a task identification parameter of the modeling rendering task initiated by the second game process;

[0024] S50, matching the task identification parameters of the modeling rendering task initiated by the first game process with the task identification parameters of the modeling rendering task initiated by the second game process, and if the matching results are the same, controlling the rendering control process to return the rendering result to the second game process.

[0025] For step S10, create a rendering control process;

[0026] The rendering control process refers to an independent control process that is used to centralize the modeling rendering tasks initiated by several different game processes, control the execution and execution order of the modeling rendering tasks initiated by the game processes, and return the corresponding rendering results.

[0027] In one embodiment, since the prior art often adopts the method of initiating a modeling rendering task by the game process itself and then handing it over to the rendering thread contained in itself to perform the corresponding rendering, therefore, in the case of multiple game processes, the same modeling rendering task is often initiated multiple times and rendered multiple times by the same or different game processes, resulting in a waste of system resources and performance, and easily causing the game to freeze. The method described in the present invention, by creating a rendering control process, realizes the centralization of modeling rendering tasks initiated by the same or different game processes and determines whether to execute rendering. At the same time, it can make the rendering results of the same modeling rendering task reusable, which well overcomes the technical defects in the prior art.

[0028] For step S20, in response to the modeling rendering task initiated by the first game process, controlling the rendering control process to obtain the task identification parameter of the modeling rendering task initiated by the first game process;

[0029] Among them, the modeling rendering task refers to a model or scene processing task that is widely present in the fields of game development, film and television production, architectural design, etc., and involves converting a three-dimensional model or scene into a two-dimensional image or video through computer graphics technology. In this embodiment, the modeling rendering task refers to a processing task of performing modeling rendering processing on the three-dimensional model or scene of the character so that it can be converted into a two-dimensional image or video that can be displayed on a graphical interface of a player or user end. The modeling rendering task initiated by the first game process refers to a modeling rendering task of the first game process that needs to obtain the corresponding rendering result; the game process refers to an entity of a game program running on an operating system. Commonly used operating systems include LINUX and Windows. In this embodiment, the game process refers to an independent unit when the game software is executed on a computer, which is responsible for executing the game code, managing the game resources (such as memory, graphics rendering resources, etc.), and interacting with the user. Different game processes are separated from each other and run independently; the task identification parameter refers to a parameter used to identify and distinguish different modeling rendering tasks initiated by different game processes. In this embodiment, the task identification parameter is a hash value corresponding to the modeling rendering task initiated by the game process.

[0030] In one embodiment, the hash value can be obtained by a hash algorithm, and common hash algorithms include MD5, CRC and HMAC algorithms. In this embodiment, the present invention provides a hash value calculation method for a modeling rendering task initiated by a game process based on the MD5 algorithm, and its specific principle is: first, four 32-bit registers are initialized, and a set of initial values ​​are preset; secondly, the modeling rendering task initiated by the game process is digitized and data is grouped, and the length of each group is limited to 512 bits, that is, 64 bytes; then each group of data is padded so that after its length is added with 64 bits (8 bytes) of padding, the result of the length modulo 512 is 448; then 64 bits of length information (indicating the length of the original data) is appended to the padded data; then four rounds of cyclic calculation are performed on the data group after padding and appending the length information, and each round includes four steps: nonlinear function, permutation, addition and cyclic left shift, to obtain four groups of pre-output results; finally, the four groups of pre-output results are merged to obtain a final hash value with a length of 128 bits corresponding to the modeling rendering task initiated by the game process.

[0031] In one embodiment, the modeling rendering task includes at least the steps of modeling, setting the material and texture of the model, setting the lighting, determining ray tracing, and rendering output. The modeling rendering task can be executed by calling commonly used 3D modeling and animation software (such as Blender, Maya, 3ds Max, etc.) and commonly used renderers (such as Arnold, Vray, etc.).

[0032] In one embodiment, the task identification parameter of the modeling rendering task initiated by the first game process is obtained by calculating the hash value of the modeling rendering task initiated by the first game process and controlling the rendering control process to obtain it.

[0033] In step S30, the rendering control process is controlled to execute the modeling rendering task initiated by the first game process, to obtain a rendering result, and the rendering result is returned to the first game process;

[0034] The rendering result refers to the rendering result output file after completing the modeling rendering task.

[0035] In one embodiment, step S30 specifically includes the following steps:

[0036] S301, controlling the rendering control process to create a rendering thread;

[0037] The rendering thread refers to a thread entity in the rendering control process that is used to execute the modeling rendering task.

[0038] S302, distributing the modeling rendering task initiated by the first game process to the rendering thread for processing;

[0039] S303, obtaining a rendering result corresponding to the modeling rendering task initiated by the first game process;

[0040] S304: Return the rendering result to the first game process.

[0041] In one embodiment, when the rendering control process obtains modeling rendering tasks initiated simultaneously by multiple game processes, it can also perform multi-threaded processing of the modeling rendering tasks by deriving a number of new rendering threads.

[0042] For step S40, in response to the modeling rendering task initiated by the second game process, controlling the rendering control process to obtain the task identification parameter of the modeling rendering task initiated by the second game process;

[0043] Among them, the second game process refers to other game processes that are different from the first game process. In one embodiment, the second game process can be a game process with the same attributes as the first game process, that is, the first game process and the second game process belong to entities generated by multiple runs of the same game program on the same operating system, or it can be a game process with different attributes from the first game process, that is, the first game process and the second game process belong to entities generated by different game programs running separately on the same operating system; the modeling rendering task initiated by the second game process refers to the modeling rendering task of the second game process that needs to obtain the corresponding rendering result.

[0044] In one embodiment, the task identification parameter of the modeling rendering task initiated by the second game process is obtained by calculating the hash value of the modeling rendering task initiated by the second game process and controlling the rendering control process to obtain it.

[0045] In step S50, the task identification parameter of the modeling rendering task initiated by the first game process is matched with the task identification parameter of the modeling rendering task initiated by the second game process, and if the matching results are the same, the rendering control process is controlled to return the rendering result to the second game process;

[0046] In one embodiment, by obtaining the hash value of the modeling rendering task initiated by the first game process and the hash value of the modeling rendering task initiated by the second game process, and then matching and comparing the hash values ​​of the two, if the matching results are the same, it is determined that the modeling rendering task initiated by the first game process and the modeling rendering task initiated by the second game process belong to the same modeling rendering task, and the rendering control process is controlled to call the rendering result of the modeling rendering task initiated by the first game process and return it to the second game process.

[0047] In one embodiment, the method of the present invention further provides some additional steps for enabling the second modeling rendering task initiated by the first game process to reuse the rendering result of the modeling rendering task initiated by the first game process, and the steps specifically include the following steps:

[0048] S60, in response to the second shape rendering task initiated by the first game process, controlling the rendering control process to obtain a task identification parameter of the second shape rendering task initiated by the first game process;

[0049] In one embodiment, the task identification parameter of the second shape rendering task initiated by the first game process is obtained by calculating the hash value of the second shape rendering task initiated by the first game process and controlling the rendering control process to obtain it.

[0050] S70, matching the task identification parameters of the modeling rendering task initiated by the first game process with the task identification parameters of the second modeling rendering task initiated by the first game process, and if the matching results are the same, controlling the rendering control process to return the rendering result to the first game process again.

[0051] In one embodiment, by obtaining the hash value of the modeling rendering task initiated by the first game process and the hash value of the second modeling rendering task initiated by the first game process, and then matching and comparing the hash values ​​of the two, if the matching results are the same, it is determined that the modeling rendering task initiated by the first game process and the second modeling rendering task initiated by the first game process belong to the same modeling rendering task, and the rendering control process is controlled to call the rendering result of the modeling rendering task initiated by the first game process and return it to the first game process again.

[0052] In one embodiment, the method of the present invention also provides some additional steps for returning corresponding rendering results according to the rendering accuracy requirements of the modeling rendering task initiated by the game process. Figure 2 , Figure 2 The flowchart of the steps of returning the corresponding rendering result according to the rendering accuracy requirement of the modeling rendering task initiated by the game process in the modeling rendering method based on the independent process provided by the present invention is as follows:

[0053] In the step S30 of controlling the rendering control process to execute the modeling rendering task initiated by the first game process to obtain the rendering result, the following steps are specifically included:

[0054] S311, controlling the rendering control process to execute the modeling rendering task initiated by the first game process;

[0055] S312. According to a preset precision saving standard, respectively obtain and save rendering results of the modeling rendering task initiated by the first game process at several different rendering precisions to obtain a first rendering result set.

[0056] Among them, the rendering accuracy refers to the precise index of model or scene rendering. In this embodiment, the rendering accuracy refers to the richness of details and the realism of light and shadow effects in the rendering results of the task model or scene; the first rendering result set includes several rendering results of modeling rendering tasks initiated by the first game process at different rendering accuracies.

[0057] The modeling rendering method based on independent processes also includes:

[0058] S313, matching the task identification parameter of the modeling rendering task initiated by the first game process with the task identification parameter of the modeling rendering task initiated by the second game process, and if the matching results are the same, obtaining the corresponding rendering accuracy requirement of the modeling rendering task initiated by the second game process;

[0059] In one embodiment, the obtaining of the corresponding rendering accuracy requirement of the modeling rendering task initiated by the second game process may be achieved by controlling the rendering control process to create a corresponding thread for obtaining.

[0060] In one embodiment, a corresponding matching result is obtained by matching a hash value of the modeling rendering task initiated by the first game process with a hash value of the modeling rendering task initiated by the second game process.

[0061] S314. According to the preset rendering accuracy control standard, the first rendering result set, and the corresponding rendering accuracy requirements of the modeling rendering task initiated by the second game process, determine whether the rendering accuracy of the rendering results in the first rendering result set meets the rendering accuracy requirements, and control the rendering control process to return the corresponding rendering results in the first rendering result set that meet the rendering accuracy requirements to the second game process.

[0062] In one embodiment, there is a situation where a player starts multiple game processes, and the player character in the first game process is at location A, while the player character in the second game process is at location B but the perspective is toward location A. Therefore, there is a technical problem of needing to repeatedly perform the modeling rendering task of rendering location A, but this technical problem can be solved by applying steps S311-S314 in the method described in the present invention.

[0063] In this embodiment, first, by acquiring the rendering results of several modeling rendering tasks initiated by the first game process at different rendering precisions, a first rendering result set is constructed, and then, by judging whether the rendering precision of the rendering results in the first rendering result set meets the rendering precision requirements of the same modeling rendering task initiated by the second game process, finally, the rendering results that meet the rendering precision requirements are returned to the second game process according to a preset return standard (for example, when there are multiple rendering results that meet the rendering precision requirements, the rendering result with the lowest rendering precision is returned). Therefore, the method of the present invention can obtain the rendering results of the same character model or scene at different view distances at one time (for example, the close-up and long-distance performances of the same character model or scene) without repeatedly initiating modeling rendering tasks, thereby reducing the loss of system performance and improving the flow of the game.

[0064] In other embodiments, when a user or player sets a high image quality requirement to a lower image quality requirement during a game, steps S311-S314 in the method described in the present invention may also be applied to reduce the loss of system rendering resources.

[0065] In one embodiment, the method of the present invention also provides some additional steps for returning the corresponding rendering results according to the rendering progress requirements of the modeling rendering task initiated by the game process. Figure 3 , Figure 3 The flowchart of the steps of returning the corresponding rendering result according to the rendering progress requirement of the modeling rendering task initiated by the game process in the modeling rendering method based on the independent process provided by the present invention is as follows:

[0066] In the step S30 of controlling the rendering control process to execute the modeling rendering task initiated by the first game process to obtain the rendering result, the following steps are specifically included:

[0067] S321, controlling the rendering control process to execute the modeling rendering task initiated by the first game process;

[0068] S322. According to a preset progress saving standard, respectively obtain and save rendering results of the modeling rendering tasks initiated by the first game process at several different rendering progresses to obtain a second rendering result set.

[0069] Among them, the rendering progress refers to the percentage of completion of the process from raw data to the final visualization result of a scene, model, video or image in the fields of graphics processing, video editing, 3D modeling, animation production, game development, etc. In this embodiment, the rendering progress refers to the percentage of completion of the execution of the modeling rendering task; the second rendering result set includes the rendering results of the modeling rendering tasks initiated by the first game process under several different rendering progress.

[0070] The modeling rendering method based on independent processes also includes:

[0071] S323, matching the task identification parameter of the modeling rendering task initiated by the first game process with the task identification parameter of the modeling rendering task initiated by the second game process, and if the matching results are the same, obtaining the corresponding rendering progress requirement of the modeling rendering task initiated by the second game process;

[0072] In one embodiment, the obtaining of the corresponding rendering progress requirement of the modeling rendering task initiated by the second game process may be achieved by controlling the rendering control process to create a corresponding thread for obtaining.

[0073] In one embodiment, a corresponding matching result is obtained by matching a hash value of the modeling rendering task initiated by the first game process with a hash value of the modeling rendering task initiated by the second game process.

[0074] S324. According to the preset rendering effect control standard, the second rendering result set and the corresponding rendering progress requirements of the modeling rendering task initiated by the second game process, determine whether the rendering progress of the rendering results in the second rendering result set meets the rendering progress requirements, and control the rendering control process to return the corresponding rendering results in the second rendering result set that meet the rendering progress requirements to the second game process.

[0075] In one embodiment, when performing game development and testing, technical personnel in this field need to wait until the character model or scene is completely rendered before they can review and find problems with the corresponding rendering results. At the same time, it is difficult to locate at which stage of the rendering the problem occurs. As a result, there are technical problems of low work efficiency and inability to locate rendering problems during the rendering process. However, this technical problem can be solved by applying steps S321-S324 in the method described in the present invention.

[0076] In this embodiment, first, by acquiring the rendering results of the modeling rendering tasks initiated by the first game process at different rendering progress, a second rendering result set is constructed, and then, by judging whether the rendering progress of the rendering results in the second rendering result set meets the corresponding rendering progress requirements of the modeling rendering tasks initiated by the second game process, the rendering results that meet the rendering progress requirements are returned to the second game process according to the preset return standard (for example, under the premise that the technician pre-sets the rendering progress requirement as a threshold of 25%, the rendering results that are greater than and closest to 25% are returned). Therefore, the method of the present invention can acquire and save the rendering results of the modeling rendering tasks initiated by the first game process at different rendering progress and present them to the second game process, so that the game developers can start several test game processes (i.e., the second game process) without affecting the operation of the first game process, load the rendering results of the modeling rendering tasks initiated by the first game process at different rendering progress, and conduct instant evaluation and comparison of the rendering effects of the character models or scenes. At the same time, if there is a problem with the final rendering result, it is possible to locate the rendering problem at which stage, thereby improving the work efficiency of game development.

[0077] In other embodiments, by applying steps S321-S324 in the method described in the present invention, the rendering results under different rendering progress can also be captured, and the entire process of the special effects of the corresponding rendering results from the initial conception to the final formation can be displayed, helping special effects artists to adjust and optimize the special effects performance, ensure the integration of special effects with the overall picture, and optimize the resource loading strategy to improve the smoothness and picture quality of the game.

[0078] In one embodiment, the method of the present invention further provides some additional steps for storing the rendering result. Figure 4 , Figure 4 A flowchart of the steps of storing and removing rendering results of the modeling rendering method based on an independent process provided by the present invention, wherein the steps specifically include the following steps:

[0079] S80, set shared memory;

[0080] Among them, the shared memory refers to a mechanism that allows multiple threads to directly access the same memory area. In this embodiment, through the setting of the shared memory, the rendering control process can create several new threads to store, call or return corresponding rendering results to the game process.

[0081] S90, controlling the rendering control process to store the rendering result into a specified offset position in the shared memory and setting the corresponding memory segment to be occupied;

[0082] In one embodiment, the requirement of accurately accessing the area of ​​the shared memory is achieved by storing the rendering result in a specified offset position in the shared memory.

[0083] S100: Obtain a return instruction for the rendering result, and control the rendering control process to call a corresponding rendering result from a specified offset position in the shared memory to return.

[0084] In one embodiment, please refer again to Figure 4 The method of the present invention also provides some additional steps. In step S100, a return instruction for the rendering result is obtained, and after the rendering control process is controlled to call the corresponding rendering result from the specified offset position in the shared memory, the rendering result is deleted. The steps specifically include the following steps:

[0085] S110, obtaining the return frequency and the last call time of the rendering result according to a preset polling cycle;

[0086] The return frequency of the rendering result refers to the frequency at which the rendering result is called by the rendering control process and returned to the corresponding game process.

[0087] S120, according to the return frequency of the rendering results and the last call time, combined with the preset resource release standard, control the rendering control process to remove the rendering results that meet the resource release standard from the specified offset position in the corresponding shared memory, and set the corresponding memory segment to free.

[0088] In one embodiment, by applying steps S110-S120 of the method described in the present invention, it is possible to save space resources of shared memory and further improve the fluency of the game.

[0089] In one embodiment, the method of the present invention further provides some additional steps for prioritizing several game processes when thread resources are tight and executing higher priority modeling rendering tasks when several game processes initiate modeling rendering tasks at the same time. Specifically, the steps are as follows:

[0090] The modeling rendering task at least includes an activity indication parameter of the corresponding game process and a specific modeling rendering task to be executed;

[0091] The steps specifically include the following steps:

[0092] S130. When several game processes initiate modeling rendering tasks at the same time, control the rendering control process to obtain activity indication parameters of the corresponding game processes in the modeling rendering tasks initiated by the game processes, and set the game process with the highest activity as the first game process according to the activity indication parameters and preset parameter comparison standards.

[0093] Among them, the activity indication parameter can be binary data with a length of 8 bytes. In one embodiment, each time the game process initiates a modeling rendering task, the activity indication parameter corresponding to itself is increased by 1. In this embodiment, by comparing the sizes of the activity indication parameters corresponding to each game process that simultaneously initiates the modeling rendering task, the game process with the highest activity is determined, and the game process with the highest activity is set as the first game process, and the modeling rendering task initiated by it is executed preferentially.

[0094] In one embodiment, the method of the present invention further provides some other steps for processing the situation where other game processes initiate modeling rendering tasks while the modeling rendering task initiated by the first game process is being executed. The specific steps are as follows:

[0095] S1401, setting the rendering control process as a socket server;

[0096] S1402: When the first game process simultaneously initiates a modeling rendering task, the first game process is set as a socket client;

[0097] S1403, controlling the rendering control process to record the socket connection address and port of each of the first game processes;

[0098] S1404: When the first game process initiates a modeling rendering task and establishes a socket connection, control the first game process to establish a timer;

[0099] S1405, controlling the timer to detect whether the modeling rendering task initiated by the first game process has completed rendering according to a preset detection time interval, and if completed, controlling the timer to be destroyed;

[0100] S1406. According to a preset timer polling cycle, control the rendering control process to detect whether the timer exists. If not, access the modeling rendering task initiated by other game processes.

[0101] In one embodiment, the method of the present invention further provides some additional steps for saving storage resources and storage space of the operating system, and the steps specifically include the following steps:

[0102] S150. According to a preset game process polling cycle, if the rendering control process does not receive a modeling rendering task initiated by any game process within a preset time, control the rendering control process to delete all the rendering results.

[0103] In one embodiment, since the running scripts of the game process and the rendering control process have a large number of identical basic functions, in order to reduce maintenance costs, a method for determining whether the process itself is a rendering control process is set in the running script, so that the two processes run different logical branches, thereby allowing two different processes to run the same running script, and the basic functions in the running script can be reused by two different processes.

[0104] In some other alternative implementations, in addition to the modeling, the interface, complex logical calculations, etc. can all be parsed, rendered and returned by the rendering control process for direct use by the game process.

[0105] Example 2

[0106] Please refer to Figure 5 , Figure 5The present invention provides a schematic diagram of a modeling rendering system based on an independent process, and the present invention also provides a modeling rendering system based on an independent process to implement the steps of the modeling rendering method based on an independent process described in the above embodiment. The modeling rendering system based on an independent process includes: a rendering control process creation unit 1600, a first task identification parameter acquisition unit 1601, a rendering task execution unit 1602, a second task identification parameter acquisition unit 1603, and a task identification parameter matching unit 1604.

[0107] The rendering control process creation unit 1600 is used to create a rendering control process;

[0108] The first task identification parameter acquisition unit 1601 is used to control the rendering control process to acquire the task identification parameter of the modeling rendering task initiated by the first game process in response to the modeling rendering task initiated by the first game process;

[0109] The rendering task execution unit 1602 is used to control the rendering control process to execute the modeling rendering task initiated by the first game process, obtain a rendering result, and return the rendering result to the first game process;

[0110] The second task identification parameter acquisition unit 1603 is used to control the rendering control process to acquire the task identification parameter of the modeling rendering task initiated by the second game process in response to the modeling rendering task initiated by the second game process;

[0111] The task identification parameter matching unit 1604 is used to match the task identification parameters of the modeling rendering task initiated by the first game process with the task identification parameters of the modeling rendering task initiated by the second game process. If the matching results are the same, the rendering control process is controlled to return the rendering result to the second game process.

[0112] It should be noted that the above-mentioned embodiment provides a modeling rendering system based on an independent process. When implementing a modeling rendering method based on an independent process, the division of the above-mentioned functional units is only used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure of the device is divided into different functional units to complete all or part of the functions described above.

[0113] In addition, the modeling rendering system based on an independent process provided in the above embodiment and the modeling rendering method based on an independent process in Example 1 belong to the same concept, and the implementation process thereof is detailed in the method embodiment, i.e., Example 1, and will not be repeated here.

[0114] Compared with the prior art, the method described in the present invention reduces the consumption of resource reading, logic calculation, rendering calculation, etc. of the game process by transferring the logic of loading, calculating and rendering of character models or scenes generated by the game process to the rendering control process, thereby improving the game fluency and reducing the game jam. At the same time, by obtaining the rendering results of the same character model or scene at different scene distances without repeatedly initiating the modeling rendering task, the loss to system performance is reduced. By capturing the rendering results under different rendering progress, it helps developers locate rendering problems and shows the whole process of the special effects of the corresponding rendering results from the initial conception to the final formation. It also helps special effects artists adjust and optimize the special effects performance, ensure the integration of special effects with the overall picture, and optimize the resource loading strategy to improve the game fluency and picture quality, thereby improving the work efficiency of technical personnel in this field.

[0115] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, and the present invention is also intended to include these modifications and modifications.

Claims

1. A modeling rendering method based on an independent process, comprising the following steps: Create a rendering control process; In response to a modeling rendering task initiated by a first game process, controlling the rendering control process to obtain a task identification parameter of the modeling rendering task initiated by the first game process; Controlling the rendering control process to execute the modeling rendering task initiated by the first game process, obtaining a rendering result, and returning the rendering result to the first game process; In response to a modeling rendering task initiated by a second game process, controlling the rendering control process to obtain a task identification parameter of the modeling rendering task initiated by the second game process; The task identification parameters of the modeling rendering task initiated by the first game process are matched with the task identification parameters of the modeling rendering task initiated by the second game process. If the matching results are the same, the rendering control process is controlled to return the rendering result to the second game process. If they do not match, the rendering control process is controlled to execute the modeling rendering task initiated by the second game process, obtain the rendering result, and return the rendering result to the second game process.

2. The modeling rendering method based on independent processes according to claim 1, characterized in that: After the step of controlling the rendering control process to execute the modeling rendering task initiated by the first game process, obtaining a rendering result, and returning the rendering result to the first game process, the step further includes: In response to a second shape rendering task initiated by the first game process, controlling the rendering control process to obtain a task identification parameter of the second shape rendering task initiated by the first game process; The task identification parameter of the modeling rendering task initiated by the first game process is matched with the task identification parameter of the second modeling rendering task initiated by the first game process. If the matching results are the same, the rendering control process is controlled to return the rendering result to the first game process again.

3. The modeling rendering method based on independent processes according to claim 1, characterized in that: The step of controlling the rendering control process to execute the modeling rendering task initiated by the first game process to obtain the rendering result includes: Controlling the rendering control process to execute the modeling rendering task initiated by the first game process; According to a preset precision preservation standard, respectively obtaining rendering results of the modeling rendering task initiated by the first game process at a number of different rendering precisions to obtain a first rendering result set; The modeling rendering method based on independent processes also includes: Matching the task identification parameter of the modeling rendering task initiated by the first game process with the task identification parameter of the modeling rendering task initiated by the second game process, and if the matching results are the same, obtaining the corresponding rendering accuracy requirement of the modeling rendering task initiated by the second game process; According to the preset rendering accuracy control standard, the first rendering result set and the corresponding rendering accuracy requirements of the modeling rendering task initiated by the second game process, it is determined whether the rendering accuracy of the rendering results in the first rendering result set meets the rendering accuracy requirements, and the rendering control process is controlled to return the corresponding rendering results in the first rendering result set that meet the rendering accuracy requirements to the second game process.

4. The modeling rendering method based on independent processes according to claim 1, characterized in that: The step of controlling the rendering control process to execute the modeling rendering task initiated by the first game process to obtain the rendering result includes: Controlling the rendering control process to execute the modeling rendering task initiated by the first game process; According to a preset progress saving standard, respectively obtaining and saving rendering results of the modeling rendering tasks initiated by the first game process at a number of different rendering progresses to obtain a second rendering result set; The modeling rendering method based on independent processes also includes: Matching the task identification parameter of the modeling rendering task initiated by the first game process with the task identification parameter of the modeling rendering task initiated by the second game process, and if the matching results are the same, obtaining the corresponding rendering progress requirement of the modeling rendering task initiated by the second game process; According to the preset rendering effect comparison standard, the second rendering result set and the corresponding rendering progress requirements of the modeling rendering task initiated by the second game process, it is determined whether the rendering progress of the rendering results in the second rendering result set meets the rendering progress requirements, and the rendering control process is controlled to return the corresponding rendering results in the second rendering result set that meet the rendering progress requirements to the second game process.

5. The modeling rendering method based on independent processes according to any one of claims 1 to 4, characterized in that: The task identification parameter is a hash value.

6. The modeling rendering method based on independent processes according to any one of claims 1 to 4, characterized in that: The modeling rendering method based on independent processes also includes: Set up shared memory; Controlling the rendering control process to store the rendering result into a specified offset position in the shared memory and setting the corresponding memory segment to be occupied; A return instruction for the rendering result is obtained, and the rendering control process is controlled to call the corresponding rendering result from a specified offset position in the shared memory to return.

7. The modeling rendering method based on independent processes according to any one of claim 6, characterized in that: After obtaining a return instruction for the rendering result and controlling the rendering control process to call the corresponding rendering result return from a specified offset position in the shared memory, the step further includes: According to a preset polling cycle, obtain the return frequency of the rendering result and the last call time; According to the return frequency of the rendering results and the last call time, combined with the preset resource release standard, the rendering control process is controlled to remove the rendering results that meet the resource release standard from the specified offset position in the corresponding shared memory, and the corresponding memory segment is set to free.

8. The modeling rendering method based on independent processes according to any one of claims 1 to 4, characterized in that: The modeling rendering task at least includes an activity indication parameter of the corresponding game process and a modeling rendering task to be executed; The modeling rendering method based on independent processes also includes: when several game processes initiate modeling rendering tasks at the same time, controlling the rendering control process to obtain the activity indication parameters of the corresponding game processes in the modeling rendering tasks initiated by the game processes, and setting the game process with the highest activity as the first game process according to the activity indication parameters and preset parameter comparison standards.

9. The modeling rendering method based on independent processes according to any one of claims 1 to 4, characterized in that: The modeling rendering method based on independent processes also includes: According to a preset game process polling cycle, if the rendering control process does not receive a modeling rendering task initiated by any game process within a preset time, the rendering control process is controlled to delete all the rendering results.

10. A modeling rendering system based on independent processes, characterized in that: include: A rendering control process creation unit, used for creating a rendering control process; A first task identification parameter acquisition unit, configured to control the rendering control process to acquire a task identification parameter of the modeling rendering task initiated by the first game process in response to the modeling rendering task initiated by the first game process; A rendering task execution unit, used to control the rendering control process to execute the modeling rendering task initiated by the first game process, obtain a rendering result, and return the rendering result to the first game process; A second task identification parameter acquisition unit, configured to control the rendering control process to acquire a task identification parameter of the modeling rendering task initiated by the second game process in response to the modeling rendering task initiated by the second game process; A task identification parameter matching unit is used to match the task identification parameters of the modeling rendering task initiated by the first game process with the task identification parameters of the modeling rendering task initiated by the second game process. If the matching results are the same, the rendering control process is controlled to return the rendering result to the second game process. If they do not match, the rendering control process is controlled to execute the modeling rendering task initiated by the second game process, obtain the rendering result, and return the rendering result to the second game process.