Model information processing method and device, storage medium and electronic device
By controlling the motion and diffusion interference of model vertices in the preset direction, the target map is used for rendering and displaying, which solves the problem that model rendering and display is not common among different game engines in the prior art, and improves the model's undulating terrain surface Adaptation and processing efficiency.
Patent Information
- Application Number
- CN202411147124.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-08
AI Technical Summary
The prior art cannot be universal among game engines when rendering and displaying models, and cannot render and display the models in a preset direction (such as vertical direction), resulting in low processing efficiency when adapting to the surface of undulating terrain models. .
By determining the initial model to be processed and the motion parameters of its vertices, the vertices are controlled to move in a preset direction, and rendering and displaying them using the target map, so as to achieve diffusion interference of the vertices to improve the efficiency of model information processing.
It has achieved improvement in model information processing efficiency, solved the problem of low model information processing efficiency, and adapted to different terrain surfaces, improving the universality and adaptability of rendering and display.
Smart Images

Figure CN118903818A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computer graphics, and in particular to a model information processing method, device, storage medium and electronic device. Background Art
[0002] At present, when a model needs to be rendered and displayed, it can usually be implemented using the particle system of the game engine itself. However, this method is not universal among various game engines, and it is not possible to render and display the model in a preset direction (for example, vertical direction). For example, it is not possible to adapt the model to the surface of an uneven terrain model, and there is a technical problem of low efficiency in processing the model information.
[0003] Currently, no effective solution has been proposed to the above-mentioned problem of low efficiency in processing model information. Summary of the invention
[0004] At least some embodiments of the present disclosure provide a method, device, storage medium and electronic device for processing model information to at least solve the technical problem of low efficiency in processing model information.
[0005] According to one embodiment of the present disclosure, a method for processing information of a model is provided. The method may include: determining a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model; determining a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction; using the first motion parameter to control the first vertex to move in the first preset direction, using the second motion parameter to control the first vertex to move in the second preset direction, and using the third motion parameter to control the second vertex to move in the third preset direction; using the target map corresponding to the target model, rendering and displaying the moving first initial model and the moving second initial model.
[0006] According to one embodiment of the present disclosure, a model information processing device is also provided. The device may include: a first determination unit, used to determine a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model; a second determination unit, used to determine a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction; a control unit, used to control the first vertex to move in a first preset direction using the first motion parameter, control the first vertex to move in a second preset direction using the second motion parameter, and control the second vertex to move in a third preset direction using the third motion parameter; a rendering unit, used to render and display the moving first initial model and the moving second initial model using a target map corresponding to the target model.
[0007] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the above-mentioned information processing methods of the model when running.
[0008] According to one embodiment of the present disclosure, an electronic device is also provided. The electronic device may include a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned information processing methods of the model.
[0009] According to one embodiment of the present disclosure, a computer program product is also provided. The computer program product may include a computer program, wherein the computer program is configured to execute any of the above-mentioned information processing methods of the model when running.
[0010] According to one embodiment of the present disclosure, a computer program product is also provided. The computer program product may include a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and the computer program is configured to execute the information processing method of any of the above models when running.
[0011] According to one embodiment of the present disclosure, a computer program is also provided, which is configured to execute any of the above-mentioned information processing methods of the model when running.
[0012] In at least some embodiments of the present disclosure, a first initial model to be processed and a second initial model to be processed are determined, wherein the second initial model is located at the bottom of the first initial model; a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction are determined; the first vertex is controlled to move in the first preset direction using the first motion parameter, the first vertex is controlled to move in the second preset direction using the second motion parameter, and the second vertex is controlled to move in the third preset direction using the third motion parameter; the moving first initial model and the moving second initial model are rendered and displayed using the target map corresponding to the target model. That is, the embodiment of the present disclosure diffuses the first vertex of the first initial model and the second vertex of the second initial model, interferes with the diffusion of the first vertex and the second vertex in order to achieve the preset diffusion effect, controls the first vertex to move in the first preset direction and the first preset direction, and controls the second vertex to move in the third preset direction, and further uses the target map corresponding to the target model to render and display the moving first initial model and the second initial model, thereby achieving the technical effect of improving the efficiency of processing the information of the model and solving the technical problem of low efficiency of processing the information of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0014] Figure 1 is a hardware structure block diagram of a mobile terminal according to an information processing method of a model in an embodiment of the present disclosure;
[0015] Figure 2 is a flow chart of an information processing method of a model according to one embodiment of the present disclosure;
[0016] Figure 3 is a schematic diagram of a ring model according to one embodiment of the present disclosure;
[0017] Figure 4 is a schematic diagram of determining the offset of vertex coordinates in a model according to one embodiment of the present disclosure;
[0018] Figure 5 is a schematic diagram of different diffusion distances of a ring model according to one embodiment of the present disclosure;
[0019] Figure 6 is a schematic diagram of an irregular ring model according to one embodiment of the present disclosure;
[0020] Figure 7 is a schematic diagram of generating polar coordinates according to one embodiment of the present disclosure;
[0021] Figure 8 is a schematic diagram of a polar coordinate uv according to one embodiment of the present disclosure;
[0022] Fig. 9 is a schematic diagram of a noise according to one embodiment of the present disclosure;
[0023] Fig.10 is a schematic diagram of random movement of vertices in the vertical direction according to one embodiment of the present disclosure;
[0024] Fig.11 is a schematic diagram of the effect of random movement of vertices in the vertical direction according to one embodiment of the present disclosure;
[0025] Fig.12 is a schematic diagram of a bottom model according to one embodiment of the present disclosure;
[0026] Fig.13 is a schematic diagram of determining the final diffusion position of the vertex in the bottom model according to one embodiment of the present disclosure;
[0027] Fig.14 is a schematic diagram of bottom model diffusion according to one embodiment of the present disclosure;
[0028] Fig.15 is a schematic diagram of a bottom surface model following the movement of a circular ring model according to one embodiment of the present disclosure;
[0029] Fig.16 is a schematic diagram of a model vertex ground-attaching function according to one embodiment of the present disclosure;
[0030] Fig.17 is a schematic diagram of realizing a function of attaching a model vertex to the ground according to one embodiment of the present disclosure;
[0031] Fig.18 is a schematic diagram of another method for implementing the model vertex sticking to the ground according to one embodiment of the present disclosure;
[0032] Fig.19 is a schematic diagram of diffusing an original model according to one embodiment of the present disclosure;
[0033] Fig. 20 is a schematic diagram of the combustion effect of a flame model according to one embodiment of the present disclosure;
[0034] Fig.21 is a schematic diagram of a flame model automatically adapting to terrain undulations according to one embodiment of the present disclosure;
[0035] Fig. 22 is a schematic diagram of a diffusion combustion effect of a flame model according to one embodiment of the present disclosure;
[0036] Fig.23 is a schematic diagram of a diffusion combustion effect of another flame model according to one embodiment of the present disclosure;
[0037] Fig.24 is a schematic diagram of the diffusion combustion effect of a rectangular flame model according to one embodiment of the present disclosure;
[0038] Fig.25 is a schematic diagram of a rockfall effect of a stone model according to one embodiment of the present disclosure;
[0039] Fig.26 is a schematic diagram of a dam-breaking flood effect of a water body wave model according to one embodiment of the present disclosure;
[0040] Fig. 27 is a structural block diagram of an information processing device according to a model of one embodiment of the present disclosure;
[0041] Fig.28 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0044] In a possible implementation, when the model needs to be rendered and displayed, it can usually be implemented using the particle system of the game engine itself. However, after practice and careful research, the inventor found that if the above method is used to render and display the model, since the method cannot be universal among various game engines and cannot render and display the model in a preset direction (e.g., vertical direction), for example, the model cannot be adapted to the surface of an uneven terrain model, there is a technical problem of low efficiency in processing the model information.
[0045] Based on the above, an embodiment of the present disclosure proposes a model information processing method, which diffuses the first vertex of the first initial model and the second vertex of the second initial model. In order to achieve a preset diffusion effect, the diffusion of the first vertex and the second vertex is interfered with, the first vertex is controlled to move in a first preset direction and a second preset direction, and the second vertex is controlled to move in a third preset direction, and the target map corresponding to the target model is further used to render and display the moving first initial model and the second initial model, thereby achieving the technical effect of improving the efficiency of processing model information.
[0046] Considering that in the related art, when the model is rendered and displayed by using the particle system of the game engine itself, there is a technical problem of low efficiency in processing the information of the model. However, in the embodiment of the present disclosure, the vertices of the first initial model and the second initial model are diffused. In order to achieve a preset diffusion effect, the diffusion distance of the vertices can be interfered. Based on the diffused distance after interference, the vertices are controlled to move in the first preset direction and the second preset direction, thereby achieving the technical effect of improving the efficiency of processing the information of the model and solving the technical problem of low efficiency in processing the information of the model.
[0047] According to one embodiment of the present disclosure, an embodiment of a method for processing information of a model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0048] The method embodiment can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID for short), a tablet computer (PAD), a game console and other terminal devices. Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal according to an information processing method of a model in an embodiment of the present disclosure. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (the processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a programmable logic device (Field Programmable Gate Array, FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may further include a transmission device 106, an input and output device 108, and a display device 110 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0049] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the information processing method of the model in the embodiment of the present disclosure. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the information processing method of the model described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0050] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0051] The inputs in the input / output device 108 may come from a plurality of human interface devices (HIDs), such as keyboards and mice, game controllers, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, remote controls, etc.). In addition to providing input functions, some human interface devices may also provide output functions, such as force feedback and vibration of game controllers, audio output of controllers, etc.
[0052] The display device 110 may be, for example, a Heads Up Display (HUD), a touch screen liquid crystal display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The LCD display enables the user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and the user can interact with the GUI by finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0053] Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0054] In a possible implementation, the present disclosure provides an information processing method for a model. Figure 2is a flow chart of a model information processing method according to one embodiment of the present disclosure, such as Figure 2 As shown, the method may include the following steps:
[0055] Step S202, determining a first initial model to be processed and a second initial model to be processed, wherein the first initial model and the second initial model are used to simulate the diffusion performance result of the target model on the surface of the terrain model, and the second initial model is located at the bottom of the first initial model.
[0056] In the technical solution provided in the above step S202 of the present disclosure, a first initial model to be processed and a second initial model to be processed can be determined. Wherein, when a circular ring-shaped flame model is used as the target model, the first initial model can be a circular ring-shaped model, and the second initial model is located at the bottom of the first initial model, then the second initial model can be a bottom model of the flame model, which is only for illustration here, and no specific restrictions are made on the forms of the first initial model and the second initial model to be processed. Optionally, when the target model is a circular ring-shaped flame model, a first initial model and a second initial model to be processed can be created, the first initial model can be a circular ring-shaped model, and the second initial model can be a bottom model, and optionally, the bottom model can be a pure circular patch model.
[0057] Optionally, the first initial model and the second initial model can be used to simulate the diffusion performance of the target model on the surface of the terrain model. The target model can be a model with forward-pushing characteristics in the game scene, for example, the target model can be a flame model, a water spray model, a stone model, etc. This is only an example and does not specifically limit the form of the target model.
[0058] It should be noted that the above is only an example of the first initial model and the second initial model, and any first initial model and second initial model suitable for simulating the diffusion performance result of the target model on the surface of the terrain model are within the protection scope of the present disclosure. The diffusion performance result can be the performance result that the target model always fits the terrain model during the diffusion process on the surface of the terrain model.
[0059] Optionally, the first initial model and the second initial model are not limited to simulating the diffusion performance results of the target model on the surface of the terrain model. The first initial model and the second initial model can also be used to simulate the diffusion performance results of the target model on the surface of the sky model. The target model can also be a cloud model, etc.
[0060] Step S204, determining a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction.
[0061] In the technical solution provided in the above step S204 of the present disclosure, after determining the first initial model to be processed, the first motion parameter of the first vertex of the first initial model in the first preset direction can be determined, and the second motion parameter of the first vertex in the second preset direction can be determined. After determining the second initial model to be processed, the third motion parameter of the second vertex of the second initial model in the third preset direction can be determined. Among them, the first preset direction can be a horizontal direction, that is, the xy direction. The second preset direction can be a vertical direction, that is, the z direction. The third preset direction can be a horizontal direction. The first motion parameter can be a diffusion distance of the first vertex of the first initial model in the first preset direction, and the diffusion distance can be represented by dis(distance). The second motion parameter can be a diffusion distance of the first vertex in the second preset direction. The third motion parameter can be a diffusion distance of the second vertex of the second initial model in the third preset direction.
[0062] In this embodiment, after determining the first motion parameter and the second motion parameter of the first initial model, and determining the third motion parameter of the second initial model, since the first initial model is diffused according to the determined first motion parameter and the second motion parameter, and the second initial model is diffused according to the determined third motion parameter, the diffused first initial model and the second initial model still maintain their original shapes. Further, in order to make the diffused first initial model and the second initial model conform to the random characteristics, the diffusion distance can be disturbed, and the first motion parameter, the second motion parameter and the third motion parameter can also be the diffused distance after the interference.
[0063] Step S206, using the first motion parameter to control the first vertex to move in a first preset direction, using the second motion parameter to control the first vertex to move in a second preset direction, and using the third motion parameter to control the second vertex to move in a third preset direction.
[0064] In the technical solution provided in the above step S206 of the present disclosure, after determining the first motion parameter and the second motion parameter of the first initial model, and determining the third motion parameter of the second initial model, the determined first motion parameter can be used to control the first vertex to move in the first preset direction, the determined second motion parameter can be used to control the first vertex to move in the second preset direction, and the determined third motion parameter can be used to control the second vertex to move in the third preset direction.
[0065] Optionally, after determining the first motion parameter and the second motion parameter of the first initial model, since the first motion parameter and the second motion parameter may be the diffusion distance after interference, the first motion parameter and the second motion parameter may be used to control the first vertex to move in the horizontal direction and the vertical direction respectively, so as to achieve the movement of the first vertex. Similarly, after determining the third motion parameter of the second initial model, since the third motion parameter may be the diffusion distance after interference, the third motion parameter may be used to control the second vertex to move in the horizontal direction, so as to achieve the movement of the second vertex.
[0066] Step S208: Rendering and displaying the moving first initial model and the moving second initial model using the target map corresponding to the target model.
[0067] In the technical solution provided in the above step S208 of the present disclosure, after using the first motion parameter to control the first vertex to move in the first preset direction, using the second motion parameter to control the first vertex to move in the second preset direction, and using the third motion parameter to control the second vertex to move in the third preset direction, the target map corresponding to the target model can be used to render and display the first initial model of the movement and the second initial model of the movement. Among them, the target map corresponds to the target model. When the target model is a flame model, the target map can be a flame map. When the target model is a water spray model, the target map can be a water spray map. When the target model is a stone model, the target map can be a stone map, etc. When the target model is a cloud model, the target map can be a cloud map, etc. This is only for example, and no specific limitation is made on the form of the target map.
[0068] In this embodiment, after controlling the first vertex of the first initial model to move in the first preset direction and the second preset direction respectively, and controlling the second vertex of the second initial model to move in the third preset direction, the model type of the target model can be determined, for example, the model type can be a flame type, a water type, a stone type, or a cloud model, etc. After determining the model type of the target model, a target map matching the model type can be determined. Further using the determined target map, the moving first initial model and the moving second initial model can be rendered and displayed.
[0069] Optionally, after rendering and displaying the first initial model of the movement and the second initial model of the movement, the diffusion performance result of the target model can be obtained. The diffusion performance result can be a forward pushing effect of the target model, for example, when the target model is a flame model, the diffusion performance result can be a flame burning effect, when the target model is a water body wave model, the diffusion performance result can be a flood dam breach effect, when the target model is a stone model, the diffusion performance result can be a mountain rockfall effect, when the target model is a cloud model, the diffusion performance result can be a cloud moving effect, etc. This is only for illustration, and no specific limitation is imposed on the form of the diffusion performance result.
[0070] Through the above steps S202 to S208, the first initial model to be processed and the second initial model to be processed are determined, wherein the second initial model is located at the bottom of the first initial model; the first motion parameter of the first vertex of the first initial model in the first preset direction, the second motion parameter of the first vertex in the second preset direction, and the third motion parameter of the second vertex of the second initial model in the third preset direction are determined; the first vertex is controlled to move in the first preset direction by using the first motion parameter, the first vertex is controlled to move in the second preset direction by using the second motion parameter, and the second vertex is controlled to move in the third preset direction by using the third motion parameter; the moving first initial model and the moving second initial model are rendered and displayed by using the target map corresponding to the target model. That is, the embodiment of the present disclosure diffuses the first vertex of the first initial model and the second vertex of the second initial model, interferes with the diffusion of the first vertex and the second vertex in order to achieve the preset diffusion effect, controls the first vertex to move in the first preset direction and the first preset direction, and controls the second vertex to move in the third preset direction, and further renders and displays the moving first initial model and the second initial model by using the target map corresponding to the target model, thereby achieving the technical effect of improving the efficiency of processing the information of the model and solving the technical problem of low efficiency of processing the information of the model.
[0071] The above method of the embodiment of the present disclosure is further introduced below.
[0072] As an optional embodiment, step S204, determining the first motion parameter of the first vertex of the first initial model in the first preset direction, the second motion parameter of the first vertex in the second preset direction, and the third motion parameter of the second vertex of the second initial model in the third preset horizontal direction, includes: determining the initial motion distance of the movement of the first vertex; based on the initial motion distance, determining the first motion parameter, the second motion parameter and the third motion parameter.
[0073] In this embodiment, after determining the first initial model to be processed, the initial movement distance of the first vertex movement of the first initial model can be determined. After determining the initial movement distance of the first vertex movement, based on the determined initial movement distance, the first movement parameter, the second movement parameter and the third movement parameter can be determined. The initial movement distance can be the diffusion distance of the first vertex movement.
[0074] Optionally, after determining the initial movement distance of the first vertex, that is, determining the diffusion distance of the first vertex, since the first initial model and the second initial model need to share the same diffusion distance so that the second initial model can move with the first initial model, based on the determined diffusion distance, the first motion parameter and the second motion parameter of the first initial model can be determined, and the third motion parameter of the second initial model can also be determined.
[0075] As an optional embodiment, based on the initial movement distance, determining the first movement parameter, the second movement parameter and the third movement parameter includes: using the distance adjustment parameter to adjust the initial movement distance to obtain the target movement distance; based on the target movement distance, determining the first movement parameter and the third movement parameter; based on the distance adjustment parameter corresponding to the initial movement distance, determining the second movement parameter.
[0076] In this embodiment, after determining the initial movement distance of the first vertex movement, the determined initial movement distance can be adjusted using the distance adjustment parameter to obtain the target movement distance. After obtaining the target movement distance, the first movement parameter and the third movement parameter can be determined based on the obtained target movement distance. Further based on the distance adjustment parameter corresponding to the initial movement distance, the second movement parameter can be determined. Among them, the distance adjustment parameter can be a parameter for adjusting the initial movement distance of the first vertex movement. For example, the distance adjustment parameter can be noise information. This is only an example and does not specifically limit the content of the distance adjustment parameter. The target movement distance can be the movement distance obtained after interfering with the initial movement distance, which can be called the diffusion distance after interference.
[0077] Optionally, after determining the diffusion distance of the first vertex, the diffusion distance of the first vertex can be disturbed using the noise information to obtain the diffusion distance after the disturbance. Further based on the diffusion distance after the disturbance and the direction vector of the first vertex moving in the horizontal direction, the first motion parameter can be determined, and based on the diffusion distance after the disturbance, the position information of the second vertex and the position information of the center of the second initial model, the third motion parameter can be determined. In addition, based on the distance adjustment parameter corresponding to the diffusion distance, for example, based on the noise information corresponding to the diffusion distance, the first vertex can be disturbed to obtain the second motion parameter.
[0078] As an optional embodiment, the initial movement distance is adjusted using a distance adjustment parameter to obtain a target movement distance, including: determining noise information based on a first initial model, wherein the distance adjustment parameter includes noise information, and the noise information is used to represent information of different display styles; and using the noise information to adjust the initial movement distance to obtain a target movement distance.
[0079] In this embodiment, after determining the first initial model to be processed and determining the initial movement distance of the first vertex movement, noise information can be determined based on the determined first initial model. Further using the determined noise information, the initial movement distance of the first vertex movement can be adjusted to obtain a target movement distance. The distance adjustment parameter can at least include noise information. The noise information can be called a noise function and can be represented by noise.
[0080] Optionally, after the noise is determined based on the first initial model, the diffusion distance may be disturbed by using the determined noise, so as to obtain the diffusion distance after the disturbance.
[0081] Optionally, noise information can be used to represent information of different display styles. For example, noise information can be used to represent information of display styles such as different brightness, chromaticity and transparency. Taking information representing different brightness as an example, noise information can be used to represent the result of alternating arrangement of a first color and a second color, and the brightness of the first color is different from the brightness of the second color. For example, the first color can be white and the second color can be black. This is only for illustration, and no specific restrictions are placed on the form of the first color, the second color, and the noise information.
[0082] As an optional embodiment, determining noise information based on the first initial model includes: determining polar coordinates of the first initial model; and sampling a noise map using the polar coordinates to obtain noise information.
[0083] In this embodiment, after determining the first initial model to be processed, the polar coordinates of the first initial model can be determined. After determining the polar coordinates of the first initial model, the noise map can be sampled using the determined polar coordinates of the first initial model to obtain noise information. The polar coordinates can be represented by uv.
[0084] Optionally, after determining the first initial model, the direction vector from the first vertex of the first initial model to the center of the first initial model can be determined, and the direction vector can be normalized to generate the polar coordinates of the first initial model. After generating the polar coordinates of the first initial model, the polar coordinates uv are transformed by translation or rotation through time Time, and the noise map is sampled and disturbed using the transformed polar coordinates to obtain noise noise.
[0085] It should be noted that, by using the polar coordinate sampling noise map, irregular black and white colors can be generated on the ring model, and the generated black, white and gray colors can be called noise.
[0086] As an optional embodiment, the initial movement distance is adjusted using noise information to obtain the target movement distance, including: using noise information to adjust the initial offset distance to obtain the target offset distance; using the target offset distance to offset the initial movement distance to obtain the target movement distance.
[0087] In this embodiment, after determining the noise information based on the first initial model, the initial offset distance can be adjusted using the determined noise information to obtain the target offset distance. After adjusting the initial offset distance to obtain the target offset distance, the initial movement distance can be offset using the obtained target offset distance to obtain the target movement distance. The initial offset distance can be an initial distance for offsetting the initial movement distance, which can be called a disturbance distance and can be represented by distorate_length. The target offset distance can be an offset distance after the initial offset distance is disturbed, which can be called a final disturbance distance and can be represented by distorate_vec.
[0088] Optionally, after determining the noise based on the first initial model, the interference distance can be disturbed using the determined noise, for example, the interference distance distorate_length is interpolated and mixed using the noise to obtain the final interference distance distorate_vec. After obtaining the final interference distance, the diffusion distance can be offset using the obtained final interference distance, for example, the final interference distance can be added to the diffusion distance to obtain the diffusion distance after interference.
[0089] As an optional embodiment, the initial offset distance is adjusted using the noise information to obtain the target offset distance, including: mixing the noise information and the initial offset distance to obtain the target offset distance.
[0090] In this embodiment, after the noise information is determined based on the first initial model, the noise information and the initial offset distance may be mixed to obtain the target offset distance. The noise information and the initial offset distance may be mixed using an interpolation function (lerp).
[0091] Optionally, after determining the noise based on the first initial model, the noise and the diffusion distance can be mixed by the following formula:
[0092] distorate_vec=distorate_dir*lerp(distorate_length / (-2,0), distorate_length / (2,0),
[0093] distorate_mask)
[0094] Among them, distorate_mask can be used to represent noise, and distorate_dir can be used to represent the vector direction of the first vertex to be offset. When the interference distance distorate_length is 100 and the noise is black, the interpolation blending result is -50; when the interference distance distorate_length is 100 and the noise is white, the interpolation blending result is 50. Since noise is composed of three colors: black, white and gray, you can arbitrarily output a value within the range of the interpolation blending result (-50, 50) as the final interference distance distorate_vec.
[0095] As an optional embodiment, determining the second motion parameter based on the distance adjustment parameter corresponding to the initial motion distance includes: adjusting the initial position information of the first vertex in the second preset direction based on the noise information corresponding to the initial motion distance; and determining the adjusted initial position information as the second motion parameter.
[0096] In this embodiment, after determining the initial movement distance of the first vertex, the initial position information of the first vertex in the second preset direction can be adjusted based on the noise information corresponding to the determined initial movement distance. After adjusting the initial position information, the adjusted initial position information can be determined as the second movement parameter. The initial position information can be the position information of the first vertex in the vertical direction.
[0097] Optionally, after normalizing the direction vector from the first vertex to the center of the first initial model to generate the polar coordinate uv of the first initial model, the polar coordinate uv can be tiled to obtain a tiled result, and the polar coordinate uv can be translated using the time Time to obtain a translation result. The tiled result and the translation result can be further superimposed, and the superimposed polar coordinate uv is used to sample a noise map to perturb the initial position information to obtain a second motion parameter.
[0098] As an optional embodiment, determining the first motion parameter based on the target motion distance includes: determining a direction vector of the first vertex moving in a first preset direction; and determining the first motion parameter based on the target motion distance and the direction vector.
[0099] In this embodiment, after adjusting the initial movement distance to obtain the target movement distance, the direction vector of the first vertex moving in the first preset direction can be determined. After determining the direction vector of the first vertex moving in the first preset direction, the first movement parameter can be determined based on the determined target movement distance and the direction vector. The direction vector of the first vertex moving in the first preset direction can be represented by v.
[0100] Optionally, after determining the first initial model to be processed, the coordinates of the first vertex of the first initial model may be determined. Based on the determined coordinates of the first vertex, the direction vector v of the first vertex moving in the horizontal direction may be determined. Further based on the direction vector v of the first vertex moving in the horizontal direction and the diffusion distance after interference, the first motion parameter may be determined.
[0101] As an optional embodiment, determining a direction vector of a first vertex moving in a first preset direction includes: determining first position information of the first vertex; and normalizing the first position information to obtain a direction vector.
[0102] In this embodiment, after determining the first initial model to be processed, the first position information of the first vertex of the first initial model can be determined. After determining the first position information of the first vertex, the determined first position information can be normalized to obtain a direction vector. The first position information can be the coordinates of the first vertex, which can be represented by p.
[0103] Optionally, after determining the first initial model to be processed, the coordinate p of the first vertex can be determined with the center of the first initial model as the origin. The coordinate p of the first vertex is further normalized to obtain the direction vector v of the first vertex to be moved.
[0104] As an optional embodiment, determining the first motion parameter based on the target motion distance and the direction vector includes: determining the product of the target motion distance and the direction vector as the first motion parameter, wherein different first vertices correspond to different first motion parameters.
[0105] In this embodiment, after determining the direction vector of the first vertex moving in the horizontal direction, the product of the target movement distance and the direction vector can be determined as the first movement parameter, wherein different first vertices correspond to different first movement parameters.
[0106] Optionally, after determining the direction vector v of the first vertex moving in the horizontal direction, the product v*dis between the direction vector v and the diffusion distance dis after interference can be determined, and the product is also the offset of the coordinate p of the first vertex. The offset can be further determined as the first motion parameter. After determining the offset of the coordinate p of the first vertex, the offset of the coordinate p of the first vertex is added to the coordinate p of the first vertex to obtain the final position of the coordinate p of the first vertex to be diffused.
[0107] As an optional embodiment, determining the third motion parameter based on the target motion distance includes: determining the third motion parameter based on the target motion distance, second position information of the second vertex, and third position information of the center of the second initial model.
[0108] In this embodiment, after the initial movement distance is adjusted to obtain the target movement distance, the third movement parameter can be determined based on the determined target movement distance, the second position information of the second vertex, and the third position information of the center of the second initial model. The second position information can be the world position information of the second vertex, which can be represented by center. The third position information can be the position information of the center of the second initial model, which can be represented by p1.
[0109] Optionally, after determining the diffusion distance after interference, the third motion parameter may be determined based on the determined diffusion distance after interference, the world position information center of the second vertex, and the position information p1 of the center of the second initial model.
[0110] As an optional embodiment, the third motion parameter is determined based on the target motion distance, the second position information of the second vertex and the third position information of the center of the second initial model, including: determining the position information difference between the third position information and the second position information; determining the distance between the second vertex and the center of the second initial model; and determining the third motion parameter based on the target motion distance, the position information difference and the distance.
[0111] In this embodiment, after determining the second position information and the third position information, the position information difference between the third position information and the second position information can be determined. Further, the distance between the second vertex and the center of the second initial model can be determined. After determining the position information difference between the third position information and the second position information, and the distance between the second vertex and the center of the second initial model, the third motion parameter can be determined based on the determined target motion distance, the position information difference between the third position information and the second position information, and the distance between the second vertex and the center of the second initial model. Among them, the distance between the second vertex and the center of the second initial model can be the radius of the second initial model, and the distance can be represented by R.
[0112] Optionally, after determining the world position information center of the second vertex and the position information p1 of the center of the second initial model, the position information difference between the position information of the center of the second initial model and the world position information of the second vertex can be determined, and the position information difference is p1-center. Further, the length of the second vertex from the center of the second initial model can be determined, that is, the radius R of the second initial model can be determined. Further based on the diffusion distance after interference, the position information difference p1-center and the spacing R, the third motion parameter can be determined.
[0113] As an optional embodiment, a third motion parameter is determined based on the target motion distance, position information difference and spacing, including: adjusting the position information difference using the target motion distance and spacing; adjusting the second position information using the adjusted position information difference; determining the adjusted second position information as the third motion parameter, wherein the third motion parameter is used to represent the position to which the second vertex is to move.
[0114] In this embodiment, after determining the position information difference between the third position information and the second position information, and the distance between the second vertex and the center of the second initial model, the position information difference can be adjusted using the determined target movement distance and the distance. After adjusting the position information difference, the second position information can be adjusted using the adjusted position information difference. The adjusted second position information can be further determined as a third motion parameter. The third motion parameter can be used to indicate the position to which the second vertex is to move, which can be represented by p2.
[0115] Optionally, after determining the position information difference p1-center and the spacing R, the position information difference can be adjusted using the diffusion distance and spacing after interference. For example, the quotient between the diffusion distance dis after interference and the spacing R can be determined, and the quotient is dis / R. The position information difference p1-center can be further adjusted using the quotient dis / R. The position information difference p1-center can be multiplied by the quotient dis / R, that is, (p1-center)*(dis / R). After adjusting the position information difference, the second position information can be adjusted using the adjusted position information difference. For example, the adjusted position information difference can be added to the second position information. Finally, the adjusted second position information can be determined as a third motion parameter, and the third motion parameter is the final position p2 of the second vertex to be moved.
[0116] As an optional embodiment, the method also includes: determining a first height difference between a height of the first vertex in a second preset direction and a height of the surface of the terrain model in the second preset direction; offsetting the first vertex by the first height difference in the second preset direction, wherein the height of the first vertex in the second preset direction after the offset is less than the height of the first vertex in the second preset direction before the offset.
[0117] In this embodiment, a first height difference between the height of the first vertex in the second preset direction and the height of the surface of the terrain model in the second preset direction may be determined. After determining the first height difference between the height of the first vertex in the second preset direction and the height of the surface of the terrain model in the second preset direction, the first vertex may be offset by the first height difference in the second preset direction. The height of the first vertex in the second preset direction may be the vertex height of the first initial model. The height of the surface of the terrain model in the second preset direction may be the height of the surface of the terrain model, which may be referred to as the ground height. The first height difference may be the height difference between the first vertex of the first initial model and the ground. The height of the first vertex in the second preset direction after the offset is less than the height of the first vertex in the second preset direction before the offset.
[0118] Optionally, in the process of diffusing the first vertex of the first initial model, since the surface of the terrain model is uneven, it is necessary to make the first vertex of the first initial model always fit the uneven ground during the diffusion process. Therefore, the vertex height and the ground height of the first initial model can be determined. After determining the vertex height and the ground height of the first initial model, the first height difference between the vertex height and the ground height of the first initial model can be determined, that is, the first height difference is the height difference between the vertex of the first initial model and the ground. Further, the first vertex can be offset by the first height difference in the vertical direction, that is, the first vertex can be offset downward, so as to achieve the effect that the first vertex of the first initial model always fits the uneven ground during the diffusion process.
[0119] As an optional embodiment, the method also includes: determining a second height difference between a height of the second vertex in the second preset direction and a height of the surface of the terrain model in the second preset direction; offsetting the second vertex by the second height difference in the second preset direction, wherein the height of the second vertex in the second preset direction after the offset is less than the height of the second vertex in the second preset direction before the offset.
[0120] In this embodiment, a second height difference between the height of the second vertex in the second preset direction and the height of the surface of the terrain model in the second preset direction may be determined. After determining the second height difference between the height of the second vertex in the second preset direction and the height of the surface of the terrain model in the second preset direction, the second vertex may be offset by the second height difference in the second preset direction. The height of the second vertex in the second preset direction may be the vertex height of the second initial model. The second height difference may be the height difference between the second vertex of the second initial model and the ground. The height of the second vertex in the second preset direction after the offset is less than the height of the second vertex in the second preset direction before the offset.
[0121] Optionally, in the process of diffusing the second vertex of the second initial model, due to the uneven surface of the terrain model, it is necessary to make the second vertex of the second initial model always fit the uneven ground during the diffusion process. Therefore, the vertex height and the ground height of the second initial model can be determined. After determining the vertex height and the ground height of the second initial model, the second height difference between the vertex height and the ground height of the second initial model can be determined, that is, the second height difference is the height difference between the vertex of the second initial model and the ground. Further, the second vertex can be offset by the second height difference in the vertical direction, that is, the second vertex can be offset downward, so as to achieve the effect that the second vertex of the second initial model always fits the uneven ground during the diffusion process.
[0122] As an optional embodiment, the first initial model of the movement and the second initial model of the movement are rendered and displayed using the target map corresponding to the target model, including: determining the model type of the target model; obtaining the target map matching the model type; and using the target map to render and display the first initial model of the movement and the second initial model of the movement.
[0123] In this embodiment, the model type of the target model can be determined. After determining the model type of the target model, a target map matching the model type can be obtained. Further, the target map can be used to render and display the first initial model of the movement and the second initial model of the movement. Among them, the model type can be used to indicate the type of the target model. For example, when the target model is a flame model, the model type can be used to indicate that the target model is a flame model. When the target model is a water body spray model, the model type can be used to indicate that the target model is a water body spray model. When the target model is a stone model, the model type can be used to indicate that the target model is a stone model. This is only for example, and no specific limitation is made on the form of the model type.
[0124] For example, after rendering and displaying the first initial model of the movement and the second initial model of the movement using the target map, the diffusion performance result of the target model can be obtained. When the model type of the target model is a flame model, the first initial model of the movement and the second initial model of the movement can be rendered and displayed using the target map that matches the flame model to obtain the flame burning result of the flame model. Further, when it is determined that the model type of the target model is a stone model, the target map that matches the stone model can be obtained, and the first initial model of the movement and the second initial model of the movement can be rendered and displayed using the target map that matches the stone model to obtain the rockfall effect of the stone model.
[0125] In the embodiment of the present disclosure, a first initial model to be processed and a second initial model to be processed are determined, wherein the second initial model is located at the bottom of the first initial model; a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction are determined; the first vertex is controlled to move in the first preset direction by using the first motion parameter, the first vertex is controlled to move in the second preset direction by using the second motion parameter, and the second vertex is controlled to move in the third preset direction by using the third motion parameter; the moving first initial model and the moving second initial model are rendered and displayed by using the target map corresponding to the target model. That is, the embodiment of the present disclosure diffuses the first vertex of the first initial model and the second vertex of the second initial model, interferes with the diffusion of the first vertex and the second vertex in order to achieve the preset diffusion effect, controls the first vertex to move in the first preset direction and the first preset direction, and controls the second vertex to move in the third preset direction, and further renders and displays the moving first initial model and the second initial model by using the target map corresponding to the target model, thereby achieving the technical effect of improving the efficiency of processing the information of the model and solving the technical problem of low efficiency of processing the information of the model.
[0126] The technical solution of the embodiment of the present disclosure is further introduced below with examples in combination with preferred implementation modes.
[0127] At present, when the diffusion performance result of the model needs to be realized in the game scene, it can usually be achieved by using the particle system of the game engine itself to emit a particle model to realize the diffusion of the model in a two-dimensional plane (i.e., the xy direction). However, this method has poor portability, cannot be universal among various game engines, and cannot automatically adapt to the surface of the undulating terrain model, that is, it cannot be transformed in the z direction. In addition, the special effects realized in the prior art are basically customized, and new special effects cannot be generated through rapid adaptation, and the scalability is poor. Further, since the above method emits a particle model through the particle system of the game engine itself, it strongly relies on the calculation of the central processing unit (CPU for short), although it is a relatively mature method. However, it cannot cross engines, low-end machine support is unfriendly, and the effect is poor, so there is a technical problem of low efficiency in processing the information of the model.
[0128] In order to solve the above problems, the present disclosure proposes a pure vertex function special effects method on the graphics processing unit (GPU) side that can be cross-engine. This method is written once and can quickly generate various types of special effects by only replacing model assets and adjusting parameters. It does not rely on the CPU. The functions are written on the general GPU side and can be quickly adapted to all engine hardware.
[0129] This embodiment does not rely on the particle emitter of the engine. The vertex animation logic is written on the vertex shader (VS) end to control the movement of the vertex, abstract the three-dimensional special effects into two planes, and process the vertex movement in the xy direction and the z direction respectively, so that the controllability of the vertex is higher. Among them, the rendering pipeline (graphics pipeline) refers to a series of processing processes for rendering a three-dimensional (ThreeDimensional, referred to as 3D) scene into a two-dimensional (Two Dimensional, referred to as 2D) image. In this pipeline, the VS stage is a key part. VS is a program for processing vertex data in a 3D model. The vertex data includes information such as the position, color, and normal direction of each point in the model. In the VS stage, the vertex data will undergo mathematical operations and transformations, such as scaling, rotation, and projection, and finally the vertex will be projected into a 2D coordinate system on the screen. The main purpose of this stage is to convert the vertex data of the 3D model into 2D coordinates on the screen for subsequent processing steps.
[0130] For example, taking the fire burning the ground as an example, write a random algorithm to simulate the burning and diffusion effect of the flame model. First, write a diffusion algorithm to diffuse the model vertices in a 360-degree direction. Secondly, based on polar coordinates, write a noise function to perturb the diffusion distance (xy axis) of each vertex to break the original model shape. Further write its own vertex animation function to achieve a special artistic effect of the vertex going up and down (z axis). Finally, write a ground-sticking algorithm to control the model to always stick to the uneven ground during the diffusion process.
[0131] Figure 3 is a schematic diagram of a ring model according to one embodiment of the present disclosure, such as Figure 3 As shown, create a donut-shaped model. Figure 4 is a schematic diagram of determining the offset of vertex coordinates in a model according to one embodiment of the present disclosure, such as Figure 4 As shown, taking the center of the model as the origin, obtain the coordinate p of each vertex in the model, and normalize the coordinate p to obtain the direction vector v that each vertex is to move. Further determine the diffusion distance dis of the vertex, and determine the product v*dis between the direction vector v and the diffusion distance dis as the offset of the coordinate p. Add the coordinate p and the offset to get the final position of the coordinate p. Furthermore, since the model is a perfect circle, the diffusion distance of each vertex is the same in all directions, that is, the model after diffusion is still a perfect circle, which does not conform to the random characteristics of special effects such as flames. Therefore, it is necessary to process the perfect circle into an irregular shape but generally retain the shape of a circle, and the length of the offset can be randomly processed, that is, the length of the diffusion distance dis is randomly processed. As shown Figure 4 As shown, the interference distance can be interpolated and mixed using noise, the result of dividing the interference distance by -2 is used as the A value of the lerp function, the result of dividing the interference distance by 2 is used as the B value of the lerp function, and the noise is used as the Alpha value of the lerp function to interpolate and mix the interference distance to obtain the interpolation mixing result. The interpolation mixing result is further added to the diffusion distance dis to interfere with the diffusion distance dis and obtain the diffused distance dis after interference. The diffused distance dis after interference is further multiplied by the direction vector v to obtain the offset of the coordinate p.
[0132] Figure 5 is a schematic diagram of different diffusion distances of a ring model according to one embodiment of the present disclosure, such as Figure 5 As shown, a ring model with diffusion distances of 0 and 2000 is shown. Figure 6 is a schematic diagram of an irregular ring model according to one embodiment of the present disclosure, such as Figure 6 As shown, the length of the diffusion distance dis is randomly shortened, so that the offset of the coordinate p is different, thereby forming an irregular circle.
[0133] Figure 7 is a schematic diagram of generating polar coordinates according to one embodiment of the present disclosure, such as Figure 7 As shown in the figure, the center of the ring model is taken as the origin, the vector from each vertex to the center is calculated, and the vector is normalized to generate polar coordinates. The polar coordinate uv is translated (rotated) by introducing the time parameter Time so that the polar coordinate uv rotates all the time. The polar coordinate uv is further used to sample the noise map for perturbation. Figure 8 is a schematic diagram of a polar coordinate uv according to one embodiment of the present disclosure. Fig. 9 is a schematic diagram of a noise according to one embodiment of the present disclosure, such as Fig. 9 As shown, a noise map is sampled using polar coordinates to generate irregular black and white colors on the ring. This black, white and gray color is called noise. The role of polar coordinates is to map the image on the left to the ring model on the right.
[0134] After obtaining the noise noise, the diffusion distance dis is interfered based on the noise noise:
[0135] distorate_vec=distorate_dir*lerp(distorate_length / (-2,0), distorate_length / (2,0),
[0136] distorate_mask)
[0137] Among them, distorate_length can be used to represent the interference distance, distorate_mask can be used to represent the noise, distorate_dir can be used to represent the vector direction of the vertex to be offset, and distorate_vec can be used to represent the final interference distance. The above formula uses noise noise to interpolate and mix the interference distance distorate_length. When the interference distance distorate_length is 100 and the noise noise is black, the interpolation mixing result is -50; when the interference distance distorate_length is 100 and the noise noise is white, the interpolation mixing result is 50. Since noise noise is composed of three colors: black, white and gray, a value can be arbitrarily output within the range of (-50, 50) where the interpolation mixing result is (-50, 50) as the final interference distance distorate_vec. The final interference distance is further added to the diffusion distance dis, and the diffusion distance dis is interfered to obtain the following Figure 6 The result shown has a different offset distance for each vertex.
[0138] Fig.10 is a schematic diagram of random movement of vertices in the vertical direction according to one embodiment of the present disclosure, such as Fig.10 As shown, while realizing the movement of vertices in the xy plane, it is necessary to calculate the movement of vertices in the z direction (upward). Similarly, a noise map is still sampled using the ring uv, and the sampled noise map is used to perturb the movement of vertices. First, the polar coordinate uv is tiled, and the polar coordinate uv is translated using time. The tiled result is superimposed with the translated result, and the polar coordinate uv is further used to sample the noise map to perturb the movement of vertices in the z direction. Fig.11 is a schematic diagram of the effect of random movement of vertices in the vertical direction according to one embodiment of the present disclosure, such as Fig.11 As shown, random movement of vertices in the z direction is achieved.
[0139] Fig.12 is a schematic diagram of a bottom model according to one embodiment of the present disclosure, such as Fig.12 As shown in the figure, the bottom model is a pure circular patch model. The vertex motion of the bottom model is described in detail below. Fig.13 is a schematic diagram of determining the final diffusion position of the vertex in the bottom model according to one embodiment of the present disclosure, such as Fig.13 As shown, the difference p1-center between the position p1 of the center of the bottom model and the world position center of each vertex in the bottom model is determined. The quotient between the diffusion distance dis after interference and the distance from the current vertex to the center of the bottom model is further determined, that is, the quotient dis / R between the diffusion distance dis after interference and the radius R of the bottom model is determined. Finally, the product (p1-center)*(dis / R) between the above difference and the above quotient is determined, and then added to the world position of each vertex in the bottom model to obtain the final diffusion position of the vertex in the bottom model. Fig.14 is a schematic diagram of bottom model diffusion according to one embodiment of the present disclosure, such as Fig.14 As shown, p1 is diffused, and the diffusion distance is the diffusion distance dis after disturbance, so that p1 can be moved to the position of p2. Fig.15 FIG. 1 is a schematic diagram of a bottom surface model following the movement of a circular ring model according to one embodiment of the present disclosure. Fig.15 As shown, the ring model and the bottom surface model share a perturbed diffusion distance dis, so that the bottom surface model can move along with the movement of the ring model.
[0140] Fig.16 is a schematic diagram of a model vertex ground-attaching function according to one embodiment of the present disclosure, such as Fig.16 As shown, during the diffusion process of the flame model, due to the uneven surrounding terrain, it is necessary to ensure that the model vertices have the function of sticking to the ground. Fig.17 is a schematic diagram of realizing a model vertex ground-attaching function according to one embodiment of the present disclosure, such as Fig.17 As shown, the height difference H1 between the vertex and the ground is calculated, and the height H2 from each vertex to the model axis is calculated. Further adding the calculated H1 and H2 can not only maintain the original shape of the model, but also achieve the ground-sticking effect of the model vertex. That is, this embodiment can calculate the distance d from each vertex to the terrain surface based on the terrain height data h provided in the engine, and further offset the vertex downward by a distance d, so as to achieve the ground-sticking function of the vertex during movement. Fig.18 is a schematic diagram of another embodiment of the present disclosure for realizing the function of model vertex sticking to the ground. Fig.18 As shown, when the model vertex at p1 needs to diffuse to p2, the height difference H1 between the vertex and the ground can be calculated, as well as the height H2 from each vertex to the model axis. The calculated H1 and H2 are further added to obtain the offset value of the vertex, and H1+H2=offset value, where H2 is a negative value.
[0141] The diffusion effect of the model achieved by adopting the above solution in this embodiment is further introduced below.
[0142] Fig.19 is a schematic diagram of diffusing the original model according to one embodiment of the present disclosure, such as Fig.19 As shown, the original model is a circular ring model. This embodiment performs diffusion and ground-contacting processing on the original model, and can transform the original model into the effect shown in the figure. Fig. 20 is a schematic diagram of the combustion effect of a flame model according to one embodiment of the present disclosure, such as Fig. 20 As shown, you can see the effect when the flame model just starts to burn. Fig.21 FIG. 1 is a schematic diagram of a flame model automatically adapting to terrain fluctuations according to one embodiment of the present disclosure, such as Fig.21 As shown in Figure 2, after the flame model is automatically adapted to the terrain, the following can be obtained: Fig. 22 and Fig.23 The effect shown. Fig. 22 is a schematic diagram of a diffusion combustion effect of a flame model according to one embodiment of the present disclosure, Fig.23 is a schematic diagram of the diffusion combustion effect of another flame model according to one embodiment of the present disclosure, such as Fig. 22 and Fig.23 As shown, you can see the effect of the flame model burning and spreading for a certain distance. The flame model will always automatically burn according to the terrain height and fit perfectly with the ground surface, which can help artists quickly create various flame models in the game without considering issues such as terrain height. Fig.24 is a schematic diagram of the diffusion combustion effect of a rectangular flame model according to one embodiment of the present disclosure, such as Fig.24 As shown, this embodiment can generate a rectangular flame model in addition to the annular flame model.
[0143] Fig.25 is a schematic diagram of a rockfall effect of a stone model according to one embodiment of the present disclosure, such as Fig.25 As shown, after replacing the flame model with a stone model and the corresponding texture, the effect of falling rocks from a mountain can be simulated. Fig.26 is a schematic diagram of a dam-breaking flood effect of a water body wave model according to one embodiment of the present disclosure, such as Fig.26 As shown, similarly, after replacing the flame model with a water wave model and the corresponding texture, the flood effect of a dam breach can be simulated.
[0144] This embodiment does not rely on the particle emission system and can be used on any engine and any platform; it also supports batch operations. Due to the high parallel operation characteristics of the GPU, it has good performance on low-end mobile devices. For example, this embodiment can produce two special effects, fire and flood, at the same time. Under one shader, batch calculations can be performed to save performance. In the prior art, two shaders need to be provided and cannot be batched.
[0145] In the embodiment of the present disclosure, a first initial model to be processed and a second initial model to be processed are determined, wherein the second initial model is located at the bottom of the first initial model; a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction are determined; the first vertex is controlled to move in the first preset direction using the first motion parameter, the first vertex is controlled to move in the second preset direction using the second motion parameter, and the second vertex is controlled to move in the third preset direction using the third motion parameter; the moving first initial model and the moving second initial model are rendered and displayed using the target map corresponding to the target model. That is, the embodiment of the present disclosure diffuses the first vertex of the first initial model and the second vertex of the second initial model, interferes with the diffusion of the first vertex and the second vertex in order to achieve the preset diffusion effect, controls the first vertex to move in the first preset direction and the first preset direction, and controls the second vertex to move in the third preset direction, and further uses the target map corresponding to the target model to render and display the moving first initial model and the second initial model, thereby achieving the technical effect of improving the efficiency of processing the information of the model and solving the technical problem of low efficiency of processing the information of the model.
[0146] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present disclosure.
[0147] In the present embodiment, a model information processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "unit" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0148] Fig. 27 is a structural block diagram of an information processing device according to a model of one embodiment of the present disclosure, such as Fig. 27 As shown, the information processing device 2700 of the model may include: a first determination unit 2702 , a second determination unit 2704 , a control unit 2706 and a rendering unit 2708 .
[0149] The first determining unit 2702 is used to determine a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model.
[0150] The second determination unit 2704 is used to determine a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction.
[0151] The control unit 2706 is used to control the first vertex to move in a first preset direction using the first motion parameter, control the first vertex to move in a second preset direction using the second motion parameter, and control the second vertex to move in a third preset direction using the third motion parameter.
[0152] The rendering unit 2708 is used to render and display the moving first initial model and the moving second initial model using the target map corresponding to the target model.
[0153] Optionally, the second determining unit 2704 includes: a first determining module, used to determine an initial movement distance of the first vertex movement; and a second determining module, used to determine a first movement parameter, a second movement parameter and a third movement parameter based on the initial movement distance.
[0154] Optionally, the second determination module includes: an adjustment submodule, used to adjust the initial movement distance using the distance adjustment parameter to obtain the target movement distance; a first determination submodule, used to determine the first movement parameter and the third movement parameter based on the target movement distance; and a second determination submodule, used to determine the second movement parameter based on the distance adjustment parameter corresponding to the initial movement distance.
[0155] Optionally, the adjustment submodule is further used to: determine noise information based on the first initial model, wherein the distance adjustment parameter includes noise information, and the noise information is used to represent information of different display styles; and use the noise information to adjust the initial movement distance to obtain the target movement distance.
[0156] Optionally, the adjustment submodule is used to determine the noise information based on the first initial model, including: determining the polar coordinates of the first initial model; and sampling the noise map using the polar coordinates to obtain the noise information.
[0157] Optionally, the adjustment submodule is used to use noise information to adjust the initial movement distance to obtain the target movement distance, including: using noise information to adjust the initial offset distance to obtain the target offset distance; using the target offset distance to offset the initial movement distance to obtain the target movement distance.
[0158] Optionally, the adjustment submodule is used to adjust the initial offset distance using the noise information to obtain the target offset distance, including: mixing the noise information and the initial offset distance to obtain the target offset distance.
[0159] Optionally, the second determination submodule is further used to: adjust the initial position information of the first vertex in the second preset direction based on the noise information corresponding to the initial movement distance; and determine the adjusted initial position information as the second movement parameter.
[0160] Optionally, the first determination submodule is used to determine the first motion parameter based on the target motion distance, and is also used to: determine the direction vector of the first vertex moving in the first preset direction; and determine the first motion parameter based on the target motion distance and the direction vector.
[0161] Optionally, the first determination submodule is used to determine the direction vector of the first vertex moving in the horizontal direction, including: determining first position information of the first vertex; and normalizing the first position information to obtain the direction vector.
[0162] Optionally, the first determination submodule is used to determine the first motion parameter based on the target motion distance and the direction vector, including: determining the product of the target motion distance and the direction vector as the first motion parameter, wherein different first vertices correspond to different first motion parameters.
[0163] Optionally, the first determination submodule is used to determine the third motion parameter based on the target motion distance, and is also used to determine the third motion parameter based on the target motion distance, second position information of the second vertex and third position information of the center of the second initial model.
[0164] Optionally, the first determination submodule is used to determine the third motion parameter based on the target motion distance, the second position information of the second vertex and the third position information of the center of the second initial model, including: determining the position information difference between the third position information and the second position information; determining the distance between the second vertex and the center of the second initial model; determining the third motion parameter based on the target motion distance, the position information difference and the distance.
[0165] Optionally, the first determination submodule is used to determine the third motion parameter based on the target motion distance, position information difference and spacing, including: adjusting the position information difference using the target motion distance and spacing; adjusting the second position information using the adjusted position information difference; determining the adjusted second position information as the third motion parameter, wherein the third motion parameter is used to represent the position to which the second vertex is to move.
[0166] Optionally, the device also includes: a third determination unit, used to determine a first height difference between a height of the first vertex in the second preset direction and a height of the surface of the terrain model in the second preset direction; a first offset unit, used to offset the first vertex by the first height difference in the second preset direction, wherein the height of the first vertex in the second preset direction after the offset is less than the height of the first vertex in the second preset direction before the offset.
[0167] Optionally, the device also includes: a fourth determination unit, used to determine a second height difference between the height of the second vertex in the second preset direction and the height of the surface of the terrain model in the second preset direction; a second offset unit, used to offset the second vertex in the second preset direction by the second height difference, wherein the height of the second vertex in the second preset direction after the offset is less than the height of the second vertex in the second preset direction before the offset.
[0168] Optionally, the rendering unit 2708 includes: a third determination module for determining a model type of a target model; obtaining a target map matching the model type; and a rendering module for rendering and displaying the first initial model of the movement and the second initial model of the movement using the target map.
[0169] Optionally, the first preset direction is a horizontal direction, the second preset direction is a vertical direction, and the third preset direction is a horizontal direction.
[0170] In this embodiment, the first initial model to be processed and the second initial model to be processed are determined by the first determination unit 2702, wherein the second initial model is located at the bottom of the first initial model. The first motion parameter of the first vertex of the first initial model in the first preset direction, the second motion parameter of the first vertex in the second preset direction, and the third motion parameter of the second vertex of the second initial model in the third preset direction are determined by the second determination unit 2704. The control unit 2706 controls the first vertex to move in the first preset direction using the first motion parameter, controls the first vertex to move in the second preset direction using the second motion parameter, and controls the second vertex to move in the third preset direction using the third motion parameter. The rendering unit 2708 uses the target map corresponding to the target model to render and display the moving first initial model and the moving second initial model. That is to say, the embodiment of the present disclosure diffuses the first vertex of the first initial model and the second vertex of the second initial model, interferes with the diffusion of the first vertex and the second vertex in order to achieve a preset diffusion effect, controls the first vertex to move in a first preset direction and a first preset direction, and controls the second vertex to move in a third preset direction, and further renders and displays the moving first initial model and the second initial model using the target map corresponding to the target model, thereby achieving the technical effect of improving the efficiency of processing the model information and solving the technical problem of low efficiency in processing the model information.
[0171] It should be noted that the above-mentioned units can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned units are all located in the same processor; or the above-mentioned units are located in different processors in any combination.
[0172] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0173] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0174] S1, determining a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model;
[0175] S2, determining a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction;
[0176] S3, using the first motion parameter to control the first vertex to move in a first preset direction, using the second motion parameter to control the first vertex to move in a second preset direction, and using the third motion parameter to control the second vertex to move in a third preset direction;
[0177] S4, using the target map corresponding to the target model, rendering and displaying the moving first initial model and the moving second initial model.
[0178] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0179] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0180] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0181] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0182] S1, determining a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model;
[0183] S2, determining a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction;
[0184] S3, using the first motion parameter to control the first vertex to move in a first preset direction, using the second motion parameter to control the first vertex to move in a second preset direction, and using the third motion parameter to control the second vertex to move in a third preset direction;
[0185] S4, using the target map corresponding to the target model, rendering and displaying the moving first initial model and the moving second initial model.
[0186] An embodiment of the present disclosure further provides a computer program product, which may include a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0187] Optionally, in this embodiment, the computer program product may be configured to include a computer program for performing the following steps:
[0188] S1, determining a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model;
[0189] S2, determining a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction;
[0190] S3, using the first motion parameter to control the first vertex to move in a first preset direction, using the second motion parameter to control the first vertex to move in a second preset direction, and using the third motion parameter to control the second vertex to move in a third preset direction;
[0191] S4, using the target map corresponding to the target model, rendering and displaying the moving first initial model and the moving second initial model.
[0192] An embodiment of the present disclosure further provides a computer program product, which may include a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and the computer program is configured to execute the steps of any of the above method embodiments when running.
[0193] Optionally, in this embodiment, the computer program product may be configured to include a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0194] S1, determining a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model;
[0195] S2, determining a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction;
[0196] S3, using the first motion parameter to control the first vertex to move in a first preset direction, using the second motion parameter to control the first vertex to move in a second preset direction, and using the third motion parameter to control the second vertex to move in a third preset direction;
[0197] S4, using the target map corresponding to the target model, rendering and displaying the moving first initial model and the moving second initial model.
[0198] An embodiment of the present disclosure further provides a computer program, which is configured to execute the steps of any of the above method embodiments when running.
[0199] Optionally, in this embodiment, the computer program is configured to perform the following steps:
[0200] S1, determining a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model;
[0201] S2, determining a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction;
[0202] S3, using the first motion parameter to control the first vertex to move in a first preset direction, using the second motion parameter to control the first vertex to move in a second preset direction, and using the third motion parameter to control the second vertex to move in a third preset direction;
[0203] S4, using the target map corresponding to the target model, rendering and displaying the moving first initial model and the moving second initial model.
[0204] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0205] Fig.28 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Fig.28 As shown, the electronic device 2800 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0206] like Fig.28 As shown, the electronic device 2800 is in the form of a general computing device. The components of the electronic device 2800 may include but are not limited to: at least one processor 2810, at least one memory 2820, a bus 2830 connecting different system components (including the memory 2820 and the processor 2810), and a display 2840.
[0207] The memory 2820 stores program codes, which can be executed by the processor 2810, so that the processor 2810 executes the steps described in the method part of the embodiment of the present disclosure according to various exemplary embodiments of the present disclosure.
[0208] The memory 2820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 28201 and / or a cache memory unit 28202, and may further include a read-only memory unit (ROM) 28203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0209] In some examples, the memory 2820 may also include a program / utility 28204 having a set (at least one) of program modules 28205, such program modules 28205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof may include the implementation of a network environment. The memory 2820 may further include a memory remotely disposed relative to the processor 2810, and these remote memories may be connected to the electronic device 2800 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0210] Bus 2830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a local bus of processor 2810, or a bus using any of a variety of bus architectures.
[0211] The display 2840 may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 2800 .
[0212] Optionally, the electronic device 2800 may also communicate with one or more external devices 2900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 2800, and / or any device that enables the electronic device 2800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 2850. Furthermore, the electronic device 2800 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 2860. Fig.28 As shown, the network adapter 2860 communicates with other modules of the electronic device 2800 via the bus 2830. It should be understood that although Fig.28 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 2800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, redundant arrays of independent disks (RAID) systems, tape drives, and data backup storage systems.
[0213] The electronic device 2800 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.
[0214] It can be understood by those skilled in the art that Fig.28 The structure shown is for illustration only and does not limit the structure of the electronic device. Fig.28 More or fewer components as shown, or with Figure 1 The memory 2820 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the information processing method of the model in the embodiment of the present disclosure. The processor 2810 executes various functional applications and data processing by running the computer programs stored in the memory 2820, that is, implements the above-mentioned information processing method of the model.
[0215] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0216] In the above embodiments of the present disclosure, 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.
[0217] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0218] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0219] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0220] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk, etc., which can store program code.
[0221] The above are only preferred embodiments of the present disclosure. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as the protection scope of the present disclosure.
Claims
1. A method for processing information of a model, characterized in that: include: Determining a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model; Determine a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction; Using the first motion parameter to control the first vertex to move in the first preset direction, using the second motion parameter to control the first vertex to move in the second preset direction, and using the third motion parameter to control the second vertex to move in the third preset direction; The moving first initial model and the moving second initial model are rendered and displayed using the target map corresponding to the target model.
2. The method according to claim 1, characterized in that Determining a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction, comprises: determining an initial movement distance of the first vertex movement; Based on the initial motion distance, the first motion parameter, the second motion parameter, and the third motion parameter are determined.
3. The method according to claim 2, characterized in that Determining the first motion parameter, the second motion parameter, and the third motion parameter based on the initial motion distance includes: Using the distance adjustment parameter, the initial movement distance is adjusted to obtain a target movement distance; Based on the target movement distance, determining the first movement parameter and the third movement parameter; The second motion parameter is determined based on the distance adjustment parameter corresponding to the initial motion distance.
4. The method according to claim 3, characterized in that The initial movement distance is adjusted using the distance adjustment parameter to obtain the target movement distance, including: Based on the first initial model, determining noise information, wherein the distance adjustment parameter includes the noise information, and the noise information is used to represent information of different display styles; The initial movement distance is adjusted using the noise information to obtain the target movement distance.
5. The method according to claim 4, characterized in that Based on the first initial model, determining noise information includes: determining the polar coordinates of the first initial model; The noise map is sampled using the polar coordinates to obtain the noise information.
6. The method according to claim 4, characterized in that Using the noise information, adjusting the initial movement distance to obtain the target movement distance includes: Using the noise information, the initial offset distance is adjusted to obtain a target offset distance; The target offset distance is used to offset the initial movement distance to obtain the target movement distance.
7. The method according to claim 6, characterized in that Using the noise information, the initial offset distance is adjusted to obtain the target offset distance, including: The noise information and the initial offset distance are mixed to obtain the target offset distance.
8. The method according to claim 4, characterized in that Determining the second motion parameter based on the distance adjustment parameter corresponding to the initial motion distance includes: Adjusting the initial position information of the first vertex in the second preset direction based on the noise information corresponding to the initial movement distance; The adjusted initial position information is determined as the second motion parameter.
9. The method according to claim 3, characterized in that: Determining the first motion parameter based on the target motion distance includes: Determine a direction vector of the first vertex moving in the first preset direction; The first motion parameter is determined based on the target motion distance and the direction vector.
10. The method according to claim 9, characterized in that Determining a direction vector of the first vertex moving in the first preset direction includes: Determine first position information of the first vertex; The first position information is normalized to obtain the direction vector.
11. The method according to claim 9, characterized in that Determining the first motion parameter based on the target motion distance and the direction vector includes: The product of the target movement distance and the direction vector is determined as the first movement parameter, wherein the first movement parameters corresponding to different first vertices are different.
12. The method according to claim 3, characterized in that Determining the third motion parameter based on the target motion distance includes: The third motion parameter is determined based on the target motion distance, the second position information of the second vertex, and the third position information of the center of the second initial model.
13. The method according to claim 12, characterized in that Determining the third motion parameter based on the target motion distance, the second position information of the second vertex, and the third position information of the center of the second initial model includes: determining a position information difference between the third position information and the second position information; determining a distance between the second vertex and a center of the second initial model; The third motion parameter is determined based on the target motion distance, the position information difference and the distance.
14. The method according to claim 13, characterized in that Determining the third motion parameter based on the target motion distance, the position information difference and the distance includes: Using the target movement distance and the spacing, adjusting the position information difference; adjusting the second position information using the adjusted position information difference; The adjusted second position information is determined as the third motion parameter, wherein the third motion parameter is used to indicate the position to which the second vertex is to move.
15. The method according to any one of claims 1 to 14, characterized in that The method further comprises: Determine a first height difference between a height of the first vertex in the second preset direction and a height of a surface of the terrain model in the second preset direction; The first vertex is offset by the first height difference in the second preset direction, wherein a height of the first vertex in the second preset direction after the offset is smaller than a height of the first vertex in the second preset direction before the offset.
16. The method according to any one of claims 1 to 14, characterized in that The method further comprises: Determine a second height difference between a height of the second vertex in the second preset direction and a height of a surface of the terrain model in the second preset direction; The second vertex is offset by the second height difference in the second preset direction, wherein a height of the second vertex in the second preset direction after the offset is smaller than a height of the second vertex in the second preset direction before the offset.
17. The method according to any one of claims 1 to 14, characterized in that Rendering and displaying the first moving initial model and the second moving initial model using a target map corresponding to the target model includes: Determining a model type of the target model; Obtaining the target map that matches the model type; The target map is used to render and display the first initial model of the movement and the second initial model of the movement.
18. The method according to any one of claims 1 to 14, characterized in that The first preset direction is a horizontal direction, the second preset direction is a vertical direction, and the third preset direction is the horizontal direction.
19. A model information processing device, characterized in that: include: A first determining unit, configured to determine a first initial model to be processed and a second initial model to be processed, wherein the second initial model is located at the bottom of the first initial model; a second determining unit, configured to determine a first motion parameter of a first vertex of the first initial model in a first preset direction, a second motion parameter of the first vertex in a second preset direction, and a third motion parameter of a second vertex of the second initial model in a third preset direction; a control unit, configured to control the first vertex to move in the first preset direction using the first motion parameter, control the first vertex to move in the second preset direction using the second motion parameter, and control the second vertex to move in the third preset direction using the third motion parameter; A rendering unit is used to render and display the first initial model of the movement and the second initial model of the movement by using a target map corresponding to the target model.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 18 when executed by a processor.
21. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 18.
22. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 18.
