Virtual model processing method and device, electronic equipment and storage medium
By setting up multiple target functional nodes in the virtual engine, the game producers are allowed to set the replacement effect for the material of the virtual model, which solves the problem that the appearance effect of the virtual model in the existing technology is not real enough, and efficient and complex appearance effect production is achieved.
Patent Information
- Application Number
- CN202411659794.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
AI Technical Summary
In the prior art, when game producers use virtual engines such as Unreal Engine to create virtual models, it is difficult for game producers to create real and complex appearance effects, resulting in the appearance effects of virtual models being not realistic enough, the simulation effects are poor, and the production efficiency is not high.
By setting up multiple target function nodes, game producers can set up model material mixing processing according to their own needs, and set replacement effects for the mixed model material, thereby creating a real hybrid model material with ups and downs.
It improves the authenticity and simulation effect of the appearance effect of the virtual model, realizes the programmatic production steps of model materials that have both replacement effects and mixing effects, and can quickly create real and undulating complex appearance effects, improving the efficiency of virtual model production.
Smart Images

Figure CN119587967A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of game technology, and in particular to a method, device, electronic device and storage medium for processing a virtual model. Background Art
[0002] In order to meet people's pursuit of spiritual life, entertainment games that can be operated on terminals have emerged, and more and more terminal games have emerged. Terminal games have become an indispensable way of life and entertainment. In order to enable users to get better game experience, many terminal games are often built based on real characters and scenes. Therefore, when designing games, the realization of game scenes will be closer to the real situation. When developing games, the realization of game resources such as virtual scenes and virtual elements will be closer to the real environment. Taking game development as an example, art and planning often propose the production of game resources. Specifically, through the design of game resources, various virtual resources that simulate real-life scenes can be realized, such as setting virtual models such as virtual ground or virtual rivers for game scenes.
[0003] At present, game producers often use game engines to make game scenes and game characters based on real scenes, for example, they can simulate natural environments such as virtual ground or virtual rivers in real life. In the prior art, game producers usually make virtual models in game engines, for example, using a virtual engine (Unreal Engine, UE) to set different appearance effects for virtual models, and specifically, they can set different materials for the virtual models for mixing to create the appearance effects required by the game producers. However, the existing UE tools can only obtain the appearance effects by mixing different materials, and the appearance effects of the obtained virtual models are not realistic enough, the simulation effect is poor, and it is impossible to produce complex appearance effects with real ups and downs, resulting in low efficiency in virtual model production. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for processing a virtual model. By setting multiple target function nodes, game producers can set model material mixing processing according to their own needs, and can also set displacement effects for mixed model materials, thereby creating a real mixed model material with an undulating displacement effect, improving the authenticity and simulation effect of the appearance effect of the obtained virtual model, and realizing the programming of the steps for producing model materials with both displacement effects and mixing effects, which can quickly produce complex appearance effects with real fluctuations and improve the efficiency of virtual model production.
[0005] In a first aspect, an embodiment of the present application provides a method for processing a virtual model, comprising:
[0006] Acquire at least two model materials of the virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is set with a corresponding displacement map;
[0007] Acquire at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition of each model material when performing material superposition processing;
[0008] Based on the displacement parameters and the displacement maps corresponding to the model materials, material superposition processing is performed to obtain the processed target model material of the virtual model.
[0009] In a second aspect, an embodiment of the present application provides a virtual model processing device, including:
[0010] A first acquisition unit is used to acquire at least two model materials of the virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is set with a corresponding displacement map;
[0011] A second acquisition unit is used to acquire at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition of each model material when performing material superposition processing;
[0012] The processing unit is used to perform material superposition processing based on the displacement parameters and the displacement maps corresponding to the model materials to obtain the processed target model material of the virtual model.
[0013] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; a processor loads instructions from the memory to execute the steps of any virtual model processing method provided in the embodiment of the present application.
[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps of any virtual model processing method provided in the embodiment of the present application.
[0015] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps in any virtual model processing method provided in the embodiment of the present application.
[0016] By adopting the solution of the embodiment of the present application and setting multiple target function nodes, game producers can set the model material mixing processing according to their own needs, and at the same time set the displacement effect for the mixed model material, thereby creating a real mixed model material with an undulating displacement effect, thereby improving the authenticity and simulation effect of the appearance effect of the obtained virtual model, and realizing the programming of the production steps of the model material with both displacement effect and mixing effect, which can quickly produce a complex appearance effect with real fluctuations, and improve the efficiency of virtual model production. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 It is a scene schematic diagram of a virtual model processing system provided in an embodiment of the present application;
[0019] Figure 2 It is a flowchart of an embodiment of a method for processing a virtual model provided in an embodiment of the present application;
[0020] Figure 3 It is a node flow diagram of a method for processing a virtual model provided in an embodiment of the present application;
[0021] Figure 4 It is another node flow diagram of the virtual model processing method provided in the embodiment of the present application;
[0022] Figure 5 It is another node flow diagram of the virtual model processing method provided in the embodiment of the present application;
[0023] Figure 6 It is another node flow diagram of the virtual model processing method provided in the embodiment of the present application;
[0024] Figure 7 It is another node flow diagram of the virtual model processing method provided in the embodiment of the present application;
[0025] Figure 8 It is another node flow diagram of the virtual model processing method provided in the embodiment of the present application;
[0026] Fig. 9 It is another node flow diagram of the virtual model processing method provided in the embodiment of the present application;
[0027] Fig.10 It is another node flow diagram of the virtual model processing method provided in the embodiment of the present application;
[0028] Fig.11 It is another node flow diagram of the virtual model processing method provided in the embodiment of the present application;
[0029] Fig.12 It is a schematic diagram of an editing page of a method for processing a virtual model provided in an embodiment of the present application;
[0030] Fig.13 It is another schematic diagram of an editing page of a method for processing a virtual model provided in an embodiment of the present application;
[0031] Fig.14 It is another schematic diagram of an editing page of a method for processing a virtual model provided in an embodiment of the present application;
[0032] Fig.15 It is another schematic diagram of an editing page of a method for processing a virtual model provided in an embodiment of the present application;
[0033] Fig.16 is a schematic diagram of the structure of a virtual model processing device provided in an embodiment of the present application;
[0034] Fig.17 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0036] The embodiments of the present application provide a method, device, electronic device, and computer-readable storage medium for processing a virtual model. Specifically, the present embodiment will be described from the perspective of a processing device for a virtual model, and the processing device for a virtual model can be specifically integrated in an electronic device, that is, the processing method for a virtual model in the embodiments of the present application can be executed by an electronic device, and optionally, the electronic device can include: a terminal device. The terminal device can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (PC) and the like.
[0037] The virtual model processing method provided in the embodiment of the present application can be applied to a virtual model processing system. The virtual model processing system may include a player terminal device and a server, and the terminal may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. The player terminal device and the server may perform two-way communication via a network.
[0038] Optionally, the server may be an independent server, or a server network or server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0039] The processing method of the virtual model in one embodiment of the present disclosure can be run on a local terminal device or a server. When the processing method of the virtual model is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0040] For example, when the processing method of the virtual model is run on the terminal, the terminal device stores a game application and is used to present a virtual scene in the game screen. The terminal device is used to interact with the user through a graphical user interface, for example, the game application is downloaded and installed by the terminal device and run. The terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on the display screen of the terminal device, or the graphical user interface may be presented through holographic projection. For example, the terminal device may include a touch display screen and a processor, the touch display screen is used to present the graphical user interface and receive the operation instructions generated by the user acting on the graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, respond to the operation instructions, and control the display of the graphical user interface on the touch display screen.
[0041] For example, when the processing method of the virtual model runs on the server, it can be a cloud game. Cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating body of the game application and the game screen presentation body are separated, and the storage and operation of the processing method of the virtual model are completed on the cloud gaming server. The game screen presentation is completed on the client of the cloud gaming. The cloud gaming client is mainly used for receiving and sending game data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, a personal digital assistant, etc., but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the user operates the cloud gaming client to send an operation instruction to the cloud gaming server. The cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.
[0042] See also Figure 1 , Figure 1 A scene diagram of a processing system of a virtual model provided by an embodiment of the present application. The system may include at least one terminal, at least one server, at least one database, and a network. The terminal held by the user can be connected to the server of different games through the network. The terminal is any device with computing hardware that can support and execute software products corresponding to the game. In addition, when the system includes multiple terminals, multiple servers, and multiple networks, different terminals can be connected to each other through different networks and different servers. The network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to servers, etc. For example, multiple users can be online through different terminals and connected and synchronized with each other through appropriate networks to support multi-player games. In addition, the system may include multiple databases, multiple databases are coupled to different servers, and information related to the game environment can be continuously stored in the database when different users are online for multi-player games.
[0043] The embodiment of the present application provides a method for processing a virtual model, which can be executed by a terminal or a server. The embodiment of the present application takes the method for processing a virtual model executed by a terminal as an example for explanation. Among them, the terminal may include a touch display screen and a processor (of course, the terminal may also use peripherals such as a mouse and a keyboard as input devices, and only the touch display screen is used as an example for explanation here), and the touch display screen is used to present a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. When the user operates the graphical user interface through the touch display screen, the graphical user interface can control the local content of the terminal by responding to the received operation instructions, and can also control the content of the opposite server by responding to the received operation instructions. For example, the operation instructions generated by the user acting on the graphical user interface include instructions for starting a game application, and the processor is configured to start the game application after receiving the instructions for starting the game application provided by the user. In addition, the processor is configured to render and draw a graphical user interface associated with the game on the touch display screen. The touch display screen is a multi-touch sensitive screen that can sense touch or sliding operations performed simultaneously by multiple points on the screen. The user uses a finger to perform a touch operation on the graphical user interface, and when the graphical user interface detects the touch operation, different virtual objects in the graphical user interface of the game are controlled to perform actions corresponding to the touch operation.
[0044] It should be noted that Figure 1 The scenario diagram of the virtual model processing system shown is merely an example. The virtual model processing system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0045] The following is a detailed description in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.
[0046] Please also read Figures 2 to 15 , Figure 2 A flowchart of a method for processing a virtual model provided in an embodiment of the present application is shown in FIG. The specific flow of the method for processing a virtual model may include steps 101 to 103 as follows:
[0047] Step 101: Obtain at least two model materials of a virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is provided with a corresponding displacement map.
[0048] In the embodiment of the present application, a first layer model material, a second layer model material, a third layer model material and a water material may be provided, wherein the first layer model material is a main material, such as a riverbed material; the second layer model material and the third layer model material may be detail materials, such as a grass material, a soil material or a gravel material. Specifically, the material may be mixed according to the displacement map of each layer model material, that is, according to the height. For example, the first layer model material and the second layer model material may be mixed to obtain a first result, and then the first result obtained by mixing may be mixed with the third layer model material to obtain a second result, and then the second result may be mixed with the water material to obtain a mixed result having a final mixing effect.
[0049] The embodiment of the present application is to create a function node of a mixed material based on the nanite displacement function in the virtual engine (Unreal Engine, UE), which can specifically realize the mixing of multiple model materials, and can automatically mix the coverage relationship of the water surface through the undulating ground height, thereby improving the efficiency of making complex ground materials. Since the present application requires the displacement material function based on the UE engine, the displacement option needs to be turned on to use it. The specific way to turn it on is to open DefaultEngine.ini, add r.Nanite.Allowtessellation=1 and r.Nanite.Tessellation=1 at the end, and also need to convert the model using displacement into nanite mode to realize the setting of model material mixing processing according to its own needs in the UE engine, and also can set the displacement effect for the mixed model material.
[0050] Specifically, model material refers to a collection of data used to define the surface physical and visual properties of a three-dimensional virtual model. These properties determine how the virtual model interacts with light and how it is displayed during the rendering process.
[0051] Among them, the displacement map is used to simulate the real details and geometric shapes of the surface. The displacement map can be a grayscale image, in which the grayscale value represents the height information of the surface. The brighter area represents the protruding part, while the darker area represents the sunken part. During the rendering process, the engine will displace the vertices of the model according to the grayscale information of the displacement map, so that the geometric shape of the surface changes, thereby simulating the real details and shape changes. Specifically, the displacement map can add more delicate and realistic surface details to the virtual model, such as texture, bumps, etc., making the virtual model look more realistic. The displacement map can simulate various irregular surface shapes, such as rocks, wood, cloth, etc., adding more changes and layering to the model.
[0052] Step 102: Acquire at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition of each model material when performing material superposition processing.
[0053] In an embodiment of the present application, the displacement parameters include a displacement intensity parameter, a displacement offset parameter and / or a displacement inversion parameter. Among them, the displacement intensity refers to the amplitude of the displacement of the model vertices by the grayscale value in the displacement map. A higher displacement intensity means that the amplitude of the vertex displacement is larger, thereby generating a more obvious change in geometric shape. On the contrary, a lower displacement intensity means that the amplitude of the vertex displacement is smaller, and the generated geometric shape change is relatively gentle. Displacement offset generally refers to a displacement operation performed on the model vertices based on the displacement map. This displacement operation can change the geometry of the model surface, thereby increasing the details and realism of the model. Displacement inversion is a reversal or reversal of the displacement map effect, which refers to reversing the grayscale value in the displacement map, that is, the originally protruding part becomes concave, and the originally concave part becomes protruding. In actual operation, this can be achieved by inverting the grayscale value of the displacement map.
[0054] Specifically, the displacement parameters include a displacement strength parameter, a displacement offset parameter and / or a displacement inversion parameter; the step of "obtaining at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine" includes:
[0055] Obtaining a displacement strength parameter corresponding to the model material through the first target function node, wherein the displacement strength parameter is used to determine the degree of concavity and convexity of each model material when performing material superposition processing; or,
[0056] Obtaining a displacement offset parameter corresponding to the model material through a second target function node, wherein the displacement offset parameter is used to determine the degree of fluctuation when each model material is subjected to material superposition processing; or
[0057] The displacement inversion parameters corresponding to the model material are obtained through the third target function node, wherein the displacement inversion parameters are used to determine the concave and convex directions of each model material when performing material superposition processing.
[0058] For example, see Figure 3 , Figure 3 The control module includes a displacement intensity control module, a displacement offset control module and a displacement inversion control module. The displacement intensity control module includes a plurality of first target function nodes for realizing displacement intensity control, the displacement offset control module includes a plurality of second target function nodes for realizing displacement intensity control, and the displacement inversion control module includes a plurality of third target function nodes for realizing displacement intensity control. Specifically, in order to enhance the displacement intensity, the embodiment of the present application can control the contrast multiplication value of the displacement map through the Blend HeightTexContrast node. When the value is changed from 1 to 3, the result obtained by adding the value to 1 is divided by 2, and then the result is separated into an inverse. The obtained pair of results generates the results of -1 and 2, which generates a set of values with a larger range, and makes the displacement intensity larger. Through the Lerp node, demultiplying the original displacement Alpha map can multiply the final displacement result. Furthermore, the upper and lower offsets of the corresponding values of the displacement map can be controlled through the add (addition and subtraction) node to realize the displacement offset control; the relationship between 0 and 1 can also be reversed through the 1-x (negation) node to reverse its displacement effect to realize the displacement inversion control. Thus, it can be achieved that: when the displacement strength value is 0, the displacement value is 0, the mapping result A is 0.5, B is 0.5, the result is pure gray, and there is no displacement effect. When the displacement strength value is 1, the displacement value is 1, the mapping result A is 0, B is 1, the result is the default (0-1) range, with a standard displacement effect. When the displacement strength value is 2, the displacement value is 2, the mapping result A is -0.5, B is 1.5, the result is the default (-0.5-1.5) range, with a displacement effect with greater fluctuations. When the displacement strength value is 3, the displacement value is 3, the mapping result A is -1, B is 2, the result is the default (-1-2) range, with a displacement effect with fluctuations twice that of the original effect.
[0059] Furthermore, the step of "obtaining at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine" includes:
[0060] Displaying a first editing page of the target game engine through a graphical user interface, the first editing page includes a plurality of displacement parameter setting controls, wherein each displacement parameter setting control is associated with a corresponding target function node, the displacement parameter setting control is used to obtain a displacement parameter of a type corresponding to the displacement parameter setting control, and a type of displacement information is used to adjust a material superposition degree of the model material;
[0061] Parameter information input through at least one replacement parameter setting control is acquired, and the parameter information is used as a replacement parameter.
[0062] For example, see Fig.12 , displaying the first editing page of the target game engine through a graphical user interface, the first editing page includes a plurality of displacement parameter setting controls, through the displacement parameter setting controls shown in the figure, it is possible to achieve height blending and fusion through the displacement height of the multi-layer model material, control the contrast of the height texture map, control the contrast of the height blending result, control the height offset of the height map, set the weight of the reverse fusion, and other functions. Specifically, the function corresponding to the "Layer1 / Layer2 Blend Contrast" control is to perform height blending and fusion by comparing the displacement height of the first layer model material and the second layer model material; the function corresponding to the "Blend HeightTexContrast" control is to control the contrast of the height texture map; the function corresponding to the "Blend Contrast" control is to control the contrast of the height blending result; the function corresponding to the "Blend Offset" control is to control the height offset of the height map; the function corresponding to the "Invert Blend" control is to set the reverse fusion weight; the function corresponding to the "Layer2 / Layer3 Blend Contrast" control is to perform height blending and fusion by comparing the displacement height of the second layer model material and the third layer model material.
[0063] Step 103: Based on the displacement parameters and the displacement maps corresponding to the model materials, material superposition processing is performed to obtain the processed target model material of the virtual model.
[0064] Specifically, the step of "performing material superposition processing based on the displacement parameters and the displacement maps corresponding to each of the model materials to obtain the processed target model material of the virtual model" includes:
[0065] Determine a material retention area and a material mixing area of each of the model materials based on a displacement map corresponding to each of the model materials;
[0066] Material superposition processing is performed based on the displacement parameters and the material reserved area and the material mixed area corresponding to each of the model materials to obtain the processed target model material of the virtual model.
[0067] Specifically, the blending control is to control the displacement height blending effect of the second layer model material or water surface and the first layer basic model material. The blend offset node controls the blending offset height of the second layer or water surface and the first layer basic material. The larger the value, the higher the coverage. For further information, please refer to Figure 4 Taking the mixing of the first layer model material and the second layer model material as an example, a HeightLerp node can be used to convert the height control result of the first layer material into an Alpha mask and then apply it to the mixed mask of the first layer model material and the second layer model material. For example, the second layer model material will cover the range below a certain height of the first layer model material. At the same time, you can also set the vertex color to force height intervention, so that a certain area can always belong to the first layer model material or always belong to the second layer model material.
[0068] In summary, the embodiment of the present application provides a method for processing a virtual model, which can obtain at least two model materials of the virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is provided with a corresponding displacement map; then, at least one type of displacement parameter corresponding to the model material is obtained through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition when each model material is subjected to material superposition processing; finally, based on the displacement parameter and the displacement map corresponding to each model material, material superposition processing is performed to obtain the processed target model material of the virtual model. In the embodiment of the present application, by setting multiple target function nodes, the game production personnel can set the model material mixing processing according to their own needs, and can also set the displacement effect for the mixed model material, thereby creating a real mixed model material with an undulating displacement effect, improving the authenticity and simulation effect of the appearance effect of the obtained virtual model, realizing the programming of the production steps of the model material having both the displacement effect and the mixing effect, and being able to quickly produce a complex appearance effect with real undulations, thereby improving the efficiency of virtual model production.
[0069] Based on the above introduction, the following example will be given to further illustrate the virtual model processing method of the present application. The specific embodiment of the virtual model processing method is described as follows.
[0070] Furthermore, the method further comprises:
[0071] Acquire a specified model material of a specified appearance effect, and a mixing parameter of the specified model material and the target model material, wherein the mixing parameter is used to indicate a material mixing degree of the specified model material and the target model material;
[0072] The designated model material and the target model material are subjected to material mixing processing based on the mixing parameters to obtain a mixed target model material of the virtual model.
[0073] For example, after superimposing and mixing the first layer model material, the second layer model material and the third layer model material to obtain the target model material, you can also set a layer of specified model material for water surface effect (i.e. water surface model material) for the target model material. Specifically, you can use the BreakMaterialAttributes node to split each channel again to process the effect control of the material channel of each model material.
[0074] For details, please refer to Figure 5 , because the ground covered by water generally presents a darker effect, the water color can be controlled. Specifically, a certain weight (water surface transparency value) is superimposed on the default black color to obtain a simulated wet water surface color. The water surface coverage range is still allocated using the HeightLerp result. The difference is that a "water surface coverage range value" is added in front to cooperate with the "add" node to control the range of moisture diffusion. The output Alpha mask value also needs to be clamped to the range of 0-1 to obtain the correct mask range. Finally, the correct water surface color is within this range.
[0075] For example, see Figure 6 The water surface roughness of the water surface model material can be controlled through the water surface roughness control node. Specifically, A in the Lerp node is the roughness of the original ground, and B in the Lerp node is the water surface roughness. Setting it to -1 is to make the transition from the water surface to the ground have a correct roughness change effect. The Alpha node is connected to the water surface coverage.
[0076] For example, see Figure 7 and Figure 8 , you can control the water surface normal and displacement control of the water surface model material through the water surface normal and displacement control nodes. Since the real water surface is smooth and shiny, the normal needs to be turned into a single color without fluctuations, and the setting should also be switched to a gray map effect with a grayscale of 0.5, so as to make the water surface effect more natural.
[0077] Optionally, you can also control the global normal by adding a custom normal map overlay in the LerpB channel to add more material detail.
[0078] In one embodiment, the step of “after performing material mixing processing on the designated model material and the target model material based on the mixing parameter to obtain a mixed target model material of the virtual model” further includes:
[0079] In response to the property adjustment operation for the specified model material, obtaining a material property adjustment parameter for the specified model material;
[0080] The material attribute parameters of the designated model material in the hybrid target model material are adjusted based on the material attribute adjustment parameters to obtain an adjusted hybrid target model material.
[0081] Specifically, the step of “obtaining a material property adjustment parameter for the specified model material in response to the property adjustment operation for the specified model material” includes:
[0082] Displaying a second editing page of the target game engine through a graphical user interface, the second editing page including a plurality of attribute parameter setting controls for specifying model materials, wherein the attribute parameter setting controls are used to obtain a material attribute adjustment parameter of a type corresponding to the attribute parameter setting controls, and a material attribute adjustment parameter is used to adjust a material attribute of the specified model material;
[0083] Parameter information input through at least one property parameter setting control is obtained, and the parameter information is used as a material property adjustment parameter.
[0084] For example, see Fig.13, a second editing page of the target game engine is displayed through a graphical user interface, the second editing page includes a plurality of attribute parameter setting controls, through the illustrated attribute parameter setting controls, functions such as turning on water mixing control, controlling the contrast of the texture map affecting the sleeping height, controlling the contrast of the mixing result affecting the water surface height, controlling the water surface height, reverse water surface height control, controlling the water surface transparency, controlling the water color, controlling the water surface roughness, controlling the wet coverage of the ground by water, controlling the water surface normal map, the global normal strength, the global normal map, and the global UV duplication can be realized. Specifically, the function corresponding to the "Water Blend Contrast" control is to turn on water blending control; the function corresponding to the "BlendHeightTexContrast" control is to control the contrast of the texture map that affects the water surface height; the function corresponding to the "BlendContrast" control is to control the contrast of the blending result that affects the water surface height; the function corresponding to the "Blend Water Height" control is to control the water surface height; the function corresponding to the "Invert Blend" control is the reverse water surface height control; the function corresponding to the "WaterOpacity" control is to control the transparency of the water surface; the function corresponding to the "Water Color" control is to control the color of the water; the function corresponding to the "Water Roughness" control is to control the roughness of the water surface; the function corresponding to the "Ground Wetness Range" control is to control the wet coverage of the ground by water; the function corresponding to the "Water Normal" control is to set the water surface normal map; the function corresponding to the "Global Normal_intensty" control is to set the global normal intensity; the function corresponding to the "Global Normal" control is to set the global normal map; the function corresponding to the "Global Tilling" control is to set the global UV repeat.
[0085] Specifically, the method further includes:
[0086] Displaying a third editing page of the target game engine through a graphical user interface, wherein the third editing page includes a plurality of material property setting controls for the model material, wherein a material property setting control is used to obtain a type of material property parameter;
[0087] Parameter information input through at least one material property setting control is obtained, and the parameter information is used as a material property parameter.
[0088] For example, see Fig. 9, you can use the nodes shown in the figure to control the diffuse reflection of the model material map, specifically you can control the saturation, brightness and contrast. Specifically, for saturation control, you can use a 1-x node to reverse the saturation control value. If the saturation value is 0, the result is 1-0=1, and the final result is 100% desaturation, which is a complete decolorization effect. For brightness control, you can use a Multiply node to multiply a brightness multiplier to achieve brightness control. For contrast control, use the Power node to achieve a similar contrast effect. Based on the above nodes, you can control a model material map to various desired colors.
[0089] For example, see Fig.10 , you can use the icon node to control the roughness of the model material map. The roughness can be controlled by a Min Roughness and Max Roughness. Through the Lerp node, the map is input to Alpha. If the Min Roughness value is 0 and the Max Roughness value is 1, then the result of this map will not change, that is, the original effect; if the Min Roughness value is 0 and the Max Roughness value is 2, then the maximum brightness of this map becomes 2 times, which is equivalent to doubling the contrast of this roughness map, which will make the texture more mottled and have more details.
[0090] For example, see Fig.11 , you can control the normal of the model material map through the nodes shown in the figure. You can first separate the red, green, and blue channels of the normal map, and then merge the red and green through the Append node. The result of the merger can be multiplied by a strength multiplier using the Multiply node to control the strength of the normal. Finally, the remaining blue channel can be merged through the Append node. The normal multiplication is to control the multiplication of the red and green colors. Furthermore, you can also flip the green channel. Specifically, you can use the constantBiasScale node to give a Bias (offset) with an intensity of 1, and then give a Scale (scaling) of 0.5, and then add a 1-x (negation) node, and then add a Multiply (multiplication) multiplied by 2, and finally through a Subtract (subtraction) 1, and the final shape is reversed. We can see that the left picture below is the green channel of a normal map obtained. After reversing, the right picture is obtained, and the lighting direction is opposite.
[0091] For example, see Fig.14, the third editing page of the target game engine is displayed through a graphical user interface, and the third editing page includes multiple material property setting controls. Through the material property setting controls shown in the figure, functions such as adjusting color offset, turning on color master control, saturation, brightness, contrast, highlight intensity, minimum roughness limit, maximum roughness limit, normal intensity, normal G channel switching, turning on displacement master control, displacement intensity, underwater displacement control, displacement height offset, and displacement inversion weight can be realized. Specifically, the function of the "Layer1 Albedo Tint" control is to set the color offset; the function of the "Layer1Albedo Controls" control is to turn on the overall color control; the function of the "Saturation" control is to set the saturation; the function of the "Brightness" control is to set the brightness; the function of the "Contrast" control is to set the contrast; the function of the "Layer1 Specular" control is to set the highlight intensity; the function of the "Layer1 MinRoughness" control is to set the minimum roughness limit; the function of the "Layer1 Max Roughness" control is to set the maximum roughness limit; the function of the "Layer1Normal Intensity" control is to set the normal intensity; the function of the "Layer1 Normal Invert GChanel" control is to set the normal G channel switch; the function of the "Layer1Displacement_Controls" control is to turn on the overall displacement control; the function of the "Displacementstrength" control is to set the displacement strength; the function of the "Displacement Water" control is to set the underwater displacement control; the function of the "Displacement Offset" control is to set the displacement height offset; the "Displacement The function corresponding to the "Layer1 Invert" control is to set the displacement inversion weight; the function corresponding to the "Layer1Albedo Map" control is to set the diffuse map; the function corresponding to the "Layer1 Roughness Map" control is to set the roughness map; the function corresponding to the "Layer1 Normal Map" control is to set the normal map; the function corresponding to the "Layer1 Displacement" control is to set the displacement map; the function corresponding to the "Layer1 Tilling" control is to set UV repetition; the function corresponding to the "Layer1Scaling factor" control is to set the UV scaling control. The above takes the control function of the first layer of model material as an example. According to the control function of the first layer of model material, the specific control functions of the second and third layer model materials can be known, which will not be repeated here.
[0092] Optional, see Fig.15 , this application also provides an editing page for the most basic structure of the material, which may specifically include: the function corresponding to the "00-Blend Controls" control is to control the three-layer basic model material; the function corresponding to the "01-Layer1" control is to set various parameters of the first layer model material; the function corresponding to the "02-Layer2" control is to set various parameters of the second layer model material; the function corresponding to the "03-Layer3" control is to set various parameters of the third layer model material; the function corresponding to the "04-Water" control is to control the water material; the function corresponding to the "05-globalparameters" control is to set global control normals, UV and other functions.
[0093] In summary, the embodiment of the present application provides a method for processing a virtual model. By setting multiple target function nodes, game producers can set the model material mixing processing according to their own needs, and can also set the displacement effect for the mixed model material, thereby creating a real mixed model material with an undulating displacement effect, thereby improving the authenticity and simulation effect of the appearance effect of the obtained virtual model, and realizing the programming of the production steps of the model material with both displacement effect and mixing effect, which can quickly produce a complex appearance effect with real fluctuations, and improve the efficiency of virtual model production.
[0094] This embodiment also provides a virtual model processing device, which can be integrated into a terminal device. Fig.16 As shown, the processing device of the virtual model may include:
[0095] A first acquisition unit 201 is used to acquire at least two model materials of a virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is set with a corresponding displacement map;
[0096] A second acquisition unit 202 is used to acquire at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition of each model material when performing material superposition processing;
[0097] The processing unit 203 is used to perform material superposition processing based on the displacement parameters and the displacement maps corresponding to the model materials to obtain the processed target model material of the virtual model.
[0098] In some embodiments, the processing device of the virtual model includes a processing subunit, which is used to:
[0099] Obtaining a displacement strength parameter corresponding to the model material through the first target function node, wherein the displacement strength parameter is used to determine the degree of concavity and convexity of each model material when performing material superposition processing; or,
[0100] Obtaining a displacement offset parameter corresponding to the model material through a second target function node, wherein the displacement offset parameter is used to determine the degree of fluctuation when each model material is subjected to material superposition processing; or
[0101] The displacement inversion parameters corresponding to the model material are obtained through the third target function node, wherein the displacement inversion parameters are used to determine the concave and convex directions of each model material when performing material superposition processing.
[0102] In some embodiments, the processing device of the virtual model includes a processing subunit, which is used to:
[0103] Displaying a first editing page of the target game engine through a graphical user interface, the first editing page includes a plurality of displacement parameter setting controls, wherein each displacement parameter setting control is associated with a corresponding target function node, the displacement parameter setting control is used to obtain a displacement parameter of a type corresponding to the displacement parameter setting control, and a type of displacement information is used to adjust a material superposition degree of the model material;
[0104] Parameter information input through at least one replacement parameter setting control is acquired, and the parameter information is used as a replacement parameter.
[0105] In some embodiments, the processing device of the virtual model includes a processing subunit, which is used to:
[0106] Determine a material retention area and a material mixing area of each of the model materials based on a displacement map corresponding to each of the model materials;
[0107] Material superposition processing is performed based on the displacement parameters and the material reserved area and the material mixed area corresponding to each of the model materials to obtain the processed target model material of the virtual model.
[0108] In some embodiments, the processing device of the virtual model includes a processing subunit, which is used to:
[0109] Acquire a specified model material of a specified appearance effect, and a mixing parameter of the specified model material and the target model material, wherein the mixing parameter is used to indicate a material mixing degree of the specified model material and the target model material;
[0110] The designated model material and the target model material are subjected to material mixing processing based on the mixing parameters to obtain a mixed target model material of the virtual model.
[0111] In some embodiments, the processing device of the virtual model includes a processing subunit, which is used to:
[0112] In response to the property adjustment operation for the specified model material, obtaining a material property adjustment parameter for the specified model material;
[0113] The material attribute parameters of the designated model material in the hybrid target model material are adjusted based on the material attribute adjustment parameters to obtain an adjusted hybrid target model material.
[0114] In some embodiments, the processing device of the virtual model includes a processing subunit, which is used to:
[0115] Displaying a second editing page of the target game engine through a graphical user interface, the second editing page including a plurality of attribute parameter setting controls for specifying model materials, wherein the attribute parameter setting controls are used to obtain a material attribute adjustment parameter of a type corresponding to the attribute parameter setting controls, and a material attribute adjustment parameter is used to adjust a material attribute of the specified model material;
[0116] Parameter information input through at least one property parameter setting control is obtained, and the parameter information is used as a material property adjustment parameter.
[0117] In some embodiments, the processing device of the virtual model includes a processing subunit, which is used to:
[0118] Displaying a third editing page of the target game engine through a graphical user interface, wherein the third editing page includes a plurality of material property setting controls for the model material, wherein a material property setting control is used to obtain a type of material property parameter;
[0119] Parameter information input through at least one material property setting control is obtained, and the parameter information is used as a material property parameter.
[0120] The embodiment of the present application discloses a processing device for a virtual model, wherein at least two model materials of a virtual model to be processed are obtained by a first acquisition unit 201, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is provided with a corresponding displacement map; the second acquisition unit 202 obtains at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition when each model material is subjected to material superposition processing; the processing unit 203 performs material superposition processing based on the displacement parameter and the displacement map corresponding to each model material, and obtains the processed target model material of the virtual model. In the embodiment of the present application, by setting multiple target function nodes, the game production personnel can set the model material mixing processing according to their own needs, and can also set the displacement effect for the mixed model material, thereby creating a real mixed model material with an undulating displacement effect, improving the authenticity and simulation effect of the appearance effect of the obtained virtual model, realizing the programming of the production steps of the model material with both displacement effect and mixing effect, and being able to quickly produce a complex appearance effect with real undulations, thereby improving the efficiency of virtual model production.
[0121] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Alternatively, the electronic device may be a server.
[0122] like Fig.17 As shown, Fig.17 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0123] The processor 301 is the control center of the electronic device 300. It uses various interfaces and lines to connect various parts of the entire electronic device 300, and executes various functions and processes data of the electronic device 300 by running or loading software programs and / or units stored in the memory 302, and calling data stored in the memory 302, so as to monitor the electronic device 300 as a whole. The processor 301 can be a central processing unit CPU, a graphics processing unit GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.
[0124] In the embodiment of the present application, the processor 301 in the electronic device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions, such as:
[0125] Acquire at least two model materials of the virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is set with a corresponding displacement map;
[0126] Acquire at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition of each model material when performing material superposition processing;
[0127] Based on the displacement parameters and the displacement maps corresponding to the model materials, material superposition processing is performed to obtain the processed target model material of the virtual model.
[0128] The electronic device provided in the embodiment of the present application can obtain at least two model materials of the virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is provided with a corresponding displacement map; then, at least one type of displacement parameter corresponding to the model material is obtained through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition when each model material is subjected to material superposition processing; finally, based on the displacement parameter and the displacement map corresponding to each model material, material superposition processing is performed to obtain the processed target model material of the virtual model. In the embodiment of the present application, by setting multiple target function nodes, the game production personnel can set the model material mixing processing according to their own needs, and can also set the displacement effect for the mixed model material, thereby creating a real mixed model material with an undulating displacement effect, improving the authenticity and simulation effect of the appearance effect of the obtained virtual model, realizing the programming of the production steps of the model material with both displacement effect and mixing effect, and being able to quickly produce a complex appearance effect with real undulations, thereby improving the efficiency of virtual model production.
[0129] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0130] Optional, such as Fig.17 As shown, the electronic device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art can understand that Fig.17 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0131] The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to realize the input function.
[0132] The radio frequency circuit 304 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.
[0133] The audio circuit 305 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data, and then the audio data is output to the processor 301 for processing, and then sent to another electronic device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earplug jack to provide communication between an external headset and the electronic device.
[0134] The input unit 306 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0135] The power supply 307 is used to supply power to various components of the electronic device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 307 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0136] although Fig.17 Not shown, the electronic device 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0138] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0139] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute any virtual model processing method provided in the embodiment of the present application. The computer program can execute the following steps of the virtual model processing method:
[0140] Acquire at least two model materials of the virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is set with a corresponding displacement map;
[0141] Acquire at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition of each model material when performing material superposition processing;
[0142] Based on the displacement parameters and the displacement maps corresponding to the model materials, material superposition processing is performed to obtain the processed target model material of the virtual model.
[0143] Due to the computer program stored in the storage medium, at least two model materials of the virtual model to be processed can be obtained, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is provided with a corresponding displacement map; then, at least one type of displacement parameter corresponding to the model material is obtained through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition when each model material is subjected to material superposition processing; finally, based on the displacement parameter and the displacement map corresponding to each model material, material superposition processing is performed to obtain the processed target model material of the virtual model. In the embodiment of the present application, by setting multiple target function nodes, the game production personnel can set the model material mixing processing according to their own needs, and can also set the displacement effect for the mixed model material, thereby creating a real mixed model material with an undulating displacement effect, improving the authenticity and simulation effect of the appearance effect of the obtained virtual model, realizing the programming of the production steps of the model material with both displacement effect and mixing effect, and being able to quickly produce a complex appearance effect with real undulations, thereby improving the efficiency of virtual model production.
[0144] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0145] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0146] Since the computer program stored in the computer-readable storage medium can execute any virtual model processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any virtual model processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0147] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.
[0148] In the above-mentioned virtual model processing device, computer-readable storage medium, electronic device, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-mentioned virtual model processing device, computer-readable storage medium, computer program product, electronic device and its corresponding units can refer to the description of the virtual model processing method in the above embodiment, and will not be repeated here.
[0149] The above is a detailed introduction to a virtual model processing method, device, electronic device, computer-readable storage medium and computer program product provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for processing a virtual model, characterized in that: include: Acquire at least two model materials of the virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is set with a corresponding displacement map; Acquire at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition of each model material when performing material superposition processing; Based on the displacement parameters and the displacement maps corresponding to the model materials, material superposition processing is performed to obtain the processed target model material of the virtual model.
2. The method according to claim 1, characterized in that The displacement parameters include a displacement strength parameter, a displacement offset parameter and / or a displacement inversion parameter; The obtaining, through at least one target function node of the target game engine, at least one type of displacement parameter corresponding to the model material comprises: Obtaining a displacement strength parameter corresponding to the model material through the first target function node, wherein the displacement strength parameter is used to determine the degree of concavity and convexity of each model material when performing material superposition processing; or, Obtaining a displacement offset parameter corresponding to the model material through a second target function node, wherein the displacement offset parameter is used to determine the degree of fluctuation when each model material is subjected to material superposition processing; or The displacement inversion parameters corresponding to the model material are obtained through the third target function node, wherein the displacement inversion parameters are used to determine the concave and convex directions of each model material when performing material superposition processing.
3. The method according to claim 2, characterized in that The obtaining, through at least one target function node of the target game engine, at least one type of displacement parameter corresponding to the model material comprises: Displaying a first editing page of the target game engine through a graphical user interface, the first editing page includes a plurality of displacement parameter setting controls, wherein each displacement parameter setting control is associated with a corresponding target function node, the displacement parameter setting control is used to obtain a displacement parameter of a type corresponding to the displacement parameter setting control, and a type of displacement information is used to adjust a material superposition degree of the model material; Parameter information input through at least one replacement parameter setting control is acquired, and the parameter information is used as a replacement parameter.
4. The method according to claim 1, characterized in that The material superposition processing is performed based on the displacement parameters and the displacement maps corresponding to the model materials to obtain the processed target model material of the virtual model, including: Determine a material retention area and a material mixing area of each of the model materials based on a displacement map corresponding to each of the model materials; Material superposition processing is performed based on the displacement parameters and the material reserved area and the material mixed area corresponding to each of the model materials to obtain the processed target model material of the virtual model.
5. The method according to claim 1, characterized in that The method further comprises: Acquire a specified model material of a specified appearance effect, and a mixing parameter of the specified model material and the target model material, wherein the mixing parameter is used to indicate a material mixing degree of the specified model material and the target model material; The designated model material and the target model material are subjected to material mixing processing based on the mixing parameters to obtain a mixed target model material of the virtual model.
6. The method according to claim 5, characterized in that After performing material mixing processing on the designated model material and the target model material based on the mixing parameter to obtain the mixed target model material of the virtual model, the method further includes: In response to the property adjustment operation for the specified model material, obtaining a material property adjustment parameter for the specified model material; The material attribute parameters of the designated model material in the hybrid target model material are adjusted based on the material attribute adjustment parameters to obtain an adjusted hybrid target model material.
7. The method according to claim 6, characterized in that The step of obtaining a material property adjustment parameter for the specified model material in response to the property adjustment operation for the specified model material includes: Displaying a second editing page of the target game engine through a graphical user interface, the second editing page including a plurality of attribute parameter setting controls for specifying model materials, wherein the attribute parameter setting controls are used to obtain a material attribute adjustment parameter of a type corresponding to the attribute parameter setting controls, and a material attribute adjustment parameter is used to adjust a material attribute of the specified model material; Parameter information input through at least one property parameter setting control is obtained, and the parameter information is used as a material property adjustment parameter.
8. The method according to claim 1, characterized in that The method further comprises: Displaying a third editing page of the target game engine through a graphical user interface, wherein the third editing page includes a plurality of material property setting controls for the model material, wherein a material property setting control is used to obtain a type of material property parameter; Parameter information input through at least one material property setting control is obtained, and the parameter information is used as a material property parameter.
9. A virtual model processing device, characterized in that: include: A first acquisition unit is used to acquire at least two model materials of the virtual model to be processed, wherein each model material is used to set a type of appearance effect for the virtual model, and the model material is set with a corresponding displacement map; A second acquisition unit is used to acquire at least one type of displacement parameter corresponding to the model material through at least one target function node of the target game engine, wherein the displacement parameter is used to indicate the degree of superposition of each model material when performing material superposition processing; The processing unit is used to perform material superposition processing based on the displacement parameters and the displacement maps corresponding to the model materials to obtain the processed target model material of the virtual model.
10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the virtual model processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the virtual model processing method according to any one of claims 1 to 8.
Citation Information
Cited By
Model baking method, model baking device, medium and equipment
CN115761026A