Model information processing method and device, computer readable storage medium and electronic device
By obtaining and generating target maps and animations of multiple broken models, the problem of low efficiency in the game of mirror model broken animation is solved, and efficient mirror model broken animation production is achieved.
Patent Information
- Application Number
- CN202410969030.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-12
AI Technical Summary
When creating mirror-breaking animations in games, the existing technology requires developers to manually create each independent cracking mirror model to generate cracking animations and maps, resulting in cumbersome operations, reducing the generation efficiency of broken animations, and low model information processing efficiency The problem.
By obtaining multiple fragmented models in the mirror model, generating target maps and model animations based on these models, displaying the fragmented expression animation of the mirror model, realizing one-stop generation of target maps and animations of multiple fragmented models, and converting them into one-stop Render display to improve the efficiency of broken animation production of mirror models.
It realizes efficient production of broken animation of mirror model, improves information processing efficiency, solves the problem of low model information processing efficiency, and simplifies the production process of broken animation of mirror model.
Smart Images

Figure CN118925222A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of game technology, and in particular, to a model information processing method, device, computer-readable storage medium and electronic device. Background Art
[0002] At present, when making mirror shattering animation in games, it is usually necessary to rely on models with fracture animation to generate the visual effects of mirror shattering animation. For example, by using 3D (3DS Max) software, game developers manually create each independent fractured mirror model when the mirror model breaks, extract the fracture animation from it, and then generate corresponding textures for these fractured mirror models.
[0003] However, the above production process requires developers to perform tedious operations on each model, which is relatively redundant. This greatly reduces the generation efficiency of the fragmentation animation and has the technical problem of low information processing efficiency of the model.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] At least some embodiments of the present disclosure provide a method, device, computer-readable storage medium and electronic device for processing information of a model, so as to at least solve the technical problem of low efficiency in information processing of the model.
[0006] According to one embodiment of the present disclosure, a method for processing information of a model is provided, and the method may include: obtaining multiple fragmentation models in a mirror model, wherein the fragmentation model is used to simulate the fragmentation process of the mirror model in a game screen; based on the fragmentation model, generating a target map and a model animation, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the movement state of the fragmentation model during the fragmentation process; rendering and displaying the target map and the model animation to show the fragmentation performance animation of the mirror model.
[0007] According to one example of the present disclosure, a model information processing device is also provided. The device may include: an acquisition unit, used to acquire multiple fragmentation models in a mirror model, wherein the fragmentation model is used to simulate the fragmentation process of the mirror model in the game screen; a generation unit, used to generate a target map and a model animation based on the fragmentation model, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process; a display unit, used to render and display the target map and the model animation to show the fragmentation performance animation of the mirror model.
[0008] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the information processing method of the above-mentioned model in each embodiment of the present application when running.
[0009] According to one embodiment of the present disclosure, an electronic device is also provided, 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 information processing method of the above-mentioned model in each embodiment of the present application.
[0010] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program, which implements the information processing method of the above-mentioned model in each embodiment of the present application when executed by a processor.
[0011] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the information processing method of the above-mentioned model in each embodiment of the present application is implemented.
[0012] According to another aspect of the embodiments of the present application, a computer program is also provided, which, when executed by a processor, implements the information processing method of the above-mentioned model in each embodiment of the present application.
[0013] In at least some embodiments of the present disclosure, multiple fragmentation models in the mirror model are obtained, wherein the fragmentation model is used to simulate the fragmentation process of the mirror model in the game screen; based on the fragmentation model, a target map and a model animation are generated, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process; the target map and the model animation are rendered and displayed to show the fragmentation performance animation of the mirror model. That is to say, in the embodiments of the present disclosure, by obtaining multiple fragmentation models in the mirror model, and then generating target maps and model animations based on the multiple fragmentation models, the target maps and model animations of multiple fragmentation models are generated in one stop, and then the generated target maps and model animations are rendered and displayed to obtain the fragmentation performance animation of the mirror model, which can achieve the purpose of efficiently producing the fragmentation animation of the mirror model, and realize the technical effect of improving the information processing efficiency of the model, thereby solving the technical problem of low information processing efficiency of the model when producing the fragmentation animation of the mirror model. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. 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:
[0015] 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;
[0016] Figure 2 is a flow chart of an information processing method of a model according to an embodiment of the present disclosure;
[0017] Figure 3 is a schematic diagram of a mesh model patch according to an embodiment of the present disclosure;
[0018] Figure 4 is a schematic diagram of a mask area of a mirror model according to an embodiment of the present disclosure;
[0019] Figure 5 is a schematic diagram of a subdivision effect in a mesh patch in a mask area according to an embodiment of the present disclosure;
[0020] Figure 6 is a schematic diagram of a mirror model after the model vertices are moved according to an embodiment of the present disclosure;
[0021] Figure 7 is a schematic diagram of a fragmentation model according to an embodiment of the present disclosure;
[0022] Figure 8 is a schematic diagram of a fractured model extrusion chamfer according to an embodiment of the present disclosure;
[0023] Fig. 9 is a schematic diagram of vertex coloring of a fracturing model according to an embodiment of the present disclosure;
[0024] Fig.10 is a schematic diagram of baking vertex colors of a fractured model according to an embodiment of the present disclosure;
[0025] Fig.11 is a schematic diagram of a target map according to an embodiment of the present disclosure;
[0026] Fig.12 is a schematic diagram of grouping of a fragmentation model according to an embodiment of the present disclosure;
[0027] Fig.13 is a schematic diagram of the color change of the center of mass of a fragmentation model according to an embodiment of the present disclosure;
[0028] Fig.14 is a schematic diagram of the center of mass motion of another fragmentation model according to an embodiment of the present disclosure;
[0029] Fig.15 is a schematic diagram of specific calculation steps of a turn_white node according to an embodiment of the present disclosure;
[0030] Fig.16 is a schematic diagram of a calculation process of rotating around the Z axis according to the whitening degree of the center of mass according to an embodiment of the present application;
[0031] Fig.17 is a schematic diagram of mirror fragments flying out corresponding to a fragmentation model according to an embodiment of the present application;
[0032] Fig.18 is a schematic diagram of a calculation process of a mass center spreading outward from a world origin as a center according to an embodiment of the present application;
[0033] Fig.19 is a schematic diagram of a calculation process for realizing movement of the center of mass in the Z direction according to an embodiment of the present application;
[0034] Fig. 20 is a schematic diagram of determining a refraction area and a reflection area of glass corresponding to a mirror model according to an embodiment of the present application;
[0035] Fig.21 is a schematic diagram of a calculation part of the refraction effect on the RT map according to an embodiment of the present application;
[0036] Fig. 22 is a schematic diagram of a calculation part for providing a reflection effect to glass according to an embodiment of the present application;
[0037] Fig.23 is a schematic diagram of a mirror model shattering effect according to an embodiment of the present disclosure;
[0038] Fig.24 is a structural block diagram of an information processing device according to a model of an embodiment of the present disclosure;
[0039] Fig.25 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] 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.
[0041] 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.
[0042] In a possible implementation, for the production of broken animation in the field of game technology, the relevant technology usually uses software such as 3DS Max, and the developer manually creates each independent broken mirror model when the mirror model breaks, from which the broken animation is K-ed out, and then generates corresponding maps for these broken mirror models. After practice and careful research, the inventor found that this production process is relatively redundant and requires cumbersome operations on each model, which greatly reduces the efficiency of generating broken animations and has the technical problem of low efficiency of information processing of the model.
[0043] Based on the above, the embodiment of the present disclosure proposes a model information processing method, which can be applied to the field of game technology, in the scene of transition special effects production of mirror shattering, by obtaining multiple fragmentation models in the mirror model, wherein the fragmentation model is used to simulate the fragmentation process of the mirror model in the game screen; based on the fragmentation model, a target map and a model animation are generated, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process; the target map and the model animation are rendered and displayed to show the fragmentation performance animation of the mirror model. That is to say, in the embodiment of the present disclosure, after obtaining multiple fragmentation models in the mirror model, the target map and the model animation of the multiple fragmentation models in the mirror model can be generated in one stop, and then the target map and the model animation are rendered and displayed, and the fragmentation performance animation of the mirror model can be obtained, thereby achieving the purpose of efficiently producing the fragmentation animation of the mirror model, achieving the technical effect of improving the information processing efficiency of the model, and then solving the technical problem of low information processing efficiency of the model when producing the fragmentation animation of the mirror model.
[0044] The above method embodiments involved in the present disclosure 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, a tablet computer, a PDA, a mobile Internet device, a portable application device (PAD for short), 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 field-programmable gate array (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. In one embodiment of the present disclosure, it may also include: an input and output device 108 and a display device 110.
[0045] In some optional embodiments mainly based on game scenarios, the above-mentioned device can also provide a human-computer interaction interface with a touch-sensitive surface, which can sense finger contact and / or gestures to perform human-computer interaction with a graphical user interface (Graphical User Interface, referred to as GUI). The human-computer interaction function may include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0046] 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 shown.
[0047] According to one embodiment of the present disclosure, an embodiment of a model information processing method 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 the 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] Figure 2 is a flow chart of a model information processing method according to an embodiment of the present disclosure, such as Figure 2 As shown, the method comprises the following steps:
[0049] Step S201, obtaining a plurality of fragmentation models in the mirror model.
[0050] In the technical solution of the above step S201 of the present invention, the fragmentation model is used to simulate the fragmentation process of the mirror model in the game screen, wherein the game screen may be a screen in the game application that needs to display the mirror fragmentation performance result, and the game application may be various mobile games or terminal games, and no specific restrictions are made here.
[0051] In this embodiment, when obtaining multiple fragmented models in the mirror model, the game screen in the game application can be first obtained through a game screen capture tool, and then the obtained game screen is input into a three-dimensional (3D) animation software, so as to generate a mirror model matching the game screen through the 3D animation software, as well as multiple fragmented models generated when the mirror model is fragmented in the game screen, wherein the 3D animation software can be Houdini software.
[0052] For example, 3D animation software can generate a grid model patch that is proportional to the game screen according to the size of the game screen, wherein the grid model patch can be called a mirror model that matches the game screen.
[0053] Optionally, since the mirror model is broken from the center, after generating a mirror model that matches the game screen, when breaking the mirror model, it is necessary to add enough vertices at the center of the mirror model. One vertex corresponds to one broken model, and the size and shape of the broken model are random. By changing the vertex position of the added vertices in the mirror model and randomly adding some vertices to the mirror model, multiple broken models in the mirror model can be generated.
[0054] For example, the process of generating multiple fragmentation models in the mirror model is described by taking Houdini software as the 3D animation software. Since Houdini software includes multiple nodes, each node is used to implement different functions. Based on this, through the bounding sphere function of the group node in Houdini software and the subdivision node in Houdini software, it is possible to add multiple vertices in the center of the mirror model. For example, the bounding sphere function of the group node is used to generate a mask area at the center of the mirror model, wherein the mask area is a sphere containing the basic shapes (primitives) in the mirror model, and the basic shape can be a mesh in the mirror model. That is, the mask area can be understood as a bounding sphere containing the mesh at the center of the mirror model, and the mask area can be recorded as a group2 node. Among them, the group2 node stores the information of the mesh patches corresponding to the primitives contained in the mask area. The size of the mask area is determined by the internal fragmentation parameters of the HDA file after encapsulating the fragmentation animation of the mirror model.
[0055] Optionally, after the mask area is generated at the center of the mirror model, the subdivide node can be controlled to inherit the mask information of the mask area. That is, the subdivide node is controlled to use the same mask information as the mask area and perform subdivision processing on the mesh patches in the mask area, thereby generating a subdivision effect in the mesh patches in the mask area.
[0056] Optionally, after the mesh patches in the mask area are subdivided, the vertex positions of the mesh may be moved first to ensure that the mesh has a good-looking fractured shape when it is broken.
[0057] For example, when the vertex position of the mesh is moved, it can be achieved through a rest node in Houdini software, wherein the rest node is used to save and track the model vertices when the mirror model is in an initial position or a static position.
[0058] Optionally, by setting the mode of the rest node to the storage mode (store rest), the rest node can record the positions of the model vertices when the mirror model is at the initial position. After recording the vertex positions of the model vertices, the vertex positions of the model vertices can be changed by adding noise to the model vertices.
[0059] For example, by using the turbulence noise function in the attribute node in Houdini software, noise is added to the model vertices, so as to change the vertex positions of the model vertices through the noise, thereby achieving deformation of the vertex positions of the model vertices.
[0060] Optionally, after changing the vertex positions of the model vertices of the mirror model, the changed vertex positions of the model vertices may be sent to a fragmentation (voronofracture1) node, and then the voronofracture1 node is used to generate a plurality of fragmentation models when the mirror model is fragmented.
[0061] For example, after inputting a mesh patch with changed vertex positions into the voronofracture1 node, you can randomly input some more vertices into the voronofracture1 node, where the positions of the vertices determine the generation of fragmentation, that is, the vertices determine the positions where the mirror model is broken, and the shapes of the broken models are random.
[0062] Optionally, after determining the position of the mirror model fragmentation through the voronofracture1 node, the rest node can be used again to restore the vertex positions of each model vertex in the mirror model, that is, to restore the positions of the model vertices of the mirror model to the positions when the mirror model is in the initial position. In this way, through the change of the vertex position, the real fragmentation patch can be obtained, that is, multiple fragmentation models are generated when the mirror model is fragmented.
[0063] Optionally, after a plurality of fragmentation models when the mirror model is fragmented are generated through the above steps, a target map and a model animation of the fragmentation model may be generated through the following step S202.
[0064] Step S202: Generate target texture and model animation based on the fragmentation model.
[0065] In the technical solution of the above step S202 of the present disclosure, the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to display the movement state of the fragmentation model during the fragmentation process.
[0066] In this embodiment, when generating a target map based on a fractured model, multiple fractured models may be extruded to obtain an edge mask formed by extruding each fractured model. After that, vertex coloring is performed on the vertices of each fractured model included in the edge mask, and then the vertex colors are baked to obtain a target map of the fractured model.
[0067] For example, the polygon extrusion (polyextrude) node in Houdini software is used to extrude multiple fragmented models in the mirror model, so that the fragmented models have a certain thickness. After using the polyextrude node to extrude the fragmented model, the edge mask of each extruded fragmented model can be obtained, and the edge masks of multiple fragmented models can be organized in a specific group (group), where the group (group) can be named extrude side (extrudeSide). The group contains the edge mask of each extruded fragmented model, which can facilitate further editing and control.
[0068] Optionally, taking any fragmentation model among multiple fragmentation models as an example, the vertex coloring process of the fragmentation model is introduced. The color1 node can be used to color each vertex in the fragmentation model. For example, through the color1 node, the color attribute of each vertex in the fragmentation model is adjusted to black. Afterwards, the edge part of the fragmentation model is selected using the group named extrudeSide mentioned above, and then the non-edge part of the fragmentation model is deleted using the blast3 node, so that the fragmentation model only retains the edge part, forming a "magic shadow" effect. Afterwards, the edge part retained in the fragmentation model is colored using the color2 node, for example, the color attribute of the edge part is set to white.
[0069] After the fragmentation model is colored, the color attribute of the fragmentation model is transferred using the attribtransfer node. That is, the edge color attribute of one fragmentation model is transferred to another fragmentation model to quickly color multiple fragmentation models, so that the originally completely black fragmentation model becomes a fragmentation model with white edges and black interior.
[0070] After the color attribute of the fragmentation model is transferred, the color attribute of the fragmentation model is blurred using the attribblur node to obtain a more blurred vertex color effect. The number of times the color attribute of the fragmentation model is blurred using the attribblur node can be three times, which is only an example and does not limit the number of blurring.
[0071] Finally, the vertex colors of the fractured model after vertex coloring are baked using the ROP Network node to obtain the target map corresponding to the fractured model. When baking the fractured model, the baking size can be specified, and then the vertex colors of the fractured model can be baked into the target map corresponding to the fractured model through the baketexture node in the ROP Network node.
[0072] Optionally, when generating a model animation of a fragmentation model based on a fragmentation model, the center of mass can be extracted for each of the multiple fragmentation models, and then the rotation or movement of each fragmentation model can be achieved by changing the position of the center of mass of each fragmentation model. The key frame (K frame) can be used to achieve an animation effect in which the center of the mirror model breaks first and then breaks around. Among them, the K frame is used to set the position, rotation, scaling and other properties of the fragmentation model at a specific time point. By setting the K frame on the timeline, the mirror model can produce a smooth animation effect when it breaks.
[0073] Optionally, since the mirror model is broken first inside and then outside, the broken model can be divided into a model with center breakage and a model with surrounding breakage. The model with center breakage is called the inside group (inside), and the model with surrounding breakage is called the outside group (outside).
[0074] The following section further introduces the grouping process of the fragmentation model.
[0075] For example, the geometric center point of each fragmentation model is calculated through the assemble node, and the center point of each fragmentation model is extracted. After that, a new circle node is created, and a circular patch is generated through the circle node. After that, a new attribute processing (attributewrangle4) node is created, and the code is created using the attributeewrangle4 node, and the distance from the circular patch to the center point of each fragmentation model is obtained through the formula xyzdist. Then, in the attribute processing (attributewrangle5) node, each fragmentation model is grouped with the circular patch as the boundary, and the fragmentation model inside the circular patch is the inside group, and the fragmentation model outside the circular patch is the outside group.
[0076] Optionally, after the fragmentation model is divided into an inside group and an outside group, a series of rotation and movement calculations are performed on the centroids of the two groups respectively, so as to achieve a fragmentation effect in which the center of the mirror model is firstly fragmented and then the surroundings are fragmented.
[0077] Optionally, since the calculation method for the rotation and movement of the center of mass of the two groups is the same, the difference is that the parameters in the final implementation are different from the K frames on the timeline. For example, when calculating the forward movement of the center of mass of the fragmentation model in the inside group and the outside group, the calculation method used for the two groups of fragmentation models is the same, the difference is that the movement parameters exposed to the HDA in the inside group are called transformation parameters (Transform) during internal fragmentation, and the movement parameters exposed to the HDA in the outside group are called Transform during external fragmentation. Based on this, as long as the K frames of the Transform during internal fragmentation and the Transform during external fragmentation on the timeline are distinguished respectively, different effects can be obtained. For example, the value of the K frame of the Transform on the timeline during internal fragmentation is set to 0, and the value of the K frame of the Transform on the timeline during external fragmentation is set to 15, and different fragmentation effects can be obtained.
[0078] Next, taking the inside group as an example, the calculation method of the movement process of the center of mass of the inside group is further introduced.
[0079] Optionally, the fragmentation process of the fragmentation model is controlled by changing the color of the center of mass of the fragmentation model in the inside group. For example, when the center of mass of the fragmentation model becomes white, it is determined that the fragmentation model is fragmented, that is, the fragmentation model is emitted, and when the color of the center of mass is black, it indicates that the fragmentation model remains in its original state, that is, the fragmentation model is at the initial position of the mirror model.
[0080] For example, the centroid of each fragmented model is extracted through the extractcentroid node, and the centroid color is turned white from the center of the entire model to the outside through the calculation of the turn_white node. The change of the centroid color is realized by the inside start parameter. The dynamic change of the centroid of the fragmented model can be realized by the coordination of the timeline and the Inside Start parameter. The timeline can realize the K frame of the Inside Start parameter to achieve a dynamic effect.
[0081] Optionally, a fragmentation model among multiple fragmentation models in the inside group is taken as an example to introduce its center of mass movement process.
[0082] First, the range of the center of mass movement of the shattered model is controlled by the turn_white node. The turn_white node exposes an Inside Start parameter, which is called the inner shattering influence range in HDA. The turn_white node can control the color change of the center of mass of the shattered model from black to white from the center of the model (that is, the world origin (0,0,0)). For example, when the center of mass of the shattered model is black, it indicates that the shattered model is in its original position. When the color of the center of mass of the shattered model changes to white, it indicates that the center of mass of the shattered model has been emitted.
[0083] After determining the range of motion of the centroid of the fragmentation model, the color attribute of the centroid is converted into a duration (age) attribute through the solver_age node, and then the compute_val node is used to adjust the value of the age attribute.
[0084] After converting the color attribute of the center of mass into the age attribute, in the rotation (spin_noval) node, the center of mass of the fragmented model will randomly rotate around the X or Y axis. This rotation is not affected by the age attribute of the center of mass. Finally, the age parameter exposed in HDA is called the internal fragmentation global random rotation.
[0085] After controlling the center of mass of the fractured model to rotate around the X-axis or Y-axis, the center of mass of the fractured model is randomly rotated around the X-axis or Y-axis in the rotation (spin_val) node, and the rotation is affected by the age attribute of the center of mass. The calculation method of the center of mass in this node is the same as that in the spin_noval node. The difference is that in this node, the angle parameter is multiplied by the center of mass age attribute obtained by the bind (bind1) node. The final angle parameter exposed in HDA is called random rotation during internal fracture.
[0086] After that, in the rotate node, the center of mass of the fragmented model is controlled to rotate around the Z axis when it changes from black to white. The rotate node controls the age attribute of the center of mass to affect the P attribute of the center of mass, so that when the center of mass changes to white, it rotates around the Z axis according to the degree of whitening, and finally the fragmented model can be rotated around the Z axis when it flies out.
[0087] After that, in the spread node, the center of mass of the fragmented model is changed to change its position from the world origin to the outside in the process of whitening. As the center of mass of the fragmented model changes from black to white, the change of the age attribute will cause the center of mass to move toward the world origin. By subtracting the center of mass position (P attribute) from the world origin (center of the fragmented model), a new vector is obtained. The direction of the new vector is used to support the direction of the center of mass moving outward. When the new vector is added to the center of mass, the animation effect of the center of mass of the fragmented model spreading outward can be obtained.
[0088] Finally, the move_forward node is used to realize the position change of the center of mass flying in the Z direction, that is, the animation effect of the shattered model flying out after the mirror model is broken.
[0089] Optionally, the above steps can be used to achieve that the center of mass of the fragmented model is randomly rotated around the X-axis or Y-axis (implemented by the spin_noval node), and in the process of the center of mass color changing from black to white (implemented by the turn_white node), the center of mass is randomly rotated around the X-axis or Y-axis (implemented by the spin_val node), and rotated around the Z axis (implemented by the rotate node), and then the effect of spreading outward from the world origin (implemented by the spread node) and displacement in the Z direction (implemented by the move_forward node) are performed.
[0090] Optionally, after the movement process of the center of mass of the fragmentation model is calculated, the movement of the center of mass can be converted into the movement of the fragmentation model through a transformpiece node.
[0091] Optionally, the calculation method of the motion process of the fragmentation model in the outside group is consistent with the calculation method of the motion process of the fragmentation model in the above-mentioned inside group, and will not be repeated here.
[0092] Optionally, by merging the motion of the fragmented models in the inside group with the motion of the fragmented models in the outside group, the model animation of all the fragmented models in the final complete mirror model during the fragmentation process can be obtained.
[0093] After determining the target texture and model animation of the shattered model in the mirror model through this step, the target texture and model animation of the shattered model can be input into the quality game engine for rendering and display through the following step S203 to show the shattering performance animation of the mirror model.
[0094] Step S203, rendering and displaying the target texture and the model animation to show the fragmentation performance animation of the mirror model.
[0095] In the technical solution of the above step S203 of the present disclosure, the target map and model animation of the fragmentation model generated in the above step S202 are rendered and displayed to obtain the fragmentation performance animation of the mirror model, wherein the fragmentation performance animation is used to show the fragmentation process of the mirror model.
[0096] In this embodiment, the process of rendering and displaying the target map and model animation of the fragmented model to obtain the fragmentation performance animation of the mirror model can be implemented in the game engine. For example, the target map and model animation corresponding to the fragmented model of the mirror model are input into the game engine for rendering and display, and the fragmentation performance animation of the mirror model can be displayed. Among them, the game engine is used to indicate the software framework for creating and developing games, and can provide a variety of tools and functions for making games. For example, the game engine can be a Neox engine.
[0097] Optionally, after obtaining the target texture and model animation of the shattered model, the model animation of the shattered model can be first input into the game engine to generate the skeleton information of the model animation. Afterwards, the model animation with the skeleton information and the target texture of the shattered model are imported into the game engine for rendering and display, thereby obtaining the shattering performance animation of the mirror model.
[0098] Optionally, create a mirror shader, and use a fragmented shape Mask map to simulate the refraction and reflection effects of glass, create a new vector (Raster Graphic, abbreviated as RT) map, and transfer parameters when running the game.
[0099] Optionally, create a new Metal Material (mtl) resource, reference the mirror shader, and assign the mtl material resource to the shattering animation model of the mirror model exported using the HDA file. This will produce a glass texture when the mirror model shatters, to show the complete shattering animation.
[0100] In the technical scheme of the above steps S201 to S203, multiple fragmentation models in the mirror model are obtained, wherein the fragmentation model is used to simulate the fragmentation process of the mirror model in the game screen; based on the fragmentation model, a target map and a model animation are generated, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process; the target map and the model animation are rendered and displayed to show the fragmentation performance animation of the mirror model. That is to say, in the embodiment of the present disclosure, the mirror model corresponding to the game screen, multiple fragmentation models in the mirror model, and the target map and model animation of the multiple fragmentation models can be generated in one stop based on the game screen, and then the target map and the model animation are input into the game engine for rendering and display, and the fragmentation performance animation of the mirror model is obtained, thereby achieving the purpose of efficiently producing the fragmentation animation of the mirror model, achieving the technical effect of improving the information processing efficiency of the model, and then solving the technical problem of low information processing efficiency of the model when producing the fragmentation animation of the mirror model.
[0101] The above method of this embodiment is further introduced below.
[0102] As an optional implementation, step S201, obtaining multiple fragmented models in the mirror model, includes: determining a mirror model that matches the game screen; and fragmenting the mirror model to obtain a fragmented model.
[0103] In this embodiment, the mirror model that matches the game screen is used to indicate a mesh model patch that is proportional to the game screen.
[0104] Optionally, since the mirror model is broken from the center of the mirror model, after generating a mirror model that matches the game screen, when the mirror model is broken, a plurality of broken models can be obtained by adding enough vertices at the center of the mirror model. One vertex corresponds to one broken model, and the size and shape of the broken model are random. By changing the vertex positions of the vertices added in the mirror model and randomly adding some vertices to the mirror model, a plurality of broken models in the mirror model can be generated.
[0105] As an optional implementation, determining a mirror model that matches a game screen includes: determining a screen size of the game screen; determining a patch size that matches the screen size; and generating a mirror model whose model patches satisfy the patch size.
[0106] In this embodiment, the screen size of the game screen can be determined by the resolution of the display device of the game. The patch size matching the screen size is used to indicate the mesh patch size that is proportional to the screen size.
[0107] For example, taking a vertical screen game application as an example, assuming that the resolution of the vertical screen game is 1640*720, the screen size of the game screen is determined to be 164cm*72cm according to the resolution of the vertical screen game. Based on this, the facet size that matches the screen size can be determined to be 164cm*72cm, and then a rectangular mesh facet with a size of 164cm*72cm can be generated. The rectangular mesh facet is the model facet corresponding to the generated mirror model, and the rectangular mesh facet can completely cover the game screen and the vertices are evenly distributed.
[0108] As an optional implementation, the mirror model is fragmented to obtain a fragmented model, including: determining the central area of the mirror model based on the facet size of the mirror model; adding at least one model vertex to the central area; and fragmenting the mirror model including the model vertex to obtain a fragmented model.
[0109] In this embodiment, since the mirror model is broken from the center, when the mirror model is broken, it is necessary to add enough vertices at the center of the mirror model.
[0110] For example, the center area of the mirror model can be determined by the patch size of the mirror model. For example, assuming that the patch size is 40*40, the 10*10 area in the center of the patch can be determined as the center area of the mirror model. This is an illustrative example and does not limit the specific method of determining the center area of the mirror model.
[0111] Optionally, after the central area is determined and a mask is generated according to the central area, at least one model vertex may be added to the central area, and then the mirror model including the model vertex is fragmented to obtain a fragmented model.
[0112] As an optional implementation, adding at least one model vertex in the central area includes: determining the fragmentation area range of the mirror model in the central area; determining the vertex position of the model vertex in the central area based on the fragmentation area range; and adding the model vertex at the vertex position.
[0113] In this embodiment, the range of the fragmentation area on the central area is used to indicate the inner fragmentation range of the mirror model, and can also be understood as the range of the bounding sphere mask corresponding to the central area. The fragmentation area range of the mirror model in the central area can be determined by the boundingsphere function of the group node in the Houdini software. Optionally, since the fragmentation animation of the mirror model finally generated by the Houdini software will be encapsulated into an HDA file, based on this, the fragmentation area range is determined by the inner fragmentation parameters of the HDA file.
[0114] Optionally, after determining the fragmentation region range of the mirror model in the central region, the vertex positions of the model vertices in the central region may be determined based on the fragmentation range.
[0115] For example, the fragmentation area is subdivided into meshes through the subdivide node in Houdini software, that is, the subdivide node is controlled to use the same mask information as the fragmentation area, and the mesh patches in the fragmentation area are subdivided, thereby generating a subdivision effect in the mesh patches in the fragmentation area.
[0116] Optionally, after the mesh patches within the fragmented area are subdivided, more subdivided meshes can be obtained, and then the vertices of the subdivided meshes are determined as the vertex positions of the model vertices in the central area, and then the model vertices are added to the vertex positions.
[0117] As an optional implementation, fragmenting the mirror model including model vertices to obtain a fragmented model includes: adjusting vertex positions of the mirror model including model vertices; and fragmenting the adjusted mirror model to obtain a fragmented model.
[0118] In this embodiment, in order to ensure that the mirror model has a good-looking broken shape when it is broken, the vertex positions of the mirror model including the model vertices can be adjusted, that is, the vertex positions of the model vertices can be changed. The movement of the vertex positions can be achieved by adding target noise to the model vertices.
[0119] For example, the rest node in Houdini software is used to save and track the model vertices when the mirror model is in the initial position or static position. Then, the mode of the rest node is set to store rest, so that the rest node records the position of the model vertices when the mirror model is in the initial position. After recording the vertex position of the model vertex, the vertex position of the model vertex can be changed by adding target noise to the model vertex.
[0120] Next, the process of adding noise to the model vertices to change the vertex positions of the model vertices is further introduced.
[0121] As an optional implementation manner, adjusting the vertex positions of the mirror model including the model vertices includes: adjusting the vertex positions of the mirror model including the model vertices using target noise.
[0122] In this embodiment, target noise is added to the model vertices through the turbnoise function in the attribute node in the Houdini software, so as to change the vertex positions of the model vertices through the noise, thereby realizing the movement of the vertex positions.
[0123] Optionally, after adjusting the vertex positions of the mirror model including the model vertices, the adjusted mirror model may be fragmented to obtain a fragmented model. The process of fragmenting the adjusted mirror model is further described below.
[0124] As an optional implementation, the adjusted mirror model is fragmented to obtain a fragmented model, including: determining at least one target model vertex in the adjusted mirror model; determining the fragmentation position and fragmentation appearance information corresponding to the target model vertex in the adjusted mirror model, wherein the fragmentation position is used to indicate the position of the fragmentation model, and the fragmentation appearance information is used to indicate the appearance attributes of the fragmentation model; and dividing the adjusted mirror model according to the fragmentation position and the fragmentation appearance information to obtain a fragmentation model.
[0125] In this embodiment, at least one target model vertex is used to indicate a randomly input model vertex in the adjusted mirror model, that is, the vertex position of at least one target model vertex is random.
[0126] For example, after adjusting the vertex positions of the mirror model including the model vertices, some model vertices may be randomly added to the adjusted mirror model, and the randomly added model vertices are the target model vertices. The positions of the model vertices determine the generation of the fragmentation, that is, the vertex positions of the model vertices determine the broken positions of the mirror model.
[0127] Optionally, after adding at least one target model vertex to the adjusted mirror model, the position of the target model vertex in the adjusted mirror model can be determined as the fragmentation position of the mirror model. Afterwards, the target model vertex is determined as a fragmentation node, and the mirror model is fragmented to obtain a fragmentation model, wherein the fragmentation model can be represented by a fragmentation patch, and the shape of the fragmentation model can be any shape.
[0128] As an optional implementation, step S202 generates a target map based on the fragmentation model, including: adjusting edge information of the fragmentation model; using the adjusted edge information to color the model vertices of the fragmentation model to obtain vertex colors; and baking the vertex colors to obtain a target map.
[0129] In this embodiment, the edge information of the fragmentation model is adjusted by chamfering and subdividing the fragmentation model to adjust the edge information of the fragmentation model and obtain a more refined fragmentation edge shape.
[0130] Optionally, after adjusting the edge information of the fragmented model, the model vertices of the fragmented model are shaded, that is, the vertices of the fragmented model are colored to obtain vertex color effects, and then the vertex colors are baked to obtain a target map, wherein the target map can be a Mask map of the fragmented shape.
[0131] For example, taking any fragmentation model among multiple fragmentation models as an example, the vertex coloring process of the fragmentation model is introduced. The color1 node can be used to color each vertex in the fragmentation model. For example, through the color1 node, the color attribute of each vertex in the fragmentation model is set to black. Afterwards, the edge part of the fragmentation model is selected, and then the non-edge part of the fragmentation model is deleted using the blast3 node, so that the fragmentation model only retains the edge part, forming a "magic shadow" effect. Afterwards, the color2 node is used to color the edge part retained in the fragmentation model, for example, the color attribute of the edge part is set to white. This is only an illustrative example and does not limit the vertex coloring process of the fragmentation model.
[0132] As an optional implementation, the edge information of the fragmentation model is adjusted, including: determining the chamfer corresponding to the edge information; and smoothing the chamfer.
[0133] In this embodiment, when the fragmentation model is chamfered and subdivided, the multiple fragmentation models in the mirror model can be extruded to make the fragmentation model have a certain thickness and chamfers. Then, the generated chamfers are smoothed.
[0134] For example, the polyextrude node in Houdini software can be used to extrude multiple fragmented models so that the fragmented models have a certain thickness and chamfers.
[0135] As an optional implementation, baking the vertex colors to obtain the target map includes: blurring the vertex colors; and baking the blurred vertex colors to obtain the target map.
[0136] In this embodiment, the purpose of blurring the vertex colors is to obtain a more blurred vertex color effect.
[0137] For example, the color attribute of the fragmentation model is blurred using the attribblur node to obtain a more blurred vertex color effect. The number of times the color attribute of the fragmentation model is blurred using the attribblur node can be three times, which is only an illustrative example and does not limit the number of blurring processes.
[0138] Optionally, after the vertex colors are blurred, the ROP Network node is used to bake the vertex colors to obtain a target map corresponding to the fractured model. When baking the fractured model, the baking size can be specified, and then the vertex colors of the fractured model can be baked into a target map corresponding to the fractured model through the baketexture node in the ROP Network node.
[0139] As an optional implementation, step S202, generating a model animation based on the fragmentation model, includes: extracting a center of mass from the fragmentation model; determining physical properties of the center of mass; and generating a model animation based on the physical properties.
[0140] In this embodiment, the physical properties of the center of mass may include the position of the center of mass. After the physical properties of the center of mass of the fragmentation model are determined, the fragmentation model can be controlled to first fragment from the middle and then break apart from the surroundings according to the physical properties of the center of mass.
[0141] For example, the geometric center point of each fragmentation model is calculated through the assemble node, and the center point of each fragmentation model is extracted, and the center point is the centroid of the fragmentation model.
[0142] As an optional implementation, a model animation is generated based on physical properties, including: determining motion parameters of the fragmentation model based on the physical properties; associating the motion parameters with key frames of the game screen on the timeline to generate a model animation, wherein the model animation is used to display the fragmentation order of the fragmentation model located in different areas on the mirror model.
[0143] In this embodiment, the motion parameters may include rotation parameters, movement parameters and instart parameters of the mirror model, etc. The key frame of the game screen on the timeline is used to set the position, rotation, scaling and other properties of the fragmentation model at a specific time point, and the key frame may be called a K frame.
[0144] For example, since the physical properties of the center of mass can include the position of the center of mass, based on this, after determining the position of the center of mass, the motion parameters of the fragmented model when it rotates and moves can be determined according to the position of the center of mass of the fragmented model, and then the motion parameters can be associated with the key frames of the game screen on the timeline to achieve dynamic changes in the center of mass of the fragmented model.
[0145] As an optional implementation, the physical properties include the position of the center of mass, and based on the physical properties, the motion parameters of the fragmentation model are determined, including: determining the motion range and color change information of the center of mass moving from the position, wherein the color change information is used to represent the motion state of the center of mass; based on the color change information, determining the motion parameters of the center of mass within the motion range.
[0146] In this embodiment, the range of motion of the center of mass of the fragmentation model at the beginning of the motion is used to indicate the range of motion of the center of mass of the fragmentation model from the initial position to the fragmentation. The color change information of the fragmentation model is used to indicate the motion state of the center of mass. For example, when the center of mass color is black, it means that the center of mass is at the starting position and has not moved. When the center of mass changes from black to white, it means that the center of mass is emitted from the starting position.
[0147] Optionally, the range of motion of the center of mass of the fragmented model is controlled by the turn_white node. The turn_white node exposes an Inside Start parameter, which is called the inner fragmentation influence range in HDA. The turn_white node can control the color change of the center of mass of the fragmented model from black to white at the center of the model. For example, when the center of mass of the fragmented model is black, it is used to indicate that the fragmented model is at the starting position. When the color of the center of mass of the fragmented model changes to white, it is used to indicate that the center of mass of the fragmented model is emitted. Therefore, based on the color change of the center of mass, the motion state of the center of mass can be determined.
[0148] Optionally, after the color change information of the centroid is determined, the color change information of the centroid may be converted into an age attribute through a solver_age node.
[0149] As an optional embodiment, based on the color change information, the motion parameters of the center of mass within the motion range are determined, including at least one of the following: determining the first motion parameters of the center of mass rotating around the first coordinate axis or the second coordinate axis within the motion range; determining the second motion parameters of the center of mass rotating around the first coordinate axis or the second coordinate axis within the motion range based on the color change information; determining the third motion parameters of the center of mass rotating around the third coordinate axis within the motion range based on the color change information, wherein the first coordinate axis, the second coordinate axis and the third coordinate axis are used to constitute a world coordinate system; determining the fourth motion parameters of the center of mass diffusing outward from the world origin of the world coordinate system within the motion range based on the color change information; determining the fifth motion parameters of the center of mass moving in the direction corresponding to the third coordinate axis within the motion range based on the color change information.
[0150] In this embodiment, the first coordinate axis may be used to indicate the X axis, the second coordinate axis may be used to indicate the Y axis, and the third coordinate axis may be used to indicate the Z axis. Determining the first motion parameter of the center of mass rotating around the first coordinate axis or the second coordinate axis within the motion range may be implemented through the spin_noval node. That is, in the spin_noval node, the center of mass of the fragmentation model is controlled to rotate randomly around the X axis or the Y axis, thereby determining the first motion parameter of the center of mass.
[0151] Optionally, based on the color change information, determining the second motion parameter of the center of mass rotating around the first coordinate axis or the second coordinate axis within the motion range can be implemented through the spin_val node. That is, in the spin_val node, when the color of the center of mass changes from black to white, the center of mass of the fragmentation model is controlled to rotate randomly around the X axis or the Y axis, thereby determining the second motion parameter of the center of mass.
[0152] Optionally, after the center of mass is randomly rotated around the X-axis or Y-axis and the second motion parameter of the center of mass is determined, the third motion parameter of the center of mass rotating around the third coordinate axis (Z-axis) can be determined based on the color change information. The third motion parameter can be determined by the rotate node. That is, in the rotate node, the center of mass of the fragmentation model is controlled to rotate around the Z-axis in the process of changing from black to white, and the third motion parameter of the center of mass is determined.
[0153] Optionally, based on the color change information, the fourth motion parameter of the center of mass spreading outward from the world origin of the world coordinate system within the range of motion can be determined through a spread node. That is, in the spread node, the position change of the center of mass of the fragmented model is controlled to diffuse outward from the world origin as the center during the process of changing white, thereby determining the fourth motion parameter of the center of mass during the movement. As the center of mass of the fragmented model changes from black to white, the change in the age attribute causes the center of mass to move toward the world origin. A new vector is obtained by subtracting the center of mass position from the world origin, and the direction of the new vector is used to support the direction of the center of mass moving outward. The new vector is added to the center of mass to obtain the animation effect of the center of mass of the fragmented model diffusing outward.
[0154] Optionally, based on the color change information, the fifth motion parameter of the center of mass moving in the direction corresponding to the third coordinate axis within the motion range can be determined by the move_forward node. That is, in the move_forward node, the center of mass is controlled to fly out in the Z direction, and then the fifth motion parameter of the center of mass is determined. In this way, the animation effect of the broken model flying out can be achieved after the mirror model is broken.
[0155] Optionally, after determining the above-mentioned first motion parameter, second motion parameter, third motion parameter, fourth motion parameter and fifth motion parameter, the center of mass of the fragmentation model can be controlled to rotate randomly around the X-axis or Y-axis, and in the process of the center of mass color changing from black to white, the center of mass is controlled to rotate randomly around the X-axis or Y-axis, as well as around the Z-axis, and then the effect of diffusion outward from the world origin and displacement in the Z direction are performed.
[0156] As an optional implementation, step S203, rendering and displaying the target map and model animation to show the fragmentation performance animation of the mirror model, includes: rendering and displaying the target map and model animation including bone information to show the fragmentation performance animation of the mirror model.
[0157] In this embodiment, the skeleton information is used to indicate the skeleton structure for controlling the model, and the skeleton information of the model animation of the fragmented model can be generated by the game engine. For example, after the model animation of the fragmented model is determined, the model animation of the fragmented model is input into the game engine to automatically generate the skeleton information of the model animation.
[0158] Optionally, the Unreal (UE for short) engine may also be used to generate skeleton information of a model animation of a fragmented model. After the UE engine generates the model animation with the skeleton information, the model animation with the skeleton information may be imported into a game engine.
[0159] Optionally, after obtaining the model animation with the skeleton information, the game engine can create a shader for the mirror model and use the target map of the shattered model to simulate the refraction and reflection effects of the mirror glass.
[0160] Optionally, the target map of the fragmentation model is sampled, and then the sampled values are added to the edge information of the fragmentation model calculated by the refraction function, and the obtained values can cause refraction and reflection effects on the target map.
[0161] Optionally, after obtaining the skeleton information of the model animation, the target map of the shattered model and the model animation with the skeleton information can be input into the game engine for rendering and display to show the shattering performance animation of the mirror model.
[0162] As an optional implementation, the target map and the model animation including the skeleton information are rendered and displayed to show the animation of the mirror model's fragmentation, including: using the picture frames of the game screen to perform mirror rendering on the target map to obtain the mirror rendering result; adding the target material to the model animation including the skeleton information to obtain the target model animation, wherein the target material is used to make the fragmented model present a mirror texture during the fragmentation process.
[0163] In this embodiment, the picture frame of the game screen can be used to indicate the current frame of the game. The picture frame of the game screen is used to perform mirror rendering on the target map to obtain a mirror rendering result, wherein the mirror rendering result is used to indicate the picture effect of the original scene corresponding to the game screen. Afterwards, the target material is added to the model animation to obtain the target model animation, wherein the target material can be a glass material.
[0164] Optionally, the above-mentioned process of rendering and displaying the target texture and the model animation including the skeleton information can be implemented by a game engine. For example, after obtaining the target texture of the shattered model and the model animation with the skeleton information, the game engine can use the current frame of the game to perform mirror rendering on the target texture of the shattered model to obtain the mirror rendering result of the target texture of the shattered model, and add the target material to the model animation with the skeleton information to obtain the target model animation.
[0165] Optionally, according to the mirror rendering result and the target model animation, a shattering performance animation of the mirror model when it is shattered can be displayed to obtain a complete mirror shattering special effect.
[0166] In the above steps, a target material can be added to the model animation so that the mirror model presents the texture of mirror glass during the shattering process, achieving a more realistic mirror shattering effect and improving the shattering texture.
[0167] The technical solution of the embodiment of the present application is further introduced below with examples in combination with preferred implementation modes.
[0168] In the related art, when making mirror shattering animation in a game, it is usually necessary to rely on a model with a shattering animation to generate the visual effect of the mirror shattering animation. For example, by using software such as 3DS Max, game developers manually create each independent shattering mirror model when the mirror model is shattered, extract the shattering animation from it, and then generate corresponding textures for these shattering mirror models. However, this production process is relatively redundant and requires developers to perform tedious operations on each model, which greatly reduces the efficiency of generating the shattering animation and has the technical problem of low information processing efficiency of the model.
[0169] However, in an embodiment of the present application, a mirror shattering transition method is provided, in which a mirror model corresponding to the game screen, a shattering model when the mirror model is shattered, a shattering map corresponding to the shattering model, and a shattering animation of the mirror model are generated in one stop in Houdini software, and then the generated content is imported into the Neox engine for rendering and display, to obtain a shattering animation model of the mirror model, and material resources are added to the shattering animation model of the mirror model to simulate the glass texture when the mirror model is shattered. That is, in the present application, a mirror model corresponding to the game screen, multiple shattering models in the mirror model, and shattering maps and model animations of multiple shattering models can be generated in one stop in Houdini software, so that the shattering maps and model animations are input into the game engine for rendering and display, and the shattering performance animation of the mirror model is obtained, which can achieve the purpose of efficiently producing the shattering animation of the mirror model, and achieve the technical effect of improving the information processing efficiency of the model, thereby solving the technical problem of low information processing efficiency of the model when producing the shattering animation of the mirror model.
[0170] The application scenario of this application can be made for the transition requirements of mirror shattering in the game, and the transition requirements of the mirror shattering can be: the shattering of the original scene picture - shattering in the middle - the Boos model appears from the shattered place - revealing the heart scene - shattering around - completely switching to the new scene. Among them, in the shattering process, the mirror shattering needs to be planned, for example, first shattering from the middle of the mirror model, and then shattering around. At the same time, a relatively realistic shattering simulation effect is also required, and the mirror shattering must have a certain glass texture. It is necessary to dynamically draw the current frame of the game in the Neox engine, and pass the current frame of the game as a parameter into the shader to achieve the mirror rendering effect.
[0171] Next, the technical principles of the mirror model fragmentation transition method are further introduced.
[0172] In Houdini software, a box is generated as a mirror model, and then a shattering model, shattering animation, and shattered textures are generated in Houdini. A new shader (surf shader) of the Neox engine is used for mirror rendering. The generated shattered texture is put into the shader for calculation to obtain the mirror rendering effect.
[0173] Create a new sample map named RT in the shader. When running the game, the program transfers the current game frame (rendertexture) to the RT map, so that the mirror model can render the original scene effect.
[0174] When running the game, just load the mirror shattering animation model when you want to transition. Then, when the mirror completely blocks the original scene, load the new scene, pass the current frame of the game as a parameter to the RT map, and play the shattering animation to achieve the transition effect of the mirror shattering.
[0175] Next, we will further introduce the process of generating a mirror model that matches the game screen and the broken model in the mirror model.
[0176] Generate a Grid model patch in Houdini that is proportional to the game screen. Take the vertical screen game with a resolution of 1640*720 as an example, generate a rectangular grid patch of 164cm*72cm, which can perfectly cover the game screen. Figure 3 is a schematic diagram of a mesh model patch provided according to an embodiment of the present disclosure, such as Figure 3 As shown, in the mesh model patch, the mesh vertices are evenly distributed.
[0177] For example, after generating a rectangular mesh patch, the number of subdivided grids of the rectangular mesh patch can be further determined by the number of rows and columns. Assuming that the size of the rectangular mesh patch is 164cm*72cm and the number of rows is 30, then according to the proportion, the integer of the formula 7.5*30 / 16.4=13.7 is 13 columns.
[0178] Optionally, since the mirror model is broken from the center, when the mirror model is broken, it is necessary to add enough vertices at the center of the mirror model.
[0179] Optionally, multiple vertices can be added to the center of the mirror model through the boundingsphere function of the group node in Houdini software and the subdivide node in Houdini software. Among them, the boundingsphere function of the group node is used to generate a mask area at the center of the mirror model.
[0180] Figure 4 is a schematic diagram of a mask area of a mirror model provided according to an embodiment of the present disclosure, such as Figure 4 As shown, the mask area is a sphere containing the basic shape in the mirror model, and the basic shape can be used to indicate the mesh in the mirror model. That is, the mask area can be understood as a sphere containing the mesh at the center of the mirror model, and the mask area can be recorded as a group2 node, where the group2 node stores the information of the mesh patches corresponding to the primitives contained in the mask area. The size of the mask area is determined by the internal shatter parameters of the HDA file after encapsulating the shatter animation of the mirror model.
[0181] Optionally, after generating the mask area at the center position of the mirror model, the subdivide node can be controlled to inherit the mask information of the mask area, that is, the subdivide node can be controlled to use the same mask information as the mask area, and subdivide the mesh patches in the mask area, thereby producing a subdivision effect in the mesh patches in the mask area.
[0182] Figure 5 is a schematic diagram of a subdivision effect in a mesh patch in a mask area provided according to an embodiment of the present disclosure, such as Figure 5 As shown in the figure, the subdivide node can subdivide the original face in the mask area to obtain a finer mesh effect.
[0183] Optionally, after the mesh patches in the mask area are subdivided, the vertex positions of the mesh may be moved first to ensure that the mesh has a good-looking fractured shape when it is broken.
[0184] For example, when moving the vertex position of a mesh, this can be achieved through the rest node in Houdini software, where the rest node is used to save and track the model vertices when the mirror model is in an initial position or a static position.
[0185] Optionally, by setting the mode of the rest node to store rest, the rest node can record the positions of the model vertices when the mirror model is at the initial position. After recording the vertex positions of the model vertices, the vertex positions of the model vertices can be changed by adding noise to the model vertices.
[0186] Figure 6 FIG. 1 is a schematic diagram of a mirror model provided according to an embodiment of the present disclosure after the model vertices are moved. Figure 6 As shown, through the turbnoise function in the attribute VOP node in Houdini software, noise is added to the model vertices to change the vertex positions of the model vertices through noise, thereby realizing the deformation of the vertex positions.
[0187] Optionally, after changing the vertex positions of the model vertices of the mirror model, the changed vertex positions of the model vertices may be sent to the voronofracture1 node, and then the voronofracture1 node is used to produce a plurality of fragmented models when the mirror model is fragmented.
[0188] For example, you can input a mesh patch with changed vertex positions in the voronofracture1 node, and then randomly input some vertices, where the positions of the vertices determine the generation of the fragments. That is, the vertices determine the positions where the mirror model breaks, and the shapes of the fragmented models are random.
[0189] Figure 7 is a schematic diagram of a fragmentation model according to an embodiment of the present disclosure, such as Figure 7 As shown, a mesh patch whose vertex positions are changed by noise and some random vertices are used to generate a fragmentation model, wherein the positions of the vertices determine the generation of fragmentation, and the shape of the generated fragmentation model can be any shape.
[0190] Next, the process of generating maps for the fractured model is further described.
[0191] Optionally, after obtaining the fractured model, each fractured model may be chamfered and smoothed to obtain a more refined fractured edge shape. Afterwards, vertex coloring is performed on the edge shape, and a mask map of the fractured shape obtained by vertex coloring is baked.
[0192] Figure 8is a schematic diagram of a fractured model extrusion chamfer provided in an embodiment of the present application, such as Figure 8 As shown, after the fragmentation model is extruded, a chamfer is generated, and then the chamfer is smoothed to obtain a more refined fragmentation edge shape corresponding to the fragmentation model.
[0193] As shown in Figure 8, through the foreach node, the node calculation is performed on each fragmented model in a loop. The node calculation mainly includes: extruding the model through polyextrude to generate thickness and chamfers for the face, calculating the chamfers through the polybevel node, smoothing the chamfers through smooth, and finally blurring the vertex colors of the model through the color node and attriblur node.
[0194] Optionally, when coloring the vertices of the fragmentation model, the color1 node can be used to color each vertex in the fragmentation model. For example, through the color1 node, the color attribute of each vertex in the fragmentation model is set to black. Then, the edge part of the fragmentation model is selected using the group named extrudeSide mentioned above, and then the non-edge part of the fragmentation model is deleted using the blast3 node, so that the fragmentation model only retains the edge part, forming a "magic shadow" effect. Then, the color2 node is used to color the edge part retained in the fragmentation model, for example, the color attribute of the edge part is set to white.
[0195] Fig. 9 is a schematic diagram of vertex coloring of a fragmentation model according to an embodiment of the present application, such as Fig. 9 As shown, for each fractured model, the inside is black and the edges are white.
[0196] Optionally, the attribtransfer1 node is used to transfer the color attribute of the fragmentation model, that is, the edge color attribute of one fragmentation model is transferred to another fragmentation model, so that the originally completely black fragmentation model becomes a fragmentation model with white edges and black interior.
[0197] Afterwards, the color attribute of the fragmentation model is blurred using the attribblur1 node to obtain a more blurred vertex color effect. The number of times the color attribute of the fragmentation model is blurred using the attribblur1 node can be 3 times, which is only an example and does not limit the number of blurring.
[0198] Finally, the vertex colors of the fractured model after vertex coloring are baked using the ROP Network node to obtain the target map corresponding to the fractured model. When baking the fractured model, the baking size can be specified, and then the vertex colors of the fractured model can be baked into the target map corresponding to the fractured model through the baketexture node in the ROP Network node.
[0199] Fig.10 FIG. 1 is a schematic diagram of baking vertex colors of a fractured model according to an embodiment of the present disclosure. Fig.10 As shown, click to bake and specify the size of the baked map. The vertex color of the shattered model can be baked into a map through the baketexture node in the ROP Network node.
[0200] Fig.11 It is a schematic diagram of a target map provided according to an embodiment of the present disclosure.
[0201] Next, the process of generating model animation of the fragmented model is further introduced.
[0202] After the mirror model is fragmented, SpheraMask is used to distinguish the model with central fragmentation from the model with surrounding fragmentation, and then the fragmented models are divided into inside group and outside group.
[0203] Fig.12 is a schematic diagram of a grouping of a fragmentation model according to an embodiment of the present disclosure, such as Fig.12 As shown, the fragmentation model inside the circular patch belongs to the inside group, and the fragmentation model outside the circular patch belongs to the outside group.
[0204] For example, first, the geometric center point of each fragmented model is calculated and extracted through the assemble node, that is, the model center point (1, 2, 3, 4, ... i); then, a new circle node is created to generate a circular patch; then, a new attributeewrangle4 node is created, and the code is created using the attributeewrangle4 node to obtain the distance from the circular patch to the center point of each fragmented model through the formula xyzdist; finally, in the attributeewrangle5 node, the fragmented models are grouped with the circular patch as the boundary, the fragmented models within the circular patch are the inside group, and the fragmented models outside the circular patch are the outside group.
[0205] Optionally, since the calculation method for the rotation and movement of the center of mass of the inside group and the outside group is the same, the difference is that the parameters in the final implementation are different from the K frames on the timeline. For example, when calculating the forward movement of the center of mass of the fragmentation model in the inside group and the outside group, the calculation method used for the two groups of fragmentation models is the same, the difference is that the movement parameter exposed to the HDA in the inside group is called the Transform during internal fragmentation, and the movement parameter exposed to the HDA in the outside group is called the Transform during external fragmentation. Based on this, as long as the K frames of the Transform during internal fragmentation and the Transform during external fragmentation on the timeline are distinguished respectively, different effects can be obtained. For example, the value of the K frame of the Transform during internal fragmentation on the timeline is set to 0, and the value of the K frame of the Transform during external fragmentation on the timeline is set to 15, and different fragmentation effects can be obtained.
[0206] Next, taking the inside group as an example, the calculation method of the movement process of the center of mass of the inside group is further introduced.
[0207] Optionally, the fragmentation process of the fragmentation model is controlled by changing the color of the center of mass of the fragmentation model in the inside group. For example, when the center of mass of the fragmentation model becomes white, it is determined that the fragmentation model is fragmented. That is, the fragmentation model is emitted. When the color of the center of mass is black, it means that the fragmentation model remains in its original state, that is, the fragmentation model is at the initial position of the mirror model.
[0208] Fig.13 is a schematic diagram of the color change of the centroid of the fragmentation model according to an embodiment of the present disclosure, such as Fig.13 As shown in the figure, first, the centroid of each fragmented model is extracted through the extractcentroid node; then, through the calculation of multiple nodes such as turn_white, the centroid color changes from the center of the entire model from the inside to the outside, and this change from the inside to the outside is achieved by the parameter Inside Start; the dynamic change of the centroid of the fragmented model is achieved through the coordination of the timeline and the Inside Start parameter, where the timeline can implement the K frames of the Inside Start parameter to achieve a dynamic effect; the color attribute of the centroid is synchronized to a new attribute named age through the solver_age node.
[0209] Optionally, when the center of mass is black, it indicates that the center of mass is at the original position and has not moved, and when the center of mass is white, it indicates that the center of mass has been emitted.
[0210] Fig.14FIG. 1 is a schematic diagram of the centroid motion of another fragmentation model according to an embodiment of the present disclosure. Fig.14 As shown, the black center of mass stays in place, while the white center of mass is affected by the node and emitted according to the changes in parameters and timeline.
[0211] Optionally, in the spin_noval node, the center of mass of the fragmented model will randomly rotate around the X-axis or Y-axis. This rotation is not affected by the age attribute of the center of mass and is not affected by the change of val. The final angle parameter exposed in HDA is called the internal fragmentation global random rotation. In the spin_val node, the center of mass of the fragmented model will randomly rotate around the X-axis or Y-axis again. This rotation is affected by the age attribute of the center of mass. The calculation method of the center of mass in this node is the same as that in the spin_noval node. The difference is that in this node, the angle parameter is multiplied by the center of mass age attribute obtained by the bind1 node. Finally, the angle parameter exposed in HDA is called random rotation during internal shattering. Afterwards, in the rotate node, the center of mass of the shattered model is controlled to rotate around the Z axis when it changes from black to white. The rotate node controls the age attribute of the center of mass to affect the P attribute of the center of mass, so that when the center of mass changes to white, it rotates around the Z axis according to the degree of whitening. Finally, when the shattered model flies out, the flying shattered model rotates around the Z axis. Afterwards, in the spread node, the center of mass of the shattered model changes its position when it changes to white, spreading outward with the world origin as the center. As the center of mass of the shattered model changes from black to white, the change of the age attribute will cause the center of mass to move toward the world origin. By subtracting the center of mass position (P attribute) from the world origin (the center of the shattered model), a new vector is obtained. The direction of the new vector is used to support the direction in which the center of mass moves outward. By adding the new vector to the center of mass, an animation effect of the center of mass of the shattered model spreading outward can be obtained. Finally, the position change of the center of mass flying in the Z direction is realized in the move_forward node, that is, the animation effect of the shattered model flying out after the mirror model is broken.
[0212] Optionally, the above steps can be used to achieve that the center of mass of the fragmented model is randomly rotated around the X-axis or Y-axis (implemented by the spin_noval node), and in the process of the center of mass color changing from black to white (implemented by the turn_white node), the center of mass is randomly rotated around the X-axis or Y-axis (implemented by the spin_val node), and rotated around the Z axis (implemented by the ratate node), and then the effect of spreading outward from the world origin (implemented by the spread node) and displacement in the Z direction (implemented by the move_forward node) are performed.
[0213] Fig.15 This is a schematic diagram of the specific calculation steps of a turn_white node according to an embodiment of the present disclosure. First, input the coordinate value (0, 0, 0) corresponding to the world origin in the distance node, calculate the distance from the center of mass of the fragmentation model to the world origin, and obtain a circular white mask centered on the origin; then, provide noise through the turbonoise node; add the noise to the circular white mask through the add node (actually, the circular white mask becomes not a perfect circle); finally, input the Inside Start parameter through the compare node to control the range of the circular white mask.
[0214] Optionally, the turn_white node finally affects the color attribute of the center of mass, so that the center of mass can change from black to white from the center of the model (that is, the world origin (0, 0, 0)). The Inside Start parameter here is called the inner crushing influence range in HDA. Since the calculation method of the inside group is the same as that of the outside group, but the exposure parameters are inconsistent, the Inside Start parameter in the outside group is called the outer crushing influence range in HDA.
[0215] Optionally, the age attribute can be numerically adjusted using the compute_val node.
[0216] Optionally, before performing an internal global rotation on the center of mass of the fragmented model, first use the ptnum attribute of the center of mass (each center of mass has its own numerical sequence, for example, (0, 1, 2) to perform a random rotation; since ptnum is a positive number, a fit1 node is required to convert ptnum to a range of -1-1; then, use a quaternoise node to convert the angle parameter to a quaternion value; then, use a qrotate1 node to rotate the normal vector of the center of mass, and the parameter that controls the rotation of the N attribute becomes the angle parameter of the quaternion value; finally, connect the rotated result to the N attribute of the output node to achieve the rotation of the center of mass.
[0217] Optionally, the calculation process of the center of mass doing random rotation around the X or Y axis with the Inside Start parameter is basically the same as the Spin_noval node, the only difference is that the angle parameter is multiplied by the center of mass age attribute obtained by bind1.
[0218] Fig.16It is a schematic diagram of a calculation process of rotating around the Z axis according to the whitening degree of the center of mass according to an embodiment of the present application. The age attribute of the center of mass is obtained through the bind node, and a rotate parameter with a fixed value of 3 is multiplied in the multiply1 node, and then the floattover node is used to convert the float floating point number into the value of the vector vector3. Finally, the P attribute of the center of mass (that is, the ptnum position attribute) is input into the xform node, and the xform node performs a rotation effect on the P attribute of the center of mass and connects it to the P attribute of the final output node geometryvoputput1 node.
[0219] Fig.17 is a schematic diagram of mirror fragments flying out corresponding to a fragmentation model according to an embodiment of the present application, such as Fig.17 As shown, the mirror fragments rotate around the Z axis when they fly out.
[0220] Optionally, the movement of the center of mass may include: random rotation around the X-axis or Y-axis, and in the process of the center of mass color changing from black to white, random rotation around the X-axis or Y-axis, and rotation around the Z-axis, and then the effect of spreading outward from the world origin and displacement in the Z direction.
[0221] Fig.18 is a schematic diagram of a calculation process of a mass center spreading outward from the world origin according to an embodiment of the present application, such as Fig.18 As shown in the figure, as the center of mass changes from black to white, the change in the age attribute will cause the center of mass to move outward from the world origin. By subtracting the center of mass position (P attribute) from the world origin (also the center of the model), a new vector (also the direction of the center of mass moving outward) is obtained. The new vector is normalized and then multiplied by the age attribute of the center of mass. The product is added to the center of mass position and then output to the P attribute of the output node to obtain the effect of the center of mass spreading outward.
[0222] Fig.19 This is a schematic diagram of a calculation process for realizing the movement of the center of mass in the Z direction according to an embodiment of the present application. The age attribute is obtained through the bind1 node, and the parameter of TransformAmount is input through the multiply node. The parameter controls the distance that the center of mass moves in the Z direction. The moving distance is converted into a vector value of vector3 through the floattovec1 node. Finally, the value of vector3 is input through the xform1 node and finally connected to the P attribute of the output node geometryvopoutput1.
[0223] Optionally, the movement of the center of mass can be transformed into the movement of the model using a transformpiece node.
[0224] Optionally, the calculation method of the motion process of the fragmentation model in the outside group is consistent with the calculation method of the motion process of the fragmentation model in the above-mentioned inside group, and will not be repeated here.
[0225] Optionally, by merging the motion of the fragmented models in the inside group with the motion of the fragmented models in the outside group, the model animation of all the fragmented models in the final complete mirror model during the fragmentation process can be obtained.
[0226] Optionally, after generating the model animation of the shattered model, the model animation may be encapsulated to obtain an HDA file, and the HDA file may be run to realize the shattered shape - animation K frame adjustment of the shattered effect - baking and exporting the lens shattered animation model - baking and exporting the shattered shape Mask map.
[0227] Optionally, the fractured animation model can be imported into the UE engine to generate skeletons, and then exported to the Neox engine to obtain the lens fractured animation model with skeletons.
[0228] Optionally, create a new shader for the mirror model, and use the shattered shape Mask map to simulate the refraction and reflection effects of the glass, and create a new RT map to wait for the parameters to be passed when running the game. For example, first sample the Mask map of the shattered model, and the value added to the refraction function will cause a refraction effect on the RT map, and provide a reflection effect for the glass as a glass reflection area.
[0229] Fig. 20 is a schematic diagram of determining the refraction area and reflection area of glass corresponding to the mirror model according to an embodiment of the present application, such as Fig. 20 As shown, the baked map CrackTex produced in Houdini software is first sampled, and then added to the edge of the model calculated by the fresnel function. The obtained value will cause a refraction effect on the RT map, and serve as a glass reflection area to provide a reflection effect for the glass.
[0230] Fig.21 is a schematic diagram of a calculation part of the refraction effect on the RT map according to an embodiment of the present application, such as Fig.21 As shown, the value obtained by adding the baked map CrackTex produced in Houdini software to the fresnel function is multiplied by 0.01 and the refraction intensity value, and then added to the screen space information. The obtained value produces a distortion effect on the sampling of the RT map corresponding to the current frame of the game, and then the refraction effect can be calculated.
[0231] Fig. 22is a schematic diagram of a calculation part for providing a reflection effect to glass according to an embodiment of the present application, such as Fig. 22 As shown, the RT map that produces the refraction effect is sampled, and the color space of the RT map is converted, that is, the RT map is converted from the SRGB space to the Linear space, and then added to the value obtained by adding the baked map CrackTex and the fresnel function * 0.01 * the refraction intensity value. The result is output as the final color to the color interface of the shader.
[0232] Optionally, create a new mtl material resource, reference the mirror shader, and assign the mtl resource to the mirror shattering animation model exported using HDA. When running the game, the program can pass the RT texture parameter to achieve the complete special effect. Among them, assigning the mtl resource to the mirror shattering animation model exported using HDA can make the mirror model produce glass texture when it is broken.
[0233] Fig.23 is a schematic diagram of a mirror model shattering effect provided according to an embodiment of the present disclosure, such as Fig.23 As shown, the original scene is broken --- broken in the middle --- the Boss model appears from the broken place, revealing a new scene --- broken all around, and completely switched to the new scene.
[0234] 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 prior art, 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 described in each embodiment of the present disclosure.
[0235] 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 terms "unit" and "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0236] Fig.24 is a structural block diagram of an information processing device according to a model of one embodiment of the present disclosure, such as Fig.24As shown, the device includes: an acquisition unit 2401, a generation unit 2402 and a display unit 2403.
[0237] An acquisition unit 2401 is used to acquire a plurality of fragmentation models in a mirror model, wherein the fragmentation model is used to simulate a fragmentation process of the mirror model in a game screen;
[0238] A generating unit 2402 is used to generate a target map and a model animation based on the fragmentation model, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process;
[0239] The display unit 2403 is used to render and display the target map and the model animation to show the fragmentation performance animation of the mirror model.
[0240] Optionally, the acquisition unit 2401 includes: a first determination module, used to determine a mirror model that matches the game screen; and a first processing module, used to fragment the mirror model to obtain a fragmented model.
[0241] Optionally, the first determination module includes: a first determination submodule, used to determine the screen size of the game screen; a second determination submodule, used to determine the patch size matching the screen size; and a generation submodule, used to generate a mirror model whose model patches satisfy the patch size.
[0242] Optionally, the first processing module includes: a first determination submodule, used to determine the central area of the mirror model based on the face size of the mirror model; an adding submodule, used to add at least one model vertex on the central area; and a first processing submodule, used to fragment the mirror model including the model vertices to obtain a fragmented model.
[0243] Optionally, the adding submodule is further used to determine the fragmentation area range of the mirror model in the central area; based on the fragmentation area range, determine the vertex positions of the model vertices in the central area; and add the model vertices at the vertex positions.
[0244] Optionally, the first processing submodule is further used to adjust the vertex positions of the mirror model including the model vertices; and perform fragmentation processing on the adjusted mirror model to obtain a fragmentation model.
[0245] Optionally, the first processing submodule is further used to adjust the vertex positions of the mirror model including the model vertices by using the target noise.
[0246] Optionally, the first processing submodule is also used to determine at least one target model vertex in the adjusted mirror model; determine the fragmentation position and fragmentation appearance information corresponding to the target model vertex in the adjusted mirror model, wherein the fragmentation position is used to indicate the position of the fragmentation model, and the fragmentation appearance information is used to indicate the appearance attributes of the fragmentation model; and divide the adjusted mirror model according to the fragmentation position and the fragmentation appearance information to obtain a fragmentation model.
[0247] Optionally, the generation unit 2402 includes: an adjustment module for adjusting the edge information of the fragmentation model; a second processing module for using the adjusted edge information to color the model vertices of the fragmentation model to obtain vertex colors; and a baking module for baking the vertex colors to obtain a target map.
[0248] Optionally, the adjustment module further includes: a third determination submodule, used to determine the chamfer corresponding to the edge information; and a processing submodule, used to perform smoothing processing on the chamfer.
[0249] Optionally, the baking module further includes: a second processing submodule, used for blurring the vertex colors; and a baking submodule, used for baking the blurred vertex colors to obtain a target map.
[0250] Optionally, the generating unit 2402 includes: an extraction module for extracting the center of mass from the fragmentation model; a second determination module for determining the physical properties of the center of mass; and a first generating module for generating a model animation based on the physical properties.
[0251] Optionally, the first generation module includes: a fourth determination submodule, used to determine the motion parameters of the fragmentation model based on physical properties; an association submodule, used to associate the motion parameters with the key frames of the game screen on the timeline to generate a model animation, wherein the model animation is used to display the fragmentation order of the fragmentation model located in different areas on the mirror model.
[0252] Optionally, the physical properties include the position of the center of mass, and the fourth determination submodule is further used to: determine the motion range and color change information of the center of mass moving from the position, wherein the color change information is used to represent the motion state of the center of mass; based on the color change information, determine the motion parameters of the center of mass within the motion range.
[0253] Optionally, the fourth determination submodule is also used to: determine the motion parameters of the center of mass within the motion range based on the color change information through at least one of the following steps: determine the first motion parameters of the center of mass rotating around the first coordinate axis or the second coordinate axis within the motion range; determine the second motion parameters of the center of mass rotating around the first coordinate axis or the second coordinate axis within the motion range based on the color change information; determine the third motion parameters of the center of mass rotating around the third coordinate axis within the motion range based on the color change information, wherein the first coordinate axis, the second coordinate axis and the third coordinate axis are used to constitute a world coordinate system; determine the fourth motion parameters of the center of mass diffusing outward from the world origin of the world coordinate system within the motion range based on the color change information; determine the fifth motion parameters of the center of mass moving in the direction corresponding to the third coordinate axis within the motion range based on the color change information.
[0254] Optionally, the display unit 2403 includes: a display module, which is used to render and display the target map and the model animation including the skeleton information to show the fragmentation performance animation of the mirror model.
[0255] Optionally, the display module also includes: a rendering sub-module, which is used to use the picture frame of the game screen to perform mirror rendering on the target map to obtain a mirror rendering result; an adding sub-module, which is used to add a target material to the model animation including bone information to obtain a target model animation, wherein the target material is used to make the fragmentation model present a mirror texture during the fragmentation process; and a display sub-module, which is used to display the fragmentation performance animation based on the mirror rendering result and the target model animation.
[0256] In the information processing device of the model of this embodiment, a mirror model corresponding to the game screen, multiple fragmented models in the mirror model, and target maps and model animations of the multiple fragmented models can be generated in one stop based on the game screen, so that the target map and model animation are rendered and displayed to obtain the fragmentation performance animation of the mirror model, thereby achieving the purpose of efficiently producing the fragmentation animation of the mirror model and realizing the technical effect of improving the information processing efficiency of the model, thereby solving the technical problem of low information processing efficiency of the model when producing the fragmentation animation of the mirror model.
[0257] 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.
[0258] 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 one of the above method embodiments when running.
[0259] 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.
[0260] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0261] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0262] S1, obtaining a plurality of fragmentation models in a mirror model, wherein the fragmentation model is used to simulate a fragmentation process of the mirror model in a game screen;
[0263] S2, based on the fragmentation model, generating a target map and a model animation, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process;
[0264] S3, rendering and displaying the target map and the model animation to show the animation of the fragmentation of the mirror model.
[0265] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: determining a mirror model that matches the game screen; and fragmenting the mirror model to obtain a fragmented model.
[0266] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: determining the screen size of the game screen; determining a patch size that matches the screen size; and generating a mirror model whose model patches satisfy the patch size.
[0267] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: determining a central area of the mirror model based on the patch size of the mirror model; adding at least one model vertex to the central area; and fragmenting the mirror model including the model vertex to obtain a fragmented model.
[0268] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: determining the fragmentation area range of the mirror model in the central area; based on the fragmentation area range, determining the vertex positions of the model vertices in the central area; and adding the model vertices at the vertex positions.
[0269] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: adjusting the vertex positions of the mirror model including the model vertices; and fragmenting the adjusted mirror model to obtain a fragmented model.
[0270] Optionally, the computer-readable storage medium is further configured to store a program code for executing the following steps: using target noise, adjusting the vertex positions of the mirror model including the model vertices.
[0271] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: determining at least one target model vertex in the adjusted mirror model; determining a fragmentation position and fragmentation appearance information corresponding to the target model vertex in the adjusted mirror model, wherein the fragmentation position is used to indicate the position of the fragmentation model, and the fragmentation appearance information is used to indicate the appearance attributes of the fragmentation model; and dividing the adjusted mirror model according to the fragmentation position and the fragmentation appearance information to obtain a fragmentation model.
[0272] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: adjusting edge information of the fragmented model; using the adjusted edge information to color the model vertices of the fragmented model to obtain vertex colors; and baking the vertex colors to obtain a target map.
[0273] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: determining the chamfer corresponding to the edge information; and performing smoothing on the chamfer.
[0274] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: blurring vertex colors; and baking the blurred vertex colors to obtain a target map.
[0275] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: extracting the center of mass from the fragmentation model; determining the physical properties of the center of mass; and generating a model animation based on the physical properties.
[0276] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: determining motion parameters of the fragmentation model based on physical properties; associating the motion parameters with key frames of the game screen on the timeline to generate a model animation, wherein the model animation is used to display the fragmentation order of the fragmentation model located in different areas on the mirror model.
[0277] Optionally, the above-mentioned computer-readable storage medium is also configured to store program codes for executing the following steps: determining the motion range and color change information of the center of mass moving from a position, wherein the color change information is used to represent the motion state of the center of mass; based on the color change information, determining the motion parameters of the center of mass within the motion range.
[0278] Optionally, the above-mentioned computer-readable storage medium is also configured to store program codes for executing the following steps: determining a first motion parameter of the center of mass rotating around a first coordinate axis or a second coordinate axis within the range of motion; determining a second motion parameter of the center of mass rotating around the first coordinate axis or the second coordinate axis within the range of motion based on color change information; determining a third motion parameter of the center of mass rotating around a third coordinate axis within the range of motion based on color change information, wherein the first coordinate axis, the second coordinate axis and the third coordinate axis are used to constitute a world coordinate system; determining a fourth motion parameter of the center of mass diffusing outward from the world origin of the world coordinate system within the range of motion based on the color change information; determining a fifth motion parameter of the center of mass moving in a direction corresponding to the third coordinate axis within the range of motion based on the color change information.
[0279] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: rendering and displaying the target map and the model animation including the skeleton information to show the fragmentation performance animation of the mirror model.
[0280] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: performing mirror rendering on a target map using a picture frame of a game screen to obtain a mirror rendering result; adding a target material to a model animation including skeletal information to obtain a target model animation, wherein the target material is used to make the fragmented model present a mirror texture during the fragmentation process; and displaying a fragmentation performance animation based on the mirror rendering result and the target model animation.
[0281] In the computer-readable storage medium of this embodiment, a method for processing information of a model is provided. Based on the game screen, a mirror model corresponding to the game screen, multiple fragmentation models in the mirror model, and target maps and model animations of the multiple fragmentation models can be generated in one stop, so that the target map and model animation are rendered and displayed to obtain the fragmentation performance animation of the mirror model, thereby achieving the purpose of efficiently producing the fragmentation animation of the mirror model, achieving the technical effect of improving the information processing efficiency of the model, and then solving the technical problem of low information processing efficiency of the model when producing the fragmentation animation of the mirror model.
[0282] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0283] In an exemplary embodiment of the present application, a program product capable of implementing the above method of the present embodiment is stored on a computer-readable storage medium. In some possible implementations, various aspects of the embodiments of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above "Exemplary Method" section of the present embodiment according to various exemplary implementations of the present disclosure.
[0284] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present disclosure is not limited to this. In the embodiment of the present disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0285] The program product may be in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0286] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0287] 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.
[0288] 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.
[0289] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0290] S1, obtaining a plurality of fragmentation models in a mirror model, wherein the fragmentation model is used to simulate a fragmentation process of the mirror model in a game screen;
[0291] S2, based on the fragmentation model, generating a target map and a model animation, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process;
[0292] S3, rendering and displaying the target map and the model animation to show the animation of the fragmentation of the mirror model.
[0293] Optionally, the processor may also be configured to execute the following steps through a computer program: determining a mirror model that matches the game screen; and fragmenting the mirror model to obtain a fragmented model.
[0294] Optionally, the processor may also be configured to execute the following steps through a computer program: determining the screen size of the game screen; determining a patch size that matches the screen size; and generating a mirror model whose model patches satisfy the patch size.
[0295] Optionally, the processor may also be configured to perform the following steps through a computer program: determining a central area of the mirror model based on the patch size of the mirror model; adding at least one model vertex to the central area; and fragmenting the mirror model including the model vertex to obtain a fragmented model.
[0296] Optionally, the processor may also be configured to perform the following steps through a computer program: determining a fragmentation region range of the mirror model in the central region; determining vertex positions of model vertices in the central region based on the fragmentation region range; and adding model vertices at the vertex positions.
[0297] Optionally, the processor may also be configured to perform the following steps through a computer program: adjusting the vertex positions of the mirror model including the model vertices; and fragmenting the adjusted mirror model to obtain a fragmented model.
[0298] Optionally, the processor may also be configured to perform the following steps through a computer program: using target noise, adjusting the vertex positions of the mirror model including the model vertices.
[0299] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: determine at least one target model vertex in the adjusted mirror model; determine the fragmentation position and fragmentation appearance information corresponding to the target model vertex in the adjusted mirror model, wherein the fragmentation position is used to indicate the position of the fragmentation model, and the fragmentation appearance information is used to indicate the appearance attributes of the fragmentation model; divide the adjusted mirror model according to the fragmentation position and the fragmentation appearance information to obtain a fragmentation model.
[0300] Optionally, the processor may also be configured to perform the following steps through a computer program: adjusting edge information of the fragmented model; using the adjusted edge information to color the model vertices of the fragmented model to obtain vertex colors; and baking the vertex colors to obtain a target map.
[0301] Optionally, the processor may also be configured to execute the following steps through a computer program: determining the chamfer corresponding to the edge information; and performing smoothing on the chamfer.
[0302] Optionally, the processor may also be configured to perform the following steps through a computer program: blurring the vertex colors; and baking the blurred vertex colors to obtain a target map.
[0303] Optionally, the processor may also be configured to perform the following steps through a computer program: extracting the center of mass from the fragmentation model; determining the physical properties of the center of mass; and generating a model animation based on the physical properties.
[0304] Optionally, the processor can also be configured to perform the following steps through a computer program: determining the motion parameters of the fragmentation model based on physical properties; associating the motion parameters with the key frames of the game screen on the timeline to generate a model animation, wherein the model animation is used to display the fragmentation order of the fragmentation model located in different areas on the mirror model.
[0305] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: determine the movement range and color change information of the center of mass moving from the position, wherein the color change information is used to represent the movement state of the center of mass; based on the color change information, determine the movement parameters of the center of mass within the movement range.
[0306] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: determine a first motion parameter of the center of mass rotating around a first coordinate axis or a second coordinate axis within the range of motion; determine a second motion parameter of the center of mass rotating around the first coordinate axis or the second coordinate axis within the range of motion based on color change information; determine a third motion parameter of the center of mass rotating around a third coordinate axis within the range of motion based on color change information, wherein the first coordinate axis, the second coordinate axis and the third coordinate axis are used to constitute a world coordinate system; determine a fourth motion parameter of the center of mass diffusing outward from the world origin of the world coordinate system within the range of motion based on the color change information; determine a fifth motion parameter of the center of mass moving in a direction corresponding to the third coordinate axis within the range of motion based on the color change information.
[0307] Optionally, the processor may also be configured to perform the following steps through a computer program: rendering and displaying the target map and the model animation including the skeleton information to show the fragmentation performance animation of the mirror model.
[0308] Optionally, the processor can also be configured to perform the following steps through a computer program: use the picture frames of the game screen to perform mirror rendering on the target map to obtain a mirror rendering result; add a target material to the model animation including bone information to obtain a target model animation, wherein the target material is used to make the fragmentation model present a mirror texture during the fragmentation process; and display the fragmentation performance animation based on the mirror rendering result and the target model animation.
[0309] In the electronic device of this embodiment, a model information processing method is provided. Based on the game screen, a mirror model corresponding to the game screen, multiple fragmentation models in the mirror model, and target maps and model animations of the multiple fragmentation models can be generated in one stop, so that the target map and model animation are rendered and displayed to obtain the fragmentation performance animation of the mirror model, thereby achieving the purpose of efficiently producing the fragmentation animation of the mirror model, achieving the technical effect of improving the information processing efficiency of the model, and then solving the technical problem of low model information processing efficiency when producing the fragmentation animation of the mirror model.
[0310] Fig.25 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Fig.25 As shown, the electronic device 2500 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0311] like Fig.25As shown, the electronic device 2500 is in the form of a general computing device. The components of the electronic device 2500 may include but are not limited to: at least one processor 2510, at least one memory 2520, a bus 2525 connecting different system components (including the memory 2520 and the processor 2510), and a display 2540.
[0312] The memory 2520 stores program codes, which can be executed by the processor 2510, so that the processor 2510 executes the steps described in the method section of the embodiment of the present application according to various exemplary embodiments of the present disclosure.
[0313] The memory 2520 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 25201 and / or a cache memory unit 25202, and may further include a read-only memory unit (ROM) 25203, 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.
[0314] In some examples, the memory 2520 may also include a program / utility 25204 having a set (at least one) of program modules 25205, such program modules 25205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include the implementation of a network environment. The memory 2520 may further include a memory remotely disposed relative to the processor 2510, and these remote memories may be connected to the electronic device 2500 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.
[0315] The bus 2525 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 the processor 2510, or a bus using any of a variety of bus architectures.
[0316] The display 2540 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 2500 .
[0317] Optionally, the electronic device 2500 may also communicate with one or more external devices 2600 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 2500, and / or any device that enables the electronic device 2500 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 2550. Furthermore, the electronic device 2500 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 2560. Fig.25 As shown, the network adapter 2560 communicates with other modules of the electronic device 2500 via the bus 2525. It should be understood that although Fig.25 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 2500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0318] The electronic device 2500 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.
[0319] It can be understood by those skilled in the art that Fig.25 The structure shown is for illustration only and does not limit the structure of the above electronic device. Fig.25 More or fewer components as shown, or with Figure 1 The memory 2520 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 2510 executes various functional applications and data processing by running the computer programs stored in the memory 2520, that is, implements the above-mentioned information processing method of the model.
[0320] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.
[0321] Optionally, the computer program included in the above-mentioned computer program product is executed by a processor to perform the following steps:
[0322] S1, obtaining a plurality of fragmentation models in a mirror model, wherein the fragmentation model is used to simulate a fragmentation process of the mirror model in a game screen;
[0323] S2, based on the fragmentation model, generating a target map and a model animation, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process;
[0324] S3, rendering and displaying the target map and the model animation to show the animation of the fragmentation of the mirror model.
[0325] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.
[0326] Optionally, the computer program stored in the non-volatile computer-readable storage medium is used by the processor to execute the following steps:
[0327] S1, obtaining a plurality of fragmentation models in a mirror model, wherein the fragmentation model is used to simulate a fragmentation process of the mirror model in a game screen;
[0328] S2, based on the fragmentation model, generating a target map and a model animation, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process;
[0329] S3, rendering and displaying the target map and the model animation to show the animation of the fragmentation of the mirror model.
[0330] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.
[0331] Optionally, the computer program is executed by a processor to perform the following steps:
[0332] S1, obtaining a plurality of fragmentation models in a mirror model, wherein the fragmentation model is used to simulate a fragmentation process of the mirror model in a game screen;
[0333] S2, based on the fragmentation model, generating a target map and a model animation, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process;
[0334] S3, rendering and displaying the target map and the model animation to show the animation of the fragmentation of the mirror model.
[0335] 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.
[0336] 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.
[0337] In the several embodiments provided in this application, 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 the 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.
[0338] 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 on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0339] 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.
[0340] 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable 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 method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0341] The above is only a preferred embodiment 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 principle of the present disclosure. These improvements and modifications should also be regarded as the scope of protection of the present disclosure.
Claims
1. A model information processing method, It is characterized in that include: Acquire multiple fragmentation models in the mirror model, wherein the fragmentation models are used to simulate the fragmentation process of the mirror model in the game screen; Based on the fragmentation model, a target map and a model animation are generated, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process; The target map and the model animation are rendered and displayed to show the fragmentation animation of the mirror model.
2. The method according to claim 1, It is characterized in that Get multiple fracture models in the mirror model, including: Determining the mirror model that matches the game screen; The mirror model is fragmented to obtain the fragmented model.
3. The method according to claim 2, It is characterized in that Determining the mirror model that matches the game screen includes: Determining the screen size of the game screen; Determine a patch size that matches the picture size; Generate the mirror model with a model patch that meets the patch size.
4. The method according to claim 2, It is characterized in that The mirror model is subjected to fragmentation processing to obtain the fragmentation model, comprising: Determining a central area of the mirror model based on a patch size of the mirror model; adding at least one model vertex on the central area; The mirror model including the model vertices is fragmented to obtain the fragmented model.
5. The method according to claim 4, It is characterized in that Adding at least one model vertex on the central area includes: Determine the fragmentation area range of the mirror model on the central area; Based on the fragmentation region range, determining the vertex position of the model vertex in the central region; Add the model vertex at the vertex position.
6. The method according to claim 4, It is characterized in that The mirror model including the model vertices is subjected to fragmentation processing to obtain the fragmentation model, comprising: Adjusting the vertex positions of the mirror model including the model vertices; The adjusted mirror model is fragmented to obtain the fragmented model.
7. The method according to claim 6, It is characterized in that Adjusting the vertex positions of the mirror model including the model vertices comprises: The vertex positions of the mirror model including the model vertices are adjusted using target noise.
8. The method according to claim 6, It is characterized in that The adjusted mirror model is subjected to fragmentation processing to obtain the fragmentation model, comprising: In the adjusted mirror model, determining at least one target model vertex; Determine the fragmentation position and fragmentation appearance information corresponding to the vertex of the target model in the adjusted mirror model, wherein the fragmentation position is used to indicate the position of the fragmentation model, and the fragmentation appearance information is used to indicate the appearance attribute of the fragmentation model; The adjusted mirror model is divided according to the fragmentation position and the fragmentation appearance information to obtain the fragmentation model.
9. The method according to claim 1, It is characterized in that Based on the fragmentation model, generating the target map includes: Adjusting edge information of the fragmentation model; Using the adjusted edge information, coloring the model vertices of the fragmented model to obtain vertex colors; The vertex colors are baked to obtain the target map.
10. The method according to claim 9, It is characterized in that The edge information of the fragmentation model is adjusted, including: Determine the chamfer corresponding to the edge information; The chamfer is smoothed.
11. The method according to claim 9, It is characterized in that Baking the vertex colors to obtain the target map includes: Performing blur processing on the vertex color; The blurred vertex colors are baked to obtain the target map.
12. The method according to claim 1, It is characterized in that Generating the model animation based on the fragmentation model includes: extracting a centroid from the fragmentation model; determining physical properties of the center of mass; Based on the physical properties, the model animation is generated.
13. The method according to claim 12, It is characterized in that Generating the model animation based on the physical properties includes: Based on the physical properties, determining motion parameters of the fragmentation model; The motion parameters are associated with the key frames of the game screen on the timeline to generate the model animation, wherein the model animation is used to show the fragmentation order of the fragmentation model located in different areas on the mirror model.
14. The method according to claim 13, It is characterized in that The physical property includes the position of the center of mass, and based on the physical property, determining the motion parameters of the fragmentation model includes: Determine a movement range and color change information of the center of mass starting from the position, wherein the color change information is used to indicate a movement state of the center of mass; Based on the color change information, the motion parameter of the center of mass within the motion range is determined.
15. The method according to claim 14, It is characterized in that Determining the motion parameter of the center of mass within the motion range based on the color change information includes at least one of the following: Determine a first motion parameter of the center of mass rotating around the first coordinate axis or the second coordinate axis within the motion range; Determine, based on the color change information, a second motion parameter of the center of mass rotating around the first coordinate axis or the second coordinate axis within the motion range; Based on the color change information, determining a third motion parameter of the center of mass rotating around a third coordinate axis within the motion range, wherein the first coordinate axis, the second coordinate axis and the third coordinate axis are used to form a world coordinate system; Based on the color change information, determining a fourth motion parameter of the center of mass spreading outward from the world origin of the world coordinate system within the motion range; Based on the color change information, a fifth motion parameter of the center of mass moving in the motion range in a direction corresponding to the third coordinate axis is determined.
16. The method according to claim 1, It is characterized in that The target map and the model animation are input for rendering and display to show the fragmentation performance animation of the mirror model, including: The target map and the model animation including the skeleton information are rendered and displayed to show the fragmentation performance animation of the mirror model.
17. The method according to claim 16, It is characterized in that Rendering and displaying the target map and the model animation including the skeleton information to show the fragmentation performance animation of the mirror model includes: Using the picture frame of the game screen to perform mirror rendering on the target map to obtain a mirror rendering result; Adding a target material to the model animation including the skeleton information to obtain a target model animation, wherein the target material is used to make the fragmented model present a mirror texture during the fragmentation process; The fragmentation performance animation is displayed based on the specular rendering result and the target model animation.
18. An information processing device for a model, It is characterized in that include: An acquisition unit, used for acquiring a plurality of fragmentation models in the mirror model, wherein the fragmentation models are used for simulating a fragmentation process of the mirror model in a game screen; A second generating unit is used to generate a target map and a model animation based on the fragmentation model, wherein the target map is used to describe the fragmentation shape corresponding to the fragmentation model, and the model animation is used to show the motion state of the fragmentation model during the fragmentation process; The display unit is used to render and display the target map and the model animation to show the fragmentation performance animation of the mirror model.
19. A computer-readable storage medium, It is 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 17 when executed by a processor.
20. An electronic device comprising a memory and a processor, It is 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 17.
21. A computer program product, It is 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 17.
