Virtual scene interaction processing method and device, electronic equipment and storage medium

By adjusting the pose of the virtual object frame by frame in the virtual scene, it naturally transitions to the reference pose, the problem of stiff movement of the virtual object in the prior art is solved, and the user experience and interaction fluency are improved.

CN119701359APending Publication Date: 2025-03-28TENCENT DIGITAL TIANJIN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311276899.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art uses rigid actions to affect user experience when interacting between virtual objects and interactive objects in virtual scenes.

Method used

By displaying virtual objects and interactive objects in the virtual scene, obtaining the current pose in response to interaction conditions, determining the ratio of the pose difference value to the transition frame number as the pose adjustment value, and adjusting the pose of the virtual object frame by frame, so that it naturally transitions to the reference pose.

Benefits of technology

It realizes a natural and smooth transition of interactive actions in virtual scenes, improves user experience, avoids multiple triggers of interactive controls, and reduces resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119701359A_ABST
    Figure CN119701359A_ABST
Patent Text Reader

Abstract

The invention provides an interactive processing method and device of a virtual scene, electronic equipment and a storage medium. The method comprises the following steps: displaying a virtual object and an interactive object in a virtual scene; responding to the condition that the virtual object meets the interaction condition between the virtual object and the interactive object at the first moment, and obtaining the current pose of the virtual object at the first moment; the pose difference value between the current pose and a reference pose is determined, and the reference pose is the initial pose of the virtual object in interaction with the interactive object; the ratio of the pose difference value to the number of transition frames is determined to serve as a pose adjustment value, and the number of transition frames is the number of image frames between the first moment and the second moment; and controlling the virtual object to implement the pose adjustment value in each image frame from the first moment until the second moment is reached. According to the method and the device, the interaction action in the virtual scene can be naturally and smoothly transited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer human-computer interaction technology, and in particular to a method, device, electronic device and storage medium for interactive processing of a virtual scene. Background Art

[0002] With the development of computer technology, electronic devices can realize richer and more vivid virtual scenes. Virtual scenes refer to digital scenes drawn by computers through digital communication technology. Users can get a completely virtualized experience of vision, hearing, etc. (such as virtual reality) or a partially virtualized experience (such as augmented reality) in virtual scenes, and can control objects in virtual scenes to interact and get feedback.

[0003] When it is necessary to control a virtual object to move from its current position to another position in a virtual scene, the relevant technology usually adopts a method of controlling the virtual object to move directly. For example, controlling the virtual object to forcibly move from its current position to another position causes the virtual object to move stiffly, affecting the user experience. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device, computer program product and computer-readable storage medium for interactive processing of a virtual scene, which can enable a natural and smooth transition of interactive actions in a virtual scene.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present invention provides a method for interactively processing a virtual scene, the method comprising:

[0007] Displaying virtual objects and interactive objects in a virtual scene;

[0008] In response to the virtual object satisfying an interaction condition between the virtual object and the interactable object at a first moment, acquiring a current position and posture of the virtual object at the first moment;

[0009] Determining a posture difference between the current posture and a reference posture, wherein the reference posture is an initial posture of the virtual object in the interaction with the interactive object;

[0010] Determine a ratio of the posture difference value to the transition frame number as a posture adjustment value, wherein the transition frame number is the number of image frames between the first moment and the second moment;

[0011] The virtual object is controlled to implement the posture adjustment value in each image frame starting from the first moment until the second moment is reached.

[0012] The present application provides a virtual scene interactive processing device, the device comprising:

[0013] A display module, used for displaying virtual objects and interactive objects in a virtual scene;

[0014] an acquisition module, configured to acquire a current position and posture of the virtual object at the first moment in response to the virtual object satisfying an interaction condition between the virtual object and the interactable object at the first moment;

[0015] A first determination module, configured to determine a posture difference between the current posture and a reference posture, wherein the reference posture is an initial posture of the virtual object in the interaction with the interactive object;

[0016] A second determination module is used to determine a ratio of the posture difference value to the transition frame number as a posture adjustment value, wherein the transition frame number is the number of image frames between the first moment and the second moment;

[0017] A data adjustment module is used to control the virtual object to implement the posture adjustment value in each image frame starting from the first moment until the second moment is reached.

[0018] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0019] A memory for storing computer executable instructions;

[0020] The processor is used to implement the interactive processing method of the virtual scene provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0021] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the interactive processing method of a virtual scene provided in the embodiment of the present application when executed by a processor.

[0022] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the interactive processing method of the virtual scene provided in the embodiment of the present application is implemented.

[0023] The embodiments of the present application have the following beneficial effects:

[0024] By converting the current posture of the virtual object at the first moment to the reference posture at the second moment frame by frame, the interaction process between the virtual object and the interactive object is made more natural, and the virtual object is adjusted to the reference posture, which makes it easier to trigger the interactive control, avoids multiple triggering, and reduces resource waste. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1A It is a schematic diagram of an application mode of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0026] Figure 1B It is a schematic diagram of an application mode of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0027] Figure 2 is a schematic diagram of the structure of the terminal 400 provided in an embodiment of the present application;

[0028] Figure 3A It is a first flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application;

[0029] Figure 3B It is a second flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application;

[0030] Figure 3C 3 is a schematic diagram of a third flow chart of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0031] Figure 3D It is a fourth flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application;

[0032] Figure 3E It is a fifth flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application;

[0033] Figure 3F It is a sixth flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application;

[0034] Figure 3G 7 is a schematic diagram of a seventh flow chart of a method for interactive processing of a virtual scene provided in an embodiment of the present application;

[0035] Figure 3H It is an eighth flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application;

[0036] Figure 4A It is a first schematic diagram of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0037] Figure 4B is a second schematic diagram of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0038] Figure 4C is a third schematic diagram of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0039] Figure 4D is a fourth schematic diagram of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0040] Figure 4E is a fifth schematic diagram of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0041] Figure 5 It is a flowchart of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application;

[0042] Figure 6 Schematic diagram of the position and posture of the virtual object in the world coordinate system provided by this embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0044] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0045] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0046] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0047] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0048] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0049] 1) A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal device. The virtual scene can be a simulation of the real world, a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, a virtual scene may include the sky, land, ocean, etc. The land may include environmental elements such as deserts and cities, and users can control virtual objects to move in the virtual scene.

[0050] 2) Virtual objects, movable objects in a virtual scene. The movable objects may be virtual characters, virtual animals, cartoon characters, etc. The virtual object may be a virtual image in the virtual scene that represents a user, or a user character that is controlled by operations on a client. A virtual scene may include multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a portion of the space in the virtual scene.

[0051] 3) Interactive objects, also known as non-player characters (NPCs), are images of various people and objects that can interact in the virtual scene and are not controlled by real players. For example, they can be artificial intelligence (AI) trained to fight in the virtual scene. Interactive objects can be virtual characters, virtual animals, cartoon characters, etc., such as people, animals, plants, oil drums, walls, stones, etc. displayed in the virtual scene. The number of interactive objects participating in the interaction in the virtual scene can be pre-set or dynamically determined during the operation of the virtual scene.

[0052] 4) Pose, which describes the position, posture and orientation of the virtual object in the world coordinate system. Position refers to the coordinates of the center or reference point of the virtual object in three-dimensional space, usually represented by three real numbers; posture refers to a physical state maintained by the virtual object in the virtual scene, such as holding a prop, empty-handed, etc.; orientation refers to the direction the virtual object faces in three-dimensional space, which can be represented by rotation matrix, Euler angle or quaternion.

[0053] 5) World coordinate system. In a virtual scene, the world coordinate system is used to describe the position and direction of objects in the virtual scene. Its main functions are: displaying the three-dimensional coordinates of the target object and determining the position of the target object based on the origin. The origin in the world coordinate system can be the center point of the virtual scene, the horizontal coordinate axis (x-axis) can be a straight line passing through the origin and parallel to the boundary line of the virtual scene, the longitudinal coordinate axis (y-axis) is a straight line in the same horizontal plane as the x-axis, passing through the origin and perpendicular to the horizontal coordinate axis, and the vertical coordinate axis is a straight line passing through the origin and perpendicular to the plane xoy.

[0054] In the interactive scheme of the virtual scene in the prior art, the current posture of the virtual object is usually forcibly switched to the reference posture without a transition process, which makes the movement of the virtual object stiff and the movement switching process unnatural.

[0055] The applicant has discovered that the interaction processing methods of the prior art cannot naturally switch the posture of virtual objects. To address the above problem, an embodiment of the present application provides an interaction processing method for a virtual scene, which can enable a natural and smooth transition of interaction actions in a virtual scene.

[0056] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for interactive processing of a virtual scene, which can make the interactive actions of virtual objects and interactive objects more natural. The exemplary application of the electronic device provided by the embodiments of the present application is described below. The device provided by the embodiments of the present application can be implemented as a laptop, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), a smart phone, a smart speaker, a smart watch, a smart TV, a vehicle-mounted terminal, an aircraft, and other types of terminals, and can also be implemented as a server. Below, an exemplary application when the electronic device is implemented as a terminal will be described.

[0057] In some embodiments, the virtual scene can be an environment for virtual objects (such as game characters) to interact. For example, it can be an environment for game characters to fight in the virtual scene. By controlling the actions of the game characters, both parties can interact in the virtual scene, allowing users to relieve life stress during the game.

[0058] In one implementation scenario, see Figure 1A , Figure 1A It is a schematic diagram of the application mode of the interactive processing method of the virtual scene provided in the embodiment of the present application, which is suitable for some application modes that completely rely on the graphics processing hardware computing power of the terminal device 400 to complete the relevant data calculation of the virtual scene 100, such as stand-alone / offline mode games, and the output of the virtual scene is completed through various types of terminal devices 400 such as smart phones, tablet computers and virtual reality / augmented reality devices.

[0059] When forming a visual perception of the virtual scene 100, the terminal device 400 calculates the data required for display through the graphics computing hardware, and completes the loading, parsing and rendering of the display data, and outputs video frames that can form a visual perception of the virtual scene through the graphics output hardware, for example, presenting two-dimensional video frames on the display screen of a smartphone, or projecting video frames to achieve a three-dimensional display effect on the lenses of augmented reality / virtual reality glasses; in addition, in order to enrich the perception effect, the terminal device 400 can also use different hardware to form one or more of auditory perception, tactile perception, motion perception and taste perception.

[0060] As an example, a client 410 (e.g., a stand-alone game application) is running on the terminal device 400. During the operation of the client 410, a virtual scene including role-playing is output. The virtual scene may be an environment for game characters to interact, such as a plain, street, valley, etc. for game characters to fight against each other. Taking the first-person perspective display of the virtual scene 100 as an example, virtual objects 110 and interactive objects 120 are displayed in the virtual scene 100, wherein the virtual object 110 may be a game character controlled by a user (or player), that is, the virtual object 110 is controlled by a real user and will move in the virtual scene 100 in response to the real user's operation on a controller (e.g., a touch screen, a voice-controlled switch, a keyboard, a mouse, a joystick, etc.). For example, when the real user moves the joystick to the right, the virtual object 110 will move to the right in the virtual scene 100, and may also remain still, jump, and control the virtual object 110 to perform shooting operations, etc.; the interactive object 120 is a non-player character in the virtual scene 100 (e.g., a virtual prop such as a box, a stone, and a car).

[0061] For example, a virtual object 110 and an interactive object 120 are displayed in a virtual scene 100. The client 410 displays an animation of the virtual object 110 moving toward the interactive object 120 in the virtual scene 100 in response to a movement operation of the virtual object 110 toward the interactive object 120 (for example, receiving a click operation of the player controlling the virtual object 110 to run toward the interactive object 120 in the virtual scene 100). Subsequently, when an interaction condition is met between the virtual object 110 and the interactive object 120, the client 410 displays an interaction animation of the virtual object 110 and the interactive object 120 in the virtual scene 100 in response to a trigger operation of the virtual object 110 on the interactive control 130 displayed on the interactive object 120 (for example, receiving a click operation of the player on the icon 130 of the interactive control displayed in the virtual scene 100). In this way, the interaction method of the virtual scene is enriched and the player's gaming experience is improved.

[0062] In another implementation scenario, see Figure 1B, Figure 1B It is a schematic diagram of an application mode of the interactive processing method of the virtual scene provided in an embodiment of the present application, which is applied to a terminal device 400 and a server 200, and is suitable for an application mode that relies on the computing power of the server 200 to complete the virtual scene calculation and output the virtual scene on the terminal device 400.

[0063] Taking the visual perception of the virtual scene 100 as an example, the server 200 calculates the virtual scene related display data (such as scene data) and sends it to the terminal device 400 through the network 300. The terminal device 400 relies on the graphics computing hardware to complete the loading, parsing and rendering of the display data, and relies on the graphics output hardware to output the virtual scene to form a visual perception. For example, a two-dimensional video frame can be presented on the display screen of a smartphone, or a video frame with a three-dimensional display effect can be projected on the lenses of augmented reality / virtual reality glasses. As for the perception of the form of the virtual scene, it can be understood that the corresponding hardware output of the terminal device 400 can be used, such as using a microphone to form auditory perception, using a vibrator to form tactile perception, and so on.

[0064] As an example, as an example, a client 410 (such as an online version of a game application) is running on the terminal device 400, and the game interaction with other users is carried out by connecting to the server 200 (such as a game server). The terminal device 400 outputs the virtual scene 100 of the client 410. Taking the first-person perspective display of the virtual scene 100 as an example, virtual objects 110 and interactive objects 120 are displayed in the virtual scene 100, wherein the virtual object 110 can be a game character controlled by the user, that is, the virtual object 110 is controlled by the real user, and will move in the virtual scene 100 in response to the real user's operation on the controller (such as a touch screen, voice-controlled switch, keyboard, mouse, and joystick, etc.). For example, when the real user moves the joystick to the right, the virtual object 110 will move to the right in the virtual scene 100, and can also remain still, jump, and control the virtual object 110 to perform shooting operations, etc.; the interactive object 120 is a non-player character in the virtual scene 100 (such as virtual props such as boxes, stones, and cars).

[0065] For example, a virtual object 110 and an interactive object 120 are displayed in a virtual scene 100. The client 410 displays an animation of the virtual object 110 moving toward the interactive object 120 in the virtual scene 100 in response to a movement operation of the virtual object 110 toward the interactive object 120 (for example, receiving a click operation of the player controlling the virtual object 110 to run toward the interactive object 120 in the virtual scene 100). Subsequently, when an interaction condition is met between the virtual object 110 and the interactive object 120, the client 410 displays an interaction animation of the virtual object 110 and the interactive object 120 in the virtual scene 100 in response to a trigger operation of the virtual object 110 on the interactive control 130 displayed on the interactive object 120 (for example, receiving a click operation of the player on the icon 130 of the interactive control displayed in the virtual scene 100). In this way, the interaction method of the virtual scene is enriched and the player's gaming experience is improved.

[0066] In some embodiments, the terminal device or server can implement the interactive processing method of the virtual scene provided by the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as a game APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0067] Taking a computer program as an application program as an example, in actual implementation, the terminal device 400 installs and runs an application program that supports a virtual scene. The application program can be any one of a first-person shooter game (FPS), a third-person shooter game, a virtual reality application program, a three-dimensional map program, a card strategy game, a sports game, or a multiplayer gunfight survival game. The user uses the terminal device 400 to operate a virtual object in the virtual scene to perform an activity, which includes but is not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and building a virtual building. Indicatively, the virtual character can be a virtual person, such as a simulated person character or an anime person character.

[0068] In other embodiments, the embodiments of the present application can be implemented through artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.

[0069] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, pre-trained models are also called large models and basic models. After fine-tuning, they can be widely used in downstream tasks in various major directions of artificial intelligence. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0070] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0071] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the terminal 400 provided in an embodiment of the present application, Figure 2 The terminal 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .

[0072] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0073] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0074] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0075] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0076] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0077] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0078] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0079] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0080] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0081] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The interactive processing device 455 of the virtual scene stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a display module 4551, an acquisition module 4552, a first determination module 4553, a second determination module 4554 and a data adjustment module 4555. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.

[0082] The interactive processing method of the virtual scene provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the terminal provided in the embodiment of the present application.

[0083] See also Figure 3A , Figure 3A This is a first flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application, with the terminal as the execution subject, combining Figure 3A The steps shown are explained.

[0084] In step 101 , virtual objects and interactive objects are displayed in a virtual scene.

[0085] In some embodiments, the virtual scene may be an online game scene, the virtual object may be a player character corresponding to the user in the online game, and the interactive object may be a non-player character that interacts with the player character.

[0086] In step 102, in response to the virtual object satisfying an interaction condition between the virtual object and the interactable object at a first moment, a current position and posture of the virtual object at the first moment is obtained.

[0087] In some embodiments, the interaction condition includes: the distance between the virtual object and the interactive object at the first moment is less than or equal to a distance threshold. The distance threshold can be determined by: obtaining the speed of the virtual object; determining the product of the speed and the preset time length, and using the product as the distance threshold.

[0088] For example, the speed of the virtual object may be various types of speeds, such as maximum speed, minimum speed, average speed, etc.

[0089] For example, different moments can be set according to fixed time lengths, such as one minute, a quarter of an hour, one hour, etc. The first moment is the moment when the interaction condition is met, and the second moment is the moment after the preset time length is counted from the first moment.

[0090] In some embodiments, the preset duration may be fixed, and may be set by the player according to his or her own usage habits, for example, by giving the player a duration selection range and allowing the player to select a duration as the preset duration.

[0091] In other embodiments, the preset duration may be dynamic, and the preset duration may be positively correlated with the speed at which the player manipulates the virtual object (eg, average speed), that is, the faster the speed, the shorter the preset duration, thereby achieving player control and automatic interaction in terms of visual effects.

[0092] In other embodiments, the preset duration can be predicted by a machine learning model, and the training sample can be a video clip of a virtual scene, including the process of a virtual object switching from not interacting with an interactive object to interacting with an interactive object; the label data can be the appropriate switching duration calibrated by the player. The machine learning model can learn the player's needs for the appropriate duration.

[0093] In some embodiments, the interaction condition includes: receiving an operation instruction to trigger a control prop at a first moment, wherein the control prop is used to control the interactive object to interact with the virtual object.

[0094] For example, the second moment can be a moment of preset time (for example, 1 second) after the first moment, that is, the length between the two moments is fixed; the second moment can also be the moment when the virtual object enters the interaction range of the interactive object (the area centered on the interactive object, such as a circle, the size of which depends on the influence radius of the function of the interactive object).

[0095] For example, the control prop may be a remote controller, and the interactive object may be an aircraft, a vehicle (aircraft, car), etc. that can be remotely controlled by the remote controller.

[0096] In some embodiments, before step 102, it can be determined whether the virtual object satisfies the interaction condition at the first moment: in response to not satisfying the interaction condition, the interaction controls of the interactive object are shielded; in response to satisfying the interaction condition, the interaction controls of the interactive object are displayed from the first moment.

[0097] For example, when the interaction condition is not met, the interaction control may not be displayed on the interactable object, and the interaction control is not displayed on the interactable object until the virtual object meets the interaction condition.

[0098] The embodiment of the present application sets interaction conditions to avoid accidental touching of interaction controls when the virtual object has not yet interacted with the interactive object, thereby preventing the player's gaming experience from being affected. It can also avoid triggering the interaction controls multiple times and reduce resource waste.

[0099] In some embodiments, the interactive control may be displayed all the time during the interaction with the interactive object, and may be placed in an untriggerable state when the interaction condition is not met, and may be placed in a triggerable state when the interaction condition is met.

[0100] For example, the untriggerable state can be graying out the interactive control, that is, the interactive control cannot be triggered. Players can see the interactive control on the interactive object at any time, but the interactive control can only be triggered when the interactive condition is met. When the interactive condition is not met, the interactive control cannot be triggered even if it is clicked.

[0101] In some embodiments, after the interaction condition is met and the interactive control is in a triggerable state, reference Figure 3H , Figure 3H The eighth flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application is as follows. The interactive operation between the virtual object and the interactive object can be performed by Figure 3H The step 106 is implemented as described in detail below.

[0102] In step 106, in response to a trigger operation on the interactive control, the interactive object is controlled to interact with the virtual object.

[0103] The embodiments of the present application set different states for interactive controls in different situations to avoid accidental touching of interactive controls when the virtual object has not yet interacted with the interactive object, thereby preventing the player's gaming experience from being affected. It can also avoid triggering the interactive controls multiple times and reduce resource waste.

[0104] In step 103, a posture difference between the current posture and a reference posture is determined, wherein the reference posture is an initial posture of the virtual object in the interaction with the interactive object.

[0105] In some embodiments, the current pose includes the following components: a first position, a first posture, and a first orientation of the virtual object at a first moment, and the reference pose includes the following components: a second position, a second posture, and a second orientation of the virtual object in interaction with an interactive object (e.g., a pre-made animation representing the interaction).

[0106] As an example, the reference pose may be the initial pose in the interaction between the virtual object and the interactive object (e.g., a pre-made animation representing the interaction), that is, if the virtual object starts interacting with the interactive object from a second moment, the second moment is the initial moment of the interaction, and the pose of the virtual object at the second moment includes a second position, a second posture, and a second orientation.

[0107] The reference pose can be pre-set according to the position, orientation and interaction mode of the interactive object. For example, if the interactive object is a safe, then when opening the safe, you need to stand in front of the safe, face the safe, and put the gun away. Accordingly, the virtual object standing in front of the safe, facing the safe, and putting the gun away constitutes the reference pose.

[0108] For example, position, posture, and orientation can all be expressed in the world coordinate system. Figure 6 As shown, Figure 6 It is a schematic diagram of the position and posture of the virtual object in the world coordinate system provided by the present embodiment. The first position of the virtual object at the first moment is (x1, y1, 0), wherein x1 is the first horizontal coordinate, y1 is the first longitudinal coordinate, 0 represents that the virtual object is active on the surface (e.g., ground, water surface) of the virtual scene, so the vertical coordinate (coordinate on the z-axis) is 0, the first orientation is the degree of ∠1, the first posture is to hold the prop, and the second position of the virtual object at the second moment is (x2, y2, 0), wherein x2 is the second horizontal coordinate, y2 is the second longitudinal coordinate, 0 represents that the virtual object is active on the surface (e.g., ground, water surface) of the virtual scene, so the vertical coordinate (coordinate on the z-axis) is 0, the second orientation is the degree of ∠2, and the second posture is empty-handed. Wherein, the ground plane of the virtual scene is the xoy plane, the origin is the center point of the virtual scene, the x-axis is a straight line passing through the origin and parallel to the horizontal boundary line of the virtual scene, and the y-axis is a longitudinal straight line perpendicular to the x-axis.

[0109] In some embodiments, the interaction between the virtual object and the interactable object (eg, including an animation of the interaction process) may be executed starting at the second moment.

[0110] In other embodiments, the interaction between the virtual object and the interactive object may also be performed at a time after the second time, that is, the interaction is not limited to starting from the second time. For example, if the second time is time t (in seconds), the third time may be t+1, t+2, t+3, etc. The specific delay can be set according to the actual delay requirements of the virtual scene.

[0111] For example, the virtual object has switched from the current position at the first moment to the reference position at the second moment. At this time, the player can directly click the interaction control to directly start the interaction between the virtual object and the interactive object, or start the interaction between the virtual object and the interactive object 5 seconds after the second moment.

[0112] In some embodiments, taking the interaction between a virtual object and an interactive object (e.g., including animation of the interaction process) as an example, see Figure 3B , Figure 3B It is a second flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application. Figure 3A Step 103 of "determining the pose difference between the current pose and the reference pose" can be achieved by Figure 3B Steps 1031 to 1034 are implemented as described in detail below.

[0113] In step 1031 , a position difference between the first position and the second position is determined as a position difference.

[0114] In some embodiments, the first position and the second position are both three-dimensional coordinate data in the world coordinate system. Since virtual objects in the virtual environment move on the surface of the virtual scene (such as the ground or water surface), the position difference only calculates the position difference of the virtual object on the x-axis and y-axis during the calculation process.

[0115] In step 1032 , a posture difference between the first posture and the second posture is determined as a posture difference.

[0116] In some embodiments, the first posture may be holding a prop, and the second posture may be empty-handed, so the posture difference represents the action change process from holding a prop to empty-handed.

[0117] For example, since the virtual object needs to interact with the interactive object at the second moment, the second posture needs to be in an empty-handed state to trigger the interactive control to complete the interaction, and switching the posture to empty-handed is a preparatory action before the interaction.

[0118] In step 1033, an orientation difference between the first orientation and the second orientation is determined as an orientation difference.

[0119] In some embodiments, the first orientation and the second orientation are both three-dimensional coordinate data in the world coordinate system. The virtual object moves on the surface of the virtual scene in the virtual environment. Therefore, the orientation difference only calculates the difference in the rotation angle of the virtual object around the z-axis during the calculation process.

[0120] In step 1034 , the position difference, posture difference, and orientation difference are combined into a pose difference.

[0121] For example, continue to refer to Figure 6 The posture difference can be divided into lateral position difference and longitudinal position difference. The lateral position difference is x1-x2, the longitudinal position difference is y1-y2, the posture difference is the conversion from holding props to empty hands, and the orientation difference is ∠1-∠2.

[0122] Continue to see Figure 3A In step 104, a ratio of the posture difference value to the transition frame number is determined as a posture adjustment value, wherein the transition frame number is the number of image frames between the first moment and the second moment.

[0123] In some embodiments, the ratio of the posture difference to the transition frame number can reflect the posture change of the virtual object in each frame from the first moment to the second moment, that is, the posture adjustment value.

[0124] For example, there are many ways to obtain the transition frame number, for example: it can be determined by setting a preset value of the transition frame number; for another example: it can be adapted to the frame rate of the virtual scene, that is, the product of the preset duration and the frame rate is used as the transition frame number.

[0125] In step 105 , the virtual object is controlled to implement the posture adjustment value in each image frame starting from the first moment until the second moment is reached.

[0126] In some embodiments, when the current pose component includes a first position, referring to Figure 3C , Figure 3C This is a third flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application. Figure 3A Step 105 can be Figure 3C Steps 1051A to 1052A are implemented as described in detail below.

[0127] In step 1051A, a ratio of the position difference to the transition frame number is determined as a position adjustment value.

[0128] For example, if the total time from the first moment to the second moment is 1 second, that is, the number of transition frames is 60, continue to refer to Figure 6 At this time, the position difference in the horizontal coordinate is x1-x2, so the horizontal position adjustment value is (x1-x2) / 60, and in the vertical coordinate is y1-y2, so the vertical position adjustment value is (y1-y2) / 60.

[0129] In step 1052A, in response to the position adjustment value being a non-zero value, in each image frame between the first moment and the second moment, the virtual object is controlled to implement the position adjustment value based on the position of the root bone point of the virtual object in the previous frame to form the position in the current frame.

[0130] In some embodiments, the bone structure is a bone hierarchy formed by combining a number of consecutive bones. The first bone is called the root bone, which is the key point in forming the bone structure. All other bones are attached to the root bone as child bones or sibling bones. The root bone point refers to the coordinate point corresponding to the root bone in the world coordinate system.

[0131] In some embodiments, the first position includes the first plane coordinates of the virtual object corresponding to the world coordinate system at the first moment, the first plane coordinates include a first horizontal coordinate and a first vertical coordinate, and the second position includes the second plane coordinates of the virtual object corresponding to the world coordinate system at the second moment, the second plane coordinates include a second horizontal coordinate and a second vertical coordinate.

[0132] In some embodiments, reference Figure 3D , Figure 3D This is a fourth flow chart of the interactive processing method of the virtual scene provided in an embodiment of the present application. Figure 3C Step 1052A of "Controlling the virtual object to implement the position adjustment value" can be achieved by Figure 3D Steps 10521A to 10525A are implemented as described in detail below.

[0133] In step 10521A, a transverse coordinate difference between the first transverse coordinate and the second transverse coordinate is determined.

[0134] In some embodiments, the lateral coordinate difference is a difference between a position coordinate of the virtual object on the x-axis at a first moment and a position coordinate of the virtual object on the x-axis at a second moment.

[0135] For example, continue to refer to Figure 6 The first horizontal coordinate of the virtual object on the x-axis at the first moment is x1, and the second horizontal coordinate of the virtual object on the x-axis at the second moment is x2. The horizontal coordinate difference at this time is x1-x2.

[0136] In step 10522A, the ratio of the horizontal coordinate difference to the transition frame number is determined as the horizontal position adjustment value.

[0137] In some embodiments, the ratio of the horizontal coordinate difference to the transition frame number represents the position change of the virtual object on the x-axis from the first moment to the second moment in each frame, that is, the horizontal position adjustment value.

[0138] For example, if the total time from the first moment to the second moment is 1 second, that is, the number of transition frames is 60, continue to refer to Figure 6 , the horizontal coordinate difference at this time is x1-x2, and the horizontal position adjustment value is (x1-x2) / 60.

[0139] In step 10523A, the longitudinal coordinate difference between the first longitudinal coordinate and the second longitudinal coordinate is determined.

[0140] In some embodiments, the longitudinal coordinate difference is the difference between the position coordinate of the virtual object on the y-axis at a first moment and the position coordinate of the virtual object on the y-axis at a second moment.

[0141] For example, continue to refer to Figure 6 The first longitudinal coordinate of the virtual object on the y-axis at the first moment is y1, and the second longitudinal coordinate of the virtual object on the y-axis at the second moment is y2. The longitudinal coordinate difference at this time is y1-y2.

[0142] In step 10524A, the ratio of the longitudinal coordinate difference to the transition frame number is determined as the longitudinal position adjustment value.

[0143] For example, if the total time from the first moment to the second moment is 1 second, that is, the number of transition frames is 60, continue to refer to Figure 6 , the longitudinal coordinate difference at this time is y1-y2, and the longitudinal position adjustment value is (y1-y2) / 60.

[0144] In some embodiments, the ratio of the longitudinal coordinate difference to the transition frame number represents the position change of the virtual object on the y-axis for each frame from the first moment to the second moment, that is, the longitudinal position adjustment value.

[0145] In step 10525A, the virtual object is controlled to adjust its lateral position according to the lateral position adjustment value, and to adjust its longitudinal position according to the longitudinal position adjustment value.

[0146] In some embodiments, when the current pose component includes a first pose, referring to Figure 3E , Figure 3E This is a fifth flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application. Figure 3A Step 105 can be Figure 3E Steps 1051B to 1052B are implemented as described in detail below.

[0147] In step 1051B, the ratio of the posture difference value to the transition frame number is determined as the posture adjustment value.

[0148] In step 1052B, in response to the posture adjustment value being a non-zero value, in each image frame between the first moment and the second moment, the virtual object is controlled to implement the posture adjustment value based on the posture of the virtual object in the previous frame to form a posture in the current frame.

[0149] In some embodiments, the virtual object is in a posture of holding a prop in an image frame at a first moment, and the virtual object is in a posture of being empty-handed in an image frame at a second moment.

[0150] For example, the virtual object may be in a state of holding a prop at the first moment. When the interaction conditions are met, since the virtual object needs to interact with the interactive object from the second moment on, it is necessary to put away the prop and click the interactive control with empty hands to complete the interaction.

[0151] The embodiment of the present application switches postures so that the virtual object moves from being an interactive object, and in the process of interaction after conversion to a reference posture, the movements are smoother, and the interactive operations are completed in a bare-handed state, making the interactive process more in line with reality and enriching the user experience.

[0152] In some embodiments, when the current pose component includes a first orientation, referring to Figure 3F , Figure 3F This is a sixth flow chart of the interactive processing method of the virtual scene provided in an embodiment of the present application. Figure 3A Step 105 can be Figure 3F Steps 1051C to 1052C are implemented as described in detail below.

[0153] In step 1051C, a ratio of the orientation difference to the number of transition frames is determined as an orientation adjustment value.

[0154] In step 1052C, in response to the orientation adjustment value being a non-zero value, in each image frame between the first moment and the second moment, the virtual object is controlled to implement the orientation adjustment value based on the orientation of the root bone of the virtual object in the previous frame to form the orientation in the current frame.

[0155] In some embodiments, the bone structure is a bone hierarchy formed by combining a plurality of bones in a row. The first bone is called the root bone, which is the key point of the bone structure. All other bones are attached to the root bone as child bones or sibling bones.

[0156] In some embodiments, for skeletal animation, the position and orientation of the model need to be set, which is actually setting the position and orientation of the root bone, and then calculating the position and orientation of each bone based on the transformation relationship between the parent and child bones in the bone hierarchy as the orientation of the virtual object.

[0157] In some embodiments, the first orientation includes a first rotated coordinate of the virtual object corresponding to the world coordinate system at a first moment, and the second orientation includes a second rotated coordinate of the virtual object corresponding to the world coordinate system at a second moment.

[0158] For example, the first rotation coordinate may be the angle at which the virtual object rotates around the z-axis starting from zero degrees at the first moment. The angle may be calculated by determining the rotation direction, for example, clockwise rotation is considered positive. Figure 6 , at this time, the first direction is ∠1 degrees, and the second direction is ∠2 degrees.

[0159] In some embodiments, reference Figure 3G , Figure 3G This is the seventh flow chart of the interactive processing method of the virtual scene provided in the embodiment of the present application. Figure 3F Step 1052C can be Figure 3G Steps 10521C to 10523C are implemented as described in detail below.

[0160] In step 10521C, a rotation coordinate difference between the first rotation coordinate and the second rotation coordinate is determined.

[0161] In some embodiments, the rotation coordinate difference is the difference between the angle value of the virtual object rotated around the z-axis at a first moment and the angle value of the virtual object rotated around the z-axis at a second moment.

[0162] In step 10522C, the ratio of the rotation coordinate difference to the transition frame number is determined as the orientation adjustment value.

[0163] In some embodiments, the ratio of the rotation coordinate difference to the transition frame number represents the angle change formed by the virtual object rotating around the z-axis in each frame from the first moment to the second moment, that is, the orientation adjustment value.

[0164] In step 10523C, the virtual object is controlled to rotate around a vertical reference axis of the world coordinate system according to the orientation adjustment value, wherein the vertical reference axis is perpendicular to the plane of the world coordinate system.

[0165] In some embodiments, the rotation direction may be clockwise or counterclockwise, depending on whether the heading adjustment value is positive or negative. The plane of the world coordinate system includes a transverse reference axis and a longitudinal reference axis.

[0166] In some embodiments, the trigger threshold may be raised, that is, the interactive control is displayed and the trigger operation is allowed to be executed only when the current posture of the virtual object at the first moment is completely consistent with the preset standard posture after conversion.

[0167] For example, when the virtual object completes the transformation to the standard posture, the interactive control is displayed on the interactive object, and the interaction between the virtual object and the interactive object is completed by triggering the interactive control; when the transformation is not completed, the interactive control is not displayed.

[0168] By controlling the display nodes of interactive controls, it is possible to avoid accidental touching of interactive controls when virtual objects have not yet interacted with interactive objects, thereby preventing the player's gaming experience from being affected. It can also avoid triggering interactive controls multiple times and reduce resource waste.

[0169] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0170] In a virtual scene of a team-based game, it is often necessary to interact with virtual objects and interactive objects to obtain the props needed during the game. Through the interactive processing method of a virtual scene provided by the embodiment of the present application, a posture adjustment value can be obtained through the posture difference between the virtual object at the first moment and the second moment, and the current posture can be adjusted according to the posture adjustment value, so that the virtual object can naturally interact with the interactive object.

[0171] refer to Figure 4A , Figure 4A is a first schematic diagram of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application, which will be combined with Figure 4A The application of the interactive processing method of the virtual scene in the embodiment of the present application is explained.

[0172] exist Figure 4A In the process, we first need to obtain the current pose of the virtual object at the first moment.

[0173] refer to Figure 4B , Figure 4B This is a second schematic diagram of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application. Figure 4B The current pose of the virtual object at the first moment is shown.

[0174] In some embodiments, in the world coordinate system of the virtual object, the z-axis (i.e., the horizontal height of the character's standing position) is consistent with the reference posture and is 0, because they are all standing on a normal horizontal ground, but the x-axis (lateral displacement of the horizontal plane) and the y-axis (longitudinal displacement of the horizontal plane) are different from the values ​​of the reference posture.

[0175] At the same time, the x-axis and y-axis of the virtual object's rotation value in the world coordinate system are consistent with the reference pose values, because the x-axis and y-axis control the character's horizontal and vertical rotations, and in normal games, a standing virtual object will not rotate in these two positions, so both values ​​are 0 (degrees). The z-axis controls the virtual object's rotation in vertical space, which is reflected in the game as the rotation angle generated when the virtual object turns, so it will be different from the reference pose.

[0176] For example, the first position of the virtual object at the first moment is (2400, 300, 0), where 2400 is the first horizontal coordinate, 300 is the first vertical coordinate, the first posture at the first moment is holding the prop, and the first orientation at the first moment is (0, 0, 40), where 40 is the first rotation coordinate.

[0177] Continue to refer Figure 4A , it is also necessary to obtain the reference pose of the virtual object at the second moment.

[0178] refer to Figure 4C , Figure 4C This is a third schematic diagram of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application. Figure 4C The reference pose of the virtual object at the second moment is shown.

[0179] For example, the second position of the virtual object at the second moment is (0, 0, 0), the second posture at the second moment is empty-handed, and the second orientation at the second moment is (0, 0, 0).

[0180] Continue to refer Figure 4A , record the data difference between the current pose and the reference pose (equivalent to the pose difference above), and start to perform related conversion operations. The following is a detailed description of the conversion process:

[0181] First, if Figure 4A As shown in image frame 401, if the first position of the virtual object is different from the second position of the standard interaction, the virtual object will start to move from the first position to the second position. At the same time, the entire conversion time is specified to be 1S, that is, 60 frames (the number of transition frames from the first moment to the second moment).

[0182] If the first orientation of the virtual object at this time (i.e., the world coordinate rotation value) is inconsistent with the second orientation at the standard interaction position, the character orientation will be adjusted during the 1S of the above process of moving to the second position.

[0183] Secondly, if Figure 4A As shown in the image frame 402, the first position coordinate of the virtual object in the world coordinate system is (2400, 300, 0), and a movement speed (i.e., position adjustment value) of 2400 / 60=(40 / per frame) will be generated on the X axis, moving toward the second position; similarly, a displacement of 300 / 60=(5 / per frame) will be generated on the Y axis. Through one second of movement, the horizontal and vertical coordinate positions of the virtual object skeleton are corrected.

[0184] As the difference between the coordinate rotation values ​​given above, the Z-axis rotation coordinate of the coordinates at the second moment is 0, and the rotation coordinate of the virtual object at the first moment is 40 (degrees). Then, during the displacement process, the Z-axis will produce a rotation displacement of 40 / 60 = (0.6666 (degrees) / per frame). Through one second of movement, the rotation coordinates of the skeleton are corrected (that is, the orientation is adjusted).

[0185] Then, if Figure 4A As shown in image frame 403, if the virtual object is in a state of holding a prop at this time, and when the interaction is triggered, the virtual object needs to be empty-handed, and the virtual object is controlled to switch from holding a prop to being empty-handed during the 1S process of moving to the second position. At this time, the virtual object has been converted from the current posture to the reference posture.

[0186] Finally, if the virtual object's related bone parameters meet one or two of the above three items, the conversion operations related to the satisfied items will not be performed. For example, if the world displacement coordinates of the virtual object's root bone point are correct (i.e. the first item, the current position of the virtual object), no position conversion will be performed, only the world rotation value (orientation) and posture conversion will be performed. Figure 4A As shown in the image frame 404, at this time, the relevant bone parameters and posture of the virtual object are completely consistent with the first frame of the standard interactive action, so that the virtual object will trigger the interactive control and start playing the interactive action.

[0187] refer to Figure 4D , Figure 4D This is the fourth schematic diagram of the application scenario of the interactive processing method of the virtual scene provided in the embodiment of the present application. Figure 4D Demonstrates a scenario where a virtual object triggers an interactive control.

[0188] In some embodiments, if a player triggers an interaction button and the three values ​​completely meet the standard values, the interaction action is played directly. The conversion process of these interaction actions together constitutes the transition animation seen by the virtual object after the interaction is triggered.

[0189] In some embodiments, in order to avoid the situation where "the virtual object is too far away from the standard interaction position, and when the coordinate conversion is completed within one second, the distance becomes longer, resulting in an average speed that is too fast when completing the coordinate conversion", the maximum distance at which the virtual object can trigger interaction can be set (that is, the length of the hypotenuse of the right triangle formed by the X and Y axes of the world displacement coordinates of the two).

[0190] refer to Figure 4E , Figure 4EThis is the fifth schematic diagram of the application scenario of the interactive processing method of the virtual scene provided by the embodiment of the present application. A is the standard position (second position) for triggering the interaction, C is the current position (first position) of the virtual object, then the length of AB is the difference between the Y-axis coordinates of the two, the length of BC is the difference between the X-axis coordinates of the two, and their actual distance is the length of the hypotenuse AC of the triangle.

[0191] For example, by setting a threshold, when the length of AC exceeds a certain value, the interactive controls will not be displayed to the virtual object, which can effectively prevent this situation. For example, if the maximum speed of the virtual object in the game is set to 1000, then the speed calculated by the length of AC / 1S cannot exceed 1000, that is, the length of AC cannot exceed 1000.

[0192] refer to Figure 5 , Figure 5 It is a flowchart of an application scenario of the interactive processing method of a virtual scene provided in an embodiment of the present application.

[0193] First, the virtual object reaches the vicinity of the interactive object, and determines whether the distance between the virtual object and the interactive object is within the distance threshold. If not, the interactive control is not displayed. If within the range, the interactive control is displayed.

[0194] Secondly, in response to the player's trigger operation on the interactive control, the current posture of the virtual object when clicking the interactive control is obtained, and it is determined whether the first position, first orientation and first posture of the virtual object are consistent with the reference posture. The inconsistent posture components are adjusted through the interactive processing method of the virtual scene provided in the embodiment of the present application.

[0195] Finally, the adjusted data is judged again. When there are still inconsistencies between the current pose components and the reference pose, the data is recorded and adjusted again until all current pose components are consistent with the reference pose, the interactive controls are triggered, and the corresponding interactive actions are performed to achieve interaction between the virtual object and the interactive object.

[0196] The embodiment of the present application converts the current posture component of the virtual object at the first moment to the reference posture at the second moment frame by frame, so that the interaction process between the virtual object and the interactive object is more natural, and adjusts the virtual object to the reference posture, so that the triggering of the interactive control is easier, avoiding multiple triggering and reducing resource waste.

[0197] The following is a description of an exemplary structure of a virtual scene interaction processing device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the virtual scene interaction processing device 455 of the memory 440 may include:

[0198] The display module 4551 is used to display virtual objects and interactive objects in the virtual scene.

[0199] The acquisition module 4552 is used to acquire the current posture of the virtual object at the first moment in response to the virtual object satisfying the interaction condition between the virtual object and the interactive object at the first moment.

[0200] The first determination module 4553 is used to determine the posture difference between the current posture and the reference posture, wherein the reference posture is the initial posture of the virtual object in the interaction with the interactive object.

[0201] The second determination module 4554 is used to determine the ratio of the posture difference value to the transition frame number as a posture adjustment value, wherein the transition frame number is the number of image frames between the first moment and the second moment.

[0202] In some embodiments, the current posture includes the following components: the first position, the first posture and the first orientation of the virtual object at the first moment, and the reference posture includes the following components: the second position, the second posture and the second orientation in the interaction between the virtual object and the interactive object; the first determination module 4553 is also used to determine the position difference between the first position and the second position as the position difference; determine the posture difference between the first posture and the second posture as the posture difference; determine the orientation difference between the first orientation and the second orientation as the orientation difference; combine the position difference, the posture difference and the orientation difference into the posture difference.

[0203] In some embodiments, the second data adjustment module 4555 is also used to determine the ratio of the position difference to the transition frame number as a position adjustment value; in response to the position adjustment value being a non-zero value, in each image frame between the first moment and the second moment, based on the position of the root bone point of the virtual object in the previous frame, the virtual object is controlled to implement the position adjustment value to form the position in the current frame.

[0204] In some embodiments, the first position includes the first plane coordinate of the virtual object corresponding to the world coordinate system at the first moment, the first plane coordinate includes a first horizontal coordinate and a first vertical coordinate, and the second position includes the second plane coordinate of the virtual object corresponding to the world coordinate system at the second moment, the second plane coordinate includes a second horizontal coordinate and a second vertical coordinate; the data adjustment module 4555 is also used to determine the horizontal coordinate difference between the first horizontal coordinate and the second horizontal coordinate; determine the ratio of the horizontal coordinate difference to the transition frame number as the horizontal position adjustment value; determine the vertical coordinate difference between the first vertical coordinate and the second vertical coordinate; determine the ratio of the vertical coordinate difference to the transition frame number as the vertical position adjustment value; control the virtual object to adjust the horizontal position according to the horizontal position adjustment value, and adjust the vertical position according to the vertical position adjustment value.

[0205] In some embodiments, the data adjustment module 4555 is also used to: determine the ratio of the posture difference to the transition frame number as a posture adjustment value; in response to the posture adjustment value being a non-zero value, in each image frame between the first moment and the second moment, based on the posture of the virtual object in the previous frame, control the virtual object to implement the posture adjustment value to form a posture in the current frame.

[0206] In some embodiments, the data adjustment module 4555 is also used to: when the current posture component includes the first orientation, determine the ratio of the orientation difference to the transition frame number as an orientation adjustment value; in response to the orientation adjustment value being a non-zero value, in each image frame between the first moment and the second moment, based on the orientation of the root bone of the virtual object in the previous frame, control the virtual object to implement the orientation adjustment value to form the orientation in the current frame.

[0207] In some embodiments, the first orientation includes a first rotation coordinate of the virtual object corresponding to the world coordinate system at the first moment, and the second orientation includes a second rotation coordinate of the virtual object corresponding to the world coordinate system at the second moment; the data adjustment module 4555 is also used to: determine the rotation coordinate difference between the first rotation coordinate and the second rotation coordinate; determine the ratio of the rotation coordinate difference to the transition frame number as the orientation adjustment value; control the virtual object to rotate around the vertical reference axis of the world coordinate system according to the orientation adjustment value, wherein the vertical reference axis is perpendicular to the plane of the world coordinate system.

[0208] In some embodiments, the data adjustment module 4555 is further used to: in response to the interaction condition not being met, shield the interactive controls of the interactive object from being displayed; in response to the interaction condition being met, display the interactive controls of the interactive object from the first moment onwards.

[0209] In some embodiments, the data adjustment module 4555 is also used to: implement the posture adjustment value in each image frame starting from the first moment when controlling the virtual object until the second moment is reached, and then, in response to a trigger operation on the interactive control, control the interactive object to interact with the virtual object.

[0210] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the interactive processing method of the virtual scene described in the embodiment of the present application.

[0211] The present application embodiment provides a computer-readable storage medium storing computer executable instructions, wherein the computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will execute the interactive processing method of the virtual scene provided by the present application embodiment, for example, Figure 3A The interactive processing method of the virtual scene is shown.

[0212] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0213] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0214] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0215] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0216] To summarize, through the embodiments of the present application, the virtual object is converted frame by frame from the current posture at the first moment to the reference posture at the second moment, so that the interaction process between the virtual object and the interactive object is more natural, and the virtual object is adjusted to the reference posture, which makes it easier to trigger the interactive control, avoids multiple triggering, and reduces resource waste.

[0217] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A method for interactive processing of a virtual scene, characterized in that: The method comprises: Displaying virtual objects and interactive objects in a virtual scene; In response to the virtual object satisfying an interaction condition between the virtual object and the interactable object at a first moment, acquiring a current position and posture of the virtual object at the first moment; Determining a posture difference between the current posture and a reference posture, wherein the reference posture is an initial posture of the virtual object in the interaction with the interactive object; Determine a ratio of the posture difference value to the transition frame number as a posture adjustment value, wherein the transition frame number is the number of image frames between the first moment and the second moment; The virtual object is controlled to implement the posture adjustment value in each image frame starting from the first moment until the second moment is reached.

2. The method according to claim 1, characterized in that The interaction conditions include: At the first moment, the distance between the virtual object and the interactive object is less than or equal to a distance threshold.

3. The method according to claim 2, characterized in that The second moment is a moment after a preset time period has elapsed since the first moment, and the method further includes: The distance threshold is determined by: Obtaining the speed of the virtual object; The product of the speed and the preset time length is determined, and the product is used as the distance threshold.

4. The method according to claim 1, characterized in that The interaction conditions include: An operation instruction to trigger a control prop is received at the first moment, wherein the control prop is used to control the interactive object to interact with the virtual object.

5. The method according to claim 1, characterized in that: The current pose includes the following components: a first position, a first posture, and a first orientation of the virtual object at the first moment, the reference pose comprising the following components: a second position, a second posture, and a second orientation of the virtual object in interaction with an interactable object; The determining of the posture difference between the current posture and the reference posture comprises: determining a position difference between the first position and the second position as a position difference; determining a posture difference between the first posture and the second posture as a posture difference; determining an orientation difference between the first orientation and the second orientation as an orientation difference; The position difference, the posture difference and the orientation difference are combined into the pose difference.

6. The method according to any one of claims 1 to 4, characterized in that: When the current posture component includes the first position, controlling the virtual object to implement the posture adjustment value in each image frame starting from the first moment until reaching the second moment includes: Determine a ratio of the position difference to the transition frame number as a position adjustment value; In response to the position adjustment value being a non-zero value, in each image frame between the first moment and the second moment, the virtual object is controlled to implement the position adjustment value based on the position of the root bone point of the virtual object in the previous frame to form the position in the current frame.

7. The method according to claim 6, characterized in that The first position includes a first plane coordinate of the virtual object corresponding to the world coordinate system at the first moment, the first plane coordinate includes a first horizontal coordinate and a first vertical coordinate, and the second position includes a second plane coordinate of the virtual object corresponding to the world coordinate system at the second moment, the second plane coordinate includes a second horizontal coordinate and a second vertical coordinate; The controlling the virtual object to implement the position adjustment value comprises: determining a transverse coordinate difference between the first transverse coordinate and the second transverse coordinate; Determine a ratio of the horizontal coordinate difference to the transition frame number as a horizontal position adjustment value; determining a longitudinal coordinate difference between the first longitudinal coordinate and the second longitudinal coordinate; Determine a ratio of the longitudinal coordinate difference to the transition frame number as a longitudinal position adjustment value; The virtual object is controlled to adjust its lateral position according to the lateral position adjustment value, and to adjust its longitudinal position according to the longitudinal position adjustment value.

8. The method according to any one of claims 1 to 4, characterized in that: When the current posture component includes the first posture, controlling the virtual object to implement the posture adjustment value in each image frame from the first moment until the second moment is reached includes: Determine a ratio of the posture difference value to the transition frame number as a posture adjustment value; In response to the posture adjustment value being a non-zero value, in each image frame between the first moment and the second moment, based on the posture of the virtual object in the previous frame, the virtual object is controlled to implement the posture adjustment value to form a posture in the current frame.

9. The method according to claim 8, characterized in that The virtual object is in a posture of holding a prop in the image frame at the first moment, and the virtual object is in a posture of being empty-handed in the image frame at the second moment.

10. The method according to any one of claims 1 to 4, characterized in that: When the current posture component includes the first orientation, controlling the virtual object to implement the posture adjustment value in each image frame starting from the first moment includes: Determining a ratio of the orientation difference to the transition frame number as an orientation adjustment value; In response to the orientation adjustment value being a non-zero value, in each image frame between the first moment and the second moment, the virtual object is controlled to implement the orientation adjustment value based on the orientation of the root bone of the virtual object in the previous frame to form the orientation in the current frame.

11. The method according to claim 10, characterized in that The first orientation includes a first rotation coordinate of the virtual object corresponding to the world coordinate system at the first moment, and the second orientation includes a second rotation coordinate of the virtual object corresponding to the world coordinate system at the second moment; The controlling the virtual object to implement the orientation adjustment value includes: Determining a rotation coordinate difference between the first rotation coordinate and the second rotation coordinate; Determining a ratio of the rotation coordinate difference to the transition frame number as the orientation adjustment value; The virtual object is controlled to rotate the orientation adjustment value around a vertical reference axis of the world coordinate system according to the orientation adjustment value, wherein the vertical reference axis is perpendicular to a plane of the world coordinate system.

12. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In response to not satisfying the interaction condition, shielding the interactive control of the interactive object from display; In response to satisfying the interaction condition, displaying an interaction control of the interactable object starting from the first moment.

13. The method according to claim 12, characterized in that After controlling the virtual object to implement the posture adjustment value in each image frame from the first moment until the second moment is reached, the method further includes: In response to a triggering operation on the interactive control, the interactive object is controlled to interact with the virtual object.

14. A virtual scene interactive processing device, characterized in that: The device comprises: A display module, used for displaying virtual objects and interactive objects in a virtual scene; an acquisition module, configured to acquire a current position and posture of the virtual object at the first moment in response to the virtual object satisfying an interaction condition between the virtual object and the interactable object at the first moment; A first determination module, configured to determine a posture difference between the current posture and a reference posture, wherein the reference posture is an initial posture of the virtual object in the interaction with the interactive object; A second determination module is used to determine a ratio of the posture difference value to the transition frame number as a posture adjustment value, wherein the transition frame number is the number of image frames between the first moment and the second moment; A data adjustment module is used to control the virtual object to implement the posture adjustment value in each image frame starting from the first moment until the second moment is reached.

15. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; A processor, configured to implement the interactive processing method of a virtual scene as described in any one of claims 1 to 13 when executing the computer executable instructions stored in the memory.

16. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the interactive processing method of the virtual scene described in any one of claims 1 to 13 is implemented.

17. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the interactive processing method of the virtual scene described in any one of claims 1 to 13 is implemented.