Dynamic effect model rendering method, device, electronic device and storage medium

By changing the transparency parameters of the target material ball over time, dynamic effect rendering is performed using texture maps, which solves the problem of large amount of dynamic effect rendering calculations in the game and improves rendering efficiency and authenticity.

CN114937103BActive Publication Date: 2025-09-02NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210601263.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-09-02
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

When simulating dynamic effects in games, the existing technology requires the production of a large number of special effects screens, resulting in large calculations, long-term time, high performance requirements, and low rendering speed.

Method used

The transparency parameters carried by the target material ball change over time, use texture maps to render dynamic effects to avoid animation effects, and adjust the transparency parameters of the material ball to simulate dynamic effects.

Benefits of technology

It reduces the amount of calculation during the rendering process of terminal devices, improves rendering efficiency, reduces the difficulty of making dynamic effects, and maintains the authenticity of the rendering effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114937103B_ABST
    Figure CN114937103B_ABST
Patent Text Reader

Abstract

The present application provides a model rendering method, device, electronic device and storage medium with dynamic effects. The method obtains the initial transparency parameter of the initial material ball based on the material information of the target model; adjusts the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes with time; wherein the texture map includes a dynamic texture map; the dynamic texture map is used to render the surface texture of the target model with dynamic effects; and the target model is rendered using the target material ball to obtain the dynamic effect of the target model. In this way, without the need to produce animation special effects, the target model with dynamic effects can be simulated by using the time-varying transparency parameter carried by the target material ball. In this way, by avoiding the use of animation special effects, the example consumption in the terminal device rendering process is reduced, and the difficulty of producing dynamic effects is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for rendering a model with dynamic effects. Background Art

[0002] In order to simulate dynamic scenes in games, special effects animation is usually chosen to achieve this. To achieve dynamic effects through special effects animation, it is necessary to call relevant models and use a large number of particles. Moreover, as the dynamic effects continue to change, multiple special effects scenes need to be produced to achieve the change in style.

[0003] During the rendering process, as the number of special effects images increases, the number of computing instances required by the terminal device also increases. Rendering in this way places extremely high requirements on the performance of the terminal device. In addition, due to the large number of special effects images, the rendering time required by the terminal device is longer and the rendering rate is lower. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a model rendering method, device, electronic device and storage medium with dynamic effects. Without the need to produce animation special effects, the target model with dynamic effects can be simulated by using the time-varying transparency parameters carried by the target material ball. In this way, by avoiding the use of animation special effects, the example consumption in the rendering process of the terminal device is reduced, and the difficulty of producing dynamic effects is reduced.

[0005] The present invention provides a method for rendering a model with dynamic effects, which includes:

[0006] According to the material information of the target model, obtain the initial transparency parameter of the initial material ball;

[0007] Based on the pixel parameters of the texture map, the initial transparency parameter of the initial material ball is adjusted to obtain a target material ball whose transparency parameter changes over time; wherein the texture map includes a dynamic texture map; the dynamic texture map is used to perform dynamic effect rendering on the surface texture of the target model;

[0008] The target model is rendered using the target material ball to obtain a dynamic effect of the target model.

[0009] In a possible implementation, the texture map further includes a static texture map; and adjusting the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time includes:

[0010] Using the first pixel parameter of the static texture map, adjusting the initial transparency parameter of the initial material ball to obtain a first material ball with the first transparency parameter; wherein the static texture map is used to perform static pattern rendering on the surface texture of the target model;

[0011] The second pixel parameter of the dynamic texture map that changes with time is used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0012] In one possible implementation, the static texture map includes a foreground pattern map; and using the first pixel parameter of the static texture map to adjust the initial transparency parameter of the initial material ball to obtain the first material ball having the first transparency parameter includes:

[0013] Determine the transparent area and the non-transparent area in the initial material ball according to the surface texture of the target model;

[0014] The initial transparency parameter of the non-transparent area is adjusted using the first pixel parameter of the foreground pattern map to obtain a first material ball with the first transparency parameter; wherein the foreground pattern map is used to render the foreground pattern in the surface texture of the target model.

[0015] In a possible implementation, adjusting the initial transparency parameter of the initial material ball using the first pixel parameter of the foreground pattern map to obtain the first material ball having the first transparency parameter includes:

[0016] Using the first pixel parameter of the foreground pattern map, adjusting the initial transparency parameter in the non-transparent area to obtain a second material ball with a second transparency parameter;

[0017] Using a first transparency difference at each pixel position between the initial transparency parameter and the second transparency parameter, the initial material ball and the second material ball are synthesized to obtain a third material ball with a third transparency parameter;

[0018] Inverting the initial transparency parameter of the initial material ball to obtain an inverted material ball with inverted transparency parameter;

[0019] Using a second transparency difference at each pixel position between the second transparency parameter and the reverse transparency parameter, the second material ball and the reverse material ball are synthesized to obtain a fourth material ball with a fourth transparency parameter;

[0020] Using the first maximum transparency value of each pixel position between the third transparency parameter and the fourth transparency parameter, the third material ball and the fourth material ball are synthesized to obtain a fifth material ball with a fifth transparency parameter;

[0021] The second material ball and the fifth material ball are synthesized using the second maximum transparency value of each pixel position between the second transparency parameter and the fifth transparency parameter to obtain a first material ball with a first transparency parameter.

[0022] In one possible implementation, the static texture map includes an environment map, and the first pixel parameters include grayscale pixel parameters and / or pixel parameters of any color channel; and using the first pixel parameters of the static texture map to adjust the initial transparency parameters of the initial material ball to obtain the first material ball having the first transparency parameter includes:

[0023] The initial transparency parameter of the initial material ball is adjusted using the grayscale pixel parameters of the environment map or the pixel parameters of any color channel to obtain a first material ball with a first transparency parameter; wherein the environment map is used to render the environment pattern in the surface texture of the target model.

[0024] In a possible implementation, the second pixel parameter includes a pixel parameter of any color channel; and adjusting the first transparency parameter of the first material ball using the second pixel parameter of the dynamic texture map that changes over time to obtain a target material ball whose transparency parameter changes over time includes:

[0025] The pixel parameters of any color channel of the dynamic texture map that changes with time are used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0026] In a possible implementation, the dynamic texture map includes a fog dynamic map; the fog dynamic map is obtained by the following steps:

[0027] Obtaining an original noise map according to the surface texture of the target model;

[0028] Using a preset first offset parameter, performing an offset process on the first original coordinate of each pixel position in the original noise map to obtain a first offset coordinate of each pixel position;

[0029] The original noise map is sampled according to the first original coordinate of each pixel position and the first offset coordinate of each pixel position to obtain the fog dynamic map; wherein the fog dynamic map is used to render the fog effect on the surface texture of the target model.

[0030] In a possible implementation, the dynamic texture map further includes a light and shadow dynamic map; the light and shadow dynamic map is obtained by the following steps:

[0031] Obtaining an original light and shadow map according to the surface texture of the target model;

[0032] Using a preset second offset parameter, offsetting the second original coordinates of each pixel position in the original light and shadow map to obtain a flowing light and shadow map; wherein each pixel position in the flowing light and shadow map has the second offset coordinates;

[0033] performing an offset process on the second original coordinate of each pixel position in the original light and shadow map according to a flickering speed and a flickering time of the light and shadow dynamic map on the texture surface of the target model to obtain a third offset coordinate of each pixel position;

[0034] Using the third offset coordinate of each pixel position, sampling the original light and shadow map to obtain a flickering light and shadow map;

[0035] The flow light and shadow map and the flickering light and shadow map are synthesized according to the second offset coordinates of each pixel position and the third offset coordinates of each pixel position to obtain the light and shadow dynamic map; wherein the light and shadow dynamic map is used to render the light and shadow effects on the surface texture of the target model.

[0036] In one possible implementation, the texture map includes a foreground pattern map, an environment map, a fog dynamic map, and a light and shadow dynamic map; and adjusting the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time includes:

[0037] Based on the pixel parameters of the foreground pattern map, the pixel parameters of the environment map, the pixel parameters of the fog dynamic map, and the pixel parameters of the light and shadow dynamic map, the initial transparency parameter of the initial material ball is gradually adjusted to obtain a gradually adjusted target material ball; wherein the transparency parameter of the gradually adjusted target material ball changes over time;

[0038] The step of rendering the target model using the target material ball to obtain a dynamic effect of the target model includes:

[0039] The target model is rendered using the gradually adjusted target material ball to obtain a target model with a dynamic effect; wherein the dynamic effect displays the foreground pattern map and the environment map, and has a fog dynamic effect and a light and shadow dynamic effect.

[0040] The embodiment of the present application further provides a model rendering device with dynamic effects, the model rendering device comprising:

[0041] The parameter acquisition module is used to obtain the initial transparency parameter of the initial material ball according to the material information of the target model;

[0042] A parameter adjustment module, configured to adjust an initial transparency parameter of the initial material ball based on pixel parameters of a texture map, to obtain a target material ball whose transparency parameter changes over time; wherein the texture map includes a dynamic texture map; and the dynamic texture map is configured to dynamically render the surface texture of the target model;

[0043] The effect rendering module is used to use the target material ball to render the target model to obtain the dynamic effect of the target model.

[0044] In one possible implementation, the texture map further includes a static texture map; when the parameter adjustment module is used to adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time, the parameter adjustment module is used to:

[0045] Using the first pixel parameter of the static texture map, adjusting the initial transparency parameter of the initial material ball to obtain a first material ball with the first transparency parameter; wherein the static texture map is used to perform static pattern rendering on the surface texture of the target model;

[0046] The second pixel parameter of the dynamic texture map that changes with time is used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0047] In one possible implementation, the static texture map includes a foreground pattern map; when the parameter adjustment module is configured to adjust an initial transparency parameter of the initial material ball using a first pixel parameter of the static texture map to obtain a first material ball having a first transparency parameter, the parameter adjustment module is configured to:

[0048] Determine the transparent area and the non-transparent area in the initial material ball according to the surface texture of the target model;

[0049] The initial transparency parameter of the non-transparent area is adjusted using the first pixel parameter of the foreground pattern map to obtain a first material ball with the first transparency parameter; wherein the foreground pattern map is used to render the foreground pattern in the surface texture of the target model.

[0050] In a possible implementation, when the parameter adjustment module is used to adjust the initial transparency parameter of the non-transparent area using the first pixel parameter of the foreground pattern map to obtain the first material ball having the first transparency parameter, the parameter adjustment module is used to:

[0051] Using the first pixel parameter of the foreground pattern map, adjusting the initial transparency parameter in the non-transparent area to obtain a second material ball with a second transparency parameter;

[0052] Using a first transparency difference at each pixel position between the initial transparency parameter and the second transparency parameter, the initial material ball and the second material ball are synthesized to obtain a third material ball with a third transparency parameter;

[0053] Inverting the initial transparency parameter of the initial material ball to obtain an inverted material ball with inverted transparency parameter;

[0054] Using a second transparency difference at each pixel position between the second transparency parameter and the reverse transparency parameter, the second material ball and the reverse material ball are synthesized to obtain a fourth material ball with a fourth transparency parameter;

[0055] Using the first maximum transparency value of each pixel position between the third transparency parameter and the fourth transparency parameter, the third material ball and the fourth material ball are synthesized to obtain a fifth material ball with a fifth transparency parameter;

[0056] The second material ball and the fifth material ball are synthesized using the second maximum transparency value of each pixel position between the second transparency parameter and the fifth transparency parameter to obtain a first material ball with a first transparency parameter.

[0057] In one possible implementation, the static texture map includes an environment map, and the first pixel parameters include grayscale pixel parameters and / or pixel parameters of any color channel; when the parameter adjustment module is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameters of the static texture map to obtain the first material ball having the first transparency parameter, the parameter adjustment module is used to:

[0058] The initial transparency parameter of the initial material ball is adjusted using the grayscale pixel parameters of the environment map or the pixel parameters of any color channel to obtain a first material ball with a first transparency parameter; wherein the environment map is used to render the environment pattern in the surface texture of the target model.

[0059] In one possible implementation, the second pixel parameter includes a pixel parameter of any color channel; when the parameter adjustment module is used to adjust the first transparency parameter of the first material ball using the second pixel parameter of the dynamic texture map that changes over time to obtain a target material ball whose transparency parameter changes over time, the parameter adjustment module is used to:

[0060] The pixel parameters of any color channel of the dynamic texture map that changes with time are used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0061] In a possible implementation, the dynamic texture map includes a fog dynamic map; and the parameter adjustment module is configured to obtain the fog dynamic map through the following steps:

[0062] Obtaining an original noise map according to the surface texture of the target model;

[0063] Using a preset first offset parameter, performing an offset process on the first original coordinate of each pixel position in the original noise map to obtain a first offset coordinate of each pixel position;

[0064] The original noise map is sampled according to the first original coordinate of each pixel position and the first offset coordinate of each pixel position to obtain the fog dynamic map; wherein the fog dynamic map is used to render the fog effect on the surface texture of the target model.

[0065] In a possible implementation, the dynamic texture map further includes a light and shadow dynamic map; and the parameter adjustment module is configured to obtain the light and shadow dynamic map through the following steps:

[0066] Obtaining an original light and shadow map according to the surface texture of the target model;

[0067] Using a preset second offset parameter, offsetting the second original coordinates of each pixel position in the original light and shadow map to obtain a flowing light and shadow map; wherein each pixel position in the flowing light and shadow map has the second offset coordinates;

[0068] performing an offset process on the second original coordinate of each pixel position in the original light and shadow map according to a flickering speed and a flickering time of the light and shadow dynamic map on the texture surface of the target model to obtain a third offset coordinate of each pixel position;

[0069] Using the third offset coordinate of each pixel position, sampling the original light and shadow map to obtain a flickering light and shadow map;

[0070] The flow light and shadow map and the flickering light and shadow map are synthesized according to the second offset coordinates of each pixel position and the third offset coordinates of each pixel position to obtain the light and shadow dynamic map; wherein the light and shadow dynamic map is used to render the light and shadow effects on the surface texture of the target model.

[0071] In one possible implementation, the texture map includes a foreground pattern map, an environment map, a fog dynamic map, and a light and shadow dynamic map; when the parameter adjustment module is used to adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time, the parameter adjustment module is used to:

[0072] Based on the pixel parameters of the foreground pattern map, the pixel parameters of the environment map, the pixel parameters of the fog dynamic map, and the pixel parameters of the light and shadow dynamic map, the initial transparency parameter of the initial material ball is gradually adjusted to obtain a gradually adjusted target material ball; wherein the transparency parameter of the gradually adjusted target material ball changes over time;

[0073] When the effect rendering module is used to render the target model using the target material ball to obtain the dynamic effect of the target model, the effect rendering module is used to:

[0074] The target model is rendered using the gradually adjusted target material ball to obtain a target model with a dynamic effect; wherein the dynamic effect displays the foreground pattern map and the environment map, and has a fog dynamic effect and a light and shadow dynamic effect.

[0075] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the model rendering method for dynamic effects as described above are performed.

[0076] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned method for rendering a model with dynamic effects are executed.

[0077] The model rendering method, device, electronic device, and storage medium for dynamic effects provided in the embodiments of the present application obtain the initial transparency parameter of the initial material ball based on the material information of the target model; adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time; and use the target material ball to render the target model to obtain the dynamic effect of the target model. In this way, without the need to produce animation special effects, the target model with dynamic effects can be simulated by using the time-varying transparency parameter carried by the target material ball. In this way, by avoiding the use of animation special effects, the calculation example consumption during the terminal device rendering process is reduced, and the difficulty of producing dynamic effects is reduced.

[0078] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0080] Figure 1 A flowchart of a model rendering method with dynamic effects provided in an embodiment of the present application;

[0081] Figure 2 A schematic diagram of a transparency adjustment process provided in an embodiment of the present application;

[0082] Figure 3 A schematic diagram of the production process of a dynamic fog map provided in an embodiment of the present application;

[0083] Figure 4 A schematic diagram of the production process of a light and shadow dynamic map provided in an embodiment of the present application;

[0084] Figure 5 A schematic structural diagram of a model rendering device with dynamic effects provided in an embodiment of the present application;

[0085] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work falls within the scope of protection of the present application.

[0087] Research has found that in order to simulate scenes with dynamic effects in games, special effects animation is usually chosen to achieve this. To simulate dynamic effects through special effects animation, it is necessary to call related models and use a large number of particles. Moreover, as the dynamic effects continue to change, multiple frames of special effects scenes need to be produced to achieve changes in style. During the rendering process, as the number of special effects scenes increases, the number of computing instances required by the terminal device will also increase. When rendering in this way, the performance requirements for the terminal device are extremely high, and due to the large number of special effects scenes, the time required for the terminal device to render will also be longer, resulting in a lower rendering rate.

[0088] Based on this, an embodiment of the present application provides a model rendering method with dynamic effects, which can render a target model with dynamic effects by changing the transparency parameters carried by the target material ball over time. In this way, while ensuring the authenticity of the rendered simulated object, it can reduce the number of calculation examples required in the rendering process of the terminal device and improve the rendering efficiency of the game screen.

[0089] See also Figure 1 , Figure 1 This is a flow chart of a model rendering method for dynamic effects provided by an embodiment of the present application. Figure 1 As shown in , the model rendering method of dynamic effects provided by the embodiment of the present application includes:

[0090] S101. Obtain an initial transparency parameter of an initial material ball according to material information of a target model.

[0091] S102 : Based on the pixel parameters of the texture map, adjust the initial transparency parameter of the initial material ball to obtain a target material ball whose transparency parameter changes with time.

[0092] S103: Utilize the target material ball to render the target model to obtain a dynamic effect of the target model.

[0093] The embodiment of the present application provides a model rendering method with dynamic effects. When the target model displayed in the game scene has a dynamic effect, the initial transparency parameter of the material ball used to render the target model is obtained based on the material information of the target model itself when it is displayed. In order to render the target model with dynamic effects, the initial transparency parameter in the initial material ball is adjusted by a dynamic texture map used to render the surface texture of the target model with dynamic effects. Since the transparency parameter of the dynamic texture map changes with time, the transparency parameter carried by the adjusted target material ball can also change with time, thereby simulating the dynamic effect of the target model. In this way, a target model with dynamic effects can be simulated without the need for additional animation special effects. In this way, the computational cost required for the terminal device to render the special effects screen can be reduced, thereby improving the rendering efficiency of the terminal device.

[0094] If you want to simulate a target model with realistic effects in the game, you need to simulate the material of the target model; here, the material refers to the real properties of the target object, such as the color information, reflective effect, transparency information, etc.

[0095] The material ball is a VR parameter file, which includes the color parameters, reflective effects, transparency parameters and other physical attribute parameters of the target model mentioned above, as well as various static maps, such as texture maps, Matcap (Material Capture) maps and normal maps, etc. Therefore, the actual effect that the material ball can render depends on the physical attribute parameters and various mapping information it includes.

[0096] In step S101 , the initial transparency parameter of the initial material ball used to render the target model may be obtained in advance based on the material information of the target model displayed in the game scene.

[0097] Here, while obtaining the initial transparency parameter, other initial parameters in the initial material ball may be set with reference to the material information of the target model, including initial color parameters, reflection effect parameters, and initial transparency parameters.

[0098] For example, here we take the target model as the "moon". In order to make the presented "moon" more beautiful and fit the display effect of the real "moon" in the game, the "moon" is usually made translucent, that is, the outer contour of the "moon" is an opaque boundary, and the interior of the "moon" is completely transparent. At this time, the Fresnel algorithm can be used to produce a translucent material ball with a "solid outside and hollow inside", that is, the outer contour of the "moon" is opaque, and gradually becomes transparent from the outer contour of the "moon" to the center of the "moon".

[0099] Since the present application renders a target model with a dynamic effect by changing the transparency parameter over time, other parameters (for example, color parameters) are not changed during the transparency adjustment process. Other parameters can be directly added to the material ball without changing during the transparency adjustment process. Therefore, in the subsequent process, only the transparency adjustment process is explained, and the process of adding other parameters will not be repeated.

[0100] The above process can only render a statically displayed target model. However, in some game scenes, in order to improve the realism of the game screen, there are usually some dynamic effects on the target model, such as "smoke" floating on the surface of the "moon".

[0101] In step S102, in order to obtain a target model with dynamic effects, the pixel parameters of the texture map are used to adjust the initial transparency parameters of the initial material ball, so that the transparency parameters in the adjusted material ball change with time; in this way, the dynamic effect can be simulated by changing the transparency parameters with time, and there is no need to produce special effects animation to achieve the dynamic effect.

[0102] The texture map includes a dynamic texture map in which pixel parameters change over time; the dynamic texture map is used to render a dynamic effect on the surface texture of the target model.

[0103] Furthermore, for a target model, the surface texture of the target model not only includes dynamic effects, but also may include some fixed predetermined patterns (for example, foreground patterns and background patterns); however, if the target model is in a completely transparent state, no pattern can be displayed on the surface texture of the target model. Only when the surface texture of the target model is in a non-transparent state such as opaque or partially opaque, can the corresponding pattern be displayed in the non-transparent area.

[0104] Therefore, in order to enable the corresponding pattern to be displayed on the surface texture of the rendered target model, the initial transparency of the initial material ball used to render the target model can be adjusted according to the first pixel parameter of the static texture map to ensure that the static texture map appears non-transparent in the corresponding display area in the target model.

[0105] In one embodiment, the texture map further comprises a static texture map; see Figure 2 , Figure 2 This is a schematic diagram of a transparency adjustment process provided by an embodiment of the present application. Figure 2 As shown, step S102 includes:

[0106] Step S1021: Using the first pixel parameter of the static texture map, adjust the initial transparency parameter of the initial material ball to obtain a first material ball with a first transparency parameter.

[0107] In this step, the initial transparency parameter of the initial material ball is adjusted step by step using the static texture map and the dynamic texture map respectively; specifically, the initial transparency parameter of the initial material ball is adjusted using the first pixel parameter carried by the static texture map; here, for a static texture map, it is composed of multiple polygonal grids, each polygonal grid is equivalent to a pixel position (point) of the static texture map, and each pixel position has a first pixel value. When adjusting the initial transparency parameter, the first pixel value of each pixel position can be used to adjust the transparency value of the corresponding pixel position in the initial material ball; and then, after the adjustment, the first material ball with the first transparency parameter is obtained.

[0108] Since transparency is actually a value between 0 and 1, changing this "value" so that it is within the range of 0 to 1 and not 0 can change the transparency of each pixel position, and can make the originally completely transparent pixel position become opaque or semi-transparent.

[0109] The first pixel parameter of the static texture map, for example, the pixel value of any color channel, or the transparency parameter carried by itself, or the grayscale pixel value, etc., are all "numerical values" in the range of 0 to 1. Therefore, the first pixel parameter here can include color parameters and transparency parameters (Alpha, A); color parameters can include color parameters of the three color channels of red (Red, R), green (Green, G), and blue (Blue, B) and grayscale pixel parameters, etc.

[0110] In one embodiment, the static texture map includes a foreground pattern map; step S1021 includes: determining the transparent area and the non-transparent area in the initial material ball based on the surface texture of the target model; using the first pixel parameter of the foreground pattern map, adjusting the initial transparency parameter of the non-transparent area to obtain a first material ball with a first transparency parameter.

[0111] The foreground pattern map is used to render the foreground pattern in the surface texture of the target model, that is, by "adding" the foreground pattern map to the material ball, the foreground pattern map can be displayed on the surface of the target model rendered by the material ball.

[0112] In this step, for the target model, there are transparent areas and non-transparent areas in its surface texture, that is, no pattern needs to be displayed in the transparent area of ​​the target model surface texture; it is sufficient to ensure that the foreground pattern map can be displayed in the non-transparent area. Therefore, in order to reduce part of the data processing amount, it is only necessary to use the foreground pattern map to adjust the initial transparency parameters of the non-transparent area in the initial material ball; specifically, according to the surface texture when the target model is displayed, the transparent area and the non-transparent area in the initial material ball are determined; for the determined non-transparent area, the first pixel parameter of the foreground pattern map (for example, the pixel value of any color channel, or the carried transparency parameter, or the grayscale pixel value, etc.) is used to adjust the initial transparency parameter of the non-transparent area in the initial material ball through corresponding operations to obtain a first material ball with a first transparency parameter. Here, the corresponding operations include addition, subtraction, OR, XOR, and inversion operations.

[0113] For the determined transparent area, in order to further reduce the amount of calculation in the rendering process, for the transparent area, the preset transparency parameters can be directly used to adjust the initial transparency parameters of each pixel in the transparent area by assignment.

[0114] Corresponding to the above embodiment, it is assumed that the pattern displayed on the "moon" is "leaves", and the initial material ball used to render the "moon" is a translucent material ball that is "solid outside and hollow inside" (the rendered "moon" gradually changes from a completely opaque state to a completely transparent state from the outer contour to the center). The current central area of ​​the "moon" is completely transparent. In this completely transparent state, the "leaves" located in the central area cannot be displayed. Therefore, at this time, it is necessary to use the first pixel parameter of the foreground pattern map corresponding to the "leaves" to adjust the initial transparency parameter of each pixel position at the position of the "leaves" in the initial material ball, so that the transparency of the pixel position at the position of the "leaves" is not 0, that is, the pixel position is in a non-transparent state.

[0115] In order to make the target model have a more realistic effect, the outer circle boundary contour of the surface texture of the target model can be processed into a model with a multi-level gradient effect through multiple synthesis processes.

[0116] In one embodiment, the adjusting the initial transparency parameter of the initial material ball using the first pixel parameter of the foreground pattern map to obtain the first material ball having the first transparency parameter includes:

[0117] Step a: using the first pixel parameter of the foreground pattern map, adjusting the initial transparency parameter in the non-transparent area to obtain a second material ball with a second transparency parameter.

[0118] In this step, the initial transparency parameter in the non-transparent area of ​​the initial material ball is adjusted using the foreground pattern map to obtain a second material ball with a second transparency parameter; at this time, the target model is rendered using the second material ball to obtain a target model with a foreground pattern map displayed on the surface.

[0119] Step b: using the first transparency difference between the initial transparency parameter and the second transparency parameter at each pixel position, synthesizing the initial material ball and the second material ball to obtain a third material ball with a third transparency parameter.

[0120] In this step, after obtaining the second material ball, the first transparency difference between the initial transparency value of each pixel position in the initial transparency parameter and the second transparency value of each pixel position in the second transparency parameter is calculated, and the initial material ball and the second material ball are synthesized using the first transparency difference at each pixel position to obtain a third material ball with a third transparency parameter; at this time, the target model is rendered using the third material ball to obtain a target model with a first gradient effect on the boundary and without displaying the foreground pattern map.

[0121] Here, the first gradient effect refers to the outer boundary outline of the target model gradually changing from a non-transparent state to a transparent state.

[0122] Step c: inverting the initial transparency parameter of the initial material ball to obtain an inverted material ball with inverted transparency parameter.

[0123] In this step, the initial transparency parameter carried by the initial material ball can be inverted; specifically, the difference between the initial transparency value at each pixel position and "1" is calculated to obtain an inverted material ball with inverted transparency parameters.

[0124] Step d: Using the second transparency difference between the second transparency parameter and the reverse transparency parameter at each pixel position, the second material ball and the reverse material ball are synthesized to obtain a fourth material ball with a fourth transparency parameter.

[0125] In this step, after obtaining the reverse material ball, the second transparency difference between the second transparency value of each pixel position in the second transparency parameter and the reverse transparency value of each pixel position in the reverse transparency parameter is calculated, and the second transparency difference of each pixel position is used to synthesize the second material ball and the reverse material ball to obtain a fourth material ball with a fourth transparency parameter; at this time, the target model is rendered using the fourth material ball to obtain a target model whose boundary has a second gradient effect and does not display the foreground pattern map.

[0126] Here, the second gradient effect refers to the outer boundary outline of the target model gradually changing from a transparent state to a non-transparent state.

[0127] Step e: Using the first maximum transparency value of each pixel position between the third transparency parameter and the fourth transparency parameter, the third material ball and the fourth material ball are synthesized to obtain a fifth material ball with a fifth transparency parameter.

[0128] In this step, the first transparency maximum value between the third transparency value of each pixel position in the third transparency parameter and the fourth transparency value of each pixel position in the fourth transparency parameter is calculated, and the third material ball and the fourth material ball are synthesized using the first transparency maximum value of each pixel position to obtain a fifth material ball with a fifth transparency parameter; at this time, the target model is rendered using the fifth material ball to obtain a target model whose outer circle boundary contour has a multi-layer gradient effect and does not display the foreground pattern map.

[0129] Step f: Using the second maximum transparency value of each pixel position between the second transparency parameter and the fifth transparency parameter, the second material ball and the fifth material ball are synthesized to obtain a first material ball with a first transparency parameter.

[0130] In this step, the second transparency maximum value between the second transparency value of each pixel position in the second transparency parameter and the fifth transparency value of each pixel position in the fifth transparency parameter is calculated, and the second material ball and the fifth material ball are synthesized using the second transparency maximum value of each pixel position to obtain a first material ball with a first transparency parameter; at this time, the target model is rendered using the first material ball to obtain a target model whose outer circle boundary contour has a multi-layer gradient effect and displays a foreground pattern map.

[0131] For the target model, the environment it belongs to will also have a certain degree of influence on its display effect, such as the lighting effects in the environment; in order to further increase the realism of the rendering effect, the rendered target object can be affected by false ambient light through the environment map, thereby creating a false lighting information for the rendered target model.

[0132] For some static texture maps, they may not have transparency parameters (for example, environment Matcap maps), that is, there are no parts with different transparency values ​​in such static texture maps (for example, environment Matcap maps), and each pixel position is completely opaque; at this time, it is impossible to adjust the transparency parameters in the material ball through the transparency parameters it carries. In this case, the transparency parameters in the material ball can be adjusted by using the grayscale pixel values ​​it carries or the pixel parameters of any color channel.

[0133] In another embodiment, the static texture map includes an environment map, and the first pixel parameters include grayscale pixel parameters and / or pixel parameters of any color channel; step S1021 includes: using the grayscale pixel parameters of the environment map or the pixel parameters of any color channel to adjust the initial transparency parameters of the initial material ball to obtain a first material ball with a first transparency parameter.

[0134] The environment map is used to render the environment pattern in the surface texture of the target model.

[0135] In this step, under the premise that the environment map does not have a transparency parameter, the grayscale pixel value of each pixel position in the environment map or the pixel parameter of any color channel is selected to adjust the initial transparency parameter of the initial material ball through corresponding calculations.

[0136] Here, if the grayscale pixel parameters of the environment map are used to adjust the initial transparency parameters, first, the obtained environment map is converted into a grayscale environment map to obtain the grayscale pixel value of each pixel position in the environment map, wherein the grayscale pixel value of each pixel position is a value in the range of 0 to 1; since the transparency parameter is actually also a value between 0 and 1, the grayscale pixel value of each pixel position in the grayscale environment map can be used to adjust the initial transparency parameter of the corresponding pixel position in the initial material ball through the corresponding calculation method to obtain a first material ball with a first transparency parameter.

[0137] In this way, the lighting information carried by the environment map can be passed to the material ball used to render the target object, so that the rendered target object can be affected by the fake ambient light, resulting in a more realistic target object.

[0138] It should be noted that the foreground pattern map and the environment map can be used to gradually adjust the initial transparency parameters of the initial material ball; that is, the foreground pattern map can be used to adjust the initial transparency parameters of the initial material ball first; then, the environment map can be used to perform a secondary transparency parameter adjustment based on the transparency parameters adjusted by the foreground pattern map to obtain a first material ball with a first transparency parameter; here, in fact, the adjustment order of the transparency parameters of the material ball by the foreground pattern map and the environment map is not restricted, that is, the transparency parameters of the material ball can be adjusted first by using the foreground pattern map, and then the transparency parameters after the initial adjustment can be adjusted for a secondary time by using the environment map; the transparency parameters of the material ball can also be adjusted first by using the environment map, and then the transparency parameters after the initial adjustment can be adjusted for a secondary time by using the foreground pattern map, which can be determined according to actual conditions and is not restricted here; wherein, the adjustment method for the transparency parameter is the same as the transparency adjustment method of the above embodiment, and will not be repeated here.

[0139] Step S1022: Using the second pixel parameter of the dynamic texture map that changes with time, adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0140] In this step, the first transparency parameter carried by the first material ball is adjusted again based on the first transparency adjustment using the second pixel parameter of the dynamic texture map; similarly, the second pixel value at each pixel position in the dynamic texture map can be used to adjust the transparency value at the corresponding pixel position in the first material ball; here, since the second pixel parameter carried by the dynamic texture map changes with time, the transparency parameter of the target material ball obtained after adjustment using the second pixel parameter also changes with time.

[0141] Here, the second pixel parameters may include color parameters and transparency parameters (Alpha, A); the color parameters may include color parameters of three color channels of red (Red, R), green (Green, G), and blue (Blue, B) and grayscale pixel parameters, etc.

[0142] In one embodiment, the second pixel parameter includes a pixel parameter of any color channel; step S1022 includes: using the pixel parameter of any color channel of the dynamic texture map that changes with time, adjusting the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0143] In this step, for each pixel position in the dynamic texture map, the pixel value of any color channel at the pixel position is determined. For this pixel position, the pixel value of any color channel it has changes with time. On this basis, the pixel value at the pixel position that changes with time can be used to adjust the first transparency value at the corresponding pixel position in the first material ball, thereby obtaining a target material ball whose transparency parameter changes with time.

[0144] Here, the dynamic texture map may include a fog dynamic map and a light and shadow dynamic map; wherein the fog dynamic map is used to render fog effects on the surface texture of the target model; and the light and shadow dynamic map is used to render light and shadow effects on the surface texture of the target model.

[0145] It should be noted that the initial transparency parameter of the initial material ball can be gradually adjusted using static texture mapping and dynamic texture mapping; in the above embodiment, the initial transparency parameter of the initial material ball is first adjusted using static texture mapping; then, using dynamic texture mapping, a secondary transparency parameter adjustment is performed on the basis of the first transparency parameter obtained after the static texture mapping adjustment, to obtain a target material ball whose transparency parameter changes over time; here, in fact, the adjustment order of the transparency parameter of the material ball by the static texture mapping and the dynamic texture mapping is not restricted, that is, the transparency parameter of the material ball can be adjusted using the static texture mapping first, and then the transparency parameter after the initial adjustment can be adjusted for a secondary time using the dynamic texture mapping; the transparency parameter of the material ball can also be adjusted using the dynamic texture mapping first, and then the transparency parameter after the initial adjustment can be adjusted for a secondary time using the static texture mapping, which can be determined according to actual conditions and is not restricted here; wherein, the adjustment method for the transparency parameter is the same as the transparency adjustment method in the above embodiment, and will not be repeated here.

[0146] In one embodiment, see Figure 3 , Figure 3 This is a schematic diagram of the production process of a fog dynamic map provided in an embodiment of the present application. Figure 3 As shown, the fog dynamic map is obtained by the following steps:

[0147] Step S301: Obtain an original noise map according to the surface texture of the target model.

[0148] In this step, the original noise map used to render the fog effect on the surface of the target model can be obtained according to the display form of the surface texture of the target model in the game scene.

[0149] Step S302: Using a preset first offset parameter, perform offset processing on the first original coordinates of each pixel position in the original noise map to obtain a first offset coordinate of each pixel position.

[0150] In this step, the original noise map that was originally static can be made to "move" by means of UV flow; specifically, the first original coordinates of each pixel position in the original noise map can be offset using a preset first offset parameter. By changing the first original coordinates of each pixel position in the original noise map, the first original coordinates of the original noise map are changed over time, and the first offset coordinates of each pixel position are obtained; here, the first offset coordinates of each pixel position obtained move in a first specific direction over time; thereby, the original noise map that was originally static is offset in a first specific direction such as horizontally or vertically over time.

[0151] Here, the first specific direction may include horizontal, vertical, upper left, lower left, upper right, and lower right directions, and the offset angle of the first specific direction may also be specifically specified.

[0152] Step S303: Sampling the original noise map according to the first original coordinates of each pixel position and the first offset coordinates of each pixel position to obtain the fog dynamic map.

[0153] In this step, in order to make the original noise map have a "distorted" dynamic effect similar to floating smoke, the original noise map is sampled and processed through corresponding calculation processing according to the first original coordinate of each pixel position and the first offset coordinate of each pixel position, and then the fog dynamic map is obtained; for example, first, the first original coordinate of each pixel position is added to the first offset coordinate at the pixel position; then, the coordinate value of each pixel position obtained by the addition operation is input again to the corresponding pixel position in the original noise map, and the fog dynamic map can be obtained; at this time, the pixel parameters of any color channel of the fog dynamic map change over time.

[0154] Here, the corresponding operations may include addition, subtraction, OR, XOR, and negation operations, etc.

[0155] In another embodiment, see Figure 4 , Figure 4 This is a schematic diagram of the production process of a light and shadow dynamic map provided in an embodiment of the present application. Figure 4 As shown, the light and shadow dynamic map is obtained by the following steps:

[0156] S401: Obtain an original light and shadow map according to the surface texture of the target model.

[0157] In this step, the original light and shadow map used to render the light and shadow effects on the surface of the target model can be obtained according to the display form of the surface texture of the target model in the game scene.

[0158] S402: Using a preset second offset parameter, perform offset processing on the second original coordinates of each pixel position in the original light and shadow map to obtain a flowing light and shadow map.

[0159] In this step, the original light and shadow map that was originally static can also be made to "move" by flowing UV; specifically, the second original coordinates of each pixel position in the original light and shadow map can be offset using a preset second offset parameter. By changing the second original coordinates of each pixel position in the original light and shadow map, the second original coordinates of the original light and shadow map are changed over time, and the second offset coordinates of each pixel position are obtained, thereby obtaining a flowing light and shadow map; here, the second offset coordinates of each pixel position obtained move in a second specific direction over time; thereby, the original light and shadow map that was originally static is offset in a second specific direction such as the upper left or upper right over time.

[0160] Here, the second specific direction may include horizontal, vertical, upper left, lower left, upper right, and lower right directions, and the offset angle of the second specific direction may also be specifically specified.

[0161] S403. Perform an offset process on the second original coordinate of each pixel position in the original light and shadow map according to the flickering speed and flickering time of the light and shadow dynamic map on the texture surface of the target model to obtain a third offset coordinate of each pixel position.

[0162] In this step, for the target model, according to its own design, the light and shadow effects displayed on its surface can have a certain flickering speed and corresponding flickering time; therefore, in order to make the light and shadow dynamic map "flicker", according to the flickering speed and flickering time of the light and shadow dynamic map on the texture surface of the target model, the second original coordinates of each pixel position in the original light and shadow map are offset to obtain the third offset coordinates of each pixel position.

[0163] S404: Using the third offset coordinates of each pixel position, sample the original light and shadow map to obtain a scintillation light and shadow map.

[0164] In this step, in order to make the original light and shadow map have a "flickering" dynamic effect, the third offset coordinate of each pixel position is used to sample the original light and shadow map through corresponding calculation processing, and then a flickering light and shadow map is obtained; for example, first, the second original coordinate of each pixel position is added to the third offset coordinate at the pixel position; then, the coordinate value of each pixel position obtained by the addition operation is input again into the corresponding pixel position in the original light and shadow map to obtain a flickering light and shadow map.

[0165] S405 , synthesizing the flowing light and shadow map and the flickering light and shadow map according to the second offset coordinates of each pixel position and the third offset coordinates of each pixel position to obtain the light and shadow dynamic map.

[0166] In this step, in order to make the original light and shadow map have the dynamic effects of "flickering" and "flowing" at the same time, the second offset coordinate of each pixel position and the third offset coordinate of each pixel position are used to synthesize the flowing light and shadow map and the flickering light and shadow map through corresponding calculation processing, thereby obtaining a light and shadow dynamic map that is both "flickering" and "flowing"; for example, first, the second offset coordinate of each pixel position is multiplied by the third offset coordinate at the pixel position; then, the coordinate value of each pixel position obtained by the multiplication operation is limited to between 0 and 1, and the light and shadow dynamic map can be obtained.

[0167] In step S103, the target model is rendered using the obtained target material ball, so that a target model with a dynamic effect can be rendered according to parameter information such as transparency parameters carried in the target material ball.

[0168] In one embodiment, the texture map includes a foreground pattern map, an environment map, a fog dynamic map, and a light and shadow dynamic map; step S102 includes: gradually adjusting the initial transparency parameters of the initial material ball based on the pixel parameters of the foreground pattern map, the pixel parameters of the environment map, the pixel parameters of the fog dynamic map, and the pixel parameters of the light and shadow dynamic map, to obtain a gradually adjusted target material ball.

[0169] In this step, when the texture maps used to adjust the transparency parameters of the initial material ball include a foreground pattern map, an environment map, a fog dynamic map, and a light and shadow dynamic map, the initial transparency parameters of the initial material ball are gradually adjusted using the pixel parameters of the foreground pattern map, the pixel parameters of the environment map, the pixel parameters of the fog dynamic map, and the pixel parameters of the light and shadow dynamic map respectively;

[0170] Specifically, first, the initial transparency parameters of the initial material ball are adjusted using the pixel parameters of the foreground pattern map; secondly, the transparency parameters of the material ball after the foreground pattern map is adjusted using the pixel parameters of the environment map; then, the transparency parameters of the material ball after the environment map is adjusted using the pixel parameters of the fog dynamic map; finally, the transparency parameters of the material ball after the fog dynamic map is adjusted using the pixel parameters of the light and shadow dynamic map, to obtain a target material ball after gradual adjustment; wherein, the transparency parameters of the target material ball after gradual adjustment change over time.

[0171] It should be noted that, for the foreground pattern map, environment map, fog dynamic map and light and shadow dynamic map, there is no restriction on the order of adjusting the transparency parameters in the material ball. In other embodiments, the environment map can be used to first adjust the initial transparency parameters in the initial material ball; secondly, the foreground pattern map is used to adjust the transparency parameters of the material ball after the environment map is adjusted; then, the fog dynamic map is used to adjust the transparency parameters of the material ball after the foreground pattern map is adjusted; finally, the light and shadow dynamic map is used to adjust the transparency parameters of the material ball after the fog dynamic map is adjusted.

[0172] Step S103 includes: using the gradually adjusted target material ball to render the target model to obtain a target model with a dynamic effect; wherein the dynamic effect displays the foreground pattern map and the environment map, and has a fog effect and a light and shadow effect.

[0173] In this step, the target model is rendered using the target material ball that has been gradually adjusted through the foreground pattern map, environment map, fog dynamic map, and light and shadow dynamic map, so that a target model that displays the foreground pattern map, environment map, and has fog dynamic effects and light and shadow dynamic effects can be obtained.

[0174] The model rendering method for dynamic effects provided in an embodiment of the present application obtains the initial transparency parameter of an initial material ball based on the material information of the target model; adjusts the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time; and uses the target material ball to render the target model to obtain the dynamic effect of the target model. In this way, without the need to produce animation special effects, the target model with dynamic effects can be simulated by using the time-varying transparency parameter carried by the target material ball. In this way, by avoiding the use of animation special effects, the computational cost during the terminal device rendering process is reduced, and the difficulty of producing dynamic effects is reduced.

[0175] See also Figure 5 , Figure 5This is a structural diagram of a model rendering device with dynamic effects provided by an embodiment of the present application. Figure 5 As shown in , the model rendering device 500 includes:

[0176] The parameter acquisition module 510 is used to obtain the initial transparency parameter of the initial material ball according to the material information of the target model;

[0177] A parameter adjustment module 520 is configured to adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time; wherein the texture map includes a dynamic texture map; the dynamic texture map is used to dynamically render the surface texture of the target model;

[0178] The effect rendering module 530 is used to use the target material ball to render the target model to obtain the dynamic effect of the target model.

[0179] Furthermore, the texture map further includes a static texture map; when the parameter adjustment module 520 is used to adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time, the parameter adjustment module 520 is used to:

[0180] Using the first pixel parameter of the static texture map, adjusting the initial transparency parameter of the initial material ball to obtain a first material ball with the first transparency parameter; wherein the static texture map is used to perform static pattern rendering on the surface texture of the target model;

[0181] The second pixel parameter of the dynamic texture map that changes with time is used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0182] Furthermore, the static texture map includes a foreground pattern map; when the parameter adjustment module 520 is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameter of the static texture map to obtain a first material ball having the first transparency parameter, the parameter adjustment module 520 is used to:

[0183] Determine the transparent area and the non-transparent area in the initial material ball according to the surface texture of the target model;

[0184] The initial transparency parameter of the non-transparent area is adjusted using the first pixel parameter of the foreground pattern map to obtain a first material ball with the first transparency parameter; wherein the foreground pattern map is used to render the foreground pattern in the surface texture of the target model.

[0185] Furthermore, when the parameter adjustment module 520 is used to adjust the initial transparency parameter of the non-transparent area using the first pixel parameter of the foreground pattern map to obtain the first material ball having the first transparency parameter, the parameter adjustment module 520 is used to:

[0186] Using the first pixel parameter of the foreground pattern map, adjusting the initial transparency parameter in the non-transparent area to obtain a second material ball with a second transparency parameter;

[0187] Using a first transparency difference at each pixel position between the initial transparency parameter and the second transparency parameter, the initial material ball and the second material ball are synthesized to obtain a third material ball with a third transparency parameter;

[0188] Inverting the initial transparency parameter of the initial material ball to obtain an inverted material ball with inverted transparency parameter;

[0189] Using a second transparency difference at each pixel position between the second transparency parameter and the reverse transparency parameter, the second material ball and the reverse material ball are synthesized to obtain a fourth material ball with a fourth transparency parameter;

[0190] Using the first maximum transparency value of each pixel position between the third transparency parameter and the fourth transparency parameter, the third material ball and the fourth material ball are synthesized to obtain a fifth material ball with a fifth transparency parameter;

[0191] The second material ball and the fifth material ball are synthesized using the second maximum transparency value of each pixel position between the second transparency parameter and the fifth transparency parameter to obtain a first material ball with a first transparency parameter.

[0192] Furthermore, the static texture map includes an environment map, and the first pixel parameters include grayscale pixel parameters and / or pixel parameters of any color channel; when the parameter adjustment module 520 is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameters of the static texture map to obtain the first material ball having the first transparency parameter, the parameter adjustment module 520 is used to:

[0193] The initial transparency parameter of the initial material ball is adjusted using the grayscale pixel parameters of the environment map or the pixel parameters of any color channel to obtain a first material ball with a first transparency parameter; wherein the environment map is used to render the environment pattern in the surface texture of the target model.

[0194] Furthermore, the second pixel parameter includes a pixel parameter of any color channel; when the parameter adjustment module 520 is used to adjust the first transparency parameter of the first material ball using the second pixel parameter of the dynamic texture map that changes with time to obtain a target material ball whose transparency parameter changes with time, the parameter adjustment module 520 is used to:

[0195] The pixel parameters of any color channel of the dynamic texture map that changes with time are used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0196] Furthermore, the dynamic texture map includes a fog dynamic map; the parameter adjustment module 520 is used to obtain the fog dynamic map through the following steps:

[0197] Obtaining an original noise map according to the surface texture of the target model;

[0198] Using a preset first offset parameter, performing an offset process on the first original coordinate of each pixel position in the original noise map to obtain a first offset coordinate of each pixel position;

[0199] The original noise map is sampled according to the first original coordinate of each pixel position and the first offset coordinate of each pixel position to obtain the fog dynamic map; wherein the fog dynamic map is used to render the fog effect on the surface texture of the target model.

[0200] Furthermore, the dynamic texture map also includes a light and shadow dynamic map; the parameter adjustment module 520 is used to obtain the light and shadow dynamic map through the following steps:

[0201] Obtaining an original light and shadow map according to the surface texture of the target model;

[0202] Using a preset second offset parameter, offsetting the second original coordinates of each pixel position in the original light and shadow map to obtain a flowing light and shadow map; wherein each pixel position in the flowing light and shadow map has the second offset coordinates;

[0203] performing an offset process on the second original coordinate of each pixel position in the original light and shadow map according to a flickering speed and a flickering time of the light and shadow dynamic map on the texture surface of the target model to obtain a third offset coordinate of each pixel position;

[0204] Using the third offset coordinate of each pixel position, sampling the original light and shadow map to obtain a flickering light and shadow map;

[0205] The flow light and shadow map and the flickering light and shadow map are synthesized according to the second offset coordinates of each pixel position and the third offset coordinates of each pixel position to obtain the light and shadow dynamic map; wherein the light and shadow dynamic map is used to render the light and shadow effects on the surface texture of the target model.

[0206] Furthermore, the texture map includes a foreground pattern map, an environment map, a fog dynamic map, and a light and shadow dynamic map; when the parameter adjustment module 520 is used to adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time, the parameter adjustment module 520 is used to:

[0207] Based on the pixel parameters of the foreground pattern map, the pixel parameters of the environment map, the pixel parameters of the fog dynamic map, and the pixel parameters of the light and shadow dynamic map, the initial transparency parameter of the initial material ball is gradually adjusted to obtain a gradually adjusted target material ball; wherein the transparency parameter of the gradually adjusted target material ball changes over time;

[0208] When the effect rendering module 530 is used to render the target model using the target material ball to obtain the dynamic effect of the target model, the effect rendering module 530 is used to:

[0209] The target model is rendered using the gradually adjusted target material ball to obtain a target model with a dynamic effect; wherein the dynamic effect displays the foreground pattern map and the environment map, and has a fog dynamic effect and a light and shadow dynamic effect.

[0210] The model rendering device for dynamic effects provided in an embodiment of the present application obtains the initial transparency parameter of an initial material ball based on the material information of the target model; adjusts the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time; and uses the target material ball to render the target model to obtain the dynamic effect of the target model. In this way, without the need to produce animation special effects, the target model with dynamic effects can be simulated by using the time-varying transparency parameter carried by the target material ball. In this way, by avoiding the use of animation special effects, the calculation example consumption during the terminal device rendering process is reduced, and the difficulty of producing dynamic effects is reduced.

[0211] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6As shown in , the electronic device 600 includes a processor 610, a memory 620 and a bus 630. The memory 620 stores machine-readable instructions executable by the processor 610. When the electronic device runs a model rendering method for a dynamic effect as in the embodiment, the processor 610 communicates with the memory 620 via the bus 630. The processor 610 executes the machine-readable instructions. The processor 610 performs the preamble of the method item to perform the following steps:

[0212] According to the material information of the target model, obtain the initial transparency parameter of the initial material ball;

[0213] Based on the pixel parameters of the texture map, the initial transparency parameter of the initial material ball is adjusted to obtain a target material ball whose transparency parameter changes over time; wherein the texture map includes a dynamic texture map; the dynamic texture map is used to perform dynamic effect rendering on the surface texture of the target model;

[0214] The target model is rendered using the target material ball to obtain a dynamic effect of the target model.

[0215] In a feasible embodiment, the texture map further includes a static texture map; the processor 610 is configured to adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time, specifically for:

[0216] Using the first pixel parameter of the static texture map, adjusting the initial transparency parameter of the initial material ball to obtain a first material ball with the first transparency parameter; wherein the static texture map is used to perform static pattern rendering on the surface texture of the target model;

[0217] The second pixel parameter of the dynamic texture map that changes with time is used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0218] In one feasible embodiment, the static texture map includes a foreground pattern map; when the processor 610 is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameter of the static texture map to obtain the first material ball having the first transparency parameter, it is specifically configured to:

[0219] Determine the transparent area and the non-transparent area in the initial material ball according to the surface texture of the target model;

[0220] The initial transparency parameter of the non-transparent area is adjusted using the first pixel parameter of the foreground pattern map to obtain a first material ball with the first transparency parameter; wherein the foreground pattern map is used to render the foreground pattern in the surface texture of the target model.

[0221] In a feasible embodiment, when the processor 610 is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameter of the foreground pattern map to obtain the first material ball with the first transparency parameter, it is specifically used to:

[0222] Using the first pixel parameter of the foreground pattern map, adjusting the initial transparency parameter in the non-transparent area to obtain a second material ball with a second transparency parameter;

[0223] Using a first transparency difference at each pixel position between the initial transparency parameter and the second transparency parameter, the initial material ball and the second material ball are synthesized to obtain a third material ball with a third transparency parameter;

[0224] Inverting the initial transparency parameter of the initial material ball to obtain an inverted material ball with inverted transparency parameter;

[0225] Using a second transparency difference at each pixel position between the second transparency parameter and the reverse transparency parameter, the second material ball and the reverse material ball are synthesized to obtain a fourth material ball with a fourth transparency parameter;

[0226] Using the first maximum transparency value of each pixel position between the third transparency parameter and the fourth transparency parameter, the third material ball and the fourth material ball are synthesized to obtain a fifth material ball with a fifth transparency parameter;

[0227] The second material ball and the fifth material ball are synthesized using the second maximum transparency value of each pixel position between the second transparency parameter and the fifth transparency parameter to obtain a first material ball with a first transparency parameter.

[0228] In one feasible embodiment, the static texture map includes an environment map, and the first pixel parameters include grayscale pixel parameters and / or pixel parameters of any color channel; when the processor 610 is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameters of the static texture map to obtain the first material ball having the first transparency parameter, it is specifically configured to:

[0229] The initial transparency parameter of the initial material ball is adjusted using the grayscale pixel parameters of the environment map or the pixel parameters of any color channel to obtain a first material ball with a first transparency parameter; wherein the environment map is used to render the environment pattern in the surface texture of the target model.

[0230] In a feasible embodiment, the second pixel parameter includes a pixel parameter of any color channel; when the processor 610 is used to adjust the first transparency parameter of the first material ball using the second pixel parameter of the dynamic texture map that changes with time to obtain a target material ball with a transparency parameter that changes with time, it is specifically used to:

[0231] The pixel parameters of any color channel of the dynamic texture map that changes with time are used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0232] In a feasible embodiment, the dynamic texture map includes a fog dynamic map; the processor 610 is configured to obtain the fog dynamic map through the following steps:

[0233] Obtaining an original noise map according to the surface texture of the target model;

[0234] Using a preset first offset parameter, performing an offset process on the first original coordinate of each pixel position in the original noise map to obtain a first offset coordinate of each pixel position;

[0235] The original noise map is sampled according to the first original coordinate of each pixel position and the first offset coordinate of each pixel position to obtain the fog dynamic map; wherein the fog dynamic map is used to render the fog effect on the surface texture of the target model.

[0236] In a feasible embodiment, the dynamic texture map further includes a light and shadow dynamic map; the processor 610 is configured to obtain the light and shadow dynamic map through the following steps:

[0237] Obtaining an original light and shadow map according to the surface texture of the target model;

[0238] Using a preset second offset parameter, offsetting the second original coordinates of each pixel position in the original light and shadow map to obtain a flowing light and shadow map; wherein each pixel position in the flowing light and shadow map has the second offset coordinates;

[0239] performing an offset process on the second original coordinate of each pixel position in the original light and shadow map according to a flickering speed and a flickering time of the light and shadow dynamic map on the texture surface of the target model to obtain a third offset coordinate of each pixel position;

[0240] Using the third offset coordinate of each pixel position, sampling the original light and shadow map to obtain a flickering light and shadow map;

[0241] The flow light and shadow map and the flickering light and shadow map are synthesized according to the second offset coordinates of each pixel position and the third offset coordinates of each pixel position to obtain the light and shadow dynamic map; wherein the light and shadow dynamic map is used to render the light and shadow effects on the surface texture of the target model.

[0242] In one feasible embodiment, the texture map includes a foreground pattern map, an environment map, a fog dynamic map, and a light and shadow dynamic map; the processor 610 is used to execute pixel parameters based on the texture map, adjust the initial transparency parameter of the initial material ball, and obtain a target material ball whose transparency parameter changes over time, specifically for:

[0243] Based on the pixel parameters of the foreground pattern map, the pixel parameters of the environment map, the pixel parameters of the fog dynamic map, and the pixel parameters of the light and shadow dynamic map, the initial transparency parameter of the initial material ball is gradually adjusted to obtain a gradually adjusted target material ball; wherein the transparency parameter of the gradually adjusted target material ball changes over time;

[0244] The processor 610 is configured to perform rendering processing on the target model using the target material ball to obtain a dynamic effect of the target model, specifically for:

[0245] The target model is rendered using the gradually adjusted target material ball to obtain a target model with a dynamic effect; wherein the dynamic effect displays the foreground pattern map and the environment map, and has a fog dynamic effect and a light and shadow dynamic effect.

[0246] In the above method, an initial transparency parameter of an initial material ball is obtained based on the material information of the target model; the initial transparency parameter of the initial material ball is adjusted based on the pixel parameters of the texture map to obtain a target material ball with a time-varying transparency parameter; and the target model is rendered using the target material ball to obtain a dynamic effect of the target model. In this way, without the need to produce animation effects, a target model with a dynamic effect can be simulated by using the time-varying transparency parameter carried by the target material ball. In this way, by avoiding the use of animation effects, the computational cost of the terminal device rendering process is reduced, and the difficulty of producing dynamic effects is reduced. In addition, in order to enable the corresponding static texture map to be displayed on the surface texture of the rendered target model, the transparency of the material ball can be adjusted based on the first pixel parameter (e.g., the transparency parameter) of the static texture map to ensure that the pixels in the area of ​​the target model displaying the static texture map appear non-transparent. Moreover, during the process of changing the transparency parameter of the material ball, in order to further increase the realism of the rendering effect, a false ambient light can be created on the surface texture of the rendered target model using an environment map, thereby creating false lighting information for the surface texture of the rendered target model.

[0247] An embodiment of the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium. The computer program is executed when a processor is run, and the processor performs the following steps:

[0248] According to the material information of the target model, obtain the initial transparency parameter of the initial material ball;

[0249] Based on the pixel parameters of the texture map, the initial transparency parameter of the initial material ball is adjusted to obtain a target material ball whose transparency parameter changes over time; wherein the texture map includes a dynamic texture map; the dynamic texture map is used to perform dynamic effect rendering on the surface texture of the target model;

[0250] The target model is rendered using the target material ball to obtain a dynamic effect of the target model.

[0251] In a feasible embodiment, the texture map further includes a static texture map; the processor is configured to adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time, specifically for:

[0252] Using the first pixel parameter of the static texture map, adjusting the initial transparency parameter of the initial material ball to obtain a first material ball with the first transparency parameter; wherein the static texture map is used to perform static pattern rendering on the surface texture of the target model;

[0253] The second pixel parameter of the dynamic texture map that changes with time is used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0254] In one feasible embodiment, the static texture map includes a foreground pattern map; when the processor is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameter of the static texture map to obtain the first material ball having the first transparency parameter, it is specifically used to:

[0255] Determine the transparent area and the non-transparent area in the initial material ball according to the surface texture of the target model;

[0256] The initial transparency parameter of the non-transparent area is adjusted using the first pixel parameter of the foreground pattern map to obtain a first material ball with the first transparency parameter; wherein the foreground pattern map is used to render the foreground pattern in the surface texture of the target model.

[0257] In a feasible embodiment, when the processor is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameter of the foreground pattern map to obtain the first material ball with the first transparency parameter, it is specifically used to:

[0258] Using the first pixel parameter of the foreground pattern map, adjusting the initial transparency parameter in the non-transparent area to obtain a second material ball with a second transparency parameter;

[0259] Using a first transparency difference at each pixel position between the initial transparency parameter and the second transparency parameter, the initial material ball and the second material ball are synthesized to obtain a third material ball with a third transparency parameter;

[0260] Inverting the initial transparency parameter of the initial material ball to obtain an inverted material ball with inverted transparency parameter;

[0261] Using a second transparency difference at each pixel position between the second transparency parameter and the reverse transparency parameter, the second material ball and the reverse material ball are synthesized to obtain a fourth material ball with a fourth transparency parameter;

[0262] Using the first maximum transparency value of each pixel position between the third transparency parameter and the fourth transparency parameter, the third material ball and the fourth material ball are synthesized to obtain a fifth material ball with a fifth transparency parameter;

[0263] The second material ball and the fifth material ball are synthesized using the second maximum transparency value of each pixel position between the second transparency parameter and the fifth transparency parameter to obtain a first material ball with a first transparency parameter.

[0264] In one feasible embodiment, the static texture map includes an environment map, and the first pixel parameters include grayscale pixel parameters and / or pixel parameters of any color channel; when the processor is used to adjust the initial transparency parameter of the initial material ball using the first pixel parameters of the static texture map to obtain the first material ball having the first transparency parameter, it is specifically used to:

[0265] The initial transparency parameter of the initial material ball is adjusted using the grayscale pixel parameters of the environment map or the pixel parameters of any color channel to obtain a first material ball with a first transparency parameter; wherein the environment map is used to render the environment pattern in the surface texture of the target model.

[0266] In a feasible embodiment, the second pixel parameter includes a pixel parameter of any color channel; when the processor is used to adjust the first transparency parameter of the first material ball using the second pixel parameter of the dynamic texture map that changes with time to obtain a target material ball with a transparency parameter that changes with time, the processor is specifically used to:

[0267] The pixel parameters of any color channel of the dynamic texture map that changes with time are used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

[0268] In a feasible embodiment, the dynamic texture map includes a fog dynamic map; the processor is configured to obtain the fog dynamic map by the following steps:

[0269] Obtaining an original noise map according to the surface texture of the target model;

[0270] Using a preset first offset parameter, performing an offset process on the first original coordinate of each pixel position in the original noise map to obtain a first offset coordinate of each pixel position;

[0271] The original noise map is sampled according to the first original coordinate of each pixel position and the first offset coordinate of each pixel position to obtain the fog dynamic map; wherein the fog dynamic map is used to render the fog effect on the surface texture of the target model.

[0272] In a feasible embodiment, the dynamic texture map further includes a light and shadow dynamic map; the processor is configured to obtain the light and shadow dynamic map through the following steps:

[0273] Obtaining an original light and shadow map according to the surface texture of the target model;

[0274] Using a preset second offset parameter, offsetting the second original coordinates of each pixel position in the original light and shadow map to obtain a flowing light and shadow map; wherein each pixel position in the flowing light and shadow map has the second offset coordinates;

[0275] performing an offset process on the second original coordinate of each pixel position in the original light and shadow map according to a flickering speed and a flickering time of the light and shadow dynamic map on the texture surface of the target model to obtain a third offset coordinate of each pixel position;

[0276] Using the third offset coordinate of each pixel position, sampling the original light and shadow map to obtain a flickering light and shadow map;

[0277] The flow light and shadow map and the flickering light and shadow map are synthesized according to the second offset coordinates of each pixel position and the third offset coordinates of each pixel position to obtain the light and shadow dynamic map; wherein the light and shadow dynamic map is used to render the light and shadow effects on the surface texture of the target model.

[0278] In a feasible embodiment, the texture map includes a foreground pattern map, an environment map, a fog dynamic map, and a light and shadow dynamic map; the processor is used to execute pixel parameters based on the texture map, adjust the initial transparency parameter of the initial material ball, and obtain a target material ball whose transparency parameter changes over time, specifically for:

[0279] Based on the pixel parameters of the foreground pattern map, the pixel parameters of the environment map, the pixel parameters of the fog dynamic map, and the pixel parameters of the light and shadow dynamic map, the initial transparency parameter of the initial material ball is gradually adjusted to obtain a gradually adjusted target material ball; wherein the transparency parameter of the gradually adjusted target material ball changes over time;

[0280] The processor is configured to perform rendering processing on the target model using the target material ball to obtain a dynamic effect of the target model, specifically for:

[0281] The target model is rendered using the gradually adjusted target material ball to obtain a target model with a dynamic effect; wherein the dynamic effect displays the foreground pattern map and the environment map, and has a fog dynamic effect and a light and shadow dynamic effect.

[0282] In the above method, an initial transparency parameter of an initial material ball is obtained based on the material information of the target model; the initial transparency parameter of the initial material ball is adjusted based on the pixel parameters of the texture map to obtain a target material ball with a time-varying transparency parameter; and the target model is rendered using the target material ball to obtain a dynamic effect of the target model. In this way, without the need to produce animation effects, a target model with a dynamic effect can be simulated by using the time-varying transparency parameter carried by the target material ball. In this way, by avoiding the use of animation effects, the computational cost of the terminal device rendering process is reduced, and the difficulty of producing dynamic effects is reduced. In addition, in order to enable the corresponding static texture map to be displayed on the surface texture of the rendered target model, the transparency of the material ball can be adjusted based on the first pixel parameter (e.g., the transparency parameter) of the static texture map to ensure that the pixels in the area of ​​the target model displaying the static texture map appear non-transparent. Moreover, during the process of changing the transparency parameter of the material ball, in order to further increase the realism of the rendering effect, a false ambient light can be created on the surface texture of the rendered target model using an environment map, thereby creating false lighting information for the surface texture of the rendered target model.

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

[0284] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.

[0285] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0286] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0287] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0288] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-mentioned embodiments within the technical scope disclosed in the present application, or perform equivalent replacements for some of the technical features thereof. These modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for rendering a model with dynamic effects, characterized in that: The model rendering method includes: According to the material information of the target model, obtain the initial transparency parameter of the initial material ball; Based on the pixel parameters of the texture map, the initial transparency parameter of the initial material ball is adjusted to obtain a target material ball whose transparency parameter changes over time; wherein the texture map includes a dynamic texture map; the dynamic texture map is used to perform dynamic effect rendering on the surface texture of the target model; Rendering the target model using the target material ball to obtain a dynamic effect of the target model; The texture map further includes a static texture map; and adjusting the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time includes: Using the first pixel parameter of the static texture map, adjusting the initial transparency parameter of the initial material ball to obtain a first material ball with the first transparency parameter; wherein the static texture map is used to perform static pattern rendering on the surface texture of the target model; The second pixel parameter of the dynamic texture map that changes with time is used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

2. The model rendering method according to claim 1, characterized in that: The static texture map includes a foreground pattern map; and adjusting the initial transparency parameter of the initial material ball using the first pixel parameter of the static texture map to obtain a first material ball having the first transparency parameter, comprising: Determine the transparent area and the non-transparent area in the initial material ball according to the surface texture of the target model; The initial transparency parameter of the non-transparent area is adjusted using the first pixel parameter of the foreground pattern map to obtain a first material ball with the first transparency parameter; wherein the foreground pattern map is used to render the foreground pattern in the surface texture of the target model.

3. The model rendering method according to claim 2, characterized in that: The method of adjusting the initial transparency parameter of the initial material ball by using the first pixel parameter of the foreground pattern map to obtain the first material ball having the first transparency parameter includes: Using the first pixel parameter of the foreground pattern map, adjusting the initial transparency parameter in the non-transparent area to obtain a second material ball with a second transparency parameter; Using a first transparency difference at each pixel position between the initial transparency parameter and the second transparency parameter, the initial material ball and the second material ball are synthesized to obtain a third material ball with a third transparency parameter; Inverting the initial transparency parameter of the initial material ball to obtain an inverted material ball with inverted transparency parameter; Using a second transparency difference at each pixel position between the second transparency parameter and the reverse transparency parameter, the second material ball and the reverse material ball are synthesized to obtain a fourth material ball with a fourth transparency parameter; Using the first maximum transparency value of each pixel position between the third transparency parameter and the fourth transparency parameter, the third material ball and the fourth material ball are synthesized to obtain a fifth material ball with a fifth transparency parameter; The second material ball and the fifth material ball are synthesized using the second maximum transparency value of each pixel position between the second transparency parameter and the fifth transparency parameter to obtain a first material ball with a first transparency parameter.

4. The model rendering method according to claim 1, characterized in that: The static texture map includes an environment map, the first pixel parameters include grayscale pixel parameters and / or pixel parameters of any color channel; and using the first pixel parameters of the static texture map to adjust the initial transparency parameters of the initial material ball to obtain the first material ball having the first transparency parameter, comprising: The initial transparency parameter of the initial material ball is adjusted using the grayscale pixel parameters of the environment map or the pixel parameters of any color channel to obtain a first material ball with a first transparency parameter; wherein the environment map is used to render the environment pattern in the surface texture of the target model.

5. The model rendering method according to claim 1, characterized in that: The second pixel parameter includes a pixel parameter of any color channel; and the method of adjusting the first transparency parameter of the first material ball by using the second pixel parameter of the dynamic texture map that changes with time to obtain a target material ball whose transparency parameter changes with time includes: The pixel parameters of any color channel of the dynamic texture map that changes with time are used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

6. The model rendering method according to claim 1, characterized in that: The dynamic texture map includes a fog dynamic map; Obtain the fog dynamic map by following the steps below: Obtaining an original noise map according to the surface texture of the target model; Using a preset first offset parameter, performing an offset process on the first original coordinate of each pixel position in the original noise map to obtain a first offset coordinate of each pixel position; The original noise map is sampled according to the first original coordinate of each pixel position and the first offset coordinate of each pixel position to obtain the fog dynamic map; wherein the fog dynamic map is used to render the fog effect on the surface texture of the target model.

7. The model rendering method according to claim 1, characterized in that: The dynamic texture map also includes light and shadow dynamic map; Obtain the light and shadow dynamic map by following the steps below: Obtaining an original light and shadow map according to the surface texture of the target model; Using a preset second offset parameter, offsetting the second original coordinates of each pixel position in the original light and shadow map to obtain a flowing light and shadow map; wherein each pixel position in the flowing light and shadow map has the second offset coordinates; performing an offset process on the second original coordinate of each pixel position in the original light and shadow map according to a flickering speed and a flickering time of the light and shadow dynamic map on the texture surface of the target model to obtain a third offset coordinate of each pixel position; Using the third offset coordinate of each pixel position, sampling the original light and shadow map to obtain a flickering light and shadow map; The flow light and shadow map and the flickering light and shadow map are synthesized according to the second offset coordinates of each pixel position and the third offset coordinates of each pixel position to obtain the light and shadow dynamic map; wherein the light and shadow dynamic map is used to render the light and shadow effects on the surface texture of the target model.

8. The model rendering method according to claim 1, characterized in that: The texture maps include a foreground pattern map, an environment map, a fog dynamic map, and a light and shadow dynamic map; the initial transparency parameter of the initial material ball is adjusted based on the pixel parameters of the texture maps to obtain a target material ball whose transparency parameter changes with time, including: Based on the pixel parameters of the foreground pattern map, the pixel parameters of the environment map, the pixel parameters of the fog dynamic map, and the pixel parameters of the light and shadow dynamic map, the initial transparency parameter of the initial material ball is gradually adjusted to obtain a gradually adjusted target material ball; wherein the transparency parameter of the gradually adjusted target material ball changes over time; The step of rendering the target model using the target material ball to obtain a dynamic effect of the target model includes: The target model is rendered using the gradually adjusted target material ball to obtain a target model with a dynamic effect; wherein the dynamic effect displays the foreground pattern map and the environment map, and has a fog dynamic effect and a light and shadow dynamic effect.

9. A model rendering device with dynamic effects, characterized in that: The model rendering device includes: The parameter acquisition module is used to obtain the initial transparency parameter of the initial material ball according to the material information of the target model; A parameter adjustment module, configured to adjust an initial transparency parameter of the initial material ball based on pixel parameters of a texture map, to obtain a target material ball whose transparency parameter changes over time; wherein the texture map includes a dynamic texture map; and the dynamic texture map is configured to dynamically render the surface texture of the target model; An effect rendering module, configured to render the target model using the target material ball to obtain a dynamic effect of the target model; The texture map also includes a static texture map; when the parameter adjustment module is used to adjust the initial transparency parameter of the initial material ball based on the pixel parameters of the texture map to obtain a target material ball whose transparency parameter changes over time, the parameter adjustment module is used to: Using the first pixel parameter of the static texture map, adjusting the initial transparency parameter of the initial material ball to obtain a first material ball with the first transparency parameter; wherein the static texture map is used to perform static pattern rendering on the surface texture of the target model; The second pixel parameter of the dynamic texture map that changes with time is used to adjust the first transparency parameter of the first material ball to obtain a target material ball whose transparency parameter changes with time.

10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus. When the processor is running, the machine-readable instructions execute the steps of the dynamic effect model rendering method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the dynamic effect model rendering method according to any one of claims 1 to 8 are executed.

Citation Information

Patent Citations

  • 3D (three-dimensional) volume light dynamic implementation method and device

    CN102243769A

  • Three-dimensional object color adjusting method and device, computer equipment and computer readable storage medium

    CN108876931A