Virtual object interaction method and device, computer equipment and storage medium
By identifying the color value at the interaction position and the posture data of the virtual object, and determining the feedback action, the problem of low utilization of virtual object interaction resources is solved, and diversified virtual object feedback and full utilization of resources are achieved.
Patent Information
- Application Number
- CN202310331255.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
Traditional virtual object interaction methods have low resource utilization and cannot fully utilize virtual object resources.
By identifying the color value at the interaction position indicated by the interaction operation, determine the part where the virtual object matches the color value at the interaction position, obtain the posture data of the virtual object, determine the feedback action type and posture change parameters, and control the virtual object to execute the corresponding Feedback actions to achieve diversified feedback.
It improves the utilization of virtual object resources, provides diverse interactive feedback, and enhances the immersive interactive experience of virtual objects.
Smart Images

Figure CN118732820A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a virtual object interaction method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of computer technology, virtual object interactive applications have emerged, through which interactive objects can interact with virtual objects. For example, virtual objects can specifically be virtual characters, virtual pets, etc.
[0003] In the traditional technology, the virtual object interaction mode is to control the virtual object to perform a pre-configured one-time feedback action in response to the interactive operation triggered by the interactive object when the virtual object is displayed. However, the current virtual object interaction mode is single and cannot fully utilize the virtual object resources, resulting in low resource utilization. Summary of the invention
[0004] Based on this, it is necessary to provide a virtual object interaction method, device, computer equipment, computer-readable storage medium and computer program product that can improve resource utilization in response to the above technical problems.
[0005] In a first aspect, the present application provides a virtual object interaction method. The method comprises:
[0006] When a virtual object exists in the virtual scene, in response to an interaction operation triggered in the virtual scene, identifying a color value at an interaction position indicated by the interaction operation;
[0007] When the color value at the interaction position represents that the interaction operation acts on the virtual object, a portion of the virtual object that matches the color value at the interaction position is determined, and posture data of the virtual object is obtained;
[0008] Determine a feedback action type that matches the posture data and the matching part;
[0009] Determine a posture change parameter of a feedback action of the feedback action type relative to a matching part;
[0010] Based on the posture change parameters, the virtual object is controlled to perform feedback actions corresponding to the matched parts.
[0011] In a second aspect, the present application also provides a virtual object interaction device. The device comprises:
[0012] A color value recognition module, for identifying a color value at an interaction position indicated by an interaction operation in response to an interaction operation triggered in the virtual scene when a virtual object exists in the virtual scene;
[0013] A part matching module is used to determine the part of the virtual object that matches the color value at the interaction position when the color value at the interaction position represents the interaction operation acting on the virtual object, and obtain the posture data of the virtual object;
[0014] A feedback action type determination module, used to determine the feedback action type that matches the posture data and the matching part;
[0015] A posture change parameter determination module, used to determine the posture change parameter of the feedback action of the feedback action type relative to the matching part;
[0016] The feedback module is used to control the virtual object to perform feedback actions corresponding to the matched parts based on the posture change parameters.
[0017] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0018] When a virtual object exists in the virtual scene, in response to an interaction operation triggered in the virtual scene, identifying a color value at an interaction position indicated by the interaction operation;
[0019] When the color value at the interaction position represents that the interaction operation acts on the virtual object, a portion of the virtual object that matches the color value at the interaction position is determined, and posture data of the virtual object is obtained;
[0020] Determine a feedback action type that matches the posture data and the matching part;
[0021] Determine a posture change parameter of a feedback action of the feedback action type relative to a matching part;
[0022] Based on the posture change parameters, the virtual object is controlled to perform feedback actions corresponding to the matched parts.
[0023] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0024] When a virtual object exists in the virtual scene, in response to an interaction operation triggered in the virtual scene, identifying a color value at an interaction position indicated by the interaction operation;
[0025] When the color value at the interaction position represents that the interaction operation acts on the virtual object, a portion of the virtual object that matches the color value at the interaction position is determined, and posture data of the virtual object is obtained;
[0026] Determine a feedback action type that matches the posture data and the matching part;
[0027] Determine a posture change parameter of a feedback action of the feedback action type relative to a matching part;
[0028] Based on the posture change parameters, the virtual object is controlled to perform feedback actions corresponding to the matched parts.
[0029] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0030] When a virtual object exists in the virtual scene, in response to an interaction operation triggered in the virtual scene, identifying a color value at an interaction position indicated by the interaction operation;
[0031] When the color value at the interaction position represents that the interaction operation acts on the virtual object, a portion of the virtual object that matches the color value at the interaction position is determined, and posture data of the virtual object is obtained;
[0032] Determine a feedback action type that matches the posture data and the matching part;
[0033] Determine a posture change parameter of a feedback action of the feedback action type relative to a matching part;
[0034] Based on the posture change parameters, the virtual object is controlled to perform feedback actions corresponding to the matched parts.
[0035] The above-mentioned virtual object interaction method, device, computer equipment, storage medium and computer program product, when there is a virtual object in the virtual scene, responds to the interactive operation triggered in the virtual scene, identifies the color value at the interactive position indicated by the interactive operation, when the color value at the interactive position represents the interactive operation for the virtual object, determines the part of the virtual object that matches the color value at the interactive position, can use the color value partition recognition method to achieve the determination of the matching part that needs to interact, by obtaining the posture data of the virtual object, can combine the posture data and the matching part to achieve the determination of the feedback action type, and then can determine the posture change parameter of the feedback action relative to the matching part on the basis of determining the feedback action type, so that the virtual object can be controlled to perform the feedback action corresponding to the matching part based on the posture change parameter. In the whole process, on the basis of determining the matching part by using the color value, it can combine the matching part, posture data and feedback action type to achieve diversified feedback of virtual objects, achieve full utilization of virtual object resources, and thus improve resource utilization.
[0036] In a sixth aspect, the present application provides a virtual object interaction method. The method comprises:
[0037] Displaying a virtual scene, in which there exists a virtual object obtained by shaping the original model; the virtual object retains the parts of the original model;
[0038] In the case of displaying the posture of the virtual object, in response to an interactive operation triggered in the virtual scene, displaying an interactive position indicated by the interactive operation;
[0039] When the interaction position belongs to any part of the virtual object, the virtual object is displayed to change its posture from the virtual object posture to perform the feedback action mapped to the part where the interaction position is located.
[0040] In a seventh aspect, the present application further provides a virtual object interaction device. The device comprises:
[0041] A virtual scene display module is used to display a virtual scene, in which there is a virtual object obtained by shaping the original model; the virtual object retains the parts of the original model;
[0042] An interaction position display module, for displaying an interaction position indicated by an interaction operation in response to an interaction operation triggered in a virtual scene while displaying the posture of a virtual object;
[0043] The posture change display module is used to display the posture change of the virtual object from the virtual object posture when the interactive position belongs to any part of the virtual object, so as to perform the feedback action mapped to the part where the interactive position is located.
[0044] In an eighth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0045] Displaying a virtual scene, in which there exists a virtual object obtained by shaping the original model; the virtual object retains the parts of the original model;
[0046] In the case of displaying the posture of the virtual object, in response to an interactive operation triggered in the virtual scene, displaying an interactive position indicated by the interactive operation;
[0047] When the interaction position belongs to any part of the virtual object, the virtual object is displayed to change its posture from the virtual object posture to perform the feedback action mapped to the part where the interaction position is located.
[0048] In a ninth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0049] Displaying a virtual scene, in which there exists a virtual object obtained by shaping the original model; the virtual object retains the parts of the original model;
[0050] In the case of displaying the posture of the virtual object, in response to an interactive operation triggered in the virtual scene, displaying an interactive position indicated by the interactive operation;
[0051] When the interaction position belongs to any part of the virtual object, the virtual object is displayed to change its posture from the virtual object posture to perform the feedback action mapped to the part where the interaction position is located.
[0052] In a tenth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0053] Displaying a virtual scene, in which there exists a virtual object obtained by shaping the original model; the virtual object retains the parts of the original model;
[0054] In the case of displaying the posture of the virtual object, in response to an interactive operation triggered in the virtual scene, displaying an interactive position indicated by the interactive operation;
[0055] When the interaction position belongs to any part of the virtual object, the virtual object is displayed to change its posture from the virtual object posture to perform the feedback action mapped to the part where the interaction position is located.
[0056] The above-mentioned virtual object interaction method, device, computer equipment, storage medium and computer program product, by displaying a virtual scene with a virtual object obtained by shaping the original model, responds to the interaction operation triggered in the virtual scene while displaying the virtual object posture, and displays the interaction position indicated by the interaction operation, so as to realize direct feedback on the interaction triggering operation, so that when the interaction position belongs to any part of the virtual object, the virtual object can be displayed to change its posture from the virtual object posture to execute the feedback action mapped to the part where the interaction position is located, and can realize diversified feedback of the virtual object in combination with the part where the interaction position is located, the virtual object posture and the feedback action, realize full utilization of virtual object resources, and thus improve resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A diagram of an application environment of a virtual object interaction method in an embodiment;
[0058] Figure 2 A schematic diagram of a flow chart of a virtual object interaction method in one embodiment;
[0059] Figure 3 is a schematic diagram of a posture of a virtual object in one embodiment;
[0060] Figure 4 A schematic diagram of a part partition texture map in one embodiment;
[0061] Figure 5 A schematic diagram of a color texture map obtained by rendering in one embodiment;
[0062] Figure 6 is a schematic diagram of horizontal direction control parameters and vertical direction control parameters in one embodiment;
[0063] Figure 7 is a schematic diagram of a facial animation parameter range in one embodiment;
[0064] Figure 8 is a schematic diagram of a virtual cat lowering its head in one embodiment;
[0065] Fig. 9 is a schematic diagram of a virtual cat looking up in one embodiment;
[0066] Fig.10 A schematic diagram of the interaction that a virtual pet interaction is expected to achieve in one embodiment;
[0067] Fig.11 An interactive flow chart of partitioning into interactions in one embodiment;
[0068] Fig.12 is a schematic diagram of facial sliding interaction in one embodiment;
[0069] Fig.13 is a schematic diagram of a foot sliding interaction in one embodiment;
[0070] Fig.14 is a schematic diagram of a basic posture of a virtual object in one embodiment;
[0071] Fig.15 is a schematic diagram of an animation state machine in one embodiment;
[0072] Fig.16 A schematic diagram of a flow chart of a virtual object interaction method in one embodiment;
[0073] Fig.17 A schematic diagram of virtual cats of various shapes obtained through a kneading operation in one embodiment;
[0074] Fig.18 A schematic diagram showing an interaction triggering position in one embodiment;
[0075] Fig.19 is a structural block diagram of a virtual object interaction device in one embodiment;
[0076] Fig. 20is a structural block diagram of a virtual object interaction device in one embodiment;
[0077] Fig.21 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0079] The virtual object interaction method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. The terminal 102 is installed with a client for realizing virtual object interaction, which can be an application, a web client, or a sub-application running in the running environment of the parent application. The terminal 102 obtains the correspondence between the part and the color value and the correspondence between the posture data, the part and the feedback action type from the server 104. When there is a virtual object in the virtual scene, the terminal 102 responds to the interactive operation triggered in the virtual scene, identifies the color value at the interactive position indicated by the interactive operation, and when the color value at the interactive position represents that the interactive operation acts on the virtual object, determines the part of the virtual object that matches the color value at the interactive position, and obtains the posture data of the virtual object, determines the feedback action type that matches the posture data and the matched part, determines the posture change parameter of the feedback action type relative to the matched part, and controls the virtual object to perform the feedback action corresponding to the matched part based on the posture change parameter.
[0080] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0081] In one embodiment, Figure 2 As shown, a virtual object interaction method is provided, which can be executed by a terminal or a server alone, or by a terminal and a server in collaboration. In the embodiment of the present application, the method is applied to a terminal as an example for explanation, and includes the following steps:
[0082] Step 202 : When there is a virtual object in the virtual scene, in response to an interaction operation triggered in the virtual scene, a color value at an interaction position indicated by the interaction operation is identified.
[0083] Among them, virtual objects refer to movable objects in a virtual environment, and the movable objects may be virtual characters, virtual animals, etc. The virtual environment is a virtual environment provided when the client runs on a terminal, and the virtual environment may be a simulation of the real world, a semi-simulation and semi-fictitious environment, or a purely fictitious environment. For example, the virtual environment may specifically be a three-dimensional virtual environment. For another example, when the virtual environment is a three-dimensional virtual environment, virtual objects refer to virtual characters, virtual animals, etc. displayed in the three-dimensional virtual environment. The virtual objects have their own shape and volume in the three-dimensional virtual environment and occupy a part of the space in the three-dimensional virtual environment.
[0084] Among them, the interactive operation refers to the operation triggered by the interactive object when interacting. For example, the interactive operation may specifically refer to a click operation triggered by the interactive object when interacting. For example, the interactive operation may specifically refer to a click operation triggered by the interactive object through an input device when interacting, and the input device may specifically be a mouse, a stylus, etc. For another example, the interactive operation may specifically refer to a touch screen operation triggered by the interactive object when interacting. The interactive position refers to the position when the interactive operation is triggered. For example, when the interactive triggering operation is a click operation, the interactive position may specifically refer to the clicked position. For another example, when the interactive operation is a touch screen operation, the interactive position may specifically refer to the touched screen position.
[0085] The color value refers to the color value corresponding to the color in the color mode. For example, the value corresponding to red in the RGB (red, green, blue) color mode is 255, 0, 0, the value corresponding to green in the RGB color mode is 0, 255, 0, and the value corresponding to blue in the RGB color mode is 0, 0, 255. In this embodiment, the color value may specifically refer to the color value corresponding to the color in the single-channel mode.
[0086] Specifically, when there are virtual objects in the virtual scene, if the interactive objects want to interact, an interactive operation will be triggered. In response to the interactive operation triggered in the virtual scene, the terminal can determine the interactive position indicated by the interactive operation, convert the interactive position indicated by the interactive operation into texture coordinates, perform color value recognition based on the texture coordinates, obtain the texture color value corresponding to the texture coordinates, and obtain the color value at the interactive position indicated by the interactive operation based on the texture color value.
[0087] Step 204 : when the color value at the interaction position represents that the interaction operation acts on the virtual object, a portion of the virtual object that matches the color value at the interaction position is determined, and posture data of the virtual object is obtained.
[0088] The posture data is used to describe the posture of the virtual object. For example, the posture of the virtual object can be one of standing, squatting, lying, sideways, and flipping. For example, when the virtual object is a virtual cat, the possible postures can be as follows: Figure 3 As shown, including standing, squatting, lying down and sideways.
[0089] Specifically, when the color value at the interactive position represents that the interactive operation acts on the virtual object, the terminal can determine the part whose color value matches the interactive position from the pre-configured correspondence between the part and the color value according to the color value at the interactive position, and obtain the posture data of the virtual object. Among them, the pre-configured correspondence between the part and the color value refers to the mapping relationship between the pre-configured part and the color value. The color values of different parts are different and can be configured according to the actual application scenario.
[0090] In a specific application, the terminal can determine whether the interactive operation acts on the virtual object by comparing the color value at the interactive position with the color value threshold. When the color value at the interactive position is greater than the color value threshold, it indicates that the interactive operation acts on the virtual object. The color value threshold can be configured according to the actual application scenario. For example, the color value threshold can be 0, which means that when the color value at the interactive position is greater than 0, it is determined that the interactive operation acts on the virtual object. It should be noted that since the color values of each part of the virtual object are included in the part partition texture map, and the color values of each part are different, as long as the color values of each part are set to a value other than 0, the color value at the interactive position can be used to determine whether the interactive operation acts on the virtual object.
[0091] In a specific application, the virtual object can be a virtual animal, such as a virtual cat, which can be divided into six parts: eyes, ears, face, front paws, body and tail. The correspondence between the pre-configured parts and the color values can be: eyes corresponding to color value 1, ears corresponding to color value 2, face corresponding to color value 3, front paws corresponding to color value 4, body corresponding to color value 5 and tail corresponding to color value 6. If the color value at the interaction position is color value 3, according to the pre-configured correspondence between the parts and the color values, it can be determined that the part whose color value matches the interaction position is the face.
[0092] Step 206: Determine the feedback action type that matches the posture data and the matched part.
[0093] Among them, the feedback action type refers to the type of feedback action that matches the posture data and the matching part, and can be configured according to the actual application scenario. For example, the feedback action type can specifically be a continuous feedback action. A continuous feedback action refers to a feedback action generated in response to the continuation of a continuous operation. For example, a continuous feedback action can specifically refer to a feedback action generated in response to a continuous sliding operation. For example, for a virtual pet, a continuous feedback action can specifically refer to a head-up action or a head-down action generated in response to a continuous sliding operation on the face. For another example, for a virtual pet, a continuous feedback action can specifically refer to a foot movement generated in response to a continuous sliding operation on the feet. A single feedback action refers to a feedback action that is performed only once, that is, a one-time feedback action. For example, a single feedback action can specifically refer to a posture change that is performed only once.
[0094] Specifically, for the same part, when the posture of the virtual object is different, the matching feedback action type may be different. Therefore, when the posture data and the matching part are determined, the terminal can determine the posture of the virtual object according to the posture data, and then determine the feedback action type that matches the posture data and the matching part based on the mapping relationship between posture-part-feedback action type. In specific applications, the mapping relationship between posture-part-feedback action type can be configured according to the actual application scenario. For example, when the posture is standing and the part is the face, the feedback action type can be a continuous feedback action. For another example, when the posture is flipping and the part is the face, the feedback action type can be a single feedback action.
[0095] Step 208: Determine the posture change parameter of the feedback action of the feedback action type relative to the matched part.
[0096] The posture change parameter refers to a parameter used to control the posture change of the virtual object. For example, the posture change parameter may specifically refer to an animation parameter used to control the posture change of the virtual object.
[0097] Specifically, on the basis of determining the feedback action type, the terminal needs to determine the calculation method of the posture change parameters corresponding to the feedback action type according to the feedback action type, and determine the posture change parameters of the feedback action type relative to the matching part according to the calculation method of the posture change parameters. There are different calculation methods of posture change parameters for different feedback action types.
[0098] In a specific application, when the feedback action type is a continuous feedback action, the terminal will use the interactive operation as the starting trigger operation of the continuous operation corresponding to the continuous feedback action, and starting from the starting trigger operation, in response to the continuous operation, determine the posture change parameters corresponding to the continuous operation and the matching part. When the feedback action type is a single feedback action, the terminal will obtain the feedback action sequence corresponding to the matching part to determine the posture change parameters based on the feedback action sequence. In a specific application, the continuous operation includes multiple trigger operations. For each trigger operation in the continuous operation, the terminal needs to determine the posture change parameters corresponding to the targeted trigger operation and the matching part.
[0099] Step 210: Based on the posture change parameter, the virtual object is controlled to perform a feedback action corresponding to the matched part.
[0100] Specifically, the terminal will control the virtual object to perform feedback actions corresponding to the matching part based on the posture change parameters. In specific applications, the posture change parameters can be animation parameters, and controlling the virtual object to perform feedback actions corresponding to the matching part can be understood as the terminal implementing animations corresponding to the animation parameters.
[0101] In a specific application, for a continuous feedback action, the determined posture change parameter is the posture change parameter corresponding to each trigger operation in the continuous operation corresponding to the continuous feedback action. When the virtual object is controlled to perform a feedback action corresponding to the matching part based on the posture change parameter, for each trigger operation, the terminal will control the virtual object to perform a feedback action corresponding to the targeted trigger operation and the matching part based on the targeted trigger operation.
[0102] In a specific application, for a single feedback action, the determined posture change parameter is the posture change parameter of the single feedback action, and the terminal directly controls the virtual object to perform a feedback action corresponding to the matched part based on the posture change parameter of the single feedback action. In a specific application, assuming that the virtual object is a virtual pet, the matched part is an ear, and the feedback action type that matches the posture data and the matched part is a single feedback action, and the feedback action is an ear shake, the terminal can obtain the animation parameters for realizing the ear shake, and control the virtual pet to perform the feedback action of the ear shake corresponding to the ear according to the animation parameters.
[0103] In the above virtual object interaction method, when there is a virtual object in the virtual scene, in response to an interactive operation triggered in the virtual scene, the color value at the interactive position indicated by the interactive operation is identified, when the color value at the interactive position represents that the interactive operation is used for the virtual object, the part where the virtual object matches the color value at the interactive position is determined, and the matching part that needs to be interacted can be determined by using the color value partition recognition method, and the posture data of the virtual object can be obtained, and the feedback action type can be determined by combining the posture data and the matching part, and then the posture change parameter of the feedback action relative to the matching part can be determined on the basis of determining the feedback action type, so that the virtual object can be controlled to perform the feedback action corresponding to the matching part based on the posture change parameter. In the whole process, on the basis of determining the matching part by using the color value, the matching part, posture data, feedback action type, etc. can be combined to realize diversified feedback of the virtual object, and the full utilization of virtual object resources can be realized, thereby improving resource utilization.
[0104] In one embodiment, when there is a virtual object in the virtual scene, in response to an interaction operation triggered in the virtual scene, identifying a color value at an interaction position indicated by the interaction operation includes:
[0105] When a virtual object exists in the virtual scene, in response to an interactive operation triggered in the virtual scene, the interactive position indicated by the interactive operation is converted into texture coordinates, and a color texture map is rendered onto a preconfigured screen rendering texture map; the color texture map is obtained by rendering the virtual object based on the part partition texture map;
[0106] According to the texture coordinates, texture sampling is performed on the screen rendering texture map to obtain the texture color value corresponding to the texture coordinates;
[0107] Based on the texture color value, a color value at an interaction position indicated by the interaction operation is determined.
[0108] Among them, texture coordinates refer to UV coordinates, which are used to indicate where to sample from the texture image, that is, to collect pixel colors. U refers to the horizontal direction and V refers to the vertical direction. The texture coordinates can be understood as percentage coordinates on the texture image. The range of texture coordinates is 0 to 1. Usually, UV(0,0) refers to the upper left corner of the texture image, and UV(1,1) refers to the lower right corner of the texture image.
[0109] Among them, the color texture map refers to the texture map obtained by rendering the virtual object based on the part partition texture map. The part partition texture map refers to the model map used to draw the surface texture of the virtual object. Each pixel in the part partition texture map corresponds to the surface of the virtual object. In this embodiment, the part partition texture map includes the color values of each part of the virtual object, and the color values of each part are different, that is, the color values of the pixels belonging to the same part in the part partition texture map are the same, and the color values of the pixels belonging to different parts are different. In this way, the color value can be used to distinguish different parts of the virtual object.
[0110] Among them, the screen rendering texture is a type of texture, which can also be called RenderTexture. It is a special texture type in Unity (a real-time 3D interactive content creation and operation platform). It defines a texture object on the server-side. Drawing the rendering directly to this texture is equivalent to drawing directly to this texture during drawing, which can save copying time. Texture sampling refers to the process of taking the color of the corresponding position in the texture map according to the texture coordinates. In this embodiment, it is the process of taking the color of the corresponding position in the screen rendering texture map according to the texture coordinates.
[0111] Specifically, when there are virtual objects in the virtual scene, the terminal will determine the interaction position indicated by the interaction operation in response to the interaction operation triggered in the virtual scene, convert the interaction position indicated by the interaction operation into texture coordinates, and render the color texture map to a preconfigured screen rendering texture map. According to the size of the screen rendering texture map, the texture coordinates are mapped to the corresponding pixel coordinates on the screen rendering texture map, and the pixel value at the pixel coordinate is used as the texture color value corresponding to the texture coordinate. Based on the texture color value, the color value at the interaction position indicated by the interaction operation is determined.
[0112] In a specific application, when entering a virtual scene with a virtual object, the terminal will obtain the corresponding part partition texture map of the virtual object, set the part partition texture map to the corresponding rendering material of the virtual object, render the virtual object based on the rendering material, and obtain a color texture map. The part partition texture map includes the color values of each part of the virtual object, and the color values of each part are different. Among them, the rendering material is information describing the surface appearance of the virtual object, including appearance, color, texture, smoothness, transparency, etc., and its essence is an instance of a shader.
[0113] In a specific application, the part partitioning method for the virtual object can be configured according to the actual application scenario. For example, the virtual object can be a virtual animal, such as a virtual cat, which can be divided into six parts: eyes, ears, face, front paws, body and tail. The part partitioning texture map corresponding to the virtual cat can be as follows: Figure 4The color texture map obtained by rendering the virtual cat based on the part partition texture map can be as follows Figure 5 As shown (it should be noted that the color value of the part is not Figure 5 ).
[0114] In a specific application, in the part partitioning texture map, the color value of each part can be configured according to the actual application scenario. In a specific application, the smaller and more important the part is, the larger the color value is, so the importance of the parts can be divided according to the color value as the priority. For example, for small and important parts such as eyes and ears, their color values can be greater than those of parts such as face and body during configuration.
[0115] In a specific application, the terminal can call the rendering interface to render the color texture to the preconfigured screen rendering texture. In a specific application, the called rendering interface can be specifically the command buffer, which is a newly added encapsulated rendering interface of Unity. Its main function is to predefine a series of rendering instructions, and then execute these rendering instructions when we want, that is, these rendering instructions can be executed when the rendering interface is called.
[0116] In a specific application, assuming that the size of the screen rendering texture is X*Y, and the texture coordinates are (U, V) = (A1, B1), the texture coordinates are mapped to the screen rendering texture, and the corresponding pixel coordinates obtained are (A1*X, B1*Y). For example, assuming that the size of the screen rendering texture is 256*256, and the texture coordinates are (U, V) = (0.5, 0.5), the texture coordinates are mapped to the screen rendering texture, and the corresponding pixel coordinates obtained are (128, 128). In a specific application, the terminal will directly use the texture color value as the color value at the interactive position indicated by the interactive operation. In this way, complex calculations are avoided, and the color value at the interactive position indicated by the interactive operation can be quickly determined.
[0117] In a specific application, the terminal will obtain the color value selection range at the interactive position indicated by the interactive operation, and the color value selection range can be pre-configured according to the actual application scenario. When the color value selection range is obtained, the terminal will obtain at least one candidate color value corresponding to the color value selection range from the screen rendering texture map based on the color value selection range, perform a color value comparison between the at least one candidate color value and the texture color value, and obtain the color value at the interactive position indicated by the interactive operation according to the comparison result.
[0118] In a specific application, for each candidate color value in at least one candidate color value, the candidate color value may be the same size as the texture color value, or may be different in size from the texture color value. If the candidate color value and the texture color value correspond to the same part, the candidate color value and the texture color value are the same size. If the candidate color value and the texture color value correspond to different parts, the candidate color value and the texture color value are different in size. By comparing the color values of at least one candidate color value and the texture color value, the maximum color value of at least one candidate color value and the texture color value can be determined according to the comparison result, and the color value with the most occurrences in at least one candidate color value and the texture color value, that is, the color value mode, can also be determined. The terminal can use the maximum color value of at least one candidate color value and the texture color value as the color value at the interactive position indicated by the interactive operation, and can also use the color value with the most occurrences in at least one candidate color value and the texture color value, that is, the color value mode, as the color value at the interactive position indicated by the interactive operation.
[0119] In this embodiment, by responding to an interactive operation triggered in a virtual scene, the interactive position indicated by the interactive operation is converted into texture coordinates, and the color texture map is rendered to a preconfigured screen rendering texture map. Texture sampling is performed on the screen rendering texture map according to the texture coordinates, so that the texture color value corresponding to the texture coordinate can be obtained, and the color value at the interactive position indicated by the interactive operation can be determined based on the texture color value, thereby achieving accurate color value recognition.
[0120] In one embodiment, the virtual object interaction method further includes:
[0121] When the corresponding cumulative interaction time or cumulative interaction times of the matched parts meet the corresponding cumulative feedback triggering conditions, the cumulative feedback event is triggered;
[0122] In response to the accumulated feedback event, the virtual object is controlled to perform a feedback action mapped by the accumulated feedback event corresponding to the matched part.
[0123] The cumulative interaction time refers to the interaction time for the matched parts. The cumulative number of interactions refers to the number of interactions for the matched parts. The cumulative feedback trigger condition refers to the condition used to trigger the cumulative feedback event, which can be configured according to the actual application scenario. For example, the cumulative feedback trigger condition can specifically refer to the cumulative interaction time reaching the preconfigured time, or it can refer to the cumulative number of interactions reaching the preconfigured number of times. The preconfigured time and preconfigured number can be configured according to the actual application scenario. The cumulative feedback event refers to the event of feedback on the cumulative interaction.
[0124] Specifically, the terminal will count the corresponding cumulative interaction time and cumulative interaction times of the matched parts. When the corresponding cumulative interaction time or cumulative interaction times of the matched parts meet the corresponding cumulative feedback triggering conditions, the terminal will trigger a cumulative feedback event. In response to the cumulative feedback event, the virtual object is controlled to perform the feedback action mapped by the corresponding cumulative feedback event of the matched parts to achieve feedback on the cumulative interaction. In specific applications, for different parts, the corresponding feedback action mapped by the cumulative feedback event can be configured according to the actual application scenario. For example, when the matched part is the body, the corresponding feedback action mapped by the cumulative feedback event can be rolling on the ground.
[0125] In this embodiment, when the corresponding cumulative interaction time or cumulative number of interactions of the matched parts meets the corresponding cumulative feedback trigger conditions, a cumulative feedback event can be triggered. Thus, by responding to the cumulative feedback event, the virtual object is controlled to execute the feedback action mapped by the corresponding cumulative feedback event of the matched parts, thereby realizing feedback on the cumulative interaction and making full use of the virtual object resources, thereby improving resource utilization. At the same time, it can also provide the interactive object with a rich simulated interactive experience.
[0126] In one embodiment, determining the posture change parameters of the feedback action type relative to the matching part includes:
[0127] When the feedback action type is a continuous feedback action, the interactive operation is used as the starting trigger operation of the continuous operation corresponding to the continuous feedback action;
[0128] Starting from the initial trigger operation, in response to each trigger operation in the continuous operation, for each trigger operation, a posture change parameter corresponding to the targeted trigger operation and the matched part is determined.
[0129] Among them, the continuous feedback action refers to the feedback action generated in response to the continuous operation, and the continuous operation refers to the operation generated in the process of the interactive object continuously interacting with the virtual object. For example, the continuous feedback action can specifically refer to the feedback action generated in response to the continuous sliding operation. The trigger operation refers to the operation detected by the interactive object during the continuous operation that can trigger the posture change of the virtual object.
[0130] Specifically, when the feedback action type is a continuous feedback action, indicating that the interactive object may interact continuously with the virtual object, the terminal will use the interactive operation as the starting trigger operation of the continuous operation corresponding to the continuous feedback action. Starting from the starting trigger operation, in response to each trigger operation in the continuous operation, for each trigger operation, it determines the posture change parameters corresponding to the targeted trigger operation and the matching part.
[0131] In a specific application, when the feedback action type is a continuous feedback action, the terminal will identify the trigger operation for each frame of the virtual scene during the continuous operation to determine each trigger operation in the continuous operation, that is, for each frame of the virtual scene during the continuous operation, the terminal will determine the trigger operation corresponding to the targeted virtual scene. The trigger operation corresponding to the targeted virtual scene refers to the operation triggered by the interactive object when performing continuous interaction when the targeted virtual scene is displayed. For example, the trigger operation corresponding to the targeted virtual scene may specifically refer to the touch screen operation triggered by the interactive object when performing continuous interaction when the targeted virtual scene is displayed.
[0132] In this embodiment, by taking the interactive operation as the starting trigger operation of the continuous operation corresponding to the continuous feedback action, starting from the starting trigger operation, responding to each trigger operation in the continuous operation, and for each trigger operation, determining the posture change parameters corresponding to the targeted trigger operation and the matching part, the determination of the posture change parameters corresponding to the continuous feedback action can be achieved.
[0133] In one embodiment, determining the posture change parameters corresponding to the targeted trigger operation and the matched part includes:
[0134] Determine a color value at a trigger position indicated by the targeted trigger operation;
[0135] Determine the posture change parameters corresponding to the color value at the trigger position and the matching part.
[0136] Specifically, the terminal will convert the trigger position indicated by the trigger operation into texture coordinates, and render the color texture map corresponding to the trigger operation onto a preconfigured screen rendering texture map. According to the texture coordinates, texture sampling will be performed on the rendered screen rendering texture map to determine the color value at the trigger position indicated by the trigger operation, and then determine the posture change parameters corresponding to the color value at the trigger position and the matching part.
[0137] In a specific application, based on determining the color value at the trigger position indicated by the targeted trigger operation, the terminal will judge whether the targeted trigger operation acts on the virtual object based on the color value at the trigger position indicated by the targeted trigger operation. If the targeted trigger operation acts on the virtual object, then based on the correspondence between the pre-configured part and the color value, the part corresponding to the color value at the trigger position is determined, and the posture parameters are calculated based on the part corresponding to the color value at the trigger position and the matching part, and the posture change parameters corresponding to the color value at the trigger position and the matching part are determined.
[0138] In a specific application, if the targeted trigger operation does not act on the virtual object, it means that the targeted trigger operation acts on the background area in the virtual scene. The terminal will further determine whether the targeted trigger operation meets the virtual scene lens switching interaction conditions. If the targeted trigger operation does not meet the virtual scene lens switching interaction conditions, the terminal will use the posture control parameters corresponding to the matching parts as posture change parameters. If the targeted trigger operation meets the virtual scene lens switching interaction conditions, the terminal will determine that the interaction mode corresponding to the color value at the trigger position indicated by the targeted trigger operation is a virtual scene lens switching interaction, and use the virtual scene lens switching direction mapped by the trigger position as the posture change parameter.
[0139] In a specific application, the virtual scene lens switching interaction condition can be configured according to the actual application scenario. For example, the virtual scene lens switching interaction condition can be specifically that the triggering operation before the triggering operation in the continuous operation has not acted on the virtual object for N seconds. Among them, N can be configured according to the actual application scenario.
[0140] In this embodiment, by first determining the color value at the trigger position indicated by the targeted trigger operation, the determined color value can be combined with the matching position to achieve determination of the posture change parameter.
[0141] In one embodiment, determining the posture change parameter corresponding to the color value at the trigger position and the matching part includes:
[0142] When the part corresponding to the color value at the trigger position is the same as the matched part, the posture change parameter is calculated based on the trigger position and the matched part to obtain the posture change parameter.
[0143] Specifically, when the targeted trigger operation acts on the virtual object, the terminal will determine the part corresponding to the color value at the trigger position based on the correspondence between the pre-configured part and the color value. When the part corresponding to the color value at the trigger position is the same as the matching part, it means that the targeted trigger operation acts on the matching part. The terminal will directly calculate the posture change parameters based on the trigger position and the matching part to obtain the posture change parameters.
[0144] In a specific application, for different parts, the types of posture change parameters for controlling the virtual object to perform feedback actions corresponding to the parts may be different. Therefore, for different parts, the terminal will use different methods to calculate the posture change parameters based on the trigger position to obtain the posture change parameters. In a specific application, for the face, the animation parameters of the face can be used to control the virtual object to perform feedback actions corresponding to the face. Therefore, if the matched part is the face, the terminal needs to calculate the corresponding animation parameters of the face based on the trigger position. For the feet, the movement position of the bone points obtained based on inverse dynamics can be used to control the virtual object to perform feedback actions corresponding to the feet. Therefore, if the matched part is the foot, the terminal needs to calculate the movement position of the foot bone points and the movement position of the parent bone points of the parent bone points of each level on the bone points where the foot bone points are located based on the trigger position.
[0145] In this embodiment, when the portion corresponding to the color value at the trigger position is the same as the matched portion, the posture change parameter can be calculated based on the trigger position and the matched portion to achieve determination of the posture change parameter.
[0146] In one embodiment, the matched part is the face; the posture change parameters are calculated based on the trigger position and the matched part, and the posture change parameters obtained include:
[0147] Get the screen range of the virtual object's face and the screen position of the face center bone point;
[0148] Determine the position offset between the screen position and the trigger position;
[0149] Determine the animation parameters corresponding to the trigger position based on the position offset and the facial animation parameter range corresponding to the screen range;
[0150] Based on the animation parameters corresponding to the trigger position, the posture change parameters are obtained.
[0151] Among them, the screen range refers to the approximate range of the face of the virtual object on the terminal screen. The face center bone point refers to the screen position of the bone point that serves as the face center, and the face center can be configured according to the actual application scenario. For example, the face center can specifically be the nose. The face animation parameter range refers to the range of animation parameters used to control the virtual object to perform feedback actions corresponding to the face, which can be configured according to the actual application scenario.
[0152] Specifically, the terminal will obtain the focal length of the virtual camera in the virtual scene, use the focal length of the virtual camera to obtain the screen range of the virtual object's face, and obtain the screen position of the facial center bone point based on the relationship between the virtual object's bone point and the screen coordinates, determine the position offset between the screen position and the trigger position, locate the trigger position within the facial animation parameter range based on the position offset, determine the animation parameters corresponding to the trigger position within the facial animation parameter range, and then obtain the posture change parameters based on the animation parameters corresponding to the trigger position.
[0153] In a specific application, the focal length of the virtual camera in the virtual scene can be directly obtained through a preconfigured focal length acquisition function. Obtaining the screen range of the face of the virtual object can be understood as obtaining the size of the viewing cone at a certain distance from the virtual camera. When the focal length is obtained, the screen range of the face of the virtual object can be directly calculated using a preconfigured screen range calculation function. The preconfigured screen range calculation function can be configured according to the actual application scenario and is not limited here in this embodiment. It should be noted that because the virtual camera corresponding to the virtual scene can not only rotate 360 degrees, but also zoom in and out, the screen range of the face at different focal lengths is inconsistent. Therefore, it is necessary to first obtain the focal length and then use the focal length to obtain the screen range of the face in order to accurately determine the range of facial animation parameters.
[0154] In this embodiment, by obtaining the screen range of the virtual object's face and the screen position of the facial center bone point, the position offset between the screen position and the trigger position is determined, and the facial animation parameter range corresponding to the position offset and the screen range can be used to determine the animation parameters corresponding to the trigger position, thereby determining the posture change parameters using the animation parameters corresponding to the trigger position.
[0155] In one embodiment, the animation parameters corresponding to the trigger position include horizontal direction control parameters and vertical direction control parameters; based on the animation parameters corresponding to the trigger position, the posture change parameters obtained include:
[0156] Obtaining initial vertical parameters of the face, performing smooth interpolation between the initial vertical parameters and the vertical control parameters, and obtaining interpolated vertical control parameters;
[0157] The horizontal direction control parameter and the interpolated vertical direction control parameter are used as posture change parameters.
[0158] Among them, Figure 6As shown, in order to simulate the real feedback of the virtual object stroking its head and scratching its chin in the real world as much as possible, the horizontal direction control parameter and the vertical direction control parameter can usually be used to control the horizontal and vertical rotation of the virtual object's face respectively. The two parameters can be combined to realize the 360-degree rotation of the virtual object's face within a certain range. Figure 6 As shown, in addition to the horizontal direction control parameter and the vertical direction control parameter, other parameters can also be used to control the virtual object to perform feedback actions. The vertical direction initial parameter of the face refers to the parameter that controls the degree of rotation of the virtual object's face before the trigger operation is triggered.
[0159] Specifically, the terminal will obtain the initial vertical parameters of the face, perform smooth interpolation between the initial vertical parameters and the vertical control parameters, and obtain the interpolated vertical control parameters, so that the initial vertical parameters can smoothly transition to the vertical control parameters, and use the horizontal control parameters and the interpolated vertical control parameters as posture change parameters. In specific applications, the smoothdamp function can be used to perform smooth interpolation between the initial vertical parameters and the vertical control parameters to obtain the interpolated vertical control parameters. The smoothdamp function is a spring damping effect, and can also limit the maximum change speed. It should be noted that through this interpolation method, the damping effect can be increased, making the up and down rotation of the virtual object's face smoother and more natural.
[0160] In a specific application, taking a virtual cat as the virtual object and the nose as the face center of the virtual cat as an example to illustrate the effect of this interpolation method, the configured facial animation parameter range can be as follows: Figure 7 As shown in FIG. 1 , the virtual cat is controlled to shake left and right with the nose as the center of the face as the boundary, and the range of the horizontal control parameter is [-1 1]. When controlling the virtual cat to shake up and down, Figure 8 As shown in FIG. 1 , when the virtual cat's head is touched, the virtual cat lowers its head and shakes within a range, such as Fig. 9 As shown in the figure, when you touch the chin of the virtual cat, the virtual cat tilts its head back and shakes, so the vertical control parameters can be roughly divided into two halves: the range of the vertical control parameters from the head to the nose in the upper half is [0-1], and the range of the vertical control parameters from the nose to the chin in the lower half is [1 0]. Figure 7It can be seen that a mutation occurs in the vertical direction control parameter at the nose. The interpolated vertical direction control parameter is obtained by performing smooth interpolation between the initial vertical direction parameter and the vertical direction control parameter. The interpolated vertical direction control parameter is used to control the up and down rotation of the virtual object's face, which is equivalent to making a short animation blend when switching between the upper and lower half areas. This can increase the damping effect and make the up and down rotation of the virtual object's face smoother and more natural.
[0161] In this embodiment, by using the interpolation method, the horizontal direction control parameter and the interpolated vertical direction control parameter are used as posture change parameters, which can increase the damping effect and make the rotation of the face of the virtual object smoother and more natural.
[0162] In one embodiment, the matched part is the foot; the posture change parameter is calculated based on the trigger position and the matched part, and the posture change parameter includes:
[0163] Obtain the plane where the virtual object is located; the plane where the virtual object is located is obtained based on the world position of the foot bone point and the orientation axis of the virtual object;
[0164] Determine a plane intersection point of the trigger position relative to the plane where the virtual object is located, and use the plane intersection point as a moving position of the foot bone point of the foot bone point;
[0165] Based on the moving position of the foot bone points, the posture change parameters are obtained.
[0166] The world position of the foot bone point refers to the position of the foot bone point in the world coordinate system. The orientation axis of the virtual object is used to represent the orientation of the virtual object.
[0167] Specifically, when the matching part is the foot, the terminal will obtain the plane where the virtual object is located, draw a ray from the trigger position, so that the ray drawn from the trigger position intersects with the plane where the virtual object is located, and use the intersection point as the plane intersection point of the trigger position relative to the plane where the virtual object is located, and use the plane intersection point as the moving position of the foot bone point, and then based on the moving position of the foot bone point, obtain the posture change parameters.
[0168] In a specific application, the plane where the virtual object is located is obtained based on the world position of the foot bone point and the orientation axis of the virtual object. If the trigger operation is a start trigger operation, the terminal needs to obtain the world position of the foot bone point and the orientation axis of the virtual object to calculate the plane where the virtual object is located. If the trigger operation is not a start trigger operation, the terminal directly obtains the plane where the virtual object is located calculated at the start trigger operation.
[0169] In a specific application, each bone point of the virtual object has a corresponding world position and identification, which is determined when the virtual object is constructed. The terminal can directly obtain the world position of the foot bone point based on the identification of the foot bone point. The orientation axis of the virtual object can be obtained through a preconfigured orientation axis acquisition function. After obtaining the world position of the foot bone point and the orientation axis of the virtual object, the plane where the virtual object is located can be determined based on the world position and orientation axis of the foot bone point. The world position of the foot bone point is on the plane where the virtual object is located, and the orientation axis is consistent with the direction of the plane where the virtual object is located.
[0170] In this embodiment, by acquiring the plane of the virtual object based on the world position of the foot bone point and the orientation axis of the virtual object, the plane intersection of the trigger position relative to the plane of the virtual object is determined, and the plane intersection is used as the moving position of the foot bone point of the foot bone point. The moving position of the foot bone point can be determined, and thus the posture change parameters can be determined based on the moving position of the foot bone point.
[0171] In one embodiment, based on the movement position of the foot bone point, the posture change parameter is obtained including:
[0172] When the moving position of the foot bone point is within the interactive range of the foot, reverse deduction is performed based on the moving position of the foot bone point to obtain the moving positions of the parent bone points of all levels on the bone chain where the foot bone point is located;
[0173] Based on the movement position of the foot bone point and the movement position of the parent bone point, the posture change parameters are obtained.
[0174] Specifically, after determining the moving position of the foot bone point, the terminal will determine whether the moving position of the foot bone point is within the interactive range of the foot. When the moving position of the foot bone point is within the interactive range of the foot, the terminal will reversely deduce based on the moving position of the foot bone point using inverse dynamics to obtain the moving position of the parent bone points of all levels on the bone chain where the foot bone point is located, and then obtain the posture change parameters based on the moving position of the foot bone point and the moving position of the parent bone point. Among them, inverse dynamics is a method of determining the entire bone chain by first determining the position of the child bone, and then reversely deriving the position of the n-level parent bone on the bone chain where it is located.
[0175] In a specific application, the interaction of the foot will only be performed when the moving position of the foot bone point is within the interaction range of the foot. If the moving position of the foot bone point is not within the interaction range of the foot, the interaction of the foot will be exited. In a specific application, the interaction range can be configured according to the actual application scenario. For example, the interaction range can be a certain range of the interaction radius with the position obtained by offsetting the world position of the foot bone point by a preset distance as the center of the interaction circle. The preset distance can be configured according to the actual application scenario, and the interaction radius can also be configured according to the actual application scenario, which is positively correlated with the size of the virtual object. The larger the virtual object, the larger the interaction radius, and the smaller the virtual object, the smaller the interaction radius.
[0176] In this embodiment, when the moving position of the foot bone point is within the interaction range of the foot, reverse deduction is performed based on the moving position of the foot bone point to obtain the moving position of the parent bone points of each level on the bone chain where the foot bone point is located, so that the posture change parameters can be determined based on the moving position of the foot bone point and the moving position of the parent bone point.
[0177] In one embodiment, based on the movement position of the foot bone point and the movement position of the parent bone point, the posture change parameter is obtained including:
[0178] Determining a foot movement control parameter for controlling the movement of the foot bone point based on the pre-movement position of the foot bone point and the moved position of the foot bone point;
[0179] Use the foot movement control parameters and the parent bone point movement position as posture change parameters.
[0180] Specifically, the position of the foot bone point before movement refers to the position of the foot bone point when the targeted trigger operation is triggered. Based on the position of the foot bone point before movement and the moving position of the foot bone point, the terminal can determine the foot movement control parameters used to control the movement of the foot bone point, and then use the foot movement control parameters and the moving position of the parent bone point as posture change parameters.
[0181] In a specific application, the foot movement control parameters are used to slowly accumulate the foot bone point from the position before the movement to the foot bone point moving position, which is equivalent to a smooth damping effect, which can make the foot move more naturally. In a specific application, the foot movement control parameters can be obtained by smooth interpolation between the position before the movement and the foot bone point moving position.
[0182] In this embodiment, based on the position of the foot bone point before movement and the moving position of the foot bone point, the foot movement control parameters that control the movement of the foot bone point can be determined, so that the foot movement control parameters and the moving position of the parent bone point can be used as posture change parameters to realize the determination of the posture change parameters.
[0183] In one embodiment, determining the posture change parameter corresponding to the color value at the trigger position and the matching part includes:
[0184] When the part corresponding to the color value at the trigger position is different from the matched part and the part corresponding to the color value at the trigger position meets the interactive part update condition, the part corresponding to the color value at the trigger position is determined as the interactive part, and the interactive posture of the virtual object when the targeted trigger operation is triggered is obtained;
[0185] The posture change parameters are calculated based on the interaction part and the interaction posture to obtain the posture change parameters.
[0186] The interactive part update condition refers to the condition for updating the interactive part, which can be configured according to the actual application scenario. For example, the interactive part update condition can be that the triggering operation within M seconds before the triggering operation in the continuous operation acts on the part corresponding to the color value at the triggering position. M can be configured according to the actual application scenario.
[0187] Specifically, when the targeted trigger operation acts on the virtual object, the terminal will determine the part corresponding to the color value at the trigger position based on the correspondence between the pre-configured part and the color value. When the part corresponding to the color value at the trigger position is different from the matching part, it means that the targeted trigger operation may not be performed on the matching part, or it may be performed on the matching part, that is, there is a false touch. At this time, the terminal needs to further determine whether the part corresponding to the color value at the trigger position meets the interactive part update condition. If the part corresponding to the color value at the trigger position meets the interactive part update condition, the terminal will determine the part corresponding to the color value at the trigger position as the interactive part, and obtain the interactive posture of the virtual object when the targeted trigger operation is triggered, and calculate the posture change parameters based on the interactive part and the interactive posture to obtain the posture change parameters. In a specific application, the terminal will first determine the feedback action type that matches the interactive posture and the interactive part, and then determine the posture change parameters of the feedback action of the feedback action type relative to the interactive part.
[0188] In this embodiment, when the part corresponding to the color value at the trigger position is different from the matched part and the part corresponding to the color value at the trigger position meets the interaction part update condition, the part corresponding to the color value at the trigger position can be directly determined as the interaction part, and then, based on the interaction posture of the virtual object when the trigger operation is triggered, the posture change parameters can be calculated based on the interaction part and the interaction posture to achieve the determination of the posture change parameters.
[0189] In one embodiment, determining the posture change parameter corresponding to the color value at the trigger position and the matching part includes:
[0190] When the part corresponding to the color value at the trigger position is different from the matched part and the part corresponding to the trigger position does not meet the interactive part update condition, the posture control parameter corresponding to the matched part is used as the posture change parameter.
[0191] Specifically, when the targeted trigger operation acts on the virtual object, the terminal will determine the part corresponding to the color value at the trigger position based on the correspondence between the pre-configured part and the color value. When the part corresponding to the color value at the trigger position is different from the matched part, it means that the targeted trigger operation may not be performed on the matched part, or it may be performed on the matched part, that is, there is a false touch. At this time, the terminal needs to further determine whether the part corresponding to the color value at the trigger position meets the interactive part update condition. If the part corresponding to the color value at the trigger position does not meet the interactive part update condition, it means that there is a false touch, and the terminal will use the posture control parameters corresponding to the matched part as posture change parameters. Among them, posture control parameters refer to parameters used to control posture changes.
[0192] In a specific application, for different parts, the corresponding posture control parameters are different, and the corresponding posture control parameters of different parts can be configured according to the actual application scenario. For example, for the face, the corresponding posture control parameters can be pre-configured animation parameters, that is, the corresponding posture change is a pre-configured face shake. For another example, for the foot, the corresponding posture control parameters can be specifically determined by the foot movement control parameters of the last trigger operation corresponding to the trigger operation targeted, and corresponding to the foot movement control parameters, the posture control parameters are used to slowly reduce the movement of the foot bone point from the foot bone point moving position to the position before the movement, which is equivalent to a smooth damping effect, which can make the performance of the foot movement when exiting the foot interaction more natural. In a specific application, assuming that the foot movement control parameters are: parameter 1-parameter 2-parameter 3-parameter 4, the foot bone point moves from the position before the movement to the foot bone point moving position, and the corresponding posture control parameters can be parameter 4-parameter 3-parameter 2-parameter 1, and the foot bone point moves from the foot bone point moving position to the position before the movement.
[0193] In this embodiment, when the part corresponding to the color value at the trigger position is different from the matched part and the part corresponding to the trigger position does not meet the interactive part update condition, the posture control parameters corresponding to the matched part are directly used as the posture change parameters, so as to realize the determination of the posture change parameters.
[0194] In one embodiment, determining the posture change parameters of the feedback action type relative to the matching part includes:
[0195] When the feedback action type is a single feedback action, obtaining a feedback action sequence corresponding to the matching part; the feedback action sequence includes at least two pre-configured actions;
[0196] The action to be fed back is determined from at least two preconfigured actions, and the animation parameters of the action to be fed back are used as posture change parameters of the feedback action of the feedback action type relative to the matching part.
[0197] A single feedback action refers to a feedback action that is performed only once, i.e., a one-time feedback action. For example, a single feedback action may specifically refer to a posture change that is performed only once. A feedback action sequence refers to a sequence consisting of at least two preconfigured actions, and the at least two preconfigured actions in the feedback action sequence and the order of the actions may be configured according to the actual application scenario.
[0198] Specifically, when the feedback action type is a single feedback action, the terminal will obtain the corresponding feedback action sequence of the matching part, and the feedback action sequence includes at least two preconfigured actions. The terminal can determine the action to be fed back from the at least two preconfigured actions, and use the animation parameters of the action to be fed back as the posture change parameters of the feedback action of the feedback action type relative to the matching part.
[0199] In a specific application, the feedback action sequence can be composed of a single animation feedback action and a layer of state switching action. The actions in the feedback action sequence can be arranged and implemented until the feedback action sequence is cleared and returns to the default posture of the virtual object. In a specific application, a single animation feedback action refers to an animation feedback action that is performed only once, such as a virtual object's ear shaking. A layer of state refers to the basic posture of the virtual object, which can be configured according to the actual application scenario. A layer of state switching refers to switching between layers of states. For example, a layer of state can specifically include the five basic postures of standing, squatting, lying, sideways, and lying.
[0200] In this embodiment, by obtaining a feedback action sequence corresponding to the matched part including at least two preconfigured actions, the action to be fed back is determined from the at least two preconfigured actions, and the animation parameters of the action to be fed back are used as the posture change parameters of the feedback action of the feedback action type relative to the matched part. The feedback action sequence can be used to determine the posture change parameters.
[0201] In one embodiment, the virtual object interaction method further includes:
[0202] When the color value at the interaction position represents that the interaction operation acts on the background area in the virtual scene, it is determined that the interaction mode corresponding to the color value at the interaction position is a virtual scene lens switching interaction, and the virtual scene lens switching operation mapped at the interaction position is executed.
[0203] The background area refers to the area in the virtual scene except the area where the virtual object is located. The lens refers to a tool for viewing the virtual scene, which displays the image of the virtual scene on the terminal by shooting a part of the virtual scene. Taking the game as an example, the game image is obtained by shooting a part of the virtual scene by the lens. The interactive object can view the images of different areas in the virtual scene by controlling the movement of the lens.
[0204] Specifically, after identifying the color value at the interactive position, the terminal will use the color value at the interactive position to determine whether the interactive operation acts on the background area in the virtual scene. When the color value at the interactive position represents that the interactive operation acts on the background area in the virtual scene, the terminal will determine that the interactive mode corresponding to the color value at the interactive position is a virtual scene lens switching interaction, and execute the virtual scene lens switching operation mapped at the interactive position according to the mapping relationship between the interactive position and the virtual scene lens switching direction. In a specific application, the mapping relationship between the interactive position and the virtual scene lens switching direction can be configured according to the actual application scenario, and a 360° rotating lens can be realized through the configuration of the mapping relationship.
[0205] In a specific application, the terminal can determine whether the interactive operation acts on the background area in the virtual scene by comparing the color value at the interactive position with the color value threshold. When the color value at the interactive position is equal to the color value threshold, it indicates that the interactive operation acts on the background area. The color value threshold can be configured according to the actual application scenario. For example, the color value threshold can be 0, which means that when the color value at the interactive position is equal to 0, it is determined that the interactive operation acts on the background area.
[0206] In this embodiment, when the color value at the interaction position represents that the interactive operation acts on the background area in the virtual scene, the interaction mode corresponding to the color value at the interaction position is determined to be a virtual scene lens switching interaction, and the virtual scene lens switching operation mapped at the interaction position is executed, so as to realize interactive feedback on the virtual scene lens switching.
[0207] In one embodiment, the virtual object interaction method of the present application is described by applying it to virtual pet interaction.
[0208] The inventors believe that traditional virtual object interactions have some limitations. For example, the overall posture of the virtual object is fixed, and the lens of the virtual camera is fixed and cannot be rotated. The interaction method is single and cannot fully utilize the virtual object resources, resulting in low resource utilization.
[0209] Based on this, the present application provides a virtual object interaction method, that is, a solution for virtual object realistic interaction, which can be applied to pet interaction in games. The overall concept of the solution is to use virtual object partition recognition technology as the basis, and adopt sliding interaction, inverse dynamics, state machine and other technologies to realize diversified realistic interactions such as click feedback, part dragging, state switching, and part following of virtual objects.
[0210] In one embodiment, the virtual object interaction method of the present application is described by taking the application to Unity-based virtual pet interaction as an example.
[0211] like Fig.10 As shown, it is a schematic diagram of the interaction expected to be achieved by applying the virtual object interaction method of the present application to virtual pet interaction. Different parts of the virtual object will produce different feedback when different postures are triggered. The feedback includes posture switching, cyclic actions (i.e., continuous feedback actions), one-time feedback, emotional feedback, paw inverse dynamics, etc. Emotional feedback includes weak feedback accumulation that will produce strong feedback or posture switching, that is, the cumulative interaction time or the cumulative number of interactions meets the corresponding cumulative feedback triggering conditions, which will trigger a cumulative feedback event. For example, taking the virtual pet as a virtual cat, if you touch the virtual cat's body for a certain period of time, the cat will roll on the ground. At the same time, some randomness of feedback will be added, such as introducing a feedback action sequence, to give the interactive object a rich simulated interactive experience. For another example, if Fig.10 As shown in the figure, through strong feedback + random switching of postures, the randomness of feedback is greatly improved, and you can "rub the virtual cat until it turns belly up." In addition, rubbing the overall part and rubbing the sensitive part will also have different feedback.
[0212] Specifically, the virtual object interaction method of the present application mainly involves the following technologies: first, partitioning to interaction technology, second, face following sliding interaction technology, third, foot inverse dynamics sliding interaction technology and animation state machine. The following are explanations of each of the technologies.
[0213] 1. Partition-to-interaction technology.
[0214] In this application, the virtual object is partitioned using a part-partitioned texture map, and different parts are assigned different color values. After skinning, the rendered screen rendering texture map is obtained, and then in response to the interactive operation triggered in the virtual scene, the color value at the interactive position indicated by the interactive operation can be identified to determine the matching part, and then the interaction is performed based on the matching part. It should be noted that the consumption of the part partitioning color value identification involved in this application is very small. Therefore, for continuous operations, the trigger operation identification can be performed on each frame of the virtual scene during the continuous operation process. Identifying the color value can make it possible to switch the interactive position during sliding, such as rubbing the head to rub the body.
[0215] Specifically, the interaction flow chart can be as follows Fig.11 As shown, when there is a virtual object in the virtual scene, the terminal responds to the interactive operation triggered in the virtual scene, and identifies the color value at the interactive position indicated by the interactive operation. When the color value at the interactive position is equal to the color value threshold, it indicates that the interactive operation acts on the background area and enters the lens interaction. When the color value at the interactive position is greater than the color value threshold, it indicates that the interactive operation acts on the virtual object. The terminal will enter the corresponding part interaction through color value judgment. The part interaction includes one-time interactive actions, sliding interactive actions, inverse dynamics interactive actions, and basic posture switching, etc. ( Fig.11 Only one-time interaction actions and sliding interaction actions are shown in the figure, among which the one-time interaction actions and basic posture switching can be understood as single feedback actions, and the sliding interaction actions and inverse dynamics interaction actions can be understood as continuous feedback actions), that is, determining the part of the virtual object that matches the color value at the interaction position, and obtaining the posture data of the virtual object, determining the feedback action type that matches the posture data and the matched part, determining the posture change parameters of the feedback action of the feedback action type relative to the matched part, and based on the posture change parameters, controlling the virtual object to perform the feedback action corresponding to the matched part.
[0216] In specific applications, when entering into part interaction, if the feedback action type is a continuous feedback action, the terminal will perform trigger operation identification on each frame of the virtual scene during the continuous operation to identify the color value of the trigger position indicated by each trigger operation in the continuous operation, and determine the posture change parameters corresponding to the color value at the trigger position and the matching part.
[0217] In a specific application, when the part corresponding to the color value at the trigger position is the same as the matched part, the terminal can directly calculate the posture change parameter based on the trigger position and the matched part to obtain the posture change parameter. Fig.11 The part corresponding to the color value at the trigger position is determined as the interaction part, that is, a new part interaction is entered, and the interaction posture of the virtual object when the trigger operation is triggered is obtained. The posture change parameter is calculated based on the interaction part and the interaction posture to obtain the posture change parameter. When the part corresponding to the color value at the trigger position is different from the matched part and the part corresponding to the trigger position does not meet the interaction part update condition, the posture control parameter corresponding to the matched part is used as the posture change parameter.
[0218] 2. Face following sliding interaction technology.
[0219] Specifically, in order to simulate as much as possible the real feedback of a virtual object stroking its head or scratching its chin in the real world, the horizontal and vertical rotation degrees of the virtual object's face can usually be controlled by two parameters, the horizontal control parameter and the vertical control parameter. The two parameters can be combined to achieve a 360-degree rotation of the virtual object's face within a certain range. In the process of implementing facial follow-up sliding interaction, this solution uses the nose of the virtual object as the facial center and the nose as the boundary to control the left and right shaking and up and down shaking of the virtual object. It should be noted that when controlling the up and down shaking, it is required that when touching the virtual head, the virtual object should lower its head and shake within a range, and when touching the virtual object's chin, the virtual object should raise its head and shake, so the virtual object's facial animation parameter range is approximately Figure 7 ( Figure 7 In the case shown in FIG. 1 , the virtual object in the image is a virtual cat, a sudden change occurs in the vertical control parameter at the nose. In the present application, a short animation blend is performed when switching between the upper and lower half areas to achieve a smoother and more natural upward and downward rotation of the face.
[0220] In specific applications, such as Fig.12 As shown, the face sliding interaction is explained by taking a virtual cat as an example. In response to the trigger operation, after entering the face interaction area through color value judgment, the terminal first takes the screen position of the nose bone point, and then calculates the approximate range of the virtual cat's face on the screen through the focal length, that is, the screen range of the face, determines the position offset between the screen position and the trigger position, and calculates the target value of the animation parameter according to the position offset and the facial animation parameter range corresponding to the screen range, that is, the animation parameter corresponding to the trigger position. For the vertical direction control parameter in the animation parameter corresponding to the trigger position, the smooth damping function is used to smooth the vertical direction control parameter through interpolation, that is, the vertical direction initial parameter of the face is obtained, and smooth interpolation is performed between the vertical direction initial parameter and the vertical direction control parameter to obtain the interpolated vertical direction control parameter, and the horizontal direction control parameter and the interpolated vertical direction control parameter are used as the posture change parameter. The smooth damping function is a spring damping effect, and the maximum change speed can also be limited.
[0221] 3. Foot inverse dynamics sliding interaction technology.
[0222] Specifically, the intended goal of the sliding interaction of the foot is that the triggering operation of the interactive object can lead the foot of the virtual object to move. Therefore, inverse dynamics technology is introduced in this application. By introducing inverse dynamics technology, it is only necessary to determine the position of the foot of the virtual object when the interactive object slides the screen, and the movement of other parts of the virtual object such as the hands can be reversely driven through inverse dynamics.
[0223] In specific applications, such as Fig.13As shown, the sliding interaction of the foot is explained by taking a virtual cat as an example. In response to the trigger operation, after entering the foot interaction area (distinguishing between left and right feet) through color value judgment, the terminal will obtain the world position of the foot bone point, and the world position of the virtual cat's foot bone point is fixedly offset upward by a preset distance to obtain the interaction center of the foot. The interaction center and the direction of the virtual cat (direction axis) form the plane where the virtual cat is located. The interaction radius is determined according to the size of the virtual cat, and the interaction range of the foot is determined based on the interaction center and the interaction radius. In response to each trigger operation in the continuous sliding operation of the interactive object, a ray is drawn from the trigger position indicated by the trigger operation and intersects with the plane where the virtual object is located to obtain the moving position of the foot bone point, that is, the plane intersection of the trigger position indicated by the trigger operation relative to the plane where the virtual object is located is determined. If the moving position of the foot bone point exceeds the interaction radius, the foot interaction is terminated.
[0224] In a specific application, if the moving position of the foot bone point is within the interaction range of the foot, the terminal will perform reverse deduction based on the moving position of the foot bone point to obtain the moving position of the parent bone points of all levels on the bone chain where the foot bone point is located, and obtain the posture change parameters based on the moving position of the foot bone point and the moving position of the parent bone point.
[0225] In a specific application, during the foot interaction process, there will be a foot movement control parameter that slowly accumulates and moves the foot toward the foot bone point. When exiting the foot interaction, the foot movement control parameter slowly decreases, making the performance of entering and exiting the foot interaction more natural.
[0226] 4. Animation state machine.
[0227] Specifically, in order to achieve the diversity of virtual object interaction, the present application adopts a two-layer state machine to implement the entire interaction framework. The virtual object itself has five different basic postures, such as Fig.14 As shown in FIG. 1 , taking a virtual cat as an example, the virtual object includes five basic postures: standing, squatting, lying, sideways, and lying. Fig.15 As shown, in the animation state machine, these five basic postures constitute the first-level state machine, and each first-level posture has a second-level state machine. The second-level state machine has a default posture, such as a standing posture loop (that is, when the virtual cat is standing, the corresponding fixed animation is playing), and several interactive postures, which are called second-level postures, such as the face sliding interaction, inverse dynamics sliding interaction, and single animation feedback (such as ear shaking) implemented above. In this embodiment, Fig.15As shown in the figure, the virtual cat is divided into multiple different parts, each of which has a corresponding interactive posture. For the head and body, you can stroke them as a whole, and you can follow the trigger operation. For sensitive parts such as the left and right ears, eyes, nose, and tail, you can get one-time feedback. For the left and right legs and left and right hands, you can trigger the reverse dynamics feedback.
[0228] When the interactive object interacts with any part, the virtual cat will switch from the current second-layer posture to the next correspondingly configured second-layer interactive posture or switch the state of the first-layer state machine. After the interaction, it will either return to the default second-layer posture or enter the feedback action mapped by the cumulative feedback event when the cumulative feedback event is triggered.
[0229] In specific applications, in order to realize the above two-layer state machine framework, the abstract behavior of the virtual cat is defined at the program implementation level. The abstract behavior includes three types: one is single animation feedback (such as shaking the ears), the second is looping animation (face sliding interaction, inverse dynamics sliding interaction or other fixed looping animation (for example, when stroking the body, a fixed looping animation will be played)), and the third is the posture switching of the first-layer state machine. The virtual cat will produce different feedback in different posture interactions in different parts, that is, perform different feedback actions. For example, when the cat is standing or squatting, long pressing and sliding (that is, continuous operation) on the face will trigger face sliding interaction, long pressing and sliding the feet will trigger inverse dynamics interaction, and clicking on the ears will trigger ear shaking animation.
[0230] In a specific application, for the sake of richness, this application introduces a behavior sequence, which consists of a single animation feedback and a layer of state switching. The animations in the sequence are arranged and played until the sequence is cleared and returns to the default posture. In addition, this application also introduces cumulative counts and randomness of interactions. For example, there is a probability of switching to the basic posture by clicking the ear three times in a row. The introduced behavior sequence, cumulative counts, and randomness of interactions can be configured according to the actual application scenario.
[0231] In one embodiment, Fig.16 As shown, a virtual object interaction method is provided, which can be executed by a terminal or a server alone, or by a terminal and a server in collaboration. In the embodiment of the present application, the method is applied to a terminal as an example for explanation, and includes the following steps:
[0232] Step 1602, displaying a virtual scene, in which there exists a virtual object obtained by shaping the original model; the virtual object retains the parts of the original model.
[0233] The original model refers to a model that has not been sculpted. The virtual object refers to an movable object obtained by sculpting the original model in the virtual environment. The movable object can be a virtual character, a virtual animal, etc. For example, the original model can be an animal model that has not been sculpted, and the virtual object is a virtual animal obtained by sculpting the original model. For example, the original model can be a cat model that has not been sculpted, and the virtual object is a cat obtained by sculpting the original model. For further example, Fig.17 As shown, by performing shaping operations on a cat model that has not been sculpted, virtual cats of various body shapes can be obtained.
[0234] Specifically, the terminal will display a virtual scene, in which there is a virtual object obtained by the kneading operation of the original model, and the virtual object retains the parts of the original model. In a specific application, the original model includes multiple parts, and the sizes of the multiple parts can be changed through the kneading operation, such as Fig.17 As shown, different virtual cats have different body shapes, which actually means that the sizes of the parts of different cats are not exactly the same, but different virtual cats all have six parts: eyes, ears, face, front paws, body and tail. In a specific application, while displaying the virtual object obtained by the kneading operation of the original model, the terminal will also display the background area corresponding to the virtual object, which can be configured according to the actual application scenario.
[0235] Step 1604 : in the case of displaying the posture of the virtual object, in response to an interaction operation triggered in the virtual scene, displaying the interaction position indicated by the interaction operation.
[0236] Among them, the interactive operation refers to the operation triggered by the interactive object when interacting. For example, the interactive operation may specifically refer to a click operation triggered by the interactive object when interacting. For example, the interactive operation may specifically refer to a click operation triggered by the interactive object through an input device when interacting, and the input device may specifically be a mouse, a stylus, etc. For another example, the interactive operation may specifically refer to a touch screen operation triggered by the interactive object when interacting. The interactive position refers to the position when the interactive operation is triggered. For example, when the interactive triggering operation is a click operation, the interactive position may specifically refer to the clicked position. For another example, when the interactive operation is a touch screen operation, the interactive position may specifically refer to the touched screen position.
[0237] Specifically, when displaying the posture of a virtual object, the terminal will obtain the corresponding part partition texture map of the virtual object, render the virtual object based on the part partition texture map, obtain the color texture map, and wait for the response to the interactive operation on the virtual object. If the interactive object wants to interact, it will initiate the interactive operation. In response to the interactive operation, the terminal will display the interactive position indicated by the interactive operation, so that the interactive object can intuitively understand the interactive position selected by itself.
[0238] In a specific application, the interactive operation may be a start trigger operation of a continuous operation. As the continuous operation proceeds, the terminal will display the sliding trigger position of the continuous operation. In a specific application, the virtual object may be a virtual cat, such as Fig.18 As shown, when the continuous operation is a slide on the virtual cat's body, the terminal will display the corresponding slide trigger position in the area where the virtual cat's body is located; when the continuous operation is a slide on the area where the virtual cat's head is located, the terminal will display the slide trigger position in the area where the virtual cat's head is located.
[0239] Step 1606, when the interaction position belongs to any part of the virtual object, the virtual object is displayed to change its posture from the virtual object posture to perform a feedback action mapped to the part where the interaction position is located.
[0240] Among them, the part where the interaction position is located refers to the part selected by the interactive object for interaction. For example, the part where the interaction position is located can be eyes, face, ears, body, etc. The feedback action mapped to the part where the interaction position is located refers to the interactive action generated by the virtual object in response to the interaction with the part where the interaction position is located. For example, the feedback action mapped to the part where the interaction position is located can be posture switching. For example, the posture switching can be the virtual object changing from standing to lying, sitting, sideways, lying, etc. For another example, the feedback action mapped to the part where the interaction position is located can be a continuous feedback action. For example, when the part where the interaction position is located is the face, the feedback action mapped to the face can be lowering the head, looking up the head, etc.
[0241] Specifically, when the interactive position belongs to any part of the virtual object, the terminal will display the virtual object to change its posture from the posture of the virtual object to perform the feedback action mapped to the part where the interactive position is located. In a specific application, when the interactive position is determined, the terminal will convert the interactive position indicated by the interactive operation into texture coordinates, perform color value recognition according to the texture coordinates, obtain the texture color value corresponding to the texture coordinates, and obtain the color value at the interactive position indicated by the interactive operation based on the texture color value. When the color value at the interactive position represents that the interactive operation acts on the virtual object, the terminal can determine the part where the color value matches the interactive position from the pre-configured correspondence between the part and the color value according to the color value at the interactive position, that is, the part where the interactive position is located, and obtain the posture data of the virtual object, determine the feedback action type that matches the posture data and the part where the interactive position is located, determine the posture change parameters of the feedback action type relative to the part where the interactive position is located, and control the virtual object to perform the feedback action mapped to the part where the interactive position is located based on the posture change parameters.
[0242] The above-mentioned virtual object interaction method, by displaying a virtual scene with a virtual object obtained by shaping the original model, responds to the interaction operation triggered in the virtual scene while displaying the virtual object posture, and displays the interaction position indicated by the interaction operation, so as to realize direct feedback on the interaction triggering operation, so that when the interaction position belongs to any part of the virtual object, the virtual object can be displayed to change its posture from the virtual object posture to execute the feedback action mapped to the part where the interaction position is located. It can realize diversified feedback of the virtual object by combining the part where the interaction position is located, the virtual object posture and the feedback action, realize full utilization of virtual object resources, and thus improve resource utilization.
[0243] In one embodiment, when the interaction position belongs to any part of the virtual object, displaying the virtual object to change its posture from the virtual object posture to perform the feedback action of mapping the part where the interaction position is located includes:
[0244] When the interaction position belongs to any part of the virtual object, and the feedback action type that matches the virtual object posture and the part where the interaction position is located is a continuous feedback action, the virtual object is displayed to change its posture starting from the virtual object posture to execute the continuous feedback action mapped to the part where the interaction position is located.
[0245] Specifically, when the interaction position belongs to any part of the virtual object, and the feedback action type that matches the virtual object posture and the part where the interaction position is located is a continuous feedback action, the terminal will use the interaction operation as the starting trigger operation of the continuous operation corresponding to the continuous feedback action, and starting from the starting trigger operation, in response to the continuous operation, determine the posture change parameters corresponding to the continuous operation and the part where the interaction position is located, so as to control the virtual object to change its posture based on the posture change parameters, so as to execute the continuous feedback action mapped to the part where the interaction position is located.
[0246] In a specific application, for a continuous feedback action, the determined posture change parameter is the posture change parameter corresponding to each trigger operation in the continuous operation corresponding to the continuous feedback action. Then, based on the posture change parameter, when controlling the feedback action mapped to the location of the interaction position of the virtual object, for each trigger operation, the terminal will control the virtual object to perform a feedback action corresponding to the targeted trigger operation and the location of the interaction position based on the targeted trigger operation.
[0247] In this embodiment, when the feedback action type is a continuous feedback action, a continuous feedback action mapping the location of the virtual object performing the interaction can be displayed, which can achieve diversified feedback of virtual objects and full utilization of virtual object resources, thereby improving resource utilization.
[0248] In one embodiment, when the interaction position belongs to any part of the virtual object, displaying the virtual object to change its posture from the virtual object posture to perform the feedback action of mapping the part where the interaction position is located includes:
[0249] When the interaction position belongs to any part of the virtual object, and the feedback action type that matches the virtual object posture and the part where the interaction position is located is a single feedback action, the virtual object is displayed to change its posture starting from the virtual object posture to execute the single feedback action mapped to the part where the interaction position is located.
[0250] Specifically, when the interaction position belongs to any part of the virtual object, and the feedback action type that matches the virtual object posture and the part where the interaction position is located is a single feedback action, the terminal will obtain the corresponding feedback action sequence of the matching part, determine the posture change parameter based on the feedback action sequence, and control the virtual object to change its posture based on the posture change parameter, so as to execute the single feedback action mapped to the part where the interaction position is located.
[0251] In a specific application, for a single feedback action, the determined posture change parameter is the posture change parameter of the single feedback action, and the terminal directly controls the virtual object to perform the feedback action mapped to the part where the interaction position is located based on the posture change parameter of the single feedback action. In a specific application, assuming that the virtual object is a virtual pet, the matching part is the ear, and the feedback action type that matches the posture data and the part where the interaction position is located is a single feedback action, and the feedback action is to shake the ear, the terminal can obtain the animation parameters for realizing the ear shaking, and control the virtual pet to perform the feedback action of shaking the ear corresponding to the ear according to the animation parameters.
[0252] In this embodiment, when the feedback action type is a single feedback action, a single feedback action mapping the location of the virtual object performing the interaction can be displayed, which can achieve diversified feedback of virtual objects and full utilization of virtual object resources, thereby improving resource utilization.
[0253] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0254] Based on the same inventive concept, the embodiment of the present application also provides a virtual object interaction device for implementing the virtual object interaction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more virtual object interaction device embodiments provided below can refer to the limitations of the virtual object interaction method above, and will not be repeated here.
[0255] In one embodiment, Fig.19 As shown, a virtual object interaction device is provided, including: a color value recognition module 1902, a part matching module 1904, a feedback action type determination module 1906, a posture change parameter determination module 1908 and a feedback module 1910, wherein:
[0256] The color value recognition module 1902 is used to, when there is a virtual object in the virtual scene, identify the color value at the interaction position indicated by the interaction operation in response to the interaction operation triggered in the virtual scene;
[0257] The part matching module 1904 is used to determine the part of the virtual object that matches the color value at the interaction position when the color value at the interaction position represents the interaction operation acting on the virtual object, and obtain the posture data of the virtual object;
[0258] A feedback action type determination module 1906, for determining a feedback action type that matches the posture data and the matching part;
[0259] A posture change parameter determination module 1908, for determining a posture change parameter of a feedback action of a feedback action type relative to a matching part;
[0260] The feedback module 1910 is used to control the virtual object to perform a feedback action corresponding to the matched part based on the posture change parameter.
[0261] In one embodiment, the color value recognition module is also used to, when there is a virtual object in the virtual scene, respond to an interactive operation triggered in the virtual scene, convert the interactive position indicated by the interactive operation into texture coordinates, and render the color texture map onto a preconfigured screen rendering texture map; the color texture map is obtained by rendering the virtual object based on a part partition texture map, and texture sampling is performed on the screen rendering texture map according to the texture coordinates to obtain the texture color value corresponding to the texture coordinates, and based on the texture color value, the color value at the interactive position indicated by the interactive operation is determined.
[0262] In one embodiment, the feedback module is also used to trigger a cumulative feedback event when the corresponding cumulative interaction time or cumulative interaction times of the matched part meets the corresponding cumulative feedback trigger condition. In response to the cumulative feedback event, the virtual object is controlled to perform the feedback action mapped by the corresponding cumulative feedback event of the matched part.
[0263] In one embodiment, the posture change parameter determination module is also used to, when the feedback action type is a continuous feedback action, use the interactive operation as the starting trigger operation of the continuous operation corresponding to the continuous feedback action, starting from the starting trigger operation, responding to each trigger operation in the continuous operation, and for each trigger operation, determining the posture change parameters corresponding to the targeted trigger operation and the matching part.
[0264] In one embodiment, the posture change parameter determination module is further used to determine the color value at the trigger position indicated by the targeted trigger operation, and determine the posture change parameter corresponding to the color value at the trigger position and the matching part.
[0265] In one embodiment, the posture change parameter determination module is further used to calculate the posture change parameter based on the trigger position and the matched part to obtain the posture change parameter when the part corresponding to the color value at the trigger position is the same as the matched part.
[0266] In one embodiment, the matched part is the face; the posture change parameter determination module is also used to obtain the screen range of the face of the virtual object and the screen position of the center bone point of the face, determine the position offset between the screen position and the trigger position, determine the animation parameters corresponding to the trigger position based on the position offset and the facial animation parameter range corresponding to the screen range, and obtain the posture change parameters based on the animation parameters corresponding to the trigger position.
[0267] In one embodiment, the animation parameters corresponding to the trigger position include horizontal direction control parameters and vertical direction control parameters; the posture change parameter determination module is also used to obtain the initial vertical direction parameters of the face, perform smooth interpolation between the initial vertical direction parameters and the vertical direction control parameters, obtain the interpolated vertical direction control parameters, and use the horizontal direction control parameters and the interpolated vertical direction control parameters as posture change parameters.
[0268] In one embodiment, the matching part is the foot; the posture change parameter determination module is also used to obtain the plane where the virtual object is located; the plane where the virtual object is located is obtained based on the world position of the foot bone point and the orientation axis of the virtual object, and the plane intersection of the trigger position relative to the plane where the virtual object is located is determined, and the plane intersection is used as the moving position of the foot bone point of the foot bone point, and the posture change parameters are obtained based on the moving position of the foot bone point.
[0269] In one embodiment, the posture change parameter determination module is also used to perform reverse deduction based on the moving position of the foot bone point when the moving position of the foot bone point is within the interaction range of the foot, to obtain the moving position of the parent bone points of each level on the bone chain where the foot bone point is located, and to obtain the posture change parameters based on the moving position of the foot bone point and the moving position of the parent bone point.
[0270] In one embodiment, the posture change parameter determination module is also used to determine the foot movement control parameters that control the movement of the foot bone point based on the pre-movement position of the foot bone point and the moving position of the foot bone point, and use the foot movement control parameters and the moving position of the parent bone point as posture change parameters.
[0271] In one embodiment, the posture change parameter determination module is also used to determine the part corresponding to the color value at the trigger position as the interaction part when the part corresponding to the color value at the trigger position is different from the matching part and the part corresponding to the color value at the trigger position meets the interaction part update condition, and obtain the interaction posture of the virtual object when the trigger operation is triggered, calculate the posture change parameters based on the interaction part and the interaction posture, and obtain the posture change parameters.
[0272] In one embodiment, the posture change parameter determination module is also used to use the posture control parameters corresponding to the matched part as the posture change parameters when the part corresponding to the color value at the trigger position is different from the matched part and the part corresponding to the trigger position does not meet the interactive part update condition.
[0273] In one embodiment, the posture change parameter determination module is also used to obtain the corresponding feedback action sequence of the matching part when the feedback action type is a single feedback action; the feedback action sequence includes at least two preconfigured actions, and the action to be fed back is determined from the at least two preconfigured actions, and the animation parameters of the action to be fed back are used as the posture change parameters of the feedback action of the feedback action type relative to the matching part.
[0274] In one embodiment, the virtual object interaction device also includes a lens switching module, which is used to determine that the interaction mode corresponding to the color value at the interaction position is a virtual scene lens switching interaction when the color value at the interaction position represents the interaction operation acting on the background area in the virtual scene, and execute the virtual scene lens switching operation mapped at the interaction position.
[0275] In one embodiment, Fig. 20 As shown, a virtual object interaction device is provided, comprising: a virtual scene display module 2002, an interaction position display module 2004 and a posture change display module 2006, wherein:
[0276] The virtual scene display module 2002 is used to display a virtual scene, in which there is a virtual object obtained by shaping the original model; the virtual object retains the parts of the original model;
[0277] An interaction position display module 2004 is used to display the interaction position indicated by the interaction operation in response to the interaction operation triggered in the virtual scene when displaying the posture of the virtual object;
[0278] The posture change display module 2006 is used to display the posture change of the virtual object from the posture of the virtual object when the interaction position belongs to any part of the virtual object, so as to perform the feedback action mapped to the part where the interaction position is located.
[0279] The above-mentioned virtual object interaction device, by displaying a virtual scene in which a virtual object exists that is obtained by shaping an original model, and in the case of displaying the posture of the virtual object, responds to the interaction operation triggered in the virtual scene and displays the interaction position indicated by the interaction operation, can realize direct feedback on the interaction triggering operation, so that when the interaction position belongs to any part of the virtual object, the virtual object can be displayed to change its posture starting from the virtual object posture to execute the feedback action mapped to the part where the interaction position is located, and can realize diversified feedback of the virtual object in combination with the part where the interaction position is located, the posture of the virtual object and the feedback action, realize full utilization of virtual object resources, and thus improve resource utilization.
[0280] In one embodiment, the posture change display module is also used to display the posture change of the virtual object starting from the virtual object posture when the interaction position belongs to any part of the virtual object, and the feedback action type matching the virtual object posture and the part where the interaction position is located is a continuous feedback action, so as to execute the continuous feedback action mapped to the part where the interaction position is located.
[0281] In one embodiment, the posture change display module is also used to display the virtual object's posture change from the virtual object posture when the interaction position belongs to any part of the virtual object, and the feedback action type matching the virtual object posture and the part where the interaction position is located is a single feedback action, so as to execute the single feedback action mapped to the part where the interaction position is located.
[0282] Each module in the above virtual object interaction device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0283] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. Taking the computer device as a terminal as an example, its internal structure diagram may be as follows: Fig.21As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a virtual object interaction method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0284] Those skilled in the art will understand that Fig.21 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0285] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0286] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0287] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0288] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0289] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0290] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A virtual object interaction method, It is characterized in that The method comprises: When a virtual object exists in the virtual scene, in response to an interaction operation triggered in the virtual scene, identifying a color value at an interaction position indicated by the interaction operation; When the color value at the interaction position represents that the interaction operation acts on the virtual object, determining a portion of the virtual object that matches the color value at the interaction position, and acquiring posture data of the virtual object; Determining a feedback action type that matches the posture data and the matched part; Determine a posture change parameter of the feedback action of the feedback action type relative to the matched part; Based on the posture change parameter, the virtual object is controlled to perform the feedback action corresponding to the matched part.
2. The method according to claim 1, It is characterized in that When there is a virtual object in the virtual scene, in response to an interaction operation triggered in the virtual scene, identifying a color value at an interaction position indicated by the interaction operation includes: When a virtual object exists in a virtual scene, in response to an interactive operation triggered in the virtual scene, an interactive position indicated by the interactive operation is converted into texture coordinates, and a color texture map is rendered onto a preconfigured screen rendering texture map; the color texture map is obtained by rendering the virtual object based on a part partition texture map; According to the texture coordinates, texture sampling is performed on the screen rendering texture map to obtain texture color values corresponding to the texture coordinates; Based on the texture color value, a color value at an interaction position indicated by the interaction operation is determined.
3. The method according to claim 1, It is characterized in that The method further comprises: When the corresponding cumulative interaction time or cumulative interaction times of the matched parts meets the corresponding cumulative feedback triggering condition, a cumulative feedback event is triggered; In response to the accumulated feedback event, the virtual object is controlled to perform a feedback action mapped by the accumulated feedback event corresponding to the matched part.
4. The method according to any one of claims 1 to 3, It is characterized in that The posture change parameters of the feedback action for determining the feedback action type relative to the matched part include: When the feedback action type is a continuous feedback action, taking the interactive operation as a starting triggering operation of a continuous operation corresponding to the continuous feedback action; Starting from the initial trigger operation, in response to each trigger operation in the continuous operation, for each trigger operation, a posture change parameter corresponding to the targeted trigger operation and the matched part is determined.
5. The method according to claim 4, It is characterized in that The step of determining the posture change parameters corresponding to the targeted trigger operation and the matched part includes: Determine a color value at a trigger position indicated by the targeted trigger operation; Determine a posture change parameter corresponding to the color value at the trigger position and the matched part.
6. The method according to claim 5, It is characterized in that The determining of the posture change parameter corresponding to the color value at the trigger position and the matched part includes: When the portion corresponding to the color value at the trigger position is the same as the matched portion, a posture change parameter is calculated based on the trigger position and the matched portion to obtain the posture change parameter.
7. The method according to claim 6, It is characterized in that The matched part is a face; the posture change parameter is calculated based on the trigger position and the matched part to obtain the posture change parameter, including: Acquire the screen range of the face of the virtual object and the screen position of the face center bone point; Determining a position offset between the screen position and the trigger position; Determining animation parameters corresponding to the trigger position based on the position offset and a facial animation parameter range corresponding to the screen range; Based on the animation parameters corresponding to the trigger position, posture change parameters are obtained.
8. The method according to claim 7, It is characterized in that The animation parameters corresponding to the trigger position include horizontal direction control parameters and vertical direction control parameters; the posture change parameters obtained based on the animation parameters corresponding to the trigger position include: Acquiring an initial vertical direction parameter of the face, and performing smooth interpolation between the initial vertical direction parameter and the vertical direction control parameter to obtain an interpolated vertical direction control parameter; The horizontal direction control parameter and the interpolated vertical direction control parameter are used as posture change parameters.
9. The method according to claim 6, It is characterized in that The matched part is a foot; the posture change parameter is calculated based on the trigger position and the matched part, and the posture change parameter is obtained including: Acquire the plane where the virtual object is located; the plane where the virtual object is located is obtained based on the world position of the foot bone point and the orientation axis of the virtual object; Determine a plane intersection point of the trigger position relative to the plane where the virtual object is located, and use the plane intersection point as a foot bone point movement position of the foot bone point; Based on the moving position of the foot bone point, a posture change parameter is obtained.
10. The method according to claim 9, It is characterized in that The posture change parameters obtained based on the movement position of the foot bone point include: When the moving position of the foot bone point is within the interactive range of the foot, reverse deduction is performed based on the moving position of the foot bone point to obtain the moving positions of the parent bone points of each level on the bone chain where the foot bone point is located; Based on the movement position of the foot bone point and the movement position of the parent bone point, a posture change parameter is obtained.
11. The method according to claim 10, It is characterized in that The obtaining of posture change parameters based on the movement position of the foot bone point and the movement position of the parent bone point includes: Determining a foot movement control parameter for controlling the movement of the foot bone point based on the pre-movement position of the foot bone point and the moved position of the foot bone point; The foot movement control parameter and the parent bone point movement position are used as posture change parameters.
12. The method according to claim 5, It is characterized in that The determining of the posture change parameter corresponding to the color value at the trigger position and the matched part includes: When the part corresponding to the color value at the trigger position is different from the matched part and the part corresponding to the color value at the trigger position meets the interactive part update condition, the part corresponding to the color value at the trigger position is determined as the interactive part, and the interactive posture of the virtual object when the targeted trigger operation is triggered is obtained; A posture change parameter is calculated based on the interaction part and the interaction posture to obtain the posture change parameter.
13. The method according to claim 5, It is characterized in that The determining of the posture change parameter corresponding to the color value at the trigger position and the matched part includes: When the part corresponding to the color value at the trigger position is different from the matched part and the part corresponding to the trigger position does not meet the interactive part update condition, the posture control parameter corresponding to the matched part is used as the posture change parameter.
14. The method according to claim 1, It is characterized in that The posture change parameters of the feedback action for determining the feedback action type relative to the matched part include: When the feedback action type is a single feedback action, obtaining a feedback action sequence corresponding to the matched part; the feedback action sequence includes at least two pre-configured actions; The action to be fed back is determined from the at least two preconfigured actions, and the animation parameters of the action to be fed back are used as posture change parameters of the feedback action of the feedback action type relative to the matching part.
15. The method according to claim 1, It is characterized in that The method further comprises: When the color value at the interaction position represents that the interaction operation acts on the background area in the virtual scene, it is determined that the interaction mode corresponding to the color value at the interaction position is a virtual scene lens switching interaction, and the virtual scene lens switching operation mapped at the interaction position is executed.
16. A virtual object interaction method, It is characterized in that The method comprises: Displaying a virtual scene, wherein a virtual object obtained by shaping the original model exists in the virtual scene; the virtual object retains the parts of the original model; In the case of displaying the posture of the virtual object, in response to an interaction operation triggered in the virtual scene, displaying an interaction position indicated by the interaction operation; When the interaction position belongs to any part of the virtual object, the virtual object is displayed to change its posture from the virtual object posture, so as to perform a feedback action mapped to the part where the interaction position is located.
17. The method according to claim 16, It is characterized in that When the interaction position belongs to any part of the virtual object, displaying the virtual object to change its posture from the posture of the virtual object to perform the feedback action of mapping the part where the interaction position is located includes: When the interaction position belongs to any part of the virtual object, and the feedback action type that matches the virtual object posture and the part where the interaction position is located is a continuous feedback action, the virtual object is displayed to change its posture starting from the virtual object posture to execute the continuous feedback action mapped to the part where the interaction position is located.
18. The method according to claim 16, It is characterized in that When the interaction position belongs to any part of the virtual object, displaying the virtual object to change its posture from the posture of the virtual object to perform the feedback action of mapping the part where the interaction position is located includes: When the interaction position belongs to any part of the virtual object, and the feedback action type that matches the virtual object posture and the part where the interaction position is located is a single feedback action, the virtual object is displayed to change its posture starting from the virtual object posture to execute the single feedback action mapped to the part where the interaction position is located.
19. A virtual object interaction device, It is characterized in that The device comprises: A color value recognition module, configured to, when a virtual object exists in a virtual scene, identify a color value at an interaction position indicated by an interaction operation in response to an interaction operation triggered in the virtual scene; a part matching module, configured to determine a part of the virtual object that matches the color value at the interaction position when the color value at the interaction position represents that the interaction operation acts on the virtual object, and obtain posture data of the virtual object; A feedback action type determination module, used to determine a feedback action type that matches the posture data and the matching part; A posture change parameter determination module, used to determine the posture change parameter of the feedback action of the feedback action type relative to the matched part; A feedback module is used to control the virtual object to perform the feedback action corresponding to the matched part based on the posture change parameter.
20. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 18 are implemented.
21. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.
22. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.
