Virtual object interaction method and apparatus, computer device, and storage medium

Through methods such as virtual object partition recognition technology and reverse dynamics, the problem of low resource utilization of traditional virtual object interaction methods is solved, diversified feedback and realistic interaction of virtual objects are realized, and the interactive experience is improved.

WO2024198378A1PCT designated stage expired Publication Date: 2024-10-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/131254
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-30
Filing Date
2023-11-13
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

The traditional virtual object interaction method cannot fully utilize virtual object resources, has the problem of low resource utilization, has a single interaction method, and cannot achieve diversified realistic interactions.

Method used

Virtual object partition recognition technology, sliding interaction, reverse dynamics, and state machine technologies are used to determine the matching parts by identifying color values ​​in interactive operations, and calculate posture changes based on preconfigured virtual object postures and feedback action types. Parameters to control virtual objects to perform diverse feedback actions.

Benefits of technology

It achieves diversified feedback of virtual objects, improves resource utilization, provides a rich immersive interactive experience, and enhances the interactivity between interactive objects and virtual objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023131254_03102024_PF_FP_ABST
    Figure CN2023131254_03102024_PF_FP_ABST
Patent Text Reader

Abstract

A virtual object interaction method, comprising: when there is a virtual object in a 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 (202); when the color value at the interaction position represents that the interaction operation acts on the virtual object, determining a part of the virtual object matched with the color value at the interaction position, and acquiring attitude data of the virtual object (204); on the basis of pre-configured mapping relationships among attitudes of the virtual object, parts of the virtual object, and feedback action types, determining a first feedback action type matched with the attitude data and the matched part (206); determining an attitude change parameter of a feedback action of the first feedback action type relative to the matched part (208); and on the basis of the attitude change parameter, controlling the virtual object to execute a feedback action corresponding to the matched part (210).
Need to check novelty before this filing date? Find Prior Art

Description

Virtual object interaction method, device, computer equipment and storage medium

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 2023103312555, filed on March 30, 2023, entitled “Virtual Object Interaction Method, Apparatus, Computer Device and Storage Medium,” the entire text of which is hereby incorporated by reference. Technical Field

[0003] 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

[0004] With the development of computer technology, virtual object interaction applications have emerged, through which interactive objects can interact with virtual objects. For example, virtual objects can be virtual characters, virtual pets, etc.

[0005] Conventional virtual object interaction involves controlling a virtual object to execute a preconfigured, one-time feedback action in response to an interactive operation triggered by the virtual object within a virtual object interaction application. However, current virtual object interaction methods, which only control virtual objects to execute preconfigured, one-time feedback actions through interactive operations, suffer from a single, limited virtual object interaction method, failing to fully utilize virtual object resources and resulting in low resource utilization.

[0006] Summary of the Invention

[0007] According to various embodiments provided in the present application, a virtual object interaction method, apparatus, computer device, computer-readable storage medium, and computer program product are provided.

[0008] In a first aspect, the present application provides a virtual object interaction method, which is executed by a computer device and includes:

[0009] When a virtual object exists in a 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;

[0010] When the color value at the interaction position represents that the interaction operation acts on the virtual object, based on the color value at the interaction position, from a preconfigured correspondence between parts of the virtual object and color values, determining a part of the virtual object that matches the color value at the interaction position, and obtaining posture data of the virtual object, the posture data being used to describe the posture of the virtual object;

[0011] Determining a first feedback action type that matches the posture data and the matched part based on a preconfigured mapping relationship between the posture of the virtual object, the part of the virtual object, and the feedback action type;

[0012] determining a calculation method for posture change parameters corresponding to the first feedback action type, and determining posture change parameters of the feedback action of the first feedback action type relative to the matched part based on the calculation method for the posture change parameters, wherein the posture change parameters refer to parameters used to control the posture change of the virtual object; and

[0013] Based on the posture change parameter, the virtual object is controlled to perform the feedback action corresponding to the matched part.

[0014] On the other hand, the present application also provides a virtual object interaction device, comprising:

[0015] a color value recognition module configured to, when a virtual object exists in a virtual scene and in response to an interaction operation triggered in the virtual scene, identify a color value at an interaction position indicated by the interaction operation;

[0016] a part matching module configured to, when the color value at the interaction position represents that the interaction operation acts on the virtual object, determine, based on the color value at the interaction position, a part of the virtual object that matches the color value at the interaction position from a preconfigured correspondence between parts of the virtual object and color values, and obtain posture data of the virtual object, the posture data being used to describe the posture of the virtual object;

[0017] a feedback action type determination module, configured to determine a first feedback action type that matches the posture data and the matched part based on a preconfigured mapping relationship between the posture of the virtual object, the part of the virtual object, and the feedback action type;

[0018] a posture change parameter determination module, configured to determine a calculation method for posture change parameters corresponding to the first feedback action type, and based on the calculation method for posture change parameters, determine posture change parameters of the feedback action of the first feedback action type relative to the matched part, wherein the posture change parameters are parameters used to control the posture change of the virtual object;

[0019] 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.

[0020] In another aspect, the present application provides a virtual object interaction method, which is executed by a computer device and includes:

[0021] Displaying a virtual scene, wherein a virtual object obtained by shaping an original model exists in the virtual scene; the virtual object retains parts of the original model;

[0022] In the case of displaying a virtual object posture, in response to an interaction operation triggered in the virtual scene, displaying an interaction position indicated by the interaction operation, and identifying a color value at the interaction position indicated by the interaction operation; and

[0023] When the color value at the interaction position indicates that the interaction position belongs to any part of the virtual object, a posture change parameter of the part where the interaction position is located is determined, and based on the posture change parameter, 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.

[0024] On the other hand, the present application also provides a virtual object interaction device, comprising:

[0025] A virtual scene display module, configured to display a virtual scene containing a virtual object obtained by shaping the original model, wherein the virtual object retains parts of the original model;

[0026] an interaction position display module, configured to, in response to an interaction operation triggered in the virtual scene while displaying the posture of the virtual object, display the interaction position indicated by the interaction operation and identify the color value at the interaction position indicated by the interaction operation;

[0027] A posture change display module is used to determine the posture change parameters of the part where the interaction position is located when the color value at the interaction position indicates that the interaction position belongs to any part of the virtual object, and based on the posture change parameters, display the posture change of the virtual object starting from the virtual object posture to perform a feedback action mapped to the part where the interaction position is located.

[0028] On the other hand, the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the steps of each method embodiment of the present application when executing the computer-readable instructions.

[0029] In another aspect, the present application further provides a computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, perform the steps of various method embodiments of the present application.

[0030] On the other hand, the present application further provides a computer program product, which includes computer-readable instructions, and when the computer-readable instructions are executed by a processor, performs the steps of each method embodiment of the present application.

[0031] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.

[0033] FIG1 is a diagram illustrating an application environment of a virtual object interaction method according to an embodiment;

[0034] FIG2 is a schematic diagram of a flow chart of a virtual object interaction method according to an embodiment;

[0035] FIG3 is a schematic diagram of a posture of a virtual object in one embodiment;

[0036] FIG4 is a schematic diagram of a part-region texture map according to an embodiment;

[0037] FIG5 is a schematic diagram of a color texture map obtained by rendering in one embodiment;

[0038] FIG6 is a schematic diagram of horizontal direction control parameters and vertical direction control parameters in one embodiment;

[0039] FIG7 is a schematic diagram of facial animation parameter ranges in one embodiment;

[0040] FIG8 is a schematic diagram of a virtual cat lowering its head in one embodiment;

[0041] FIG9 is a schematic diagram of a virtual cat looking up in one embodiment;

[0042] FIG10 is a schematic diagram of interactions that are expected to be achieved by virtual pet interactions in one embodiment;

[0043] FIG11 is a flowchart of the interaction from partition to interaction in one embodiment;

[0044] FIG12 is a schematic diagram of a facial sliding interaction in one embodiment;

[0045] FIG13 is a schematic diagram of a foot sliding interaction in one embodiment;

[0046] FIG14 is a schematic diagram of a basic posture of a virtual object in one embodiment;

[0047] FIG15 is a schematic diagram of an animation state machine in one embodiment;

[0048] FIG16 is a schematic diagram of a flow chart of a virtual object interaction method according to an embodiment;

[0049] FIG17 is a schematic diagram of virtual cats of various shapes obtained through a kneading operation in one embodiment;

[0050] FIG18 is a schematic diagram showing an interaction triggering position in one embodiment;

[0051] FIG19 is a block diagram of a virtual object interaction apparatus according to an embodiment;

[0052] FIG20 is a block diagram of a virtual object interaction device according to an embodiment;

[0053] FIG21 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0055] The virtual object interaction method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. In this case, terminal 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process. The data storage system can be integrated on server 104, or placed on the cloud or other servers. A client for implementing virtual object interaction is installed on terminal 102. The client can be an application, a web client, or a sub-application running in the operating environment of a parent application. The terminal 102 obtains from the server 104 a preconfigured correspondence between a virtual object's part and color values, as well as a preconfigured mapping relationship between a virtual object's posture, a virtual object's part, and a feedback action type. When a virtual object exists in a virtual scene, the terminal 102 identifies the color value of an interaction position indicated by the interaction operation in response to an interaction operation triggered in the virtual scene. When the color value at the interaction position indicates that the interaction operation acts on the virtual object, the terminal 102 determines, based on the color value at the interaction position, a part of the virtual object that matches the color value at the interaction position from the preconfigured correspondence between the virtual object's part and color values, and obtains posture data of the virtual object. The posture data is used to describe the posture of the virtual object. Based on the preconfigured mapping relationship between the virtual object's posture, the virtual object's part, and the feedback action type, a first feedback action type that matches the posture data and the matching part is determined. A calculation method for posture change parameters corresponding to the first feedback action type is determined. Based on the calculation method for the posture change parameters, posture change parameters of the feedback action of the first feedback action type relative to the matching part are determined. The posture change parameters are parameters used to control the posture change of the virtual object. Based on the posture change parameters, the virtual object is controlled to perform a feedback action corresponding to the matching part.

[0056] Terminal 102 may include, but is not limited to, various desktop computers, laptops, smartphones, tablet computers, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, and smart car devices. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Server 104 may be implemented as a standalone server or a server cluster consisting of multiple servers.

[0057] In one embodiment, as shown in FIG2 , a virtual object interaction method is provided. The method 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 described by taking the application of the method to a terminal as an example, and includes the following steps:

[0058] Step 202 : When a virtual object exists 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.

[0059] A virtual object refers to an active object in a virtual environment, such as a virtual character or animal. A virtual environment is a virtual environment provided by a client when it runs on a terminal. This virtual environment can be a simulation of the real world, a semi-simulated and semi-imaginary environment, or a purely imaginary environment. For example, a virtual environment can be a three-dimensional virtual environment. For another example, in a three-dimensional virtual environment, a virtual object refers to a virtual character or animal displayed within the three-dimensional virtual environment. A virtual object has its own shape and volume within the three-dimensional virtual environment and occupies a portion of the space within the three-dimensional virtual environment.

[0060] 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.

[0061] 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.

[0062] Specifically, when there is a virtual object in the virtual scene, if the interactive object wants 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.

[0063] In step 204, when the color value at the interaction position represents that the interaction operation acts on the virtual object, based on the color value at the interaction position, the part of the virtual object that matches the color value at the interaction position is determined from the pre-configured correspondence between the parts and color values ​​of the virtual object, and the posture data of the virtual object is obtained, where the posture data is used to describe the posture of the virtual object.

[0064] 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 prone, sideways, or flipping. For example, when the virtual object is a virtual cat, the possible postures can be shown in Figure 3, including standing, squatting, lying prone, and sideways.

[0065] Specifically, when the color value at the interaction location represents an interactive operation on a virtual object, the terminal can determine, based on the color value at the interaction location, the part that matches the color value at the interaction location from a pre-configured correspondence between virtual object parts and color values, and obtain the virtual object's posture data. The pre-configured correspondence between virtual object parts and color values ​​refers to a pre-configured mapping relationship between parts and color values. The color values ​​of different parts vary and can be configured based on the actual application scenario.

[0066] In specific applications, 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 specifically 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, it is possible to determine whether the interactive operation acts on the virtual object by the color value at the interactive position.

[0067] In specific applications, the virtual object can be a virtual animal, such as a virtual cat, and the parts of the virtual object can be divided according to the actual application scenario. For example, the virtual object can be divided into six parts: eyes, ears, face, front paws, body and tail. Each part corresponds to a different color value. For example, the pre-configured correspondence between the parts and color values ​​of the virtual object can be that the eyes correspond to color value 1, the ears correspond to color value 2, the face corresponds to color value 3, the front paws correspond to color value 4, the body corresponds to color value 5 and the tail corresponds 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 color values ​​of the virtual object, it can be determined that the part with the color value matching at the interaction position is the face.

[0068] Step 206 : Determine a first feedback action type that matches the posture data and the matched part based on a pre-configured mapping relationship between the posture of the virtual object, the part of the virtual object, and the feedback action type.

[0069] Among them, the first 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 first 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.

[0070] Specifically, for the same part, when the posture of the virtual object is different, the first feedback action type that matches it may be different. Therefore, when determining the posture data and the matching part, the terminal can determine the posture of the virtual object according to the posture data, and then determine the first feedback action type that matches the posture data and the matching part based on the pre-configured mapping relationship between the posture of the virtual object, the part of the virtual object and the feedback action type. In specific applications, the mapping relationship between the posture of the virtual object, the part of the virtual object and the 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 first feedback action type can be a continuous feedback action. For another example, when the posture is flipping and the part is the face, the first feedback action type can be a single feedback action.

[0071] Step 208, determine the calculation method of the posture change parameters corresponding to the first feedback action type, and based on the calculation method of the posture change parameters, determine the posture change parameters of the feedback action of the first feedback action type relative to the matching part. The posture change parameters refer to the parameters used to control the posture change of the virtual object.

[0072] 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.

[0073] Specifically, upon determining the first feedback action type, the terminal needs to determine, based on the first feedback action type, a calculation method for posture change parameters corresponding to the first feedback action type, and then determine the posture change parameters of the feedback action of the first feedback action type relative to the matching part based on the calculation method for posture change parameters. Different posture change parameter calculation methods are used for different first feedback action types.

[0074] In a specific application, when the first feedback action type is a continuous feedback action, the corresponding posture change parameters may be calculated 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, and determining the posture change parameters corresponding to the continuous operation and the matching part in response to the continuous operation. When the first feedback action type is a single feedback action, the corresponding posture change parameters may be calculated by obtaining 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.

[0075] Step 210: Based on the posture change parameter, the virtual object is controlled to perform a feedback action corresponding to the matched part.

[0076] Specifically, the terminal controls the virtual object to perform a feedback action corresponding to the matched part based on the posture change parameters. In a specific application, the posture change parameters can be animation parameters, and controlling the virtual object to perform a feedback action corresponding to the matched part can be understood as the terminal implementing an animation corresponding to the animation parameters.

[0077] 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 controlling the virtual object 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.

[0078] In a specific application, for a single feedback action, the determined posture change parameter is the posture change parameter of the single feedback action. The terminal then 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 first 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 achieving the ear shake and control the virtual pet to perform the feedback action of shaking the ear corresponding to the ear based on the animation parameters.

[0079] In the above-mentioned virtual object interaction method, when a virtual object exists in a virtual scene, in response to an interaction operation triggered in the virtual scene, the color value at the interaction position indicated by the interaction operation is identified. When the color value at the interaction position represents that the interaction operation is used for the virtual object, based on the color value at the interaction position, the part on the virtual object that matches the color value at the interaction position is determined from the pre-configured correspondence between the parts of the virtual object and the color values. The matching part that needs to be interacted can be determined by using the color value partitioning recognition method. By obtaining the posture data of the virtual object, the posture data and the matching part can be combined to determine the first feedback action type based on the mapping relationship between the pre-configured posture of the virtual object, the part of the virtual object and the feedback action type. Then, based on the determination of the first feedback action type, a calculation method for the posture change parameter corresponding to the first feedback action type can be determined. Based on the calculation method of the posture change parameter, the posture change parameter of the feedback action relative to the matching part is determined, so that the virtual object can be controlled to perform the feedback action corresponding to the matching part based on the posture change parameter. During the entire process, based on the use of color values ​​to determine the matching parts, the matching parts, posture data, and the first feedback action type can be combined to achieve diversified feedback of virtual objects, thereby fully utilizing virtual object resources and improving resource utilization.

[0080] In one embodiment, when a virtual object exists in a 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:

[0081] When a virtual object exists in the virtual scene, in response to an interactive operation triggered in the virtual scene, converting an interactive position indicated by the interactive operation into a first texture coordinate, and rendering a color texture map onto a preconfigured screen rendering texture map, where the color texture map is a texture map obtained by rendering the virtual object based on a part partitioning texture map, where the part partitioning texture map includes color values ​​of various parts of the virtual object;

[0082] Performing texture sampling on a screen rendering texture map of a rendered color texture map according to the first texture coordinate to obtain a texture color value corresponding to the first texture coordinate;

[0083] Based on the texture color value, a color value at an interaction position indicated by the interaction operation is determined.

[0084] 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.

[0085] The color texture map refers to the texture map obtained by rendering the virtual object based on the part-partitioned texture map. The part-partitioned texture map refers to the model map used to draw the surface texture of the virtual object. Each pixel in the part-partitioned texture map corresponds to the surface of the virtual object. In this embodiment, the part-partitioned 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 pixels belonging to the same part in the part-partitioned texture map are the same, and the color values ​​of pixels belonging to different parts are different. In this way, the color values ​​can be used to distinguish different parts of the virtual object.

[0086] The screen rendering texture is a type of texture, also known as a RenderTexture. It's a special type of texture in Unity (a real-time 3D interactive content creation and operation platform). It defines a texture object on the server side. Drawing directly onto this texture is equivalent to drawing directly onto this texture during rendering, which saves copying time. Texture sampling refers to the process of obtaining the color of the corresponding position in the texture map based on the texture coordinates. In this embodiment, this is the process of obtaining the color of the corresponding position in the screen rendering texture map based on the first texture coordinates.

[0087] 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 a first texture coordinate, and render the color texture map onto a preconfigured screen rendering texture map. According to the size of the screen rendering texture map, the first texture coordinate is mapped to the corresponding pixel coordinate on the screen rendering texture map, and the pixel value at the pixel coordinate is used as the texture color value corresponding to the first texture coordinate. Based on the texture color value, the color value at the interaction position indicated by the interaction operation is determined.

[0088] In a specific application, when entering a virtual scene containing a virtual object, the terminal obtains the corresponding part-partitioned texture map of the virtual object, sets the part-partitioned texture map to the corresponding rendering material of the virtual object, and renders the virtual object based on the rendering material to obtain a color texture map. The part-partitioned texture map includes the color values ​​of each part of the virtual object, and the color values ​​of each part are different. The rendering material is information that describes the surface appearance of the virtual object, including appearance, color, texture, smoothness, transparency, etc., and is essentially an instance of a shader.

[0089] In a specific application, the part partitioning method for a 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 shown in Figure 4. The color texture map obtained by rendering the virtual cat based on the part partitioning texture map can be shown in Figure 5 (it should be noted that the color values ​​of the parts are not shown in Figure 5).

[0090] In a specific application, the color values ​​of each part in the part-area texture map can be configured according to the actual application scenario. In this specific application, smaller and more important parts have larger color values, so the importance of parts can be prioritized based on color value. For example, small and important parts such as eyes and ears can have higher color values ​​than parts such as the face and body.

[0091] In a specific application, the terminal can call the rendering interface to render the color texture to the pre-configured screen rendering texture. In a specific application, the called rendering interface can be specifically a command buffer (rendering command buffer), which is a new encapsulated rendering interface newly added by Unity. Its most important function is to predefine a series of rendering instructions and then execute these rendering instructions at the desired time, that is, these rendering instructions can be executed when the rendering interface is called.

[0092] In a specific application, assuming that the size of the screen rendering texture map is X*Y, and the first texture coordinate is (U, V) = (A1, B1), the first texture coordinate is mapped to the screen rendering texture map, and the corresponding pixel coordinates obtained are (A1*X, B1*Y). For example, assuming that the size of the screen rendering texture map is 256*256, and the first texture coordinate is (U, V) = (0.5, 0.5), the first texture coordinate is mapped to the screen rendering texture map, 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.

[0093] In specific applications, the terminal will obtain a color selection range for the interaction location indicated by the interactive operation. This color selection range can be pre-configured according to the actual application scenario. If the color selection range is obtained, the terminal will obtain at least one candidate color value corresponding to the color selection range from the screen rendering texture image based on the color 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 of the interaction location indicated by the interactive operation based on the comparison result.

[0094] 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 performing a color value comparison on at least one candidate color value and the texture color value, the maximum color value among the at least one candidate color value and the texture color value can be determined according to the comparison result, and the color value that appears the most times among the 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 among the at least one candidate color value and the texture color value as the color value at the interaction position indicated by the interaction operation, and can also use the color value that appears the most times among the at least one candidate color value and the texture color value, that is, the color value mode, as the color value at the interaction position indicated by the interaction operation.

[0095] 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 a first texture coordinate, and the color texture map is rendered to a preconfigured screen rendering texture map. Texture sampling is performed on the screen rendering texture map of the rendered color texture map according to the first texture coordinate, so that the texture color value corresponding to the first texture coordinate can be obtained, so that the color value at the interactive position indicated by the interactive operation can be determined based on the texture color value, thereby realizing accurate color value recognition.

[0096] In one embodiment, the virtual object interaction method further includes:

[0097] When the cumulative interaction time corresponding to the matched parts meets the first cumulative feedback triggering condition, the cumulative feedback event is triggered;

[0098] In response to the accumulated feedback event, the virtual object is controlled to perform a feedback action mapped to the accumulated feedback event corresponding to the matched part.

[0099] The cumulative interaction time refers to the interaction time for the matched parts. The first cumulative feedback trigger condition refers to the condition for triggering a cumulative feedback event based on the cumulative interaction time, which can be configured according to the actual application scenario. For example, the first cumulative feedback trigger condition can specifically refer to the cumulative interaction time reaching a preconfigured time. The preconfigured time can be configured according to the actual application scenario. The cumulative feedback event refers to the event that provides feedback on the cumulative interactions.

[0100] Specifically, the terminal will count the cumulative interaction time corresponding to the matched parts. When the cumulative interaction time corresponding to the matched parts meets the first cumulative feedback trigger condition, the terminal will trigger a cumulative feedback event. In response to the cumulative feedback event, the terminal controls the virtual object to perform the feedback action mapped by the cumulative feedback event corresponding to the matched parts, thereby realizing feedback on the cumulative interaction. In specific applications, for different parts of the body, 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.

[0101] In this embodiment, when the cumulative interaction time corresponding to the matched parts meets the first cumulative feedback trigger condition, a cumulative feedback event can be triggered. In response to the cumulative feedback event, the virtual object is controlled to execute the feedback action mapped by the cumulative feedback event corresponding to 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.

[0102] In one embodiment, the virtual object interaction method further includes:

[0103] When the cumulative number of interactions corresponding to the matched parts meets the second cumulative feedback triggering condition, a cumulative feedback event is triggered;

[0104] In response to the accumulated feedback event, the virtual object is controlled to perform a feedback action mapped to the accumulated feedback event corresponding to the matched part.

[0105] The cumulative number of interactions refers to the number of interactions for the matching part. The second cumulative feedback trigger condition refers to the condition for triggering a cumulative feedback event based on the cumulative number of interactions, which can be configured according to the actual application scenario. For example, the second cumulative feedback trigger condition can specifically refer to the cumulative number of interactions reaching a preconfigured number. The preconfigured number can be configured according to the actual application scenario. The cumulative feedback event refers to the event that provides feedback on the cumulative interactions.

[0106] Specifically, the terminal will count the cumulative number of interactions with the matching body parts. When the cumulative number of interactions with the matching body parts meets the second cumulative feedback trigger condition, the terminal will trigger a cumulative feedback event. In response to the cumulative feedback event, the terminal will control the virtual object to perform the feedback action mapped by the cumulative feedback event corresponding to the matching body part, thereby providing feedback on the cumulative interactions. In specific applications, for different body parts, the corresponding feedback action mapped by the cumulative feedback event can be configured according to the actual application scenario. For example, when the matching body part is the body, the corresponding feedback action mapped by the cumulative feedback event can be rolling on the ground.

[0107] 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. In response 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 full utilization 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.

[0108] In one embodiment, determining a calculation method for posture change parameters corresponding to the first feedback action type, and determining the posture change parameters of the feedback action of the first feedback action type relative to the matching part based on the calculation method for the posture change parameters includes:

[0109] When the first feedback action type is a continuous feedback action, the interactive operation is used as a starting triggering operation of a continuous operation corresponding to the continuous feedback action;

[0110] 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.

[0111] A continuous feedback action refers to a feedback action generated in response to a continuous operation. A continuous operation refers to an action generated during a continuous interaction between an interactive object and a virtual object. For example, a continuous feedback action may specifically refer to a feedback action generated in response to a continuous sliding operation. A triggering action refers to an action detected by an interactive object during a continuous operation that can trigger a posture change in the virtual object.

[0112] Specifically, when the first 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 will determine the posture change parameters corresponding to the targeted trigger operation and the matching part.

[0113] In a specific application, when the first 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 can specifically refer to the touch screen operation triggered by the interactive object when performing continuous interaction when the targeted virtual scene is displayed.

[0114] 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 determining the posture change parameters corresponding to the targeted trigger operation and the matching part for each trigger operation, the determination of the posture change parameters corresponding to the continuous feedback action can be achieved.

[0115] In one embodiment, determining the posture change parameters corresponding to the targeted trigger operation and the matched part includes:

[0116] Converting the trigger position indicated by the targeted trigger operation into a second texture coordinate, performing texture sampling on the screen rendering texture map of the rendered color texture map according to the second texture coordinate, and determining a color value at the trigger position indicated by the targeted trigger operation;

[0117] Determine the posture change parameters corresponding to the color value at the trigger position and the matching part.

[0118] Specifically, the terminal will convert the trigger position indicated by the targeted trigger operation into a second texture coordinate, and render the color texture map corresponding to the targeted trigger operation onto a preconfigured screen rendering texture map. According to the second texture coordinate, texture sampling is performed on the screen rendering texture map of the rendered color texture map to determine the color value at the trigger position indicated by the targeted trigger operation, and then determine the posture change parameters corresponding to the color value at the trigger position and the matching part.

[0119] 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 virtual object parts and color values, 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.

[0120] In a specific application, if the targeted trigger operation does not act on the virtual object, indicating that the targeted trigger operation acts on the background area of ​​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 part as the posture change parameters. If the targeted trigger operation meets the virtual scene lens switching interaction conditions, the terminal will determine that the interaction method 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.

[0121] In a specific application, the virtual scene shot switching interaction condition can be configured according to the actual application scenario. For example, the virtual scene shot switching interaction condition can specifically be that no triggering operation has been performed on the virtual object for N seconds before the triggering operation targeted by the continuous operation. Where N can be configured according to the actual application scenario.

[0122] In this embodiment, by first determining the color value at the trigger position indicated by the targeted trigger operation, the posture change parameter can be determined by combining the determined color value with the matching position.

[0123] In one embodiment, determining the posture change parameter corresponding to the color value at the trigger position and the matching part includes:

[0124] 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.

[0125] 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 parts and color values ​​of the virtual object. When the part corresponding to the color value at the trigger position is the same as the matched part, it means that the targeted trigger operation acts on the matched part. The terminal will directly calculate the posture change parameters based on the trigger position and the matched part to obtain the posture change parameters.

[0126] 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 facial animation parameters based on the trigger position. For the feet, the movement position of the bone point 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 point and the movement position of the parent bone points of all levels on the bone point where the foot bone point is located based on the trigger position.

[0127] 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.

[0128] 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:

[0129] Get the screen range of the virtual object's face and the screen position of the face center bone point;

[0130] Determine the position offset between the screen position and the trigger position;

[0131] Determining animation parameters corresponding to the facial animation parameter range and the trigger position based on the position offset and the facial animation parameter range corresponding to the screen range;

[0132] Based on the animation parameters corresponding to the trigger position, the posture change parameters are obtained.

[0133] The screen range refers to the approximate range of the virtual object's face on the terminal screen. The facial center skeletal point refers to the screen position of the skeletal point that serves as the face's center. The facial center can be configured according to the actual application scenario. For example, the facial center can be a specific part of the face. For example, the facial center can be the nose, eyes, mouth, etc. The facial animation parameter range refers to the range of animation parameters used to control the virtual object to perform feedback actions corresponding to the face, and can be configured according to the actual application scenario.

[0134] 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.

[0135] In specific applications, the focal length of the virtual camera in the virtual scene can be directly obtained using a preconfigured focal length acquisition function. Obtaining the screen range of the virtual object's face can be understood as obtaining the size of the viewing cone at a certain distance from the virtual camera. Once the focal length is obtained, the screen range of the virtual object's face can be directly calculated using a preconfigured screen range calculation function. This 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.

[0136] 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. 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.

[0137] 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:

[0138] 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;

[0139] The horizontal direction control parameter and the interpolated vertical direction control parameter are used as posture change parameters.

[0140] As shown in FIG6 , in order to simulate as closely as possible the real-world feedback of a virtual object rubbing its head or scratching its chin, two parameters, namely a horizontal control parameter and a vertical control parameter, can be used to control the horizontal and vertical rotation of the virtual object's face, respectively. These two parameters, when combined, can achieve a 360-degree rotation of the virtual object's face within a certain range. Furthermore, as shown in FIG6 , in addition to the horizontal and vertical control parameters, other parameters (including parameters 1, 2, 3, 4, 5, 6, and 7 as shown in FIG6 ) can also be used to control the virtual object's feedback action. The initial vertical parameters of the face refer to the parameters that control the vertical rotation of the virtual object's face before the trigger operation is triggered.

[0141] 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.

[0142] 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 shown in Figure 7, wherein the nose as the face center is used as the boundary to control the virtual cat to shake left and right, and the range of its horizontal control parameters is [-1 1]. When controlling the virtual cat to shake up and down, as shown in Figure 8, when touching the virtual cat's head, the virtual cat lowers its head and shakes within a range. As shown in Figure 9, when touching the virtual cat's chin, the virtual cat raises its head and shakes. Therefore, the vertical control parameters can be roughly divided into two half areas, the upper half area from the head to the nose has a range of [0-1], and the lower half area from the nose to the chin has a range of [1 0]. As can be seen from Figure 7, there is a sudden change in the vertical direction control parameter at the nose. By performing smooth interpolation between the initial vertical direction parameter and the vertical direction control parameter, the interpolated vertical direction control parameter is obtained. The interpolated vertical direction control parameter is used to control the up and down rotation of the virtual object's face. This is equivalent to performing a short animation blend when switching between the upper and lower half areas, which can increase the damping effect and make the up and down rotation of the virtual object's face smoother and more natural.

[0143] 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 virtual object's face smoother and more natural.

[0144] In one embodiment, the matched part is the foot; the posture change parameters are calculated based on the trigger position and the matched part, and the posture change parameters obtained include:

[0145] Get 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;

[0146] 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 the moving position of the foot bone point;

[0147] The movement of the bone points is deduced based on the movement positions of the foot bone points to obtain the posture change parameters.

[0148] 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.

[0149] 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 as the plane intersection of the trigger position relative to the plane where the virtual object is located. The plane intersection is used as the moving position of the foot bone point, and then the movement of the bone point is deduced based on the moving position of the foot bone point by reverse deduction to obtain the posture change parameters.

[0150] In specific applications, 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 can directly obtain the plane where the virtual object is located calculated at the start trigger operation.

[0151] In a specific application, each skeleton point of the virtual object has a corresponding world position and identifier, which is determined when the virtual object is constructed. The terminal can directly obtain the world position of the foot skeleton point based on the identifier of the foot skeleton 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 skeleton 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 skeleton point. The world position of the foot skeleton 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.

[0152] In this embodiment, by obtaining the plane of the virtual object based on the world position of the foot skeleton 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 skeleton point. The moving position of the foot skeleton point can be determined, and the movement of the bone point can be deduced based on the moving position of the foot skeleton point to achieve the determination of the posture change parameters.

[0153] In one embodiment, the posture change parameters obtained by deriving the movement of the foot skeleton points based on their movement positions include:

[0154] When the foot bone point movement position is within the foot interaction range, the bone point movement is deduced based on the foot bone point movement position to obtain the parent bone point movement positions of the parent bone points at all levels on the bone chain where the foot bone point is located;

[0155] 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.

[0156] Specifically, after determining the movement position of the foot bone point, the terminal will determine whether the movement position of the foot bone point is within the interaction range of the foot. If the movement position of the foot bone point is within the interaction range of the foot, the terminal will use inverse dynamics to deduce the movement of the bone point based on the movement position of the foot bone point. That is, reverse deduction is performed to obtain the movement position of the parent bone points of each level of parent bone points on the skeletal chain where the foot bone point is located. Then, 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. Among them, inverse dynamics is a method of determining the position of the entire skeletal chain by first determining the position of the child bone and then inversely deriving the position of the n-level parent bone on the skeletal chain where it is located.

[0157] 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 specifically a range of a certain 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, and 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.

[0158] In this embodiment, when the moving position of the foot bone point is within the interaction range of the foot, the bone point movement is deduced based on the moving position of the foot bone point, and the parent bone point moving position of the parent bone points at all levels on the bone chain where the foot bone point is located can be obtained, 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.

[0159] In one embodiment, the posture change parameters obtained based on the movement position of the foot bone point and the movement position of the parent bone point include:

[0160] 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;

[0161] Use the foot movement control parameters and the parent bone point movement position as posture change parameters.

[0162] Specifically, the position of the foot skeleton point before movement refers to the position of the foot skeleton point when the targeted trigger operation is triggered. Based on the position of the foot skeleton point before movement and the moving position of the foot skeleton point, the terminal can determine the foot movement control parameters used to control the movement of the foot skeleton point, and then use the foot movement control parameters and the moving position of the parent skeleton point as posture change parameters.

[0163] In specific applications, the foot movement control parameters are used to gradually accumulate the foot bone point from its pre-movement position to its moved position, which is equivalent to a smooth damping effect, making the foot movement more natural. In a specific application, the foot movement control parameters can be obtained by smoothly interpolating between the pre-movement position and the moved position of the foot bone point.

[0164] In this embodiment, based on the position before movement of the foot skeleton point and the moving position of the foot skeleton point, the foot movement control parameters that control the movement of the foot skeleton point can be determined, so that the foot movement control parameters and the moving position of the parent skeleton point can be used as posture change parameters to realize the determination of the posture change parameters.

[0165] In one embodiment, determining the posture change parameter corresponding to the color value at the trigger position and the matching part includes:

[0166] 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 is determined as the interaction part, and the interaction posture of the virtual object when the trigger operation is triggered is obtained;

[0167] The posture change parameters are calculated based on the interaction part and the interaction posture to obtain the posture change parameters.

[0168] The interactive part update condition refers to the conditions for updating the interactive part and can be configured based on the actual application scenario. For example, the interactive part update condition can specifically be that the triggering operation within M seconds before the triggering operation in the continuous operation is applied to the part corresponding to the color value at the trigger position. Where M can be configured based on the actual application scenario. For example, M can be 0.2, 0.3, etc.

[0169] 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 parts and color values ​​of the virtual object. 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 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 second 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 second feedback action type relative to the interactive part.

[0170] 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.

[0171] In one embodiment, determining the posture change parameter corresponding to the color value at the trigger position and the matching part includes:

[0172] 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.

[0173] 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 parts and color values ​​of the virtual object. 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 conditions. If the part corresponding to the color value at the trigger position does not meet the interactive part update conditions, 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.

[0174] In specific applications, different body parts have different corresponding posture control parameters, and the corresponding posture control parameters for different body 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 feet, the corresponding posture control parameters can be specifically determined by the foot movement control parameters of the previous trigger operation corresponding to the trigger operation. Corresponding to the foot movement control parameters, the posture control parameters are used to gradually reduce the movement of the active foot bone point from the foot bone point movement position to the pre-movement position, which is equivalent to a smooth damping effect, making the foot movement performance 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 active foot bone point moves from the pre-movement position to the foot bone point movement position, and its corresponding posture control parameters can be parameter 4 - parameter 3 - parameter 2 - parameter 1, and the active foot bone point moves from the foot bone point movement position to the pre-movement position.

[0175] 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, which can realize the determination of the posture change parameters.

[0176] In one embodiment, determining a calculation method for posture change parameters corresponding to the first feedback action type, and determining the posture change parameters of the feedback action of the first feedback action type relative to the matching part based on the calculation method for the posture change parameters includes:

[0177] When the first 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;

[0178] An action to be fed back is determined from at least two preconfigured actions, and animation parameters of the action to be fed back are used as posture change parameters of a feedback action of a first feedback action type relative to a matching part.

[0179] A single feedback action is a feedback action that is performed only once, i.e., a one-time feedback action. For example, a single feedback action can specifically refer to a posture change that is performed only once. A feedback action sequence is a sequence consisting of at least two preconfigured actions. The at least two preconfigured actions in a feedback action sequence and the order of the actions can be configured according to the actual application scenario.

[0180] Specifically, when the first feedback action type is a single feedback action, the terminal will obtain the feedback action sequence corresponding to the matching part, which 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 first feedback action type relative to the matching part.

[0181] In specific applications, a feedback action sequence can be composed of a mixed arrangement of single animation feedback actions and one-layer state switching actions. The actions within the feedback action sequence can be arranged and implemented until the feedback action sequence is cleared, returning 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 only performed once, such as a virtual object's ears 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 down, sideways, and lying down.

[0182] 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 first feedback action type relative to the matched part. The feedback action sequence can be used to determine the posture change parameters.

[0183] In one embodiment, the virtual object interaction method further includes:

[0184] When the color value at the interaction position represents that the interaction 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.

[0185] The background area refers to the area of ​​the virtual scene excluding the virtual objects. The lens is a tool for viewing the virtual scene, capturing a portion of the virtual scene to display the virtual scene on the terminal. For example, in a game, the game screen is captured by capturing a portion of the virtual scene through the lens. Interactive objects can view different areas of the virtual scene by controlling the movement of the lens.

[0186] Specifically, after identifying the color value at the interaction location, the terminal uses the color value at the interaction location to determine whether the interaction operation is acting on the background area of ​​the virtual scene. When the color value at the interaction location indicates that the interaction operation is acting on the background area of ​​the virtual scene, the terminal determines that the interaction method corresponding to the color value at the interaction location is a virtual scene lens switching interaction, and executes the virtual scene lens switching operation mapped at the interaction location according to the mapping relationship between the interaction location and the virtual scene lens switching direction. In specific applications, the mapping relationship between the interaction location and the virtual scene lens switching direction can be configured according to the actual application scenario. Through the configuration of this mapping relationship, 360° rotation of the lens can be achieved.

[0187] In specific applications, the terminal can determine whether the interactive operation is affecting the background area of ​​the virtual scene by comparing the color value at the interactive location with a color value threshold. When the color value at the interactive location equals the color value threshold, it indicates that the interactive operation is affecting 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, indicating that when the color value at the interactive location is 0, the interactive operation is determined to be affecting the background area.

[0188] In this embodiment, when the color value at the interaction position represents the interactive operation acting on the background area in the virtual scene, the interaction method corresponding to the color value at the interaction position is determined to be the virtual scene lens switching interaction, and the virtual scene lens switching operation mapped at the interaction position is executed, which can realize interactive feedback on the virtual scene lens switching.

[0189] In one embodiment, the virtual object interaction method of the present application is described by applying it to virtual pet interaction.

[0190] The inventors believe that traditional virtual object interaction has 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 it is impossible to fully utilize the virtual object resources, resulting in low resource utilization.

[0191] Based on this, the present application provides a virtual object interaction method, that is, a solution for virtual object simulated 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 simulated interactions such as click feedback, part dragging, state switching, and part following of virtual objects.

[0192] 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.

[0193] As shown in Figure 10, this is a schematic diagram of the interaction method of the present application applied to virtual pet interaction. Different postures trigger different parts of the virtual object to generate different feedback. 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, when the cumulative interaction time meets the first cumulative feedback trigger condition or the cumulative number of interactions meets the second cumulative feedback trigger condition, a cumulative feedback event will be triggered. 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 the feedback will be added, such as introducing feedback action sequences, to give the interactive object a rich and realistic interactive experience. For example, as shown in Figure 10, through strong feedback + random posture switching, the randomness of the feedback is greatly improved, and you can "stroke the virtual cat until it turns over." In addition, stroking the entire body and stroking sensitive parts will also produce different feedback.

[0194] Specifically, the virtual object interaction method of this 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 technology respectively.

[0195] 1. Partition-to-interaction technology.

[0196] 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. Then, in response to the interactive operation triggered in the virtual scene, the color value at the interactive position indicated by the interactive operation is 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 involved in this application is very small. Therefore, for continuous operations, the trigger operation recognition can be performed on each frame of the virtual scene during the continuous operation process. By identifying the color value, it is possible to switch the interactive position during sliding, such as stroking the head to stroke the body.

[0197] Specifically, the interaction flow chart can be shown in Figure 11. When there is a virtual object in the virtual scene, the terminal will respond to the interaction operation triggered in the virtual scene, and will identify the color value at the interaction position indicated by the interaction operation. When the color value at the interaction position is equal to the color value threshold, it indicates that the interaction operation acts on the background area and enters the lens interaction. When the color value at the interaction position is greater than the color value threshold, it indicates that the interaction operation acts on the virtual object. The terminal will enter the corresponding part interaction through color value judgment. The part interaction includes one-time interaction actions, sliding interaction actions, inverse dynamics interaction actions, and basic posture switching, etc. (Figure 11 only shows one-time interaction actions and sliding interaction actions, among which one-time interaction actions and basic posture switching can be understood as single feedback actions, and sliding interaction actions and inverse dynamics interaction actions can be understood as continuous feedback actions).

[0198] In a specific application, the terminal will determine the part of the virtual object that matches the color value at the interaction position from the correspondence between the parts and color values ​​of the pre-configured virtual objects based on the color value at the interaction position, and obtain the posture data of the virtual object. Based on the mapping relationship between the pre-configured posture of the virtual object, the part of the virtual object and the feedback action type, the terminal determines the first feedback action type that matches the posture data and the matching part, determines the calculation method of the posture change parameters corresponding to the first feedback action type, and based on the calculation method of the posture change parameters, determines the posture change parameters of the feedback action of the first feedback action type relative to the matching part. Based on the posture change parameters, the terminal controls the virtual object to perform the feedback action corresponding to the matching part.

[0199] In a specific application, when entering into part interaction, if the first 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.

[0200] 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 parameters based on the trigger position and the matched part to obtain 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 color value at the trigger position meets the interactive part update condition (as shown in Figure 11, it is continuously away from the current interactive part for 0.3 seconds), the part corresponding to the color value at the trigger position is determined as the interactive part, that is, entering a new part interaction, and obtaining the interactive posture of the virtual object when the trigger operation is triggered, and calculating the posture change parameters based on the interactive part and the interactive posture to obtain 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, the posture control parameters corresponding to the matched part are used as the posture change parameters.

[0201] 2. Face following sliding interaction technology.

[0202] Specifically, to closely simulate the real-world feedback of a virtual object stroking its head or scratching its chin, two parameters—a horizontal control parameter and a vertical control parameter—are typically used to control the horizontal and vertical rotation of the virtual object's face, respectively. These two parameters, combined, enable 360-degree rotation of the virtual object's face within a certain range. In implementing face-following sliding interaction, this solution uses the virtual object's nose as the facial center and uses the nose as the boundary to control the left-right and up-and-down shaking of the virtual object. It should be noted that when controlling the up-and-down shaking, the virtual object's head should be tilted downward and shaken within a certain range when the virtual head is touched, while the head should be tilted upward when the chin is touched. Therefore, the range of the virtual object's facial animation parameters is roughly as shown in Figure 7 (the virtual object in Figure 7 is a virtual cat). The vertical control parameters exhibit a sudden change at the nose. In this application, a short animation blend is used when switching between the upper and lower half zones to achieve smoother and more natural up-and-down rotation of the face.

[0203] In a specific application, as shown in Figure 12, facial sliding interaction is illustrated using a virtual cat as an example. In response to a trigger operation, after entering the facial interaction area based on color value, the terminal first obtains the screen position of the nose bone point. Then, using the focal length, it calculates the approximate range of the virtual cat's face on the screen, i.e., the screen range of the face. The position offset between the screen position and the trigger position is determined. Based on the position offset and the facial animation parameter range corresponding to the screen range, the target value of the animation parameter is calculated, i.e., the animation parameter corresponding to the trigger position within the facial animation parameter range. For the vertical control parameter in the animation parameter corresponding to the trigger position, a smooth damping function is used to smooth the vertical control parameter by interpolation. That is, the initial vertical parameter of the face is obtained. Smooth interpolation is performed between the initial vertical parameter and the vertical control parameter to obtain the interpolated vertical control parameter. The horizontal control parameter and the interpolated vertical control parameter are used as the posture change parameter. This smooth damping function has a spring damping effect and can also limit the maximum change speed.

[0204] 3. Foot inverse dynamics sliding interaction technology.

[0205] Specifically, the expected goal of the foot sliding interaction is that the triggering operation of the interactive object can lead the virtual object's feet 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 virtual object's feet 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.

[0206] In a specific application, as shown in FIG13 , the sliding interaction of the foot is explained by taking a virtual cat as an example of a virtual object. In response to a trigger operation, after entering the foot interaction area (distinguishing between left and right feet) by judging the color value, the terminal will obtain the world position of the foot bone point, and offset the world position of the virtual cat's foot bone point by a fixed preset distance to obtain the interaction center of the foot. The interaction center and the direction of the virtual cat (towards the 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 intersected 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.

[0207] In a specific application, if the moving position of the foot bone point is within the interaction range of the foot, the terminal will deduce the bone point movement based on the moving position of the foot bone point, obtain the parent bone point moving position of the parent bone points at 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.

[0208] In a specific application, during the foot interaction process, a foot movement control parameter will slowly accumulate to move the foot toward the foot bone point. When exiting the foot interaction, the foot movement control parameter will slowly decrease, making the performance of entering and exiting the foot interaction more natural.

[0209] 4. Animation state machine.

[0210] Specifically, to achieve diverse virtual object interactions, this application employs a two-layer state machine to implement the entire interaction framework. Virtual objects themselves have five different basic postures. As shown in Figure 14, taking a virtual cat as an example, these five basic postures include standing, squatting, lying prone, sideways, and reclining. As shown in Figure 15, within the animation state machine, these five basic postures constitute the first-layer state machine. Each of these first-layer postures also contains a second-layer state machine. The second-layer state machine includes a default posture, such as a standing posture loop (i.e., when the virtual cat is in a standing posture, the corresponding fixed animation plays), as well as several interactive postures, referred to here as second-layer postures. These include the face sliding interaction, inverse dynamics sliding interaction, and single-shot animation feedback (e.g., ear twitching) implemented above. In this embodiment, as shown in Figure 15, the virtual cat is divided into multiple different parts, each with a corresponding interactive posture. For the head and body, the entire body can be stroked and triggered accordingly. For sensitive parts such as the left and right ears, eyes, nose, and tail, one-time feedback can be provided. For the left and right legs and hands, inverse dynamics feedback can be triggered.

[0211] When the interactive object interacts with any part, the virtual cat will switch from the current second-layer posture to the next corresponding configured second-layer interactive posture or switch the state of the first-layer state machine. After the interaction ends, 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.

[0212] In specific applications, to implement the above-mentioned two-layer state machine framework, the program implementation layer defines the abstract behavior of the virtual cat. These abstract behaviors include three types: one is single animation feedback (such as shaking the ears), the second is looping animation (facial 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 generate different feedback in different posture interactions and 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 a facial sliding interaction, long pressing and sliding on the feet will trigger an inverse dynamics interaction, and clicking on the ears will trigger an ear shaking animation.

[0213] 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 the default posture is returned. In addition, this application also introduces cumulative counts and random interaction. For example, clicking the ear three times in a row has a probability of switching to the basic posture. The introduced behavior sequence, cumulative count, and random interaction can be configured according to the actual application scenario.

[0214] In one embodiment, as shown in FIG16 , a virtual object interaction method is provided. The method 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 described by taking the application of the method to a terminal as an example, and includes the following steps:

[0215] Step 1602: Display a virtual scene. In the virtual scene, there is a virtual object obtained by shaping the original model. The virtual object retains the parts of the original model.

[0216] Here, the original model refers to a model that has not been sculpted. The virtual object refers to a movable object obtained by sculpting the original model in the virtual environment. The movable object can be a virtual person, 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. To further illustrate, as shown in Figure 17, by sculpting the cat model that has not been sculpted, virtual cats of various sizes can be obtained.

[0217] Specifically, the terminal will display a virtual scene containing a virtual object derived from an original model through a shaping operation. The virtual object retains the parts of the original model. In specific applications, the original model includes multiple parts, and the size of these parts can be changed through the shaping operation. As shown in Figure 17, different virtual cats have different body shapes, which actually means that the sizes of the parts of different cats are not exactly the same. However, different virtual cats all include six parts: eyes, ears, face, front paws, body, and tail. In specific applications, while displaying the virtual object derived from the original model through the shaping operation, the terminal will also display the background area corresponding to the virtual object. This background area can be configured according to the actual application scenario.

[0218] Step 1604 : In the case of displaying the posture of the virtual object, in response to an interaction operation triggered in the virtual scene, display the interaction position indicated by the interaction operation, and identify the color value at the interaction position indicated by the interaction operation.

[0219] 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.

[0220] Specifically, when displaying the virtual object's pose, the terminal retrieves the virtual object's corresponding part-partition texture map, renders the virtual object based on the part-partition texture map, obtains a color texture map, and waits for responses to interactive operations directed at the virtual object. If the interactive object wishes to interact, it initiates an interaction. In response, the terminal displays the interaction location indicated by the interaction operation, allowing the interactive object to intuitively understand the interaction location they have selected and identify the color value at the interaction location indicated by the interaction operation.

[0221] In a specific application, the interactive operation can be the starting trigger operation of a persistent operation. As the persistent operation proceeds, the terminal will display the sliding trigger position of the persistent operation. In a specific application, the virtual object can be a virtual cat. As shown in Figure 18, when the persistent operation is a sliding operation on the virtual cat's body, the terminal will display the corresponding sliding trigger position in the area where the virtual cat's body is located. When the persistent operation is a sliding operation on the area where the virtual cat's head is located, the terminal will display the sliding trigger position in the area where the virtual cat's head is located.

[0222] In a specific application, when the interaction position is determined, the terminal converts the interaction position indicated by the interaction operation into a first texture coordinate, performs color value recognition based on the first texture coordinate, obtains a texture color value corresponding to the first texture coordinate, and obtains the color value at the interaction position indicated by the interaction operation based on the texture color value. In a specific application, while converting the interaction position indicated by the interaction operation into the first texture coordinate, the terminal renders the color texture map onto a preconfigured screen rendering texture map. Based on the first texture coordinate, texture sampling can be performed on the screen rendering texture map that has been rendered with the color texture map to obtain the texture color value corresponding to the first texture coordinate.

[0223] Step 1606: When the color value at the interaction position indicates that the interaction position belongs to any part of the virtual object, determine the posture change parameters of the part where the interaction position is located, and based on the posture change parameters, display the virtual object to change its posture from the virtual object posture to perform a feedback action mapped to the part where the interaction position is located.

[0224] 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 may specifically be the 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 may specifically be posture switching. For example, the posture switching may specifically be the virtual object changing from standing to lying, sitting, sideways, or lying down. For another example, the feedback action mapped to the part where the interaction position is located may specifically 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 may specifically be lowering the head, raising the head, etc.

[0225] Specifically, when the color value at the interaction position indicates that the interaction position belongs to any part of the virtual object, the terminal will determine the posture change parameters of the part where the interaction position is located, and based on the posture change parameters, display the virtual object to change posture from the virtual object posture to perform the feedback action mapped to the part where the interaction position is located. In a specific application, when the color value at the interaction position indicates that the interactive operation acts on the virtual object, the terminal can determine the part where the color value at the interaction position matches, that is, the part where the interaction position is located, from the pre-configured correspondence between the part of the virtual object and the color value, based on the color value at the interaction position, and obtain the posture data of the virtual object, determine a first feedback action type that matches the posture data and the part where the interaction position is located, determine the posture change parameters of the feedback action of the first feedback action type relative to the part where the interaction position is located, and based on the posture change parameters, control the virtual object to perform the feedback action mapped to the part where the interaction position is located.

[0226] The above-mentioned virtual object interaction method, by displaying a virtual scene with a virtual object obtained by a sculpting operation of an original model, and displaying the posture of the virtual object, responds to the interaction operation triggered in the virtual scene, displays the interaction position indicated by the interaction operation, and identifies the color value at the interaction position indicated by the interaction operation, so as to realize direct feedback on the interaction triggering operation, so that when the color value at the interaction position represents that the interaction position belongs to any part of the virtual object, the posture change parameter of the part where the interaction position is located is determined, and based on the posture change parameter, the virtual object is 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. The part where the interaction position is located, the posture of the virtual object and the feedback action can be combined to realize diversified feedback of the virtual object, realize full utilization of virtual object resources, and thus improve resource utilization.

[0227] 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 mapped to the part where the interaction position is located includes:

[0228] When the interaction position belongs to any part of the virtual object, and the first 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 and changes its posture from the virtual object posture to perform the continuous feedback action mapped to the part where the interaction position is located.

[0229] Specifically, when the interaction position belongs to any part of the virtual object, and the first 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. Starting from the starting trigger operation, in response to the continuous operation, the posture change parameters corresponding to the continuous operation and the part where the interaction position is located are determined, 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.

[0230] 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, when controlling the feedback action mapped to the location of the interaction position of the virtual object based on the posture change parameter, for each trigger operation, the terminal will control the virtual object to perform the feedback action corresponding to the targeted trigger operation and the location of the interaction position based on the targeted trigger operation.

[0231] In this embodiment, when the first 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 the virtual object and full utilization of the virtual object resources, thereby improving resource utilization.

[0232] 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 mapped to the part where the interaction position is located includes:

[0233] When the interaction position belongs to any part of the virtual object, and the first 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 and changes its posture from the virtual object posture to perform the single feedback action mapped to the part where the interaction position is located.

[0234] Specifically, when the interaction position belongs to any part of the virtual object, and the first 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 feedback action sequence corresponding to 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.

[0235] In a specific application, for a single feedback action, the determined posture change parameters are the posture change parameters of the single feedback action. The terminal then directly controls the virtual object to perform the feedback action mapped to the location of the interaction position based on the posture change parameters of the single feedback action. In a specific application, assuming that the virtual object is a virtual pet, the matched location is the ear, and the first feedback action type that matches the posture data and the location of the interaction position is a single feedback action, and the feedback action is an ear shake, the terminal can obtain the animation parameters for achieving the ear shake and control the virtual pet to perform the feedback action of shaking the ear corresponding to the ear based on the animation parameters.

[0236] In this embodiment, when the first 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 the virtual object and full utilization of the virtual object resources, thereby improving resource utilization.

[0237] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed 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 portion of steps or stages in other steps.

[0238] Based on the same inventive concept, embodiments of the present application also provide a virtual object interaction device for implementing the aforementioned virtual object interaction method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more virtual object interaction device embodiments provided below can be found in the above-described limitations of the virtual object interaction method and will not be further elaborated here.

[0239] In one embodiment, as shown in FIG19 , a virtual object interaction device is provided, comprising: a color value recognition module 1902 , a part matching module 1904 , a first feedback action type determination module 1906 , a posture change parameter determination module 1908 , and a feedback module 1910 , wherein:

[0240] A color value recognition module 1902 is configured to, when a virtual object exists in the virtual scene and in response to an interaction operation triggered in the virtual scene, recognize a color value at an interaction position indicated by the interaction operation;

[0241] Part matching module 1904 is configured to, when the color value at the interaction location represents an interaction operation acting on the virtual object, determine, based on the color value at the interaction location and from a preconfigured correspondence between virtual object parts and color values, a part of the virtual object that matches the color value at the interaction location, and obtain posture data of the virtual object, the posture data being used to describe the posture of the virtual object;

[0242] A feedback action type determination module 1906 is configured to determine a first feedback action type that matches the posture data and the matching part based on a preconfigured mapping relationship between the posture of the virtual object, the part of the virtual object, and the feedback action type;

[0243] a posture change parameter determination module 1908 for determining a calculation method for posture change parameters corresponding to the first feedback action type, and determining posture change parameters of the feedback action of the first feedback action type relative to the matched part based on the calculation method for posture change parameters, wherein posture change parameters are parameters used to control posture changes of the virtual object;

[0244] 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.

[0245] The above-mentioned virtual object interaction device, when there is a virtual object in the virtual scene, responds to the interaction operation triggered in the virtual scene, identifies the color value at the interaction position indicated by the interaction operation, and when the color value at the interaction position represents that the interaction operation is used for the virtual object, based on the color value at the interaction position, from the pre-configured correspondence between the parts of the virtual object and the color values, determines the part on the virtual object that matches the color value at the interaction position. The method of color value partition recognition can be used to achieve the determination of the matching part that needs to be interacted. By obtaining the posture data of the virtual object, the posture data and the matching part can be combined to achieve the determination of the first feedback action type based on the mapping relationship between the pre-configured posture of the virtual object, the part of the virtual object and the feedback action type. Then, based on the determination of the first feedback action type, the calculation method of the posture change parameter corresponding to the first feedback action type can be determined. Based on the calculation method of the posture change parameter, the posture change parameter of the feedback action relative to the matching part is determined, so that the virtual object can be controlled to perform the feedback action corresponding to the matching part based on the posture change parameter. During the entire process, based on the use of color values ​​to determine the matching parts, the matching parts, posture data, and the first feedback action type can be combined to achieve diversified feedback of virtual objects, thereby fully utilizing virtual object resources and improving resource utilization.

[0246] 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 a first texture coordinate, and render the color texture map onto a preconfigured screen rendering texture map. The color texture map refers to a texture map obtained by rendering the virtual object based on a part partitioning texture map. The part partitioning texture map includes the color values ​​of each part of the virtual object. According to the first texture coordinate, texture sampling is performed on the screen rendering texture map of the rendered color texture map to obtain the texture color value corresponding to the first texture coordinate. Based on the texture color value, the color value at the interactive position indicated by the interactive operation is determined.

[0247] In one embodiment, the feedback module is also used to trigger a cumulative feedback event when the cumulative interaction time corresponding to the matched part meets the first cumulative feedback trigger condition, and in response to the cumulative feedback event, control the virtual object to perform the feedback action mapped by the cumulative feedback event corresponding to the matched part.

[0248] In one embodiment, the feedback module is also used to trigger a cumulative feedback event when the cumulative number of interactions corresponding to the matched parts meets a second cumulative feedback trigger condition, and in response to the cumulative feedback event, control the virtual object to perform a feedback action mapped by the cumulative feedback event corresponding to the matched parts.

[0249] In one embodiment, the posture change parameter determination module is also used to, when the first 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, respond to each trigger operation in the continuous operation, and determine the posture change parameters corresponding to the targeted trigger operation and the matching part for each trigger operation.

[0250] In one embodiment, the posture change parameter determination module is also used to convert the trigger position indicated by the targeted trigger operation into a second texture coordinate, perform texture sampling on the screen rendering texture map of the rendered color texture map according to the second texture coordinate, determine the color value at the trigger position indicated by the targeted trigger operation, and determine the posture change parameters corresponding to the color value at the trigger position and the matching part.

[0251] In one embodiment, the posture change parameter determination module is further configured 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.

[0252] In one embodiment, the matched part is the face; the posture change parameter determination module is further used to obtain the screen range of the face of the virtual object and the screen position of the facial center bone point, determine the position offset between the screen position and the trigger position, and determine the animation parameters corresponding to the trigger position within the facial animation parameter range based on the position offset and the screen range; and obtain the posture change parameters based on the animation parameters corresponding to the trigger position.

[0253] 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.

[0254] 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. The bone point movement is deduced based on the moving position of the foot bone point to obtain the posture change parameter.

[0255] In one embodiment, the posture change parameter determination module is also used to derive the movement of the bone point based on the movement position of the foot bone point when the movement position of the foot bone point is within the interaction range of the foot, obtain the movement position of the parent bone point of each level of the parent bone point on the bone chain where the foot bone point is located, and obtain the posture change parameter based on the movement position of the foot bone point and the movement position of the parent bone point.

[0256] 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 skeleton point based on the pre-movement position of the foot skeleton point and the moving position of the foot skeleton point, and use the foot movement control parameters and the moving position of the parent skeleton point as posture change parameters.

[0257] 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 matched 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.

[0258] 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.

[0259] 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 first 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 first feedback action type relative to the matching part.

[0260] 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.

[0261] In one embodiment, as shown in FIG20 , 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:

[0262] The virtual scene display module 2002 is used to display a virtual scene, in which a virtual object obtained by shaping the original model exists; the virtual object retains the parts of the original model;

[0263] An interaction position display module 2004 is configured to, in the case of displaying the posture of the virtual object, display the interaction position indicated by the interaction operation in response to the interaction operation triggered in the virtual scene, and identify the color value at the interaction position indicated by the interaction operation;

[0264] The posture change display module 2006 is used to determine the posture change parameters of the part where the interaction position is located when the color value at the interaction position represents that the interaction position belongs to any part of the virtual object. Based on the posture change parameters, 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.

[0265] The above-mentioned virtual object interaction device displays a virtual scene with a virtual object obtained by a sculpting operation of an original model. When displaying the posture of the virtual object, it responds to the interaction operation triggered in the virtual scene, displays the interaction position indicated by the interaction operation, and identifies the color value at the interaction position indicated by the interaction operation. It can realize direct feedback on the interaction triggering operation, so that when the color value at the interaction position represents that the interaction position belongs to any part of the virtual object, it can determine the posture change parameters of the part where the interaction position is located. Based on the posture change parameters, the virtual object is 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 posture of the virtual object and the feedback action, realize full utilization of virtual object resources, and thus improve resource utilization.

[0266] In one embodiment, the posture change display module is also used to display the posture change of the virtual object from the virtual object posture when the interaction position belongs to any part of the virtual object and the first feedback action type that matches 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.

[0267] In one embodiment, the posture change display module is also used to display the posture change of the virtual object from the virtual object posture when the interaction position belongs to any part of the virtual object and the first feedback action type that matches 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.

[0268] Each module in the aforementioned virtual object interaction device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0269] In one embodiment, a computer device is provided. The computer device can be either a terminal or a server. Taking the terminal as an example, its internal structure diagram can be shown in Figure 21. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and 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 computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless communication. The wireless communication method can be implemented via Wi-Fi, a mobile cellular network, NFC (near-field communication), or other technologies. When executed by the processor, the computer-readable instructions implement a virtual object interaction method. 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 covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0270] Those skilled in the art will understand that the structure shown in Figure 21 is merely a block diagram of a portion 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 shown in the figure, or combine certain components, or have a different component arrangement.

[0271] In one embodiment, a computer device is further provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps in the above-mentioned method embodiments when executing the computer-readable instructions.

[0272] In one embodiment, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0273] In one embodiment, a computer program product is provided, comprising computer-readable instructions, which implement the steps in the above-mentioned method embodiments when executed by a processor.

[0274] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of 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 the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0275] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned 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.

[0276] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A virtual object interaction method, executed by a computer device, comprising: 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, according to the color value at the interaction position, from a preconfigured correspondence between the parts of the virtual object and the color values, determine a part on the virtual object that matches the color value at the interaction position, and obtain posture data of the virtual object, wherein the posture data is used to describe the posture of the virtual object; Determine a first feedback action type that matches the posture data and the matched part based on a preconfigured mapping relationship between the posture of the virtual object, the part of the virtual object, and the feedback action type; Determining a calculation method for a posture change parameter corresponding to the first feedback action type, and determining a posture change parameter of the feedback action of the first feedback action type relative to the matched part based on the calculation method for the posture change parameter, wherein the posture change parameter refers to a parameter used to control the posture change of the virtual object; and 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, wherein 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 comprises: 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 a first texture coordinate, and a color texture map is rendered onto a preconfigured screen rendering texture map, wherein the color texture map refers to a texture map obtained by rendering the virtual object based on a part partitioning texture map, wherein the part partitioning texture map includes color values ​​of each part of the virtual object; According to the first texture coordinate, texture sampling is performed on a screen rendering texture map of a rendered color texture map to obtain a texture color value corresponding to the first texture coordinate; and 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, further comprising: When the accumulated interaction time corresponding to the matched parts meets the first accumulated feedback triggering condition, a accumulated feedback event is triggered; and 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 claim 1, further comprising: When the accumulated number of interactions corresponding to the matched parts meets the second accumulated feedback triggering condition, a accumulated feedback event is triggered; and 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.

5. According to the method of any one of claims 1 to 4, the determining a calculation method of the posture change parameter corresponding to the first feedback action type, and determining the posture change parameter of the feedback action of the first feedback action type relative to the matching part based on the calculation method of the posture change parameter comprises: When the first 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; and 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.

6. The method according to claim 5, wherein determining the posture change parameter corresponding to the targeted trigger operation and the matched part comprises: The trigger position indicated by the targeted trigger operation is converted into a second texture coordinate, and texture sampling is performed on the screen rendering texture map of the rendered color texture map according to the second texture coordinate to determine the color indicated by the targeted trigger operation. The color value at the trigger position; and Determine a posture change parameter corresponding to the color value at the trigger position and the matched part.

7. The method according to claim 6, characterized in that The determining of the posture change parameters 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.

8. The method according to claim 7, wherein the matched part is a face; and the posture change parameter is calculated based on the trigger position and the matched part to obtain the posture change parameter, comprising: 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 an animation parameter corresponding to a trigger position within the facial animation parameter range based on the position offset and the facial animation parameter range corresponding to the screen range; and Based on the animation parameters corresponding to the trigger position, posture change parameters are obtained.

9. The method according to claim 8, wherein the animation parameters corresponding to the trigger position include horizontal direction control parameters and vertical direction control parameters; and obtaining the posture change parameters based on the animation parameters corresponding to the trigger position includes: 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; and The horizontal direction control parameter and the interpolated vertical direction control parameter are used as posture change parameters.

10. The method according to claim 7, wherein the matched part is a foot; and the posture change parameter is calculated based on the trigger position and the matched part to obtain the posture change parameter, comprising: Get 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 moving position of the foot bone point; and The movement of the bone points is deduced based on the movement positions of the bone points of the foot to obtain posture change parameters.

11. The method according to claim 10, wherein the step of deriving the movement of the bone points based on the movement positions of the bone points of the foot to obtain the posture change parameters comprises: When the movement position of the foot bone point is within the interaction range of the foot, bone point movement derivation is performed based on the movement position of the foot bone point to obtain the movement positions of the parent bone points of each level on the bone chain where the foot bone point is located; and 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.

12. The method according to claim 11, wherein obtaining the posture change parameter based on the movement position of the foot bone point and the movement position of the parent bone point comprises: 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; and The foot movement control parameter and the parent skeleton point movement position are used as posture change parameters.

13. The method according to claim 7, wherein determining the posture change parameter corresponding to the color value at the trigger position and the matched part comprises: 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; and A posture change parameter is calculated based on the interaction part and the interaction posture to obtain the posture change parameter.

14. The method according to claim 7, wherein determining the posture change parameter corresponding to the color value at the trigger position and the matched part comprises: When the color value corresponding to the trigger position is different from the matching part and the trigger position corresponds to The part does not meet the interactive part update condition, and the posture control parameters corresponding to the matched part are used as posture change parameters.

15. According to the method of any one of claims 1 to 4, the determining a calculation method of the posture change parameter corresponding to the first feedback action type, and determining the posture change parameter of the feedback action of the first feedback action type relative to the matching part based on the calculation method of the posture change parameter comprises: When the first 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; 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 posture change parameters of the feedback action of the first feedback action type relative to the matching part.

16. The method according to any one of claims 1 to 15, further comprising: 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.

17. A virtual object interaction method, executed by a computer device, comprising: Displaying a virtual scene, wherein a virtual object obtained by shaping the original model exists in the virtual scene, and 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, and identifying a color value at the interaction position indicated by the interaction operation; and When the color value at the interaction position represents that the interaction position belongs to any part of the virtual object, a posture change parameter of the part where the interaction position is located is determined, and based on the posture change parameter, the virtual object is displayed to change its posture from the virtual object posture to execute a feedback action mapped to the part where the interaction position is located.

18. A virtual object interaction device, the device comprising: 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, when the color value at the interaction position represents that the interaction operation acts on the virtual object, determine, according to the color value at the interaction position, from a preconfigured correspondence between the part and the color value of the virtual object, a part on the virtual object that matches the color value at the interaction position, and obtain posture data of the virtual object, wherein the posture data is used to describe the posture of the virtual object; A feedback action type determination module, configured to determine a first feedback action type that matches the posture data and the matching part based on a preconfigured mapping relationship between the posture of the virtual object, the part of the virtual object and the feedback action type; a posture change parameter determination module, used to determine a calculation method of the posture change parameter corresponding to the first feedback action type, and based on the calculation method of the posture change parameter, determine the posture change parameter of the feedback action of the first feedback action type relative to the matched part, wherein the posture change parameter refers to a parameter used to control the posture change of the virtual object; 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.

19. A virtual object interaction device, the device comprising: A virtual scene display module, used for displaying a virtual scene, wherein the virtual scene contains a virtual object obtained by shaping the original model, and the virtual object retains the parts of the original model; An interaction position display module, configured to display an interaction position indicated by an interaction operation triggered in the virtual scene while displaying the posture of the virtual object, and identify a color value at the interaction position indicated by the interaction operation; A posture change display module is used to determine the posture change parameter of the part where the interactive position is located when the color value at the interactive position indicates that the interactive position belongs to any part of the virtual object, and based on the posture change parameter, display the posture change of the virtual object from the posture of the virtual object to perform the mapping of the part where the interactive position is located. feedback action.

20. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method according to any one of claims 1 to 17 when executing the computer-readable instructions.

21. A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 17.

22. A computer program product comprising computer readable instructions, which when executed by a processor implement the steps of the method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Automatic coloring method and device based on image segmentation

    CN104044352A

  • Game control method and device, equipment and storage medium

    CN112870700A

  • 3D object rendering method and device

    CN114565707A

  • Image processing device and image processing method, program and program recording medium, and data and data recording medium

    JP2002269568A

  • Object recognition system

    JP2007179455A