A method for controlling the mapping effect of three-dimensional models

By setting the enablement, color tuning, texture map and feature map parameters, controlling the mixing and transparency changes of three-dimensional model maps, the problems of large memory usage and single effect in traditional methods are solved, and rich visual effects and resource-saving effects are achieved.

CN114511672BActive Publication Date: 2024-11-05ZHEJIANG HUINAO INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210083905.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2024-11-05
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

The traditional three-dimensional model mapping method has the problem of large memory and computing power consumption, and the effect is single, making it difficult to achieve rich visual effects and model transparency changes.

Method used

By setting the enablement, color tuning, texture map, feature map and effect type parameters, control the mixing, overlay, mining and transparency changes of the three-dimensional model map, and use UV coordinates and feature information to generate shadows, parallax, metal reflection and other effects.

Benefits of technology

It saves the occupation of the map input bits, expands the role of texture maps, provides rich color change effects and DIY capabilities, suitable for display and modification of three-dimensional models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114511672B_ABST
    Figure CN114511672B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for controlling the mapping effect of a three-dimensional model, wherein several groups of mapping setting parameters are set for the three-dimensional model, each group of mapping setting parameters is composed of color adjustment parameters, texture mapping, feature mapping, and effect type parameters; wherein the activation degree parameter determines whether to enable the feature mapping, texture mapping, or color adjustment parameters; the effect type parameter determines whether the texture mapping and the existing image on the surface of the three-dimensional model are mixed, superimposed, excavated, or the transparency is changed, and the type of data expression of the feature mapping belongs to shadow, height or metalness and smoothness, etc.; the color adjustment parameter is used for color change, mixing weight, brightness, and transparency. The present invention uses the activation degree parameter, effect type parameter, and color adjustment parameter to control the display effect of the texture mapping and the feature mapping, and produces rich color, shadow, gloss, and color change effects, which is particularly suitable for DIY of model mapping.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of three-dimensional model production and display, and in particular to a method for controlling three-dimensional model mapping and effects. Background Art

[0002] The traditional method of adding textures and setting effects to 3D models is to add a main texture to express the overall color, and add effect textures as needed, such as normal maps for shadow effects, height maps for parallax, highlight maps for specular reflection, luminous maps for luminescence, occlusion maps for occlusion, etc. These textures use the same UV, tiling and translation parameters as the main texture, and then add a four-sided continuous detail texture map and corresponding normal map as needed, and set another set of tiling and translation parameters, and use tiling to reuse detail texture maps to improve the clarity of local textures and reduce the file size of the texture. In order to reduce the use of memory and computing power, some 3D software now has certain restrictions on the size and number of textures. For example, the default number of textures allowed by UNITY3D software is 16, and the textures occupied by baking environment, etc. are also included. In order to create rich effects in practical applications, it is sometimes necessary to add multiple texture maps and effect maps on the model surface. Therefore, multiple material balls are used or the model is divided into multiple parts to increase the input bits of the map. This method cannot move the map across parts and consumes more computing power. Traditional effect maps use the same UV and tiling parameters as the main map, which will result in lower clarity or larger image files. Traditional detail texture maps and existing model maps use color mixing mode, which has a relatively simple effect and does not change the model's transparency, dig holes, and other special effects. Summary of the invention

[0003] In order to solve the above-mentioned technical problems existing in the prior art, the purpose of the present invention is to provide a method for controlling the mapping effect of a three-dimensional model, by setting parameters to make the same texture map and the existing image on the model surface produce different effects such as mixing, covering, digging out or changing transparency, so that the feature map of the same input position can form different visual effects such as shadows, height parallax, metallic reflections, etc., saving the occupation of the map input position, and can provide rich color change effects, so that users can easily DIY the three-dimensional model mapping.

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

[0005] A method for controlling the mapping effect of a three-dimensional model is used to set several groups of mapping setting parameters for the three-dimensional model, each group of mapping setting parameters is composed of an activation parameter, a color adjustment parameter, a texture map, a feature map, and an effect type parameter, and each vertex data of the three-dimensional model contains UV coordinates; the activation parameter determines whether the three-dimensional model obtains information of corresponding positions from the feature map and texture map of the group according to the UV coordinates and whether to enable the color adjustment parameters of the group or close the mapping setting parameters of the group; the effect type parameter determines the way in which the texture map of the group is mixed or superimposed with the existing image on the surface of the three-dimensional model and the type of data expression of the feature map of the group; the color adjustment parameters include four parameters: tr, tg, tb, and ta; each pixel of the texture map includes four parameters: r, g, b, and a, and the value range of the parameters is 0 to 1, which respectively express the proportion and visibility of red, green, and blue; each pixel of the feature map includes four feature parameters: x, y, z, and w.

[0006] Furthermore, the information sampled by the feature map expresses normal information and bump height information when the effect type parameter is coverage, and expresses normal information, metalness and smoothness when the effect type parameter is reflection; and expresses normal information when the effect type parameter is other options.

[0007] Furthermore, the color adjustment parameters include four parameters: tr, tg, tb, and ta, and the value range of the parameters is 0 to 1; the r parameter obtained by sampling the texture map is adjusted by tr so that the new r value is equal to (2 * tr - 1) * (if tr <0.5, r: (1-r)), and tg and tb are adjusted by the same algorithm to obtain new g and b values, that is, the increase and decrease of the three colors of red, green, and blue are achieved to obtain the color adjustment effect of the texture map; if the activation parameter turns off the sampling of the texture map, the four parameters of the color adjustment parameters, tr, tg, tb, and ta, are directly displayed as sampling results at the corresponding position on the surface of the three-dimensional model.

[0008] Furthermore, when the effect type parameter is mixed, the color of the three-dimensional model surface is the existing color multiplied by the RGB parameter sampled from the texture map, multiplied by the sampled a parameter, and then divided by (1.5-the ta value of the color adjustment parameter), that is, the ta value of the color adjustment parameter can have a brightening or darkening effect; the feature map expresses the normal information, that is, it conveys the inclination direction information of the model surface, which can produce a shadow effect under light.

[0009] Furthermore, when the effect type parameter is overlay, the color finally presented by the three-dimensional model 1 is the existing color multiplied by (1-the a parameter sampled from the texture map 23 multiplied by the ta value of the color adjustment parameter), plus the RGB parameter sampled from the texture map multiplied by the a parameter sampled multiplied by the ta value of the color adjustment parameter; that is, the ta value of the color adjustment parameter can adjust the degree of coverage and occlusion of the texture map; the feature map expresses the normal information and the bump height information, and the bump height information conveys the degree to which the position on the model surface is higher or lower than the fragment section. The program will offset the image at that position according to the observation angle, thereby producing a more three-dimensional parallax effect when the observation direction is changed or the three-dimensional model is rotated.

[0010] Furthermore, when the effect type parameter is reflection, the color of the surface of the three-dimensional model is the existing color multiplied by (1-the a parameter sampled from the texture map multiplied by the ta value of the color adjustment parameter), plus the RGB parameter sampled from the texture map multiplied by the sampled a parameter multiplied by the ta value of the color adjustment parameter; that is, the ta value of the color adjustment parameter can adjust the degree of coverage and occlusion of the texture map; the feature map expresses normal information, metalness and smoothness information, the metalness information conveys the ability of the model to reflect the surrounding ambient light, and the smoothness information conveys the discreteness of the direction in which the model reflects the surrounding ambient light, thereby better expressing the surface texture of the three-dimensional model.

[0011] Furthermore, when the effect type parameter is self-luminous, the color of the surface of the three-dimensional model is the existing color multiplied by (1-the a parameter sampled from the texture map), and then after ambient light processing, the RGB parameter sampled from the texture map multiplied by the sampled a parameter multiplied by the ta value of the color adjustment parameter; that is, the color sampled from the texture map in the luminous mode is not affected by the ambient light, and the ta value of the color adjustment parameter can play a role in adjusting the luminous brightness.

[0012] Furthermore, when the effect type parameter is translucent, the color of the surface of the three-dimensional model is the existing color multiplied by the RGB parameter sampled from the texture map, and then divided by (1.5-the ta value of the color adjustment parameter), and the sampled a value is used to change the transparency of the model at that position, thereby producing a translucent or hollowed-out effect.

[0013] Furthermore, when the effect type parameter is digging a hole, a texture map is made and specific parameters are given to the area where a hole needs to be dug. If the parameter sampled from the texture map according to the UV coordinate is a specific value, the transparency of the model at that position is changed to fully transparent, thereby producing the effect of a hole being dug.

[0014] Beneficial effects of the present invention:

[0015] 1. The present invention enables the feature map of the same input position to play different visual effects such as shadow, height parallax, metal reflection, etc. by setting the effect type parameter, and greatly saves the occupation of the map input position;

[0016] 2. The present invention sets effect type parameters to make the texture map of the same input position produce different effects such as mixing, covering, removing or changing transparency with the existing image on the model surface, which greatly expands the role of texture mapping and enriches the display effect;

[0017] 3. The present invention can set the color adjustment parameters to make the same texture map produce rich color changing effects, which can not only reduce the number of texture maps but also allow users to DIY the colors very conveniently;

[0018] 4. The present invention respectively turns off feature mapping, texture mapping and color adjustment parameters by setting the enablement parameter, so that users can easily compare the effects of mapping and switching the model display effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a logical schematic diagram of a method for controlling a three-dimensional model mapping effect according to the present invention playing a role in a rendering process. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] like Figure 1As shown, the method for controlling the mapping effect of a three-dimensional model of the present invention comprises a three-dimensional model and several groups of mapping setting parameters, each group of mapping setting parameters consists of an activation parameter 21, a color adjustment parameter 22, a texture map 23, a feature map 24, and an effect type parameter 25, and each vertex data of the three-dimensional model contains UV coordinates; the activation parameter 21 determines whether the three-dimensional model obtains the information of the corresponding position from the group of feature maps 24 and texture maps 23 according to the UV coordinates and whether to enable the color adjustment parameter 22 of the group or close the group of mapping setting parameters; the effect type parameter 25 determines the way in which the texture map 23 of the group is mixed or superimposed with the existing image on the surface of the three-dimensional model and the type of data expression of the feature map 24 of the group; the color adjustment parameter 22 includes four parameters of tr, tg, tb, and ta; each pixel of the texture map 23 includes four parameters of r, g, b, and a, and the value range of the parameters is 0 to 1, which respectively express the proportion and visibility of red, green, and blue; each pixel of the feature map 24 includes four characteristic parameters of x, y, z, and w.

[0022] like Figure 1 As shown, the information sampled from the feature map 24 expresses normal information and bump height information when the effect type parameter 25 is coverage, and expresses normal information, metalness and smoothness when the effect type parameter 25 is reflection; and expresses normal information when the effect type parameter 25 is other options.

[0023] like Figure 1 As shown, the four parameters tr, tg, tb, and ta have a value range of 0 to 1; the r parameter sampled from the texture map 23 is adjusted with tr to make the new r value equal to (2 * tr - 1) * (if tr < 0.5, r: (1-r)), and tg and tb are adjusted with the same algorithm to obtain new g and b values, that is, the increase and decrease of the three colors of red, green, and blue are achieved to obtain the color adjustment effect of the texture map; if the activation parameter 21 turns off the sampling of the texture map 23, the four parameters tr, tg, tb, and ta of the color adjustment parameter 22 are directly displayed as sampling results at the corresponding position on the surface of the three-dimensional model.

[0024] like Figure 1 As shown, when the effect type parameter 25 is mixed, the color of the 3D model surface is the existing color multiplied by the RGB parameter sampled from the texture map 23, multiplied by the sampled a parameter, and then divided by (1.5-the ta value of the color adjustment parameter), that is, the ta value of the color adjustment parameter can play a brightening or darkening role; the feature map 24 expresses the normal information, that is, it conveys the inclination direction information of the model surface, which can produce a shadow effect under light.

[0025] like Figure 1 As shown, when the effect type parameter 25 is overlay, the final color presented by the three-dimensional model 1 is the existing color multiplied by (1-the a parameter sampled from the texture map 23 multiplied by the ta value of the color adjustment parameter), plus the rgb parameter sampled from the texture map 23 multiplied by the sampled a parameter multiplied by the ta value of the color adjustment parameter; that is, the ta value of the color adjustment parameter can adjust the degree of coverage and occlusion of the texture map 23; the feature map 24 expresses the normal information and the bump height information, and the bump height information conveys the degree to which the position on the model surface is higher or lower than the fragment section. The program will offset the image at that position according to the observation angle, thereby producing a more three-dimensional parallax effect when the observation direction is changed or the three-dimensional model 1 is rotated.

[0026] like Figure 1 As shown, when the effect type parameter 25 is reflection, the color of the surface of the three-dimensional model 1 is the existing color multiplied by (1-the a parameter sampled from the texture map 23 multiplied by the ta value of the color adjustment parameter), plus the RGB parameter sampled from the texture map 23 multiplied by the sampled a parameter multiplied by the ta value of the color adjustment parameter; that is, the a value of the color adjustment parameter can adjust the degree of coverage and occlusion of the texture map 23; the feature map 24 expresses the normal information, metalness and smoothness information, the metalness information conveys the ability of the model to reflect the surrounding light, and the smoothness information conveys the discreteness of the direction in which the model reflects the surrounding light, thereby better showing the surface texture of the three-dimensional model 1.

[0027] like Figure 1 As shown, when the effect type parameter 25 is self-luminous, the color of the surface of the three-dimensional model 1 is the existing color multiplied by (1-the a parameter sampled from the texture map 23), and then after being processed by ambient light, the RGB parameter sampled from the texture map 23 is added multiplied by the sampled a parameter and then multiplied by the ta value of the color adjustment parameter; that is, the color sampled from the texture map in the luminous mode is not affected by the ambient light, and the ta value of the color adjustment parameter can play a role in adjusting the luminous brightness.

[0028] like Figure 1 As shown, when the effect type parameter 25 is semi-transparent, the color of the surface of the three-dimensional model 1 is the existing color multiplied by the RGB parameter sampled from the texture map 23, and then divided by (1.5-the ta value of the color adjustment parameter), and the sampled a value is used to change the transparency of the model at that position, thereby producing a semi-transparent or hollowed-out effect.

[0029] like Figure 1 As shown, when the effect type parameter 25 is digging a hole, a texture map 23 is created to give specific parameters in the area where a hole needs to be dug. If the parameter sampled from the texture map 23 according to the UV coordinate is a specific value, the transparency of the model at that position is changed to fully transparent, thereby producing the effect of a hole being dug.

[0030] Compared with the existing technology, the method for controlling the mapping effect of a three-dimensional model described in the present invention has the advantages of being able to flexibly change the same texture map and the existing image on the model surface to produce different effects such as mixing, covering, digging out or changing the transparency, and can make the feature map of the same input position play a role in forming different visual effects such as shadows, height parallax, metal reflection, etc., which greatly saves the occupation of the map input position, can provide rich color change effects, and allows users to very conveniently compare the effects of having and not having maps and realize the switching of model display effects, which is particularly suitable for DIY of three-dimensional model mapping.

[0031] The present invention is only described in this specification for some preferred embodiments, and is not intended to be limiting thereof. The professional and technical personnel may increase the types of effects, change the calculation method of mixing or color change, add other maps or parameters, etc. according to the concept and spirit of the present invention, and these should still fall within the scope of protection of the present invention.

Claims

1. A method for controlling a three-dimensional model mapping effect, for setting a plurality of mapping setting parameters for the three-dimensional model, each mapping setting parameter comprising an activation parameter (21), a color adjustment parameter (22), a texture map (23), a feature map (24), and an effect type parameter (25). Features: Each vertex data of the three-dimensional model includes UV coordinates; the activation parameter (21) determines whether the three-dimensional model obtains the corresponding position information from the group of feature maps (24) and texture maps (23) according to the UV coordinates and whether to enable the color adjustment parameters (22) of the group or disable the group of map setting parameters; the effect type parameter (25) determines the way in which the texture maps (23) of the group are mixed or superimposed with the existing images on the surface of the three-dimensional model and the type of data expression of the feature maps (24) of the group; the color adjustment parameters (22) include four color adjustment parameters, namely tr, tg, tb, and ta; each pixel of the texture map (23) includes four color parameters, namely r, g, b, and a, with a value range of 0 to 1, which respectively express the proportion and visibility of red, green, and blue; each pixel of the feature map (24) includes four feature parameters, namely x, y, z, and w; The parameter value range of the color adjustment parameter (22) is 0 to 1; the four color parameters r, g, b, and a are sampled from the texture map (23); if tr < 0.5, tr is used to adjust the color so that the new r value is equal to (2 * tr - 1) * r, otherwise tr is used to adjust the color so that the new r value is equal to (2 * tr - 1) * (1-r), and tg and tb are used to adjust the color according to the same algorithm to obtain new g and b values, that is, the increase and decrease of the three colors of red, green, and blue are achieved to obtain the color adjustment effect of the texture map; if the activation parameter (21) turns off the sampling of the texture map (23), the four parameters tr, tg, tb, and ta of the color adjustment parameter (22) are directly displayed as sampling results at the corresponding position on the surface of the three-dimensional model.

2. The method for controlling the mapping effect of a three-dimensional model according to claim 1, Features: Each pixel sampled from the feature map (24) includes four feature parameters x, y, z, and w. When the effect type parameter (25) is coverage, it represents normal information and bump height information; when the effect type parameter (25) is reflection, it represents normal information, metalness, and smoothness; when the effect type parameter (25) is other options, it represents normal information.

3. The method for controlling the mapping effect of a three-dimensional model according to claim 2, Features: When the effect type parameter (25) is mixed, the color of the three-dimensional model surface is the RGB value of the existing color multiplied by the RGB parameter sampled from the texture map (23), multiplied by the sampled a parameter, and then divided by the difference between 1.5 and the TA value of the color adjustment parameter, that is, the TA value of the color adjustment parameter can play a brightening or darkening role; the feature map (24) expresses the normal information, that is, it conveys the inclination direction information of the model surface, and can produce a shadow effect under light.

4. The method for controlling the mapping effect of a three-dimensional model according to claim 2, Features: When the effect type parameter (25) is overlay, the color finally presented by the three-dimensional model is the difference between the existing color multiplied by 1 and the a parameter sampled from the texture map (23) multiplied by the ta value of the color adjustment parameter, plus the rgb parameter sampled from the texture map (23) multiplied by the sampled a parameter multiplied by the ta value of the color adjustment parameter; that is, the ta value of the color adjustment parameter can adjust the degree of coverage and occlusion of the texture map (23); the feature map (24) expresses normal information and bump height information, and the bump height information conveys the degree to which the position on the model surface is higher or lower than the fragment section. The program will offset the image of the position according to the observation angle, thereby producing a more three-dimensional parallax effect when changing the observation direction or rotating the three-dimensional model (1).

5. The method for controlling the mapping effect of a three-dimensional model according to claim 2, Features: When the effect type parameter (25) is reflection, the color of the surface of the three-dimensional model is the difference between the existing color multiplied by 1 and the a parameter sampled from the texture map (23) multiplied by the ta value of the color adjustment parameter, plus the rgb parameter sampled from the texture map (23) multiplied by the sampled a parameter multiplied by the ta value of the color adjustment parameter; that is, the ta value of the color adjustment parameter can adjust the degree of coverage and occlusion of the texture map (23); the feature map (24) expresses normal information, metalness and smoothness information, the metalness information conveys the ability of the model to reflect the surrounding light, and the smoothness information conveys the discreteness of the direction in which the model reflects the surrounding light, thereby better expressing the surface texture of the three-dimensional model (1).

6. The method for controlling the mapping effect of a three-dimensional model according to claim 2, Features: When the effect type parameter (25) is self-luminous, the color of the surface of the three-dimensional model is the difference between the existing color multiplied by 1 and the a parameter sampled from the texture map (23), and then after being processed by ambient light, the RGB parameter sampled from the texture map (23) multiplied by the sampled a parameter and then multiplied by the ta value of the color adjustment parameter; that is, the color sampled from the texture map in the luminous mode is not affected by the ambient light, and the ta value of the color adjustment parameter can play a role in adjusting the luminous brightness.

7. The method for controlling the mapping effect of a three-dimensional model according to claim 2, Features: When the effect type parameter (25) is semi-transparent, the color of the surface of the three-dimensional model is the existing color multiplied by the RGB parameter sampled from the texture map (23), and then divided by the difference between 1.5 and the ta value of the color adjustment parameter, and the sampled a parameter is used to change the transparency of the model at that position, thereby producing a semi-transparent or hollowed-out effect.

8. The method for controlling the mapping effect of a three-dimensional model according to claim 2, Features: When the effect type parameter (25) is a hole digging, a texture map (23) is created to give specific parameters in the area where the hole needs to be dug. If the parameter sampled from the texture map (23) according to the UV coordinate is a specific value, the transparency of the model at that position is changed to full transparency, that is, the effect of a hole being dug is generated.