A method and apparatus for model rendering

By acquiring model data from different shaders and converting it into unified shader data during the creation of character scene model assets, and then rendering it in conjunction with the lighting environment of a high dynamic range image, the problem of inconsistent model assets was solved, achieving unified rendering and usability of model assets.

CN115147522BActive Publication Date: 2025-10-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210779857.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-04
Publication Date
2025-10-28
Estimated Expiration
2042-07-04

AI Technical Summary

Technical Problem

During the creation of character and scene model assets, the lighting environment settings of models created by different artists in different shaders are inconsistent, resulting in large differences in the final effect, making it impossible to unify and put them into the subsequent production stage.

Method used

By acquiring model data from different shaders, converting it into unified shader data, and then rendering it using lighting environment data preset by a high dynamic range image, unified candidate asset data is obtained.

Benefits of technology

It achieves unified rendering of models in different shaders, avoiding the problem of being unable to go into production due to inconsistent assets, and ensuring the uniformity and usability of model assets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115147522B_ABST
    Figure CN115147522B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a method and apparatus for model rendering, comprising: obtaining first shader data for multiple target models created in different shaders; converting the first shader data corresponding to each target model into second shader data in the target shader; obtaining target lighting environment data preset based on a high dynamic range image; and rendering the target model according to the target lighting environment data and the second shader data to obtain candidate asset data. Through embodiments of the present invention, unified rendering of multiple models in different shaders according to target lighting environment data preset based on a high dynamic range image is achieved, resulting in a unified asset, thus avoiding the problem of assets being unable to be put into production due to inconsistent assets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of games, and in particular to a method and apparatus for model rendering. Background Technology

[0002] In computer graphics (CG) animation production, in order to provide users with a better experience, animators focus on how to make character, scene, and model assets more aesthetically pleasing and artistic.

[0003] During the character scene model asset development process, different artists create different character models in different shaders. In order to create more aesthetically pleasing artistic renderings, the lighting environment settings for the two characters during the visual development stage may be inconsistent. As a result, the following problem may occur: the final asset effect looks very unified and harmonious, but when the two characters are placed under the same lighting environment setting, the final effect of the characters is very different, which makes the character scene model asset completely unusable in subsequent stages, i.e., there is a problem of inconsistent model asset effects. Summary of the Invention

[0004] In view of the above problems, a method and apparatus for model rendering are proposed to overcome or at least partially solve the above problems, comprising:

[0005] A method for rendering a model, the method comprising:

[0006] Obtain the first shader data for multiple target models created in different shaders;

[0007] For each target model, the first shader data corresponding to the target model is converted into the second shader data in the target shader;

[0008] Acquire target lighting environment data based on a preset high dynamic range brightness image;

[0009] The target model is rendered according to the target lighting environment data and the second shader data to obtain candidate asset data.

[0010] Optionally, the high dynamic range brightness image data is used to preset lighting environment data for multiple time periods and / or multiple angles.

[0011] Optionally, the target model is created by a first shader, and the step of converting the first shader data corresponding to the target model into second shader data in the target shader includes:

[0012] Determine the preset shader data corresponding to the first shader;

[0013] Determine the first shader data corresponding to the target model;

[0014] The offset data is determined based on the preset shader data and the first shader data;

[0015] Based on the offset data, the first shader data is converted into second shader data in the target shader.

[0016] Optionally, it also includes:

[0017] Get preset texture data;

[0018] Determine the target texture data corresponding to the candidate asset data;

[0019] The target texture data is verified based on the preset texture data in order to determine the target asset data from the candidate asset data.

[0020] Optionally, the preset texture data includes first texture data, and the step of verifying the target texture data based on the preset texture data to determine the target asset data from the candidate asset data includes:

[0021] The target texture data is preliminarily verified based on the first texture data;

[0022] Target asset data is determined from the candidate asset data that has passed the preliminary verification.

[0023] Optionally, the preset texture data further includes second texture data, and the step of determining the target asset data from the candidate asset data that has passed the preliminary verification includes:

[0024] For the candidate asset data that has passed the initial verification, a second round of verification is performed on the target texture data based on the second texture data;

[0025] The candidate asset data that passes the second round of verification will be identified as the target asset data.

[0026] Optionally, the first texture data includes any one or more of the following:

[0027] Color data, metallicity data, roughness data, self-illumination data, normal data, UV inspection;

[0028] The second texture data includes any one or more of the following:

[0029] Pixel-level brightness range data, brightness median, brightness mean, brightness mode, and RGB saturation distribution.

[0030] Optionally, the method further includes:

[0031] The target model is rendered based on the target asset data.

[0032] An apparatus for model rendering, the apparatus comprising:

[0033] The shader data acquisition module is used to acquire the first shader data of multiple target models created in different shaders.

[0034] The shader data conversion module is used to convert the first shader data corresponding to each target model into the second shader data in the target shader for each target model.

[0035] The illumination environment data acquisition module is used to acquire target illumination environment data based on a preset high dynamic range brightness image;

[0036] The rendering module is used to render the target model according to the target lighting environment data and the second shader data to obtain candidate asset data.

[0037] A server includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the model rendering method described above.

[0038] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the model rendering method described above.

[0039] The embodiments of the present invention have the following advantages:

[0040] In this embodiment of the invention, by acquiring the first shader data of multiple target models created in different shaders, the first shader data corresponding to each target model can be converted into the second shader data in the target shader. Then, target lighting environment data based on a preset high dynamic range image is acquired, and the target model is rendered according to the target lighting environment data and the second shader data to obtain candidate asset data. This achieves unified rendering of multiple models in different shaders, avoiding the problem of assets being unable to be put into production due to inconsistent assets. Attached Figure Description

[0041] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1a These are renderings of model assets obtained independently by different artists;

[0043] Figure 1b It is Figure 1a Schematic diagram of lighting environment settings for mid-level assets;

[0044] Figure 1c It is Figure 1a Comparison chart of the effects of Chinese assets being put into production;

[0045] Figure 2 This is a flowchart of the steps of a model rendering method provided in an embodiment of the present invention;

[0046] Figure 3 This is a flowchart of another model rendering method provided in an embodiment of the present invention;

[0047] Figure 4a This is a flowchart of another model rendering method provided in an embodiment of the present invention;

[0048] Figure 4b This is a rendering of a multi-character effect provided in an embodiment of the present invention;

[0049] Figure 5 This is a schematic diagram of the structure of a model rendering apparatus provided in an embodiment of the present invention. Detailed Implementation

[0050] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0051] In the animation production process, due to the various model assets involved, it is usually necessary for multiple people to collaborate to complete the model asset production. For different models, each artist has subjective judgment issues during the production process, which ultimately makes the model present a better effect. In this process, different models have different lighting environment settings in the visual development stage. When the models are finally put into generation and the same lighting environment settings are used, there will be large differences between the model assets, making the model assets unusable.

[0052] For example, Figure 1a The images in the middle are model assets rendered by different artists. The left image is character model A, and the right image is character model B. The two are visually very similar.

[0053] Figure 1bThe middle section shows the lighting environment settings for character model A and character model B, with the left side corresponding to character model A and the right side corresponding to character model B. Figure 1b As can be seen from the lighting environment settings presented, the lighting environment settings of character model A and character model B are different.

[0054] like Figure 1c As shown, when character model A and character model B are put into production, placing them in the same lighting environment results in significant differences in their actual effects. Consequently, character models A and B cannot be used and require readjustment.

[0055] To address the issue of inconsistent assets created by different artists, the invention converts the shader data of models created by artists using different shaders, and then renders the character models using high dynamic range images as a unified lighting environment setting, thereby obtaining unified and usable assets.

[0056] Reference Figure 2 The diagram illustrates a flowchart of a model rendering method according to an embodiment of the present invention, which may specifically include the following steps:

[0057] Step 201: Obtain the first shader data of multiple target models created in different shaders;

[0058] In one example, the target model can be a model in the game, which can include character models, environment models, etc.

[0059] Character models can be player character models and / or NPC character models within the game; environment models can be the game environment in which player models and / or NPC character models reside, specifically models representing the natural environment such as buildings, plants, and trees. A single game project may involve a large number of models, requiring the participation of multiple artists (i.e., model makers). When different artists participate in model creation, they can use their respective shaders. These independently created target models constitute the original asset data of the game project. Because the original asset data is created independently using different shaders, there is a problem of asset inconsistency, making it difficult to apply to subsequent production. Therefore, it is necessary to obtain the original asset data of these multiple target models created in different shaders, and then process the original asset data to obtain unified assets for easier subsequent production.

[0060] The original asset data may include the first shader data from the target model.

[0061] During the visual development phase of the game, after multiple artists create multiple target models using their respective shaders, they can import these target models into the server. The server can then obtain the first shader data for each target model and process it to unify the multiple target models, resulting in a unified asset.

[0062] Step 202: For each target model, convert the first shader data corresponding to the target model into the second shader data in the target shader;

[0063] The target shader is a shader that unifies the processing of multiple target models.

[0064] After obtaining the first shader data, each target model corresponds to one first shader data. The first shader data can be converted into the second shader data in the target shader, thereby achieving unified processing of shader data.

[0065] Step 203: Obtain target lighting environment data based on the preset high dynamic range brightness image;

[0066] When processing multiple target models in parallel, preset tools can be loaded to obtain lighting environment settings, i.e., preset target lighting environment data, which can be determined based on high dynamic range images.

[0067] The lighting environment setting utilizes the high dynamic range (HDR) image synthesized using multiple exposure techniques in photography. When the brightness of the HDR image is reduced, areas of pure white exposure become darker while still retaining the correct image information. Conversely, when the brightness of the HDR image is increased, areas of pure black become brighter while still showing detail in the shadows. HDR images record lighting environment information from the real world, and their light and shadow, color, and reflection are all physically accurate.

[0068] By using a lighting environment setting, there is no need to manually create lighting using software-provided lighting devices. Moreover, the lighting information using images with a high dynamic range of brightness will not affect the source texture. The texture can be attached to the shader, and the target lighting environment data can be rendered by the shader, thereby avoiding the lighting environment from affecting the inherent color of the asset.

[0069] In one embodiment of the present invention, the high dynamic range brightness image data is used to preset lighting environment data for multiple time periods and / or multiple angles.

[0070] High dynamic range (HRRL) image data has a wide range of applications. It allows setting lighting environment data for different time periods and angles. By pre-setting lighting environment data for multiple time periods and angles, the versatility of assets can be improved.

[0071] The lighting environment data can include lighting environment data of types such as outdoor, indoor, dusk, and night.

[0072] It should be noted that step 203 can occur before step 201, simultaneously with step 201, or after step 201.

[0073] Step 204: Render the target model according to the target lighting environment data and the second shader data to obtain candidate asset data.

[0074] After determining the target lighting data and the second shader data, multiple target models can be rendered according to the target lighting environment data and the second shader data to obtain candidate asset data. The lighting environment data of the final candidate asset data is consistent, so the candidate asset data is a unified asset.

[0075] In this embodiment of the invention, by acquiring the first shader data of multiple target models created in different shaders, the first shader data corresponding to each target model is converted into the second shader data in the target shader. Then, target lighting environment data based on a high dynamic range image is acquired, and the target model is rendered according to the target lighting environment data and the second shader data to obtain candidate asset data. This achieves unified rendering of multiple models in different shaders, avoiding the problem of assets being unable to be put into production due to inconsistent assets.

[0076] Reference Figure 3 The diagram illustrates a flowchart of another model rendering method provided by an embodiment of the present invention, which may specifically include the following steps:

[0077] Step 301: Obtain the first shader data of multiple target models created in different shaders;

[0078] Step 302: For each target model, determine the preset shader data corresponding to the first shader, wherein the target model is created by the first shader;

[0079] When an artist creates a target model using the first shader, they can obtain the first shader data of the target model by adjusting the preset shader data in the first shader.

[0080] When it is necessary to unify the assets of multiple target models, shader data conversion can be performed. Specifically, for each completed target model, the preset shader data in the first shader can be determined.

[0081] Step 303: Determine the first shader data corresponding to the target model;

[0082] After the artist completes the target model, they can obtain the first shader data corresponding to the target model.

[0083] Step 304: Determine offset data based on the preset shader data and the first shader data;

[0084] After determining the preset shader data and the first shader data, the preset shader data and the first shader data can be compared to obtain offset data. The offset data can be used to determine the shader properties modified by the artist.

[0085] Step 305: Based on the offset data, convert the first shader data into second shader data in the target shader.

[0086] After determining the offset data, the first shader data can be converted into the second shader data in the target shader data based on the offset data.

[0087] Specifically, the preset shader data corresponding to the target shader can be determined, and the data can be adjusted according to the offset data to obtain the converted second shader data.

[0088] Step 306: Obtain target lighting environment data based on the preset high dynamic range brightness image;

[0089] Step 307: Render the target model according to the target lighting environment data and the second shader data to obtain candidate asset data.

[0090] In this embodiment of the invention, by determining the offset data between the first shader data of the target model and the preset shader data, the shader data is transformed according to the offset data, and then rendered according to the preset lighting environment data to obtain candidate asset data, thus achieving asset unification.

[0091] Reference Figure 4a The diagram illustrates a flowchart of another model rendering method provided by an embodiment of the present invention, which may specifically include the following steps:

[0092] Step 401: Obtain the first shader data of multiple target models created in different shaders;

[0093] Step 402: For each target model, convert the first shader data corresponding to the target model into the second shader data in the target shader;

[0094] Step 403: Obtain target lighting environment data based on the preset high dynamic range brightness image;

[0095] Step 404: Render the target model according to the target lighting environment data and the second shader data to obtain candidate asset data.

[0096] Step 405: Obtain preset texture data;

[0097] In practical applications, when developing and producing game projects, the attributes of the required assets can be set according to the style and requirements of the game project to obtain standardized assets. The preset texture data is the relevant data for setting the texture attributes of the assets.

[0098] In one embodiment of the present invention, the preset texture data may include first texture data and / or second texture data, wherein the first texture data may include any one or more of the following:

[0099] Color data, metallicity data, roughness data, self-illumination data, normal data, UV inspection;

[0100] The second texture data may include any one or more of the following:

[0101] Pixel-level brightness range data, brightness median, brightness mean, brightness mode, and RGB saturation distribution.

[0102] After obtaining candidate asset data, the candidate asset data can be checked (verified) to further confirm whether the assets can be used for subsequent generation.

[0103] The candidate asset data is examined, specifically the texture data, to determine whether it meets the requirements for texture data in actual production.

[0104] Therefore, preset texture data can be obtained, which can be used to indicate whether the texture data is reasonable and whether it meets the requirements of production.

[0105] The preset texture data can be divided into first texture data and second texture data. The first texture data can be used to indicate whether the texture data is reasonable. The first texture data can include color data, metallicity data, roughness data, self-illumination data, normal data, UV check, etc.

[0106] The first texture data can be set as follows:

[0107] Basecolor—There will be no areas with a brightness of 0 or 1, except for the Emission area, which can be 0.

[0108] Metallism – Only areas with a brightness of 0 and 1.

[0109] Roughness – There will be no areas with a brightness of 0 or 1, except for the Emission area, which can be 0.

[0110] The Emission (self-illumination) — Basecolor and Metallness areas must not have brightness values.

[0111] Normal (normal line) — Data will be present wherever the asset exists, and the data is not 0 or 1. A normal line value of 0 indicates that the model face orientation is incorrect.

[0112] UVcheck (UV check) — Data will be generated wherever an asset exists, and the data will not be 0. A UV value of 0 indicates that the model has no UVs.

[0113] Textures directly affect the visual effect of assets in the current frame. Second texture data can be used to indicate whether texture data meets production requirements. Second texture data may include:

[0114] Pixel-level brightness range data, brightness median, brightness mean, brightness mode, and RGB saturation distribution.

[0115] Step 406: Determine the target texture data corresponding to the candidate asset data;

[0116] After rendering, candidate asset data can be obtained, and then the target texture data corresponding to the candidate asset data can be determined.

[0117] Step 407: Verify the target texture data based on the preset texture data to determine the target asset data from the candidate asset data.

[0118] In one embodiment of the present invention, the method further includes: rendering the target model based on the target asset data.

[0119] In practical applications, target asset data refers to the asset data of a game scene that can be put into production. For example, a game scene can be built using the prepared target asset data. Standardized target asset data can ensure that the style of the constructed game scene is consistent.

[0120] After obtaining the target asset data, the target model can be rendered based on the target asset data.

[0121] After determining the preset texture data and target texture data, the target texture data can be used as a benchmark to verify whether it meets the requirements of the preset texture data or is within the range specified by the preset texture data. This verifies the target texture data, determining its rationality and suitability for subsequent production. The candidate asset data that passes the texture data verification becomes the target asset data. The target asset data can also be pushed to artists or reviewers.

[0122] In practical applications, the target model can be iteratively processed based on the production process of the aforementioned target asset data until a unified target asset data suitable for subsequent generation is obtained.

[0123] In one embodiment of the present invention, step 407 may include the following sub-steps:

[0124] Sub-step 4071: Perform preliminary verification of the target texture data based on the first texture data.

[0125] In practical applications, the target texture data can be initially verified using the first texture data. The specific verification method is as follows:

[0126] Basecolor:

[0127] Determine if there are areas with a brightness of 0 and 1 in the base color data of the target texture data. If not, the base color verification is considered successful. If it exists, determine if the current texture area is a self-illuminating area. If so, the base color verification is considered successful. If not, the base color verification is considered unsuccessful.

[0128] Metallization:

[0129] Determine if the metallicity of the target texture data only includes areas with a brightness of 0 and 1. If so, the metallicity verification passes; otherwise, the metallicity verification fails.

[0130] Roughness:

[0131] Determine if there are areas with brightness values ​​of 0 and 1 in the roughness data of the target texture data. If not, the roughness verification is considered successful. If they exist, determine if the current texture area is entirely self-illuminating. If so, the roughness verification is considered successful. If not, the roughness verification is considered unsuccessful.

[0132] Emission (self-illumination);

[0133] Determine if there are brightness values ​​in the Basecolor and Metalness areas of the target texture data. If they exist, the self-illumination verification fails; otherwise, the self-illumination verification succeeds.

[0134] Normal (normal line):

[0135] The system checks if normal data exists in the texture data. If no normal data exists, the normal verification fails. If normal data exists, the system checks if the normal data is 0 or 1. If it is, the normal verification fails; otherwise, the normal verification succeeds.

[0136] UV check:

[0137] The system checks whether UV data exists in the texture data. If UV data does not exist, the UV verification fails. If UV data exists, the system checks whether the UV data is 0. If it is, the UV verification fails; otherwise, the UV verification succeeds.

[0138] Sub-step 4072, determining the target asset data from the candidate asset data that has passed the preliminary verification. In one embodiment of the present invention, sub-step 4072 may specifically include:

[0139] For the candidate asset data that has passed the initial verification, the target texture data is verified a second time based on the second texture data; the candidate asset data that has passed the second verification is determined as the target asset data.

[0140] In practical applications, after preliminary verification of the texture data, candidate asset data that passes the preliminary verification can be directly identified as the required target asset data. Alternatively, a second verification can be performed using the second texture data to determine the target asset data that can be used for production.

[0141] Specifically, after the initial verification of the target texture data, the brightness range, brightness median, brightness mean, brightness mode, etc., can be further calculated based on the target texture data.

[0142] The minimum, maximum, and average values ​​of the brightness range can be obtained directly from the brightness data. In practical applications, to calculate the median, mode, and RGB saturation distribution of brightness, the texture can be first split into pixels at each level. For example, a 2048*2048 texture can be split into 2048 rows of data in both the horizontal and vertical columns, down to the individual pixel. The brightness and color data of an individual pixel are unique constants, thus accurately obtaining various data for that pixel. Then, all pixel values ​​can be properly distinguished for median, mode, and RGB saturation.

[0143] like Figure 4bAs shown, this is the unified asset data obtained by applying the solution of this invention. The self-developed tool can quickly load the lighting environment settings for different time periods and then perform dynamic rendering checks. Dynamic rendering checks can detect changes in both lighting (lighting environment settings) and characters.

[0144] By verifying candidate asset data, art issues can be quantified. Data for the same game project can be reasonably divided into relatively stable ranges. When large-scale asset data appears, artists can be notified to make corresponding adjustments to the asset data.

[0145] In this embodiment of the invention, after obtaining unified candidate asset data, the target asset data that can be used for subsequent production is determined by checking the candidate asset data, thereby obtaining unified asset data that can be used for production. At the same time, a unified asset iteration mechanism can be realized by preset texture data, so as to avoid inconsistent asset effects caused by subjective judgment when manually modifying shaders or even textures in a data-driven form.

[0146] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0147] Reference Figure 5 The diagram shows a schematic representation of a model rendering apparatus according to an embodiment of the present invention, which may specifically include the following modules:

[0148] The first shader data acquisition module 501 is used to acquire the first shader data of multiple target models made in different shaders;

[0149] Shader data conversion module 502 is used to convert the first shader data corresponding to the target model into the second shader data in the target shader for each target model;

[0150] The illumination environment data acquisition module 503 is used to acquire target illumination environment data based on a preset high dynamic brightness image;

[0151] The rendering module 504 is used to render the target model according to the target lighting environment data and the second shader data to obtain candidate asset data.

[0152] In one embodiment of the present invention, the high dynamic range brightness image data is used to preset lighting environment data for multiple time periods and / or multiple angles.

[0153] In one embodiment of the present invention, the target model is created by a first shader, and the shader data conversion module 502 may include:

[0154] The preset shader data determination submodule is used to determine the preset shader data corresponding to the first shader;

[0155] The first shader data determination submodule is used to determine the first shader data corresponding to the target model from the original asset data;

[0156] The offset data determination submodule is used to determine offset data based on the preset shader data and the first shader data;

[0157] A conversion submodule is used to convert the first shader data into second shader data in the target shader based on the offset data.

[0158] In one embodiment of the present invention, the device may further include:

[0159] The preset texture data determination module is used to obtain preset texture data;

[0160] The target texture data determination module is used to determine the target texture data corresponding to the candidate asset data;

[0161] The verification module is used to verify the target texture data based on the preset texture data in order to determine the target asset data from the candidate asset data.

[0162] In one embodiment of the present invention, the preset texture data includes first texture data, and the verification module further includes:

[0163] The preliminary verification submodule is used to perform preliminary verification of the target texture data based on the first texture data;

[0164] The target asset data determination submodule is used to determine the target asset data from the candidate asset data that has passed the preliminary verification.

[0165] In one embodiment of the present invention, the preset texture data further includes second texture data, and the target asset data determination submodule includes:

[0166] The second-round verification unit is used to perform a second-round verification on the target texture data based on the second texture data for the candidate asset data that has passed the initial verification.

[0167] The target asset data determination unit is used to determine the candidate asset data that has passed the second round of verification as the target asset data.

[0168] In one embodiment of the present invention, the first texture data may include any one or more of the following:

[0169] Color data, metallicity data, roughness data, self-illumination data, normal data, UV inspection;

[0170] The second texture data may include any one or more of the following:

[0171] Pixel-level brightness range data, brightness median, brightness mean, brightness mode, and RGB saturation distribution.

[0172] In one embodiment of the present invention, the target asset data is used to construct a game scene.

[0173] In this embodiment of the invention, by acquiring the first shader data of multiple target models created in different shaders, the first shader data corresponding to each target model is converted into the second shader data in the target shader. Then, target lighting environment data based on a high dynamic range image is acquired, and the target model is rendered according to the target lighting environment data and the second shader data to obtain candidate asset data. This achieves unified rendering of multiple models in different shaders, avoiding the problem of assets being unable to be put into production due to inconsistent assets.

[0174] An embodiment of the present invention also provides a server, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the steps of the above-described model rendering method.

[0175] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described model rendering method.

[0176] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0177] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0178] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0179] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0180] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0181] These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable terminal equipment, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0182] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0183] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0184] The above provides a detailed description of the model rendering method and apparatus. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for rendering a model, characterized in that, The method includes: Obtain the first shader data for multiple target models created in different shaders; For each target model, the first shader data corresponding to the target model is converted into the second shader data in the target shader; Acquire target lighting environment data based on a high dynamic range image; wherein, the high dynamic range image is used to preset lighting environment data for multiple time periods and / or multiple angles; The target model is rendered according to the target lighting environment data and the second shader data to obtain candidate asset data; The target model is created by a first shader, and the step of converting the first shader data corresponding to the target model into second shader data in the target shader includes: Determine the preset shader data corresponding to the first shader; Determine the first shader data corresponding to the target model; The offset data is determined based on the preset shader data and the first shader data; Based on the offset data, the first shader data is converted into second shader data in the target shader.

2. The method according to claim 1, characterized in that, Also includes: Get preset texture data; Determine the target texture data corresponding to the candidate asset data; The target texture data is verified based on the preset texture data in order to determine the target asset data from the candidate asset data.

3. The method according to claim 2, characterized in that, The preset texture data includes first texture data. The step of verifying the target texture data based on the preset texture data to determine the target asset data from the candidate asset data includes: The target texture data is preliminarily verified based on the first texture data; Target asset data is determined from the candidate asset data that has passed the preliminary verification.

4. The method according to claim 3, characterized in that, The preset texture data also includes second texture data, and the step of determining the target asset data from the candidate asset data that has passed the preliminary verification includes: For the candidate asset data that has passed the initial verification, a second round of verification is performed on the target texture data based on the second texture data; The candidate asset data that passes the second round of verification will be identified as the target asset data.

5. The method according to claim 4, characterized in that, The first texture data includes any one or more of the following: Color data, metallicity data, roughness data, self-illumination data, normal data, UV inspection; The second texture data includes any one or more of the following: Pixel-level brightness range data, brightness median, brightness mean, brightness mode, and RGB saturation distribution.

6. The method according to claim 2, characterized in that, The method further includes: The target model is rendered based on the target asset data.

7. A model rendering apparatus, characterized in that, The device includes: The shader data acquisition module is used to acquire the first shader data of multiple target models created in different shaders. The shader data conversion module is used to convert the first shader data corresponding to each target model into the second shader data in the target shader for each target model. The illumination environment data acquisition module is used to acquire target illumination environment data based on a preset high dynamic range brightness image; the high dynamic range brightness image is used to preset illumination environment data for multiple time periods and / or multiple angles. The rendering module is used to render the target model according to the target lighting environment data and the second shader data to obtain candidate asset data; The target model is created by the first shader, and the shader data conversion module includes: The preset shader data determination submodule is used to determine the preset shader data corresponding to the first shader; The first shader data determination submodule is used to determine the first shader data corresponding to the target model; The offset data determination submodule is used to determine offset data based on the preset shader data and the first shader data; A conversion submodule is used to convert the first shader data into second shader data in the target shader based on the offset data.

8. A server, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method of model rendering as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method of model rendering as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Three-dimensional virtual image displaying method, device, terminal and storage medium

    CN109427083A

  • Mapping processing method and device

    CN111489417A

  • Coloring data processing method and device based on game engine and electronic equipment

    CN111813380A