Information processing method and device, storage medium and electronic device
By obtaining and mixing animation map information and vertex offset information in the game scene, the target fabric display form of the virtual model is determined, which solves the problems of poor flexibility and high resource consumption in the existing VAT technology, and improves the visual effect of the game and users Experience.
Patent Information
- Application Number
- CN202411244925.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-27
AI Technical Summary
The existing vertex animation texture (VAT) technology cannot meet the requirements of flexibility and variability in real-time rendering engines, resulting in poor fabric simulation results and high resource performance consumption, affecting the quality of the game picture.
By obtaining the animation map information and vertex offset information of the virtual model in the game scene, performing mixing processing, determining the target fabric display form of the virtual model, and rendering the virtual model in the game scene to achieve more realistic fabric animation effects.
It improves the visual effects and user experience in the game scene, enhances the fun and attractiveness of the game, solves the problems of poor rendering flexibility and high resource consumption, and achieves a more realistic fabric simulation effect.
Smart Images

Figure CN119185931A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information processing method, device, storage medium and electronic device. Background Art
[0002] Cloth simulation animation plays an important role in games and is one of the important technologies to improve game quality and attract players. Through cloth simulation animation technology, the characters, scenes and objects in the game can more realistically show the texture, shape and movement of cloth, making the game screen more vivid and realistic. Vertex animation texture (VAT) technology in related technologies provides the basis for cloth simulation, and can provide cloth effects like offline solution simulation in real-time rendering engines. However, in real-time rendering engines, what is needed is not only a single cloth simulation animation, but more importantly, a cloth simulation animation that can change at any time to adapt to different states. The current VAT technology has deficiencies in this regard, and cannot meet the requirements of real-time rendering engines for flexibility and variability, and the resource performance consumption is large during real-time rendering, which further affects the cloth simulation effect.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] At least some embodiments of the present application provide an information processing method, apparatus, storage medium and electronic device to at least solve the technical problems of poor rendering flexibility and high resource consumption when implementing cloth simulation in a real-time rendering engine in the related art.
[0005] According to one embodiment of the present application, an information processing method is provided, including: obtaining animation map information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses preset material cloth, the animation map information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state; mixing the animation map information and the vertex offset information to determine a target cloth display form of the virtual model; and rendering the virtual model in the game scene according to the target cloth display form.
[0006] According to one embodiment of the present application, an information processing device is also provided, including: an acquisition module, used to acquire animation map information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses preset material cloth, the animation map information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state; a mixing module, used to mix the animation map information and the vertex offset information to determine a target cloth display form of the virtual model; and a processing module, used to render the virtual model in the game scene according to the target cloth display form.
[0007] According to one embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned information processing method in each embodiment of the present application when running.
[0008] According to one embodiment of the present application, 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 above-mentioned information processing method in each embodiment of the present application.
[0009] According to one embodiment of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned information processing method in each embodiment of the present application is implemented.
[0010] According to one 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 above-mentioned information processing method in each embodiment of the present application is implemented.
[0011] According to one embodiment of the present application, a computer program is also provided, and when the computer program is executed by a processor, the above-mentioned information processing method in each embodiment of the present application is implemented.
[0012] In at least some embodiments of the present application, by obtaining the animation map information and vertex offset information of the virtual model to be used in the game scene, and then mixing the animation map information and the vertex offset information, the target fabric display form of the virtual model is determined, and finally the virtual model is rendered in the game scene according to the target fabric display form, so that the virtual model with a real fabric effect can be displayed in the game scene. By mixing the animation map information and the vertex offset information, the dynamic effect of the virtual model in different fabric display states can be achieved, making the virtual model look more vivid and realistic, further improving the visual effect in the game scene, enhancing the user's immersion and experience, and improving the fun and attractiveness of the game, thereby solving the technical problems of poor rendering flexibility and high resource consumption when implementing fabric simulation in a real-time rendering engine in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0014] Figure 1 It is a hardware structure block diagram of a mobile terminal according to an information processing method of one embodiment of the present application;
[0015] Figure 2 is a flow chart of an information processing method according to one embodiment of the present application;
[0016] Figure 3 is a schematic diagram of a cloth display state according to one embodiment of the present application;
[0017] Figure 4 is a schematic diagram of another cloth display state according to one embodiment of the present application;
[0018] Figure 5 is a schematic diagram of another cloth display state according to one embodiment of the present application;
[0019] Figure 6 is a schematic diagram of an initial state according to one embodiment of the present application;
[0020] Figure 7 is a vertex animation map according to one embodiment of the present application;
[0021] Figure 8 is another vertex animation map according to one embodiment of the present application;
[0022] Fig. 9 is another vertex animation map according to one embodiment of the present application;
[0023] Fig.10 is an alternative vertex color map according to one embodiment of the present application;
[0024] Fig.11 is another alternative vertex color map according to one embodiment of the present application;
[0025] Fig.12 is another alternative vertex color map according to one embodiment of the present application;
[0026] Fig.13 is a schematic diagram of a target fabric display form according to one embodiment of the present application;
[0027] Fig.14 is a schematic diagram of another target fabric display form according to one embodiment of the present application;
[0028] Fig.15 is a schematic diagram of another target fabric display form according to one embodiment of the present application;
[0029] Fig.16 is a schematic diagram of another target fabric display form according to one embodiment of the present application;
[0030] Fig.17 is a structural block diagram of an information processing device according to one embodiment of the present application;
[0031] Fig.18 is a schematic diagram of an electronic device according to one embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0035] 3D animation software (Houdini): is a computer graphics and special effects software that can be widely used in the film, television and game industries to create complex special effects, simulations and animations. Houdini has a powerful node-based workflow and programmable functions, enabling users to create highly customizable effects, and can also be used to simulate fluids, cloth and other physical phenomena.
[0036] Unreal Engine (UE): is a game engine used to create various types of video games, virtual reality and augmented reality applications. The engine provides powerful tools and features that can be applied to the development of simulation games, horror games, role-playing games and many other different types of games.
[0037] Vertex Animation Texture (VAT) technology: It bakes vertex animation information into texture maps for use in vertex shaders. VAT records the displacement data of each vertex in a texture, and then inputs the texture into the world position parameter of the vertex shader, so that the GPU can restore each frame of animation. The data format of the VAT texture is very simple and intuitive. The horizontal axis is that each point corresponds to a vertex on the aggregate; the vertical axis is the time axis. Each point on the plane corresponds to the coordinate displacement of a vertex at a certain moment.
[0038] The VAT technology in the related art provides the basis for cloth simulation, and can provide cloth effects in real-time rendering engines that are similar to offline solution simulation. However, in real-time rendering engines, what is needed is not only a single cloth simulation animation, but more importantly, a cloth simulation animation that can change at any time to adapt to different states. There are some defects in the current VAT technology, including: the size of the generated texture is affected by the number of vertices and the length of the animation. When the number of vertices is too large or the animation is too long, the generated texture will be very large, resulting in an increase in the amount of video memory occupied; it does not support mixed transitions and physical collisions between animations; it is impossible to use the animation state machine to control actions; the accuracy of the action information is affected by the storage format, which may cause the read animation to be inaccurate; it is impossible to implement functions such as Inverse Kinematics (IK) in skeletal animation.
[0039] Therefore, the current VAT technology cannot meet the requirements of real-time rendering engines for flexibility and variability, and consumes a lot of resource performance during real-time rendering, further affecting the cloth simulation effect.
[0040] The above method embodiments involved in this application 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 PAD, a game console and other terminal devices. Figure 1 1 is a hardware structure block diagram of a mobile terminal of an information processing method according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a 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 microprocessor (MCU), a field-programmable logic device (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 application, it may also include: an input and output device 108 and a display device 110.
[0041] 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 (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.
[0042] Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0043] According to one embodiment of the present application, an embodiment of an 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.
[0044] Figure 2 is a flow chart of an information processing method according to one embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0045] Step S21, obtaining animation texture information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses a preset material cloth, the animation texture information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state;
[0046] Step S22, mixing the animation map information and the vertex offset information to determine the target cloth display form of the virtual model;
[0047] Step S23, rendering in the game scene according to the target cloth display form to obtain a virtual model.
[0048] At least some of the above virtual models use preset material fabrics to better simulate the material properties in the real world. The virtual model can be a flag model, a clothing model, etc. The preset material fabrics can include various textures, colors, and glossiness, which help the model to more realistically show the appearance and texture of different materials, and can also improve the visual quality of the virtual model, making the virtual model more attractive and realistic. It should be noted that the flag model is used as an example in the embodiments of the present application, but it does not constitute a specific limitation on the virtual model.
[0049] The above-mentioned animation map information is used to record the vertex animation data obtained by offline solution in advance, and usually contains information such as vertex position, normal, texture coordinates, etc. of each frame. The animation map information can be used to quickly update the vertex data of the virtual model at runtime to achieve smooth animation effects. Animation maps can reduce the computing burden of the CPU and improve rendering efficiency, so that they can be effectively applied to resource-limited platforms such as mobile devices.
[0050] The above vertex offset information is used to record the vertex offset data of the preset material cloth between multiple different cloth display states and the initial state, and is used to dynamically adjust the vertex position at runtime to display different cloth states. The vertex offset information can reflect the changes of cloth stretching, contraction, distortion, etc., so as to achieve more realistic cloth effects in games or animations. Taking the flag model as an example, the multiple different cloth display states include but are not limited to the static state, the moving state, and the state of being inserted into the ground by the virtual character.
[0051] Figure 3 is a schematic diagram of a cloth display state according to one embodiment of the present application, such as Figure 3 As shown, in a static state, the flag presents a vertical shape, the fabric hangs naturally vertically, and the whole presents a calm state. The shape of the flag will vary depending on the material and design of the fabric, and can be a flat plane shape or a shape with folds and ripples. Figure 4 is a schematic diagram of another cloth display state according to one embodiment of the present application, such as Figure 4 As shown, in the moving state, the flag can flutter in the wind and change its shape. The fabric will be blown by the wind, producing a wavy shape, and the whole thing presents a dynamic state. Figure 5 is a schematic diagram of another cloth display state according to one embodiment of the present application, such as Figure 5 As shown in the figure, when the flag is inserted into the ground by the virtual character, the shape of the flag will change. The fabric will be pulled or affected by external forces and become twisted and deformed, and the overall appearance will be messy and no longer maintain its original neat state.
[0052] Furthermore, the animation map information and the vertex offset information are mixed to determine the target fabric display form of the virtual model, and the virtual model is rendered in the game scene according to the target fabric display form. This allows the virtual model to display various fabric forms in the game scene, making the game scene more vivid and realistic.
[0053] Based on the above steps S21 to S23, by obtaining the animation map information and vertex offset information of the virtual model to be used in the game scene, and then mixing the animation map information and the vertex offset information, the target fabric display form of the virtual model is determined, and finally the virtual model is rendered in the game scene according to the target fabric display form, so that the virtual model with a real fabric effect can be displayed in the game scene. By mixing the animation map information and the vertex offset information, the dynamic effect of the virtual model in different fabric display states can be achieved, making the virtual model look more vivid and realistic, further improving the visual effect in the game scene, enhancing the user's immersion and experience, and improving the fun and attractiveness of the game, thereby solving the technical problems of poor rendering flexibility and high resource consumption when implementing fabric simulation in a real-time rendering engine in the related technology.
[0054] The information processing method in the embodiment of the present application is further introduced below.
[0055] Optionally, the initial state is a flat state of a cloth of a preset material.
[0056] Specifically, the initial state is a flat state of a cloth of a preset material. Figure 6 is a schematic diagram of an initial state according to one embodiment of the present application, such as Figure 6 As shown, in the flat state, the preset material cloth has no wrinkles. The initial state can also be, but is not limited to, a taut state, a straightened state, or a smooth state of the preset material cloth, in which the preset material cloth may have a few wrinkles.
[0057] In order to realize the free transition of the virtual model between various cloth display states, it is necessary to set the default initial state of the virtual model. When the flat state of the preset material cloth is determined as the initial state, the average adaptation effect for subsequent conversion to any state is better. If the initial state of the virtual model is a state with too many wrinkles on the surface, the normal information in this state will affect the average adaptation effect when converting to other states.
[0058] Optionally, in step S21, obtaining animation texture information of a virtual model to be used in a game scene includes:
[0059] Step S211, performing offline solving on the cloth animation of the preset material cloth to obtain a solving result, wherein the solving result is used to record the animation data of each vertex of the virtual model in the cloth animation;
[0060] Step S212, using vertex animation texture method to bake the solution result, to obtain animation texture information of the virtual model to be used in the game scene.
[0061] Specifically, in the offline solving process of the cloth animation of the preset material cloth, in the cloth animation of the preset material cloth, each vertex is animated by a computer program to obtain the position, rotation, scaling and other data of each vertex during the animation process, which usually requires a lot of computing resources and time. The physical properties of the cloth, such as gravity, friction, elasticity, etc., need to be considered during the solving process to ensure that the animation effect conforms to the movement law of the real cloth. The solving results can be saved as vertex animation data for use by the rendering engine to achieve the playback and rendering of the cloth animation.
[0062] The animation data of each vertex of the virtual model in the cloth animation includes information such as the position, rotation, scale, normal direction, etc. of each vertex in the cloth animation. Each vertex animation data can be used to achieve realistic cloth effects in real-time rendering, allowing the virtual model to show vivid cloth movement and deformation effects in the animation.
[0063] Furthermore, the VAT technology can be used to bake the animation data of each vertex in each frame of the offline simulated cloth animation into a texture, thereby obtaining the animation texture information of the virtual model to be used in the game scene. By combining the frame number information stored in the UV channel of the virtual model, the offline solution result can be restored to the vertex animation of the virtual model.
[0064] Continuing with the flag model as an example, three sets of vertex animation maps were solved offline in advance in Houdini and baked. Figure 7 is a vertex animation map according to one embodiment of the present application, and the vertex animation map corresponding to the flag model in a static state is as follows Figure 7 shown. Figure 8 is another vertex animation map according to one embodiment of the present application, such as Figure 8 As shown, the vertex animation map corresponding to the flag model in the moving state is as follows Figure 8 shown. Fig. 9 is another vertex animation map according to one embodiment of the present application, such as Fig. 9 As shown in the figure, the corresponding vertex animation map of the flag model when the virtual character is inserted into the ground is as follows Fig. 9 shown.
[0065] Based on the above optional embodiment, the cloth animation of the preset material cloth is solved offline to obtain the solution result, and then the solution result is baked using the vertex animation texture method to obtain the animation map information of the virtual model to be used in the game scene, so that the animation map information of the virtual model can be used in the game scene, so that the virtual model has a more realistic cloth animation effect in the game, further enhancing the realism and interactivity of the game scene, improving the game experience, and making the player more immersed in the game environment. At the same time, through the offline solution and map baking method, the burden of the game engine can be effectively reduced, and the running efficiency and performance of the game can be improved.
[0066] Optionally, in step S21, obtaining vertex offset information of a virtual model to be used in the game scene includes:
[0067] Step S213, calculating vertex position offsets of the virtual model between a plurality of different cloth display states and an initial state, wherein the vertex position offsets are used to record the position difference between the vertex position of the virtual model in the current cloth display state and the vertex position of the virtual model in the initial state, and the current cloth display state is any one of the plurality of different cloth display states;
[0068] Step S214, obtaining vertex offset information of the virtual model to be used in the game scene based on the vertex position offset.
[0069] Specifically, the vertex position offset is also called the offset variable. In the process of calculating the offset variable, the vertex position of the virtual model in the initial state is first obtained, which can be obtained through the initial state information recorded when the model is loaded. According to the current cloth display state, the virtual model is cloth displayed and the corresponding vertex position information is obtained. Then the vertex position in the current cloth display state is compared with the vertex position in the initial state, and the position difference between the vertex positions in different states is calculated. By repeating the above steps, the vertex position offset of the virtual model in a variety of different cloth display states is calculated, so as to compare and analyze the display effects of the virtual model in different states. After obtaining the vertex position offset, the vertex offset information of the virtual model to be used in the game scene is obtained based on the vertex position offset.
[0070] Based on the above optional embodiments, by calculating the vertex position offsets of the virtual model between a plurality of different cloth display states and the initial state, and then obtaining the vertex offset information of the virtual model to be used in the game scene based on the vertex position offsets, the dynamic change of the virtual model in different cloth display states is realized, and the accurate vertex offset information of the model can be obtained according to the vertex position offsets, which can make the virtual model in the game scene more realistic and vivid, and enhance the user's immersion and experience. At the same time, by calculating and processing the vertex position offsets, a more accurate cloth simulation effect can also be achieved, which improves the realism and quality of the game screen.
[0071] Optionally, the information processing method in the embodiment of the present application also includes: using a color map to store vertex offset information, wherein multiple vertex color channels of the color map are respectively used to store vertex coordinate offset data of the virtual model in any one of a plurality of different fabric display states.
[0072] Optionally, the color values respectively stored in the plurality of vertex color channels are obtained by normalizing the vertex coordinate offset data.
[0073] Specifically, after obtaining the vertex offset information of the virtual model to be used in the game scene based on the vertex position offset, the vertex offset information can be stored in the virtual model UV, or stored in the model binding as a blendshape. Using a color map to store vertex offset information is no longer limited by the limitations of the virtual model itself, and an unlimited number of states can be baked. By adjusting the compression algorithm, the problem of insufficient precision of the color map can be avoided.
[0074] After obtaining the offset variable, store the offset variable in each vertex color (RGB) channel. Taking the offset variable as (x, y, z) as an example, the offset variable is stored in the corresponding vertex color channel through the following calculation process:
[0075] r=x×0.05+0.2
[0076] g=z×0.05+0.2
[0077] b=y×0.05+0.2
[0078] In the above calculation process, since the vertex offset information needs to be imported into the UE engine for use later, and the coordinate systems of Houdini and UE engines are different, y and z need to be swapped. Through the above calculation process, the offset variable can be compressed between 0 and 1, thereby realizing the normalization of the vertex coordinate offset data, thereby avoiding the loss of information caused by the range exceeding the threshold being clipped when switching engines.
[0079] Based on the above optional embodiment, by storing vertex offset information in multiple vertex color channels of a color map, more efficient model rendering and storage can be achieved while reducing the demand for additional storage space.
[0080] Optionally, the information processing method in the embodiment of the present application also includes: compressing the animation texture information according to the texture format supported by the preset game engine to obtain a compression result, wherein the compression result is compressed data of a number of bits corresponding to the texture format.
[0081] Specifically, the animation texture is imported into the UE engine, the texture format is the floating point image file exchange format (EXR), the 16-bit data format is selected as the texture compression format, and the animation texture information is compressed to obtain an accurate compression result.
[0082] Based on the above optional embodiment, by compressing the animation texture information according to the texture format supported by the preset game engine, a compression result is obtained, thereby reducing the storage space occupied by the animation texture and improving the performance of the game. By compressing the animation texture information, the size of the texture data can be reduced, and the burden on the GPU when loading and processing the texture can be reduced, thereby improving the running speed and efficiency of the game. At the same time, the compressed texture data can also reduce the download time and storage space of the game, providing players with a smoother and more efficient gaming experience.
[0083] Optionally, in step S22, mixing the animation map information with the vertex offset information to determine the target cloth display form of the virtual model includes:
[0084] Step S221, determining candidate vertex animation maps corresponding to a plurality of different cloth display states based on the animation map information, and determining candidate vertex color maps corresponding to a plurality of different cloth display states based on the vertex offset information;
[0085] Step S222 , obtaining a target cloth display form of the virtual model by mixing the candidate vertex animation map and the candidate vertex color map.
[0086] Specifically, based on the animation map information, Figure 7 Alternative vertex animation maps in the static state shown, such as Figure 8 Alternative vertex animation maps for the moving state shown, and Fig. 9 The alternative vertex animation map of the flag being inserted into the ground by the virtual character is shown. The alternative vertex color map is the baking result of the color map used for transition. In the UE engine, the 16-bit data format is also selected as the map compression format to ensure accuracy. Fig.10is a candidate vertex color map according to one embodiment of the present application, the candidate vertex color map in the static state is as follows Fig.10 shown. Fig.11 is another alternative vertex color map according to one embodiment of the present application, the alternative vertex color map in the moving state is as follows Fig.11 shown. Fig.12 is another alternative vertex color map according to one embodiment of the present application. The alternative vertex color map in the process of the flag being inserted into the ground by the virtual character is as follows: Fig.12 According to the candidate vertex animation map and the candidate vertex color map, the target cloth display form of the virtual model is obtained by mixing.
[0087] Based on the above optional embodiments, by determining the candidate vertex animation maps corresponding to a plurality of different cloth display states based on the animation map information, and determining the candidate vertex color maps corresponding to a plurality of different cloth display states based on the vertex offset information, and then mixing the candidate vertex animation maps and the candidate vertex color maps to obtain the target cloth display form of the virtual model, the corresponding cloth display form can be dynamically generated according to different cloth display states. By analyzing the animation map information and the vertex offset information, the appropriate candidate vertex animation map and the candidate vertex color map can be selected for different cloth states, thereby realizing the automatic transformation and adjustment of the cloth display form of the virtual model, thereby significantly improving the fidelity and realism of the virtual model, making the cloth display more vivid and interactive.
[0088] Optionally, in step S222, the target cloth display form of the virtual model is obtained by mixing the candidate vertex animation map and the candidate vertex color map, including:
[0089] Step S2221, selecting a first target vertex animation texture corresponding to a first state value and a second target vertex animation texture corresponding to a second state value from the candidate vertex animation textures, wherein the first state value and the second state value are boundary values of a value range corresponding to a plurality of different cloth display states;
[0090] Step S2222, selecting a first target vertex color map corresponding to the first state value and a second target vertex color map corresponding to the second state value from the candidate vertex color maps;
[0091] Step S2223, performing interpolation calculation on the first target vertex animation map and the second target vertex animation map to obtain a first interpolation result;
[0092] Step S2224, performing interpolation calculation on the first target vertex color map and the second target vertex color map to obtain a second interpolation result;
[0093] Step S2225: Mix the first interpolation result and the second interpolation result to determine the target cloth display form of the virtual model.
[0094] Specifically, in the UE engine, the material function that originally restores the VAT needs to be modified. First, the function information is simplified. The embodiment of the present application only needs to use the simplified output information, which includes input time control, frame control, input normal, input vertex position offset, output normal, output vertex position offset, and UV channel for storing frame information. What needs to be adjusted in the material function is to replace the original texture with the texture array storing the animation information, and to copy an additional set of material nodes that restore the animation texture information, which are used to represent the first state value 0 and the second state value 1 respectively, select the first target vertex animation texture corresponding to the first state value 0 from the alternative vertex animation texture, and the second target vertex animation texture corresponding to the second state value 1, and select the first target vertex color texture corresponding to the first state value 0 and the second target vertex color texture corresponding to the second state value 1 from the alternative vertex color texture.
[0095] Any state can be stored between the first state value 0 and the second state value 1. The flag actually repeatedly transitions between 0 and 1. For example, the first state value 0 is the flag drooping state, and it needs to transition to the fluttering state of the second state value 1. After the flag completes the transition to the fluttering state of the second state value 1, the state in the first state value 0 can be switched to a shaking or other state. At this time, the transition from the second state value 1 to the first state value 0 is a new state performance. Therefore, only two state storage arrays are needed to realize the transition switch of any state.
[0096] Furthermore, a linear interpolation (Lerp) node is used to implement transition control between the first target vertex animation map and the second target vertex animation map to obtain a first interpolation result. The same Lerp parameter is also applied to the switching part of the transition map, and the first target vertex color map and the second target vertex color map are interpolated to obtain a second interpolation result. The first interpolation result and the second interpolation result are mixed to determine the target fabric display form of the virtual model. Different fabric display forms can be obtained by adjusting the Lerp value, and then the desired target fabric display form is determined.
[0097] Fig.13 is a schematic diagram of a target fabric display form according to one embodiment of the present application. When the Lerp value is 0, the fabric display is the same as Fig.13 shown. Fig.14 is a schematic diagram of another target fabric display form according to one embodiment of the present application. When the Lerp value is 0.3, the fabric display form is as follows Fig.14 shown. Fig.15is a schematic diagram of another target fabric display form according to one embodiment of the present application. When the Lerp value is 0.7, the fabric display form is as follows Fig.15 shown. Fig.16 is a schematic diagram of another target fabric display form according to one embodiment of the present application. When the Lerp value is 1, the fabric display form is as follows Fig.16 shown.
[0098] Based on the above optional embodiment, by selecting a first target vertex animation map corresponding to a first state value and a second target vertex animation map corresponding to a second state value from the candidate vertex animation maps, and then selecting a first target vertex color map corresponding to the first state value and a second target vertex color map corresponding to the second state value from the candidate vertex color maps, then interpolating the first target vertex animation map and the second target vertex animation map to obtain a first interpolation result, interpolating the first target vertex color map and the second target vertex color map to obtain a second interpolation result, and finally mixing the first interpolation result and the second interpolation result to determine the target cloth display form of the virtual model, thereby achieving the effect of displaying a variety of different cloth display states in the virtual model, and obtaining the final target cloth display form through interpolation and mixing calculations, so that the virtual model presents a more vivid and realistic effect in terms of animation and color.
[0099] Optionally, the information processing method in the embodiment of the present application also includes: setting multiple texture arrays; storing the first target vertex animation texture, the second target vertex animation texture, the first target vertex color texture and the second target vertex color texture in the multiple texture arrays respectively.
[0100] Specifically, in the UE engine, the textures of each state can be organized into a texture array (Texture Array) for easy switching. Four texture arrays are set to store the first target vertex animation texture, the second target vertex animation texture, the first target vertex color texture and the second target vertex color texture respectively. No matter which state is switched to, it only needs to be ensured to be between 0 and 1 or 1 to 0 to achieve state transition.
[0101] VAT technology provides the basis for realizing simulated animation through GPU. The embodiment of the present application improves the effect on this basis, that is, animation mixing, which can realize cloth simulation effect and state switching with low consumption. Compared with the traditional real-time engine solving cloth simulation, it brings better effect controllability and performance saving, and can provide good effect performance in large-scale rendering.
[0102] 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 by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, 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, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0103] In the present embodiment, an information processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "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 conceivable.
[0104] Fig.17 is a structural block diagram of an information processing device according to one embodiment of the present application, such as Fig.17 As shown, the device comprises:
[0105] The acquisition module 1701 is used to acquire the animation map information and vertex offset information of the virtual model to be used in the game scene, wherein at least part of the virtual model uses a preset material cloth, the animation map information is used to record the vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record the vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state;
[0106] A mixing module 1702 is used to mix the animation map information and the vertex offset information to determine the target cloth display form of the virtual model;
[0107] The processing module 1703 is used to render a virtual model in the game scene according to the target cloth display form.
[0108] Optionally, the initial state is a flat state of a cloth of a preset material.
[0109] Optionally, the acquisition module 1701 is also used to: perform offline solving of the cloth animation of the preset material cloth to obtain the solving result, wherein the solving result is used to record each vertex animation data of the virtual model in the cloth animation; use the vertex animation texture method to perform texture baking on the solving result to obtain the animation texture information of the virtual model to be used in the game scene.
[0110] Optionally, the acquisition module 1701 is also used to: calculate the vertex position offset of the virtual model between a plurality of different fabric display states and an initial state, wherein the vertex position offset is used to record the position difference between the vertex position of the virtual model in the current fabric display state and the vertex position of the virtual model in the initial state, and the current fabric display state is any one of a plurality of different fabric display states; and obtain the vertex offset information of the virtual model to be used in the game scene based on the vertex position offset.
[0111] Optionally, the information processing device also includes: a storage module 1704, which is used to store vertex offset information using a color map, wherein multiple vertex color channels of the color map are respectively used to store vertex coordinate offset data of the virtual model in any one of a plurality of different cloth display states.
[0112] Optionally, the color values respectively stored in the plurality of vertex color channels are obtained by normalizing the vertex coordinate offset data.
[0113] Optionally, the information processing device further includes: a compression module 1705, which is used to compress the animation texture information according to the texture format supported by the preset game engine to obtain a compression result, wherein the compression result is compressed data with a number of bits corresponding to the texture format.
[0114] Optionally, the mixing module 1702 is also used to: determine alternative vertex animation maps corresponding to multiple different cloth display states based on the animation map information, and determine alternative vertex color maps corresponding to multiple different cloth display states based on the vertex offset information; and obtain the target cloth display form of the virtual model by mixing the alternative vertex animation maps and the alternative vertex color maps.
[0115] Optionally, the mixing module 1702 is also used to: select a first target vertex animation map corresponding to a first state value and a second target vertex animation map corresponding to a second state value from the alternative vertex animation maps, wherein the first state value and the second state value are boundary values of a value range corresponding to a plurality of different fabric display states; select a first target vertex color map corresponding to the first state value and a second target vertex color map corresponding to the second state value from the alternative vertex color maps; perform interpolation calculation on the first target vertex animation map and the second target vertex animation map to obtain a first interpolation result; perform interpolation calculation on the first target vertex color map and the second target vertex color map to obtain a second interpolation result; and mix the first interpolation result with the second interpolation result to determine the target fabric display form of the virtual model.
[0116] Optionally, the information processing device also includes: a setting module 1706, used to set multiple map arrays; the storage module 1705 is also used to store the first target vertex animation map, the second target vertex animation map, the first target vertex color map and the second target vertex color map into multiple map arrays respectively.
[0117] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0118] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0119] 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.
[0120] 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.
[0121] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0122] S1, obtaining animation texture information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses a preset material cloth, the animation texture information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state;
[0123] S2, mixing the animation map information with the vertex offset information to determine the target cloth display form of the virtual model;
[0124] S3, rendering a virtual model in the game scene according to the target cloth display form.
[0125] Optionally, the initial state is a flat state of a cloth of a preset material.
[0126] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: offline solving the cloth animation of the preset material cloth to obtain a solving result, wherein the solving result is used to record each vertex animation data of the virtual model in the cloth animation; and using the vertex animation texture method to bake the solving result to obtain the animation map information of the virtual model to be used in the game scene.
[0127] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: calculating the vertex position offset of the virtual model between a plurality of different fabric display states and an initial state, wherein the vertex position offset is used to record the position difference between the vertex position of the virtual model in a current fabric display state and the vertex position of the virtual model in an initial state, and the current fabric display state is any one of a plurality of different fabric display states; and obtaining vertex offset information of the virtual model to be used in the game scene based on the vertex position offset.
[0128] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: using a color map to store vertex offset information, wherein a plurality of vertex color channels of the color map are respectively used to store vertex coordinate offset data of the virtual model in any one of a plurality of different cloth display states.
[0129] Optionally, the color values respectively stored in the plurality of vertex color channels are obtained by normalizing the vertex coordinate offset data.
[0130] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: compressing the animation texture information according to the texture format supported by the preset game engine to obtain a compression result, wherein the compression result is compressed data of a number of bits corresponding to the texture format.
[0131] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: determining candidate vertex animation maps corresponding to a plurality of different cloth display states based on the animation map information, and determining candidate vertex color maps corresponding to a plurality of different cloth display states based on the vertex offset information; and obtaining a target cloth display form of the virtual model by mixing the candidate vertex animation maps and the candidate vertex color maps.
[0132] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: selecting a first target vertex animation map corresponding to a first state value and a second target vertex animation map corresponding to a second state value from the candidate vertex animation maps, wherein the first state value and the second state value are boundary values of a value range corresponding to a plurality of different fabric display states; selecting a first target vertex color map corresponding to the first state value and a second target vertex color map corresponding to the second state value from the candidate vertex color maps; performing interpolation calculations on the first target vertex animation map and the second target vertex animation map to obtain a first interpolation result; performing interpolation calculations on the first target vertex color map and the second target vertex color map to obtain a second interpolation result; mixing the first interpolation result and the second interpolation result to determine a target fabric display form of the virtual model.
[0133] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: setting multiple map arrays; storing the first target vertex animation map, the second target vertex animation map, the first target vertex color map and the second target vertex color map into multiple map arrays respectively.
[0134] In the computer-readable storage medium of this embodiment, by obtaining the animation map information and vertex offset information of the virtual model to be used in the game scene, and then mixing the animation map information and the vertex offset information, the target cloth display form of the virtual model is determined, and finally the virtual model is rendered in the game scene according to the target cloth display form, so that the virtual model with a real cloth effect can be displayed in the game scene. By mixing the animation map information and the vertex offset information, the dynamic effect of the virtual model in different cloth display states can be achieved, making the virtual model look more vivid and realistic, further improving the visual effect in the game scene, enhancing the user's immersion and experience, and improving the fun and attractiveness of the game, thereby solving the technical problems of poor rendering flexibility and high resource consumption when implementing cloth simulation in a real-time rendering engine in the related technology.
[0135] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application 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, and includes 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 methods of the present application.
[0136] 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 application can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present application described in the above "Exemplary Method" section of the present embodiment.
[0137] According to the program product for implementing the above method in the embodiment of the present application, 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 application is not limited thereto. In the embodiment of the present application, 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.
[0138] 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.
[0139] 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.
[0140] An embodiment of the present application 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.
[0141] 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.
[0142] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0143] S1, obtaining animation texture information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses a preset material cloth, the animation texture information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state;
[0144] S2, mixing the animation map information with the vertex offset information to determine the target cloth display form of the virtual model;
[0145] S3, rendering a virtual model in the game scene according to the target cloth display form.
[0146] Optionally, the initial state is a flat state of a cloth of a preset material.
[0147] Optionally, the processor can also be configured to perform the following steps through a computer program: offline solving the cloth animation of the preset material cloth to obtain a solving result, wherein the solving result is used to record each vertex animation data of the virtual model in the cloth animation; and using the vertex animation texture method to bake the solving result to obtain the animation map information of the virtual model to be used in the game scene.
[0148] Optionally, the processor may also be configured to perform the following steps through a computer program: calculating the vertex position offset of the virtual model between a plurality of different fabric display states and an initial state, wherein the vertex position offset is used to record the position difference between the vertex position of the virtual model in a current fabric display state and the vertex position of the virtual model in an initial state, and the current fabric display state is any one of a plurality of different fabric display states; and obtaining vertex offset information of the virtual model to be used in the game scene based on the vertex position offset.
[0149] Optionally, the processor may also be configured to perform the following steps through a computer program: using a color map to store vertex offset information, wherein a plurality of vertex color channels of the color map are respectively used to store vertex coordinate offset data of the virtual model in any one of a plurality of different fabric display states.
[0150] Optionally, the color values respectively stored in the plurality of vertex color channels are obtained by normalizing the vertex coordinate offset data.
[0151] Optionally, the processor may also be configured to execute the following steps through a computer program: compress the animation texture information according to a texture format supported by a preset game engine to obtain a compression result, wherein the compression result is compressed data of a number of bits corresponding to the texture format.
[0152] Optionally, the processor may also be configured to perform the following steps through a computer program: determining candidate vertex animation maps corresponding to a plurality of different cloth display states based on the animation map information, and determining candidate vertex color maps corresponding to a plurality of different cloth display states based on the vertex offset information; and obtaining a target cloth display form of the virtual model by mixing the candidate vertex animation maps and the candidate vertex color maps.
[0153] Optionally, the processor may also be configured to perform the following steps through a computer program: selecting a first target vertex animation map corresponding to a first state value and a second target vertex animation map corresponding to a second state value from the candidate vertex animation maps, wherein the first state value and the second state value are boundary values of a value range corresponding to a plurality of different fabric display states; selecting a first target vertex color map corresponding to the first state value and a second target vertex color map corresponding to the second state value from the candidate vertex color maps; performing interpolation calculation on the first target vertex animation map and the second target vertex animation map to obtain a first interpolation result; performing interpolation calculation on the first target vertex color map and the second target vertex color map to obtain a second interpolation result; mixing the first interpolation result and the second interpolation result to determine the target fabric display form of the virtual model.
[0154] Optionally, the processor may also be configured to perform the following steps through a computer program: setting multiple texture arrays; storing the first target vertex animation texture, the second target vertex animation texture, the first target vertex color texture, and the second target vertex color texture in the multiple texture arrays, respectively.
[0155] In the electronic device of this embodiment, by obtaining the animation map information and vertex offset information of the virtual model to be used in the game scene, and then mixing the animation map information and the vertex offset information, the target fabric display form of the virtual model is determined, and finally the virtual model is rendered in the game scene according to the target fabric display form, so that the virtual model with a real fabric effect can be displayed in the game scene. By mixing the animation map information and the vertex offset information, the dynamic effect of the virtual model in different fabric display states can be achieved, making the virtual model look more vivid and realistic, further improving the visual effect in the game scene, enhancing the user's immersion and experience, and improving the fun and attractiveness of the game, thereby solving the technical problems of poor rendering flexibility and high resource consumption when implementing fabric simulation in a real-time rendering engine in the related technology.
[0156] Fig.18 is a schematic diagram of an electronic device according to an embodiment of the present application. Fig.18 As shown, the electronic device 1800 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0157] like Fig.18 As shown, the electronic device 1800 is in the form of a general computing device. The components of the electronic device 1800 may include but are not limited to: at least one processor 1810, at least one memory 1820, a bus 1830 connecting different system components (including the memory 1820 and the processor 1810), and a display 1840.
[0158] The memory 1820 stores program codes, which can be executed by the processor 1810, so that the processor 1810 executes the steps described in the method part of the embodiment of the present application according to various exemplary embodiments of the present application.
[0159] The memory 1820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 18201 and / or a cache memory unit 18202, and may further include a read-only memory unit (ROM) 18203, 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.
[0160] In some examples, the memory 1820 may also include a program / utility 18204 having a set (at least one) of program modules 18205, such program modules 18205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof may include the implementation of a network environment. The memory 1820 may further include a memory remotely disposed relative to the processor 1810, and these remote memories may be connected to the electronic device 1800 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.
[0161] Bus 1830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a local bus of processor 1810, or a bus using any of a variety of bus architectures.
[0162] The display 1840 may be, for example, a touch screen type liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 1800 .
[0163] Optionally, the electronic device 1800 may also communicate with one or more external devices 1900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 1800, and / or any device that enables the electronic device 1800 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 1850. Furthermore, the electronic device 1800 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 1860. Fig.18 As shown, the network adapter 1860 communicates with other modules of the electronic device 1800 via the bus 1830. It should be understood that although Fig.18 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 1800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0164] The electronic device 1800 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.
[0165] It can be understood by those skilled in the art that Fig.18 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.18 More or fewer components as shown, or with Figure 1 The memory 1820 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the information processing method in the embodiment of the present application. The processor 1810 executes various functional applications and data processing by running the computer programs stored in the memory 1820, that is, implementing the above-mentioned information processing method.
[0166] 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.
[0167] Optionally, the computer program included in the above-mentioned computer program product is executed by a processor to perform the following steps:
[0168] S1, obtaining animation texture information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses a preset material cloth, the animation texture information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state;
[0169] S2, mixing the animation map information with the vertex offset information to determine the target cloth display form of the virtual model;
[0170] S3, rendering a virtual model in the game scene according to the target cloth display form.
[0171] 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.
[0172] Optionally, the computer program stored in the non-volatile computer-readable storage medium is used by the processor to execute the following steps:
[0173] S1, obtaining animation texture information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses a preset material cloth, the animation texture information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state;
[0174] S2, mixing the animation map information with the vertex offset information to determine the target cloth display form of the virtual model;
[0175] S3, rendering a virtual model in the game scene according to the target cloth display form.
[0176] 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.
[0177] Optionally, the computer program is executed by a processor to perform the following steps:
[0178] S1, obtaining animation texture information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses a preset material cloth, the animation texture information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state;
[0179] S2, mixing the animation map information with the vertex offset information to determine the target cloth display form of the virtual model;
[0180] S3, rendering a virtual model in the game scene according to the target cloth display form.
[0181] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0182] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0183] 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.
[0184] 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.
[0185] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0186] 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 application can be essentially or partly or all or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
[0187] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An information processing method, characterized in that: include: Obtaining animation texture information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses a preset material cloth, the animation texture information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state; Mixing the animation map information with the vertex offset information to determine a target cloth display form of the virtual model; The virtual model is rendered in the game scene according to the target cloth display form.
2. The information processing method according to claim 1, characterized in that: The initial state is the flat state of the cloth of the preset material.
3. The information processing method according to claim 1, characterized in that: Acquiring the animation texture information of the virtual model to be used in the game scene includes: Performing offline solving on the cloth animation of the preset material cloth to obtain a solving result, wherein the solving result is used to record the animation data of each vertex of the virtual model in the cloth animation; The solution result is texture baked by using vertex animation texture to obtain the animation texture information of the virtual model to be used in the game scene.
4. The information processing method according to claim 1, characterized in that: Acquiring the vertex offset information of the virtual model to be used in the game scene includes: Calculating vertex position offsets of the virtual model between the multiple different cloth display states and the initial state, wherein the vertex position offsets are used to record the position difference between the vertex position of the virtual model in the current cloth display state and the vertex position of the virtual model in the initial state, and the current cloth display state is any one of the multiple different cloth display states; The vertex offset information of the virtual model to be used in the game scene is obtained based on the vertex position offset.
5. The information processing method according to claim 4, characterized in that: The information processing method further includes: A color map is used to store the vertex offset information, wherein a plurality of vertex color channels of the color map are respectively used to store vertex coordinate offset data of the virtual model in any one of the plurality of different cloth display states.
6. The information processing method according to claim 5, characterized in that: The color values respectively stored in the plurality of vertex color channels are obtained by normalizing the vertex coordinate offset data.
7. The information processing method according to claim 1, characterized in that: The information processing method further includes: According to the texture format supported by the preset game engine, the animation texture information is texture compressed to obtain a compression result, wherein the compression result is compressed data of a number of bits corresponding to the texture format.
8. The information processing method according to claim 1, characterized in that: Mixing the animation map information with the vertex offset information to determine the target cloth display form of the virtual model includes: Determining candidate vertex animation maps corresponding to the multiple different cloth display states based on the animation map information, and determining candidate vertex color maps corresponding to the multiple different cloth display states based on the vertex offset information; The target cloth display form of the virtual model is obtained by mixing the candidate vertex animation map and the candidate vertex color map.
9. The information processing method according to claim 8, characterized in that: The target cloth display form of the virtual model is obtained by mixing the candidate vertex animation map and the candidate vertex color map, including: Selecting a first target vertex animation texture corresponding to a first state value and a second target vertex animation texture corresponding to a second state value from the candidate vertex animation textures, wherein the first state value and the second state value are boundary values of a value range corresponding to the multiple different cloth display states; Selecting a first target vertex color map corresponding to the first state value and a second target vertex color map corresponding to the second state value from the candidate vertex color maps; Performing interpolation calculation on the first target vertex animation map and the second target vertex animation map to obtain a first interpolation result; Performing interpolation calculation on the first target vertex color map and the second target vertex color map to obtain a second interpolation result; The first interpolation result and the second interpolation result are mixed to determine the target cloth display form of the virtual model.
10. The information processing method according to claim 9, characterized in that: The information processing method further includes: Set up multiple texture arrays; The first target vertex animation map, the second target vertex animation map, the first target vertex color map, and the second target vertex color map are stored in the plurality of map arrays respectively.
11. An information processing device, characterized in that: include: An acquisition module, used to acquire animation texture information and vertex offset information of a virtual model to be used in a game scene, wherein at least part of the virtual model uses a preset material cloth, the animation texture information is used to record vertex animation data obtained by pre-offline solution, and the vertex offset information is used to record vertex offset data of the preset material cloth between a plurality of different cloth display states and an initial state; A mixing module, used for mixing the animation map information with the vertex offset information to determine a target cloth display form of the virtual model; A processing module is used to render the virtual model in the game scene according to the target cloth display form.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the information processing method described in any one of claims 1 to 10 when executed by a processor.
13. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the information processing method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the information processing method described in any one of claims 1 to 10.
Citation Information
Cited By
Cross-rendering engine fusion method based on nonlinear coordinate correction
CN121235963A
