Virtual Character Interaction Method, Device and Computer Equipment Based on Virtual Reality

By obtaining the motion data of the motion capture device and the display screen of the virtual reality device, a three-dimensional spatial coordinate system is established, and the interaction information between the virtual characters and the scene components is determined, which solves the problem of inaccurate control of virtual characters in VR devices, and accurately interacts with the scene components.

CN114712844BActive Publication Date: 2025-07-08SHANGHAI UNIV OF SPORT +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210438970.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-25
Publication Date
2025-07-08
Estimated Expiration
2042-04-25

AI Technical Summary

Technical Problem

Existing VR devices are difficult to recognize and real-time motion capture of user's legs and feet postures, resulting in inaccurate control of virtual characters.

Method used

By obtaining the action data collected by the motion capture device, combining the display screen of the virtual reality device, a three-dimensional spatial coordinate system of the scene is established, the interaction information between the virtual character and the scene components is determined, and the interaction results are generated.

Benefits of technology

It realizes users' accurate control and real-time display of virtual characters, and improves the interaction accuracy between virtual characters and scene components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114712844B_ABST
    Figure CN114712844B_ABST
Patent Text Reader

Abstract

This application relates to a virtual character interaction method, device, computer device, storage medium, and computer program product based on virtual reality. The method includes: obtaining a first display screen presented by a virtual reality device after entering a preset scene; in response to a control operation on a virtual character in the first display screen, obtaining motion data collected by a motion capture device; the motion data is generated by controlling the virtual character based on the control operation; obtaining a second display screen according to the first display screen and the motion data; determining interaction information between the virtual character and the scene component according to the relationship between the scene component and the motion data of the virtual character in the second display screen; generating an interaction result corresponding to the interaction information based on the interaction information, and displaying the interaction result in the second display screen. By using this method, accurate control of the virtual character by the user and real-time display can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual reality technology, and in particular, to a virtual character interaction method, device, computer device, storage medium, and computer program product based on virtual reality. Background Art

[0002] With the development of VR (Virtual Reality) technology, it has been applied to many fields such as aerospace, medicine, architectural design, and education at home and abroad. Users experience and interact with objects in the virtual environment to obtain an immersive experience.

[0003] In traditional technologies, VR technology is also widely used in virtual sports games. For virtual football games, users are usually trained according to a preset path.

[0004] However, in the field of VR games, since most VR devices (such as HTC Vive) can only be operated with a gamepad, the recognition of postures such as legs and feet is lacking, and motion capture technology is generally used for offline capture of game actions. It is difficult to achieve real-time capture and display of the control of virtual characters by users. Summary of the Invention

[0005] Based on this, in view of the above technical problems, it is necessary to provide a virtual character interaction method, device, computer device, computer-readable storage medium, and computer program product based on virtual reality.

[0006] In a first aspect, this application provides a virtual character interaction method based on virtual reality. The method includes:

[0007] Obtain a first display screen presented by a virtual reality device after entering a preset scene;

[0008] In response to a control operation on a virtual character in the first display screen, obtain motion data collected by a motion capture device; the motion data is generated by controlling the virtual character based on the control operation;

[0009] Obtain a second display screen based on the first display screen and the motion data;

[0010] Determine interaction information between the virtual character and the scene components according to the relationship between the scene components in the second display screen and the motion data of the virtual character;

[0011] Generate an interaction result corresponding to the interaction information based on the interaction information, and display the interaction result in the second display screen.

[0012] In one embodiment, obtaining a second display screen based on the first display screen and the motion data includes:

[0013] Based on the first display screen, establish a three-dimensional space coordinate system for the scene, and obtain the head position coordinates of the virtual character in the first display screen;

[0014] Based on the action data, obtain the relationship between the trajectory position of the virtual character's action and the head position;

[0015] Based on the head position coordinates and the relationship between the trajectory position of the virtual character's action and the head position, obtain the action position coordinates of the virtual character;

[0016] Add the action data at the coordinates corresponding to the action position coordinates in the first display screen to obtain the second display screen.

[0017] In one embodiment, according to the relationship between the scene components and the action data of the virtual character in the second display screen, determine the interaction information between the virtual character and the scene components, including:

[0018] Obtain the position coordinates and attributes of the scene components in the second display screen, and based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene components in the second display screen, determine the position relationship between the virtual character and the scene components;

[0019] Based on the position relationship, the action data of the virtual character and the attributes of the scene components in the second display screen, determine the interaction information between the virtual character and the scene components.

[0020] In one embodiment, based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene components in the second display screen, determine the position relationship between the virtual character and the scene components, including:

[0021] When there is at least one overlapping coordinate point between the action position coordinates of the corresponding virtual character and the position coordinates of the scene components in the second display screen, the position relationship between the virtual character and the scene components is collision.

[0022] In one embodiment, the above method further includes:

[0023] Obtain a sequence of checkpoints, where the sequence of checkpoints includes multiple checkpoints arranged in a preset order;

[0024] For each checkpoint, detect whether the distance between the virtual character and the checkpoint meets a preset condition. When the preset condition is met and the adjacent previous checkpoint in the sequence of checkpoints is in an active state, activate the checkpoint.

[0025] In one embodiment, the above method further includes:

[0026] When all the checkpoints in the sequence of checkpoints are activated, the collision function between the virtual character and the scene components is started.

[0027] In a second aspect, the present application further provides a virtual character interaction device based on virtual reality. The device includes:

[0028] A first display screen acquisition module, configured to acquire a first display screen presented on a virtual reality device after entering a preset scene;

[0029] An action data acquisition module, configured to acquire action data collected by an action capture device in response to a control operation on a virtual character in the first display screen; the action data is generated by controlling the virtual character based on the control operation;

[0030] A second display screen acquisition module, configured to obtain a second display screen according to the first display screen and the action data;

[0031] An interaction information determination module, configured to determine interaction information between the virtual character and a scene component according to the relationship between the scene component and the action data of the virtual character in the second display screen;

[0032] An interaction result generation module, configured to generate an interaction result corresponding to the interaction information based on the interaction information, and display the interaction result in the second display screen.

[0033] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the above embodiments are implemented.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium for a computer device. The computer-readable storage medium for a computer device stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the above embodiments are implemented.

[0035] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the above embodiments are implemented.

[0036] The above virtual character interaction method, device, computer device, storage medium, and computer program product based on virtual reality first obtain a first display screen presented by a virtual reality device after entering a preset scene; in response to a control operation on a virtual character in the first display screen, obtain motion data collected by a motion capture device, where the motion data is generated by controlling the virtual character based on the control operation. Further, based on the first display screen and the motion data, obtain a second display screen; determine interaction information between the virtual character and a scene component according to the relationship between the scene component and the motion data of the virtual character in the second display screen. Then, based on the interaction information, generate an interaction result corresponding to the interaction information and display the interaction result in the second display screen. By separately obtaining the motion data and the first display screen to obtain the second display screen, and thus obtaining the interaction information between the scene component and the motion data of the virtual character in the second display screen, accurate control of the virtual character by the user and real-time display can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 FIG. is an application environment diagram of a virtual character interaction method based on virtual reality in an embodiment;

[0038] Figure 2 FIG. is a flowchart of a virtual character interaction method based on virtual reality in an embodiment;

[0039] Figure 3 FIG. is a schematic diagram of a virtual character in an embodiment;

[0040] Figure 4 FIG. is a system framework diagram of a virtual character interaction method based on virtual reality in another embodiment;

[0041] Figure 5 FIG. is a structural framework diagram of a virtual character interaction method based on virtual reality in an embodiment;

[0042] Figure 6 FIG. is a structural block diagram of a device for a virtual character interaction method based on virtual reality in an embodiment;

[0043] Figure 7 FIG. is an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] The virtual character interaction method based on virtual reality provided by the embodiments of the present application can be implemented on the server or the terminal alone, or can be applied to a system including the terminal and the server, and is implemented through the interaction between the terminal and the server.

[0046] The virtual character interaction method based on virtual reality provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the virtual reality device 102 and the motion capture device 104 communicate with the server 106 through the network respectively. The data storage system can store the data that the server 106 needs to process. The data storage system can be integrated on the server 106, or can be placed on the cloud or other network servers. The server 106 can provide an environment for virtual character interaction for the virtual reality device 102. The server 106 obtains the first display screen presented by the virtual reality device after entering the preset scene from the virtual reality device 102; in response to the control operation on the virtual character in the first display screen, obtains the motion data collected by the motion capture device from the motion capture device 104; the motion data is generated by controlling the virtual character based on the control operation. Further, the server 106 obtains a second display screen according to the first display screen and the motion data; determines the interaction information between the virtual character and the scene component according to the relationship between the scene component and the motion data of the virtual character in the second display screen; and then generates an interaction result corresponding to the interaction information based on the interaction information, and displays the interaction result in the second display screen.

[0047] Among them, the server can communicate with the virtual reality device 102 and multiple motion capture devices 104 at the same time. Multiple servers 106 can be implemented by independent servers or a server cluster composed of multiple servers.

[0048] In one embodiment, as Figure 2 shown, a virtual character interaction method based on virtual reality is provided. Taking the application of this method to a system including a terminal and a server as an example, the following steps 202 to step 210 are included.

[0049] Step 202, obtain the first display screen presented by the virtual reality device after entering the preset scene.

[0050] In this embodiment, the preset scene is a scene where the user controls the activities of the virtual character. For example, when the present application is applied to a sports-related somatosensory game, the preset scene can be a football field, a badminton court, a volleyball court, etc. in different environments.

[0051] In this embodiment, the first display screen may include, but is not limited to: multiple scene components, environmental pictures, perspective pictures of virtual characters, etc.

[0052] In this embodiment, the perspective screen of the virtual character may include the first perspective screen of the virtual character, the third perspective screen of the virtual character, etc. The user can freely switch the perspective screen of the virtual character according to the operation interface. Among them, when the perspective screen of the virtual character is the first perspective screen of the virtual character, the first display screen is the screen in the field of vision of the virtual character in the preset scene; when the perspective screen of the virtual character is the third perspective screen of the virtual character, the first display screen is the screen of the user observing the virtual character as a third party in the preset scene.

[0053] In this embodiment, the multiple scene components may include but are not limited to: a goal, an obstacle, etc., and each scene component may include but is not limited to physical properties, such as friction.

[0054] In this embodiment, the environmental picture may include but is not limited to: rain, snow, wind, lighting, venue, etc.

[0055] In this embodiment, the server can modify the physical properties of multiple scene components based on different environment images. For example, when the environment image is raining, the server can adjust the friction of the scene components affected by the rain based on factors such as the intensity and amount of rain.

[0056] Step 204, in response to the control operation on the virtual character in the first display screen, obtain motion data collected by the motion capture device; the motion data is generated by controlling the virtual character based on the control operation.

[0057] In this embodiment, the server can simultaneously obtain the motion data collected by multiple motion capture devices of the user. The motion data may include but is not limited to: leg motion data, foot motion data, hand motion data, etc.

[0058] In this embodiment, the action data may include the position coordinates of the action.

[0059] In this embodiment, if Figure 3 As shown, the server can generate a virtual character controlled by the user through motion capture technology and virtual reality technology. Among them, since the motion capture setting has certain structural requirements on the skeleton system of the character model, the character model that comes with the Neuron resource package can be selected. On this basis, adjust the model setting to the Humanoid system, add NeuronAnimatorInstance.cs and the corresponding collision body to the model to complete the configuration of the character model in the Unity engine. Among them, NeuronInstance.cs is the base class for various instances that receive motion data.

[0060] NeuronAnimatorInstance.cs inherits from NeuronInstance and provides custom methods to directly apply action data to the components that bind bones in Unity.

[0061] Step 206: Obtain a second display screen based on the first display screen and the action data.

[0062] In this embodiment, the server can use a certain part of the virtual character as a reference position to align the first display screen and the action data in terms of position, so as to obtain the second display screen.

[0063] In this embodiment, the server can establish a spatial coordinate system for the first display screen, obtain the coordinates of the reference position in the spatial coordinate system of the first display screen, generate the spatial position coordinates corresponding to the action data in the spatial coordinate system of the first display screen, and add the action data to the coordinates corresponding to the action position coordinates in the first display screen to obtain the second display screen.

[0064] Step 208: Determine the interaction information between the virtual character and the scene components according to the relationship between the scene components and the action data of the virtual character in the second display screen.

[0065] In this embodiment, the server can determine whether the virtual character and the scene components interact based on the positional relationship between the scene components and the action data of the virtual character. When the virtual character and the scene components interact, the server can determine the interaction information between the virtual character and the scene components based on the physical properties of the scene components and the action data of the virtual character (such as action direction, action strength, etc.).

[0066] Step 210: Generate an interaction result corresponding to the interaction information and display the interaction result in the second display screen.

[0067] In this embodiment, the interaction result corresponding to the interaction information may include, but is not limited to: the influence result of the interaction on the scene components, the influence result of the interaction on the virtual character, etc.

[0068] In another embodiment, when this application is applied to a virtual football game, a hierarchical design framework can be adopted: Unity 3D game layer, display and input device (VR + motion capture) layer, user layer. As Figure 4 shown, at the bottom layer, the game scene is built through the Unity3D engine, and the logic of character interaction and scene conversion is constructed; at the second layer, the VR and motion capture devices are connected by using the scene rendering and character operation interfaces provided by the bottom layer; at the third layer, the VR and motion capture devices provide functions such as game display and manipulation for users. Among them, Unity 3D may include, but is not limited to: sub-modules such as scene design, physical simulation, and user interface design.

[0069] In the above virtual character interaction method based on virtual reality, first, a first display screen presented by a virtual reality device after entering a preset scene is obtained; in response to a control operation on the virtual character in the first display screen, motion data collected by a motion capture device is obtained, where the motion data is generated by controlling the virtual character based on the control operation. Further, a second display screen is obtained according to the first display screen and the motion data; according to the relationship between the scene components and the motion data of the virtual character in the second display screen, the interaction information between the virtual character and the scene components is determined. Then, based on the interaction information, an interaction result corresponding to the interaction information is generated, and the interaction result is displayed in the second display screen. The motion data and the first display screen are respectively obtained to obtain the second display screen, so as to obtain the interaction information between the scene components and the motion data of the virtual character in the second display screen, and accurate control and real-time display of the virtual character by the user can be realized.

[0070] In one embodiment, obtaining the second display screen according to the first display screen and the motion data includes: based on the first display screen, establishing a three-dimensional scene coordinate system to obtain the head position coordinates of the virtual character in the first display screen; based on the motion data, obtaining the relationship between the trajectory position of the virtual character's motion and the head position; based on the head position coordinates and the relationship between the trajectory position of the virtual character's motion and the head position, obtaining the motion position coordinates of the virtual character; adding the motion data at the coordinates corresponding to the motion position coordinates in the first display screen to obtain the second display screen.

[0071] In this embodiment, the server uses the head position of the virtual character as a reference position. It can be understood that the server can also select a fixed and unchanging position of the virtual character as a reference position.

[0072] In this embodiment, the server obtains the relationship between the trajectory position of the virtual character's motion and the head position; based on the head position coordinates and the relationship between the trajectory position of the virtual character's motion and the head position, obtaining the motion position coordinates of the virtual character can dynamically obtain the motion changes generated by the user's operation on the virtual character, and obtain the position of each action of the virtual character during the entire movement process, which can improve the accuracy of the second display screen.

[0073] In this embodiment, the server can generate a virtual character controlled by the user through motion capture technology and virtual reality technology.

[0074] In this embodiment, based on the data receiving software AXIS Studio provided by Neuron motion capture, after correctly connecting the sensor and calibrating the character model, the virtual character in the motion data can be driven by the motion data. Further, enable the BVH (BioVision) capture function in AXIS Studio and set the corresponding ports to forward the real-time data of motion capture to Unity, so that the virtual character in the first display screen is also driven by the motion data.

[0075] In another embodiment, since the motion capture device and the virtual reality device are respectively used to complete the setting of the virtual character, the positions of the two may be misaligned. Based on this, the server can combine the rotation angle value of the VR headset and the three-dimensional coordinates of the motion capture head by associating the script provided by the Neuron resource package with the sub-objects of the character model to correctly align the two.

[0076] In one of the embodiments, according to the relationship between the scene components and the motion data of the virtual character in the second display screen, the interaction information between the virtual character and the scene components is determined, including: obtaining the position coordinates and attributes of the scene components in the second display screen, and determining the position relationship between the virtual character and the scene components based on the motion position coordinates of the corresponding virtual character and the position coordinates of the scene components in the second display screen; based on the position relationship, the motion data of the virtual character and the attributes of the scene components in the second display screen, determining the interaction information between the virtual character and the scene components.

[0077] In this embodiment, the server determines whether the position relationship between the virtual character and the scene components is a collision based on the motion position coordinates of the corresponding virtual character and the position coordinates of the scene components in the second display screen. When the position relationship between the virtual character and the scene components is a collision, obtain the motion data of the virtual character and the physical attributes of the scene components in the second display screen, and calculate the interaction information between the virtual character and the scene components.

[0078] In this embodiment, when the position relationship between the virtual character and the scene components is a collision, the server can determine data such as the collision part of the virtual character and the force point of the scene component where the collision occurs based on the position relationship between the virtual character and the scene components and the motion data of the virtual character. Further, determine the interaction information between the virtual character and the scene components based on data such as the collision part of the virtual character, the force point of the scene component, the motion direction, the motion strength, and the force point of the scene component where the collision occurs.

[0079] In one embodiment, based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene components in the second display screen, the positional relationship between the virtual character and the scene components is determined, including: when there is at least one overlapping coordinate point between the action position coordinates of the corresponding virtual character and the position coordinates of the scene components in the second display screen, the positional relationship between the virtual character and the scene components is a collision.

[0080] In this embodiment, as Figure 5 shown, the server can build the first display screen and the user interface (UI) through Unity. Among them, the UI can include but is not limited to: the environment screen, the welcome interface scene, various training mode scenes, etc.

[0081] In this embodiment, the welcome interface scene can provide the user with options for game modes and game difficulties. Further, the server can enter the corresponding training mode scene based on the user's selection. As Figure 5 shown, when this application is applied to a virtual football game, each training mode scene is composed of adding multiple scene components on the basis of a preset football field scene.

[0082] In this embodiment, the virtual character can simultaneously have a collision positional relationship with multiple scene components, that is, the server can simultaneously obtain the interaction information generated by the collision of the virtual character with multiple scene components.

[0083] In one embodiment, the above method further includes: obtaining a checkpoint sequence, where the checkpoint sequence includes multiple checkpoints arranged in a preset order; for each checkpoint, detecting whether the distance between the virtual character and the checkpoint meets a preset condition, and when the preset condition is met and the adjacent previous checkpoint in the checkpoint sequence is in an active state, activating the checkpoint.

[0084] In this embodiment, when this application is applied to a virtual football game, the training mode scenes in the UI can include but are not limited to: passing, passing and receiving the ball, shooting, heading, dribbling, and dribbling through obstacles.

[0085] In this embodiment, the training mode scenes in the UI can be divided into two categories according to the setting logic. Among them, the first category aims directly at hitting the target to score, such as passing and heading; the second category requires the user to complete specified movements and can only perform operations such as passing and shooting after passing through the checkpoint. Optionally, as Figure 5 shown, the server can also provide the user with options such as training modes (such as free training, challenge mode, etc.) and training difficulties based on the UI, improving the user's experience freedom.

[0086] In this embodiment, when the user selects a training mode scenario of the second type (where the user needs to complete a specified movement and can perform operations such as passing and shooting only after passing through a checkpoint), when the virtual character controlled by the user passes through a checkpoint in the checkpoint sequence, it is detected whether the adjacent previous checkpoint in the checkpoint sequence is in an active state. When the adjacent previous checkpoint in the checkpoint sequence is in an active state, this checkpoint is activated. It can be understood that when the virtual character controlled by the user passes through the first checkpoint in the checkpoint sequence and the first checkpoint in the checkpoint sequence is not activated, the first checkpoint in the checkpoint sequence is activated.

[0087] In another embodiment, the UI may include: a first type of UI that needs to be displayed in combination with the scene within the scene (such as the mode selection UI on the start interface); a second type of UI that needs to be displayed in the perspective of the player's camera in real time and is always at a certain position in the perspective (such as the UI for displaying the game state); a third type of UI that needs to automatically adjust its position according to the player's trigger location (such as the UI for exiting the game and the UI for returning to the main menu). The server can implement the above three types of UI by using the Canvas of the Unity engine and modifying the Render Mode option of the Canvas. Among them, Canvas is a container in the Unity engine for accommodating UI components.

[0088] In this embodiment, when the current UI is the third type of UI, the server can calculate the Position and Rotation of the Canvas in the world coordinates based on the position when the user triggers the UI, and then keep them unchanged to reduce the dizziness feeling of the user when using the VR headset.

[0089] In one of the embodiments, the above method further includes: when all the checkpoints in the checkpoint sequence are activated, the collision function between the virtual character and the scene components is started.

[0090] In this embodiment, when the virtual character controlled by the user passes through the last checkpoint in the checkpoint sequence and the last checkpoint in the checkpoint sequence is not activated, the last checkpoint in the checkpoint sequence is activated, and the collision function between the virtual character and the scene components is started.

[0091] In this embodiment, when the user selects a training mode scenario of the first type (directly aiming at hitting the target score), the collision function between the virtual character and the scene components can still be started when not all the checkpoints in the checkpoint sequence are in an active state.

[0092] In one embodiment, the server can implement scene switching through the SceneManager.LoadScene() function.

[0093] In this embodiment, the server can use Canvas to construct the top layer, enabling smooth transitions during scene switching.

[0094] In another embodiment, the server can also provide loading prompts during scene switching. The prompting methods can include, but are not limited to: animations, text prompts, voice prompts, loading bars, etc.

[0095] In this embodiment, transition animations can also be added during scene switching. The server can use the Vector3.SmoothDamp() function to smoothly change the coordinates and viewing angles of the camera until it reaches the specified UI display position.

[0096] In one embodiment, the server can also play different background music based on different scenes.

[0097] In another embodiment, service enterprises can use scripts to achieve the function of not interrupting the background music during scene switching.

[0098] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0099] Based on the same inventive concept, the embodiments of the present application also provide a virtual character interaction device based on virtual reality for implementing the above-mentioned virtual character interaction method based on virtual reality. The implementation solutions provided by this device for solving problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the following virtual character interaction devices based on virtual reality can refer to the limitations on the virtual character interaction method based on virtual reality in the above text, and will not be repeated here.

[0100] In one embodiment, as Figure 6 shown, a virtual character interaction device based on virtual reality is provided, including: a first display screen acquisition module 602, an action data acquisition module 604, a second display screen acquisition module 606, an interaction information determination module 608, and an interaction result generation module 610, where:

[0101] The first display screen acquisition module 602 is configured to acquire a first display screen presented on a virtual reality device after entering a preset scenario.

[0102] The motion data acquisition module 604 is configured to acquire motion data collected by a motion capture device in response to a control operation on a virtual character in the first display screen; the motion data is generated by controlling the virtual character based on the control operation.

[0103] The second display screen acquisition module 606 is configured to obtain a second display screen according to the first display screen and the motion data.

[0104] The interaction information determination module 608 is configured to determine interaction information between the virtual character and the scene component according to the relationship between the scene component and the motion data of the virtual character in the second display screen.

[0105] The interaction result generation module 610 is configured to generate an interaction result corresponding to the interaction information based on the interaction information, and display the interaction result in the second display screen.

[0106] In one embodiment, the second display screen acquisition module 606 may include:

[0107] The character coordinate determination sub-module is configured to establish a three-dimensional scene coordinate system based on the first display screen, and obtain the head position coordinates of the virtual character in the first display screen.

[0108] The position relationship determination sub-module is configured to obtain the relationship between the trajectory position of the virtual character's motion and the head position based on the motion data.

[0109] The motion position coordinate determination sub-module is configured to obtain the motion position coordinates of the virtual character based on the head position coordinates and the relationship between the trajectory position of the virtual character's motion and the head position.

[0110] The motion data addition sub-module is configured to add motion data at the coordinates corresponding to the motion position coordinates in the first display screen to obtain the second display screen.

[0111] In one embodiment, the interaction information determination module 608 may include:

[0112] The interaction relationship determination sub-module is configured to obtain the position coordinates and attributes of the scene components in the second display screen, and determine the position relationship between the virtual character and the scene components based on the motion position coordinates of the corresponding virtual character and the position coordinates of the scene components in the second display screen.

[0113] The interaction information determination sub-module is configured to determine the interaction information between the virtual character and the scene components based on the position relationship, the motion data of the virtual character, and the attributes of the scene components in the second display screen.

[0114] In one embodiment, the interaction relationship determination sub-module may include:

[0115] A collision relationship determination unit, configured to determine that the positional relationship between the virtual character and the scene component is a collision when at least one coordinate point of the action position coordinates of the corresponding virtual character overlaps with the position coordinates of the scene component in the second display screen.

[0116] In one embodiment, the above device may further include:

[0117] Obtain a checkpoint sequence, where the checkpoint sequence includes a plurality of checkpoints arranged in a preset order;

[0118] A checkpoint activation module, configured to, for each checkpoint, detect whether the distance between the virtual character and the checkpoint meets a preset condition, and activate the checkpoint when the preset condition is met and the adjacent previous checkpoint in the checkpoint sequence is in an active state.

[0119] In one embodiment, the above device may further include:

[0120] A collision function start module, configured to start the collision function between the virtual character and the scene component when all the checkpoints in the checkpoint sequence are activated.

[0121] Each module in the above virtual character interaction device based on virtual reality may be implemented in whole or in part by software, hardware, and their combination. The above modules may be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to be called by the processor to execute the operations corresponding to the above respective modules.

[0122] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 7 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store action data. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a virtual character interaction method based on virtual reality.

[0123] Those skilled in the art can understand, Figure 7The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0124] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented: obtaining a first display screen presented by a virtual reality device after entering a preset scenario; in response to a control operation on a virtual character in the first display screen, obtaining action data collected by an action capture device; the action data is generated by controlling the virtual character based on the control operation; obtaining a second display screen according to the first display screen and the action data; determining interaction information between the virtual character and the scene component according to the relationship between the scene component and the action data of the virtual character in the second display screen; generating an interaction result corresponding to the interaction information based on the interaction information, and displaying the interaction result in the second display screen.

[0125] In one of the embodiments, when the processor executes the computer program, obtaining the second display screen according to the first display screen and the action data may include: based on the first display screen, establishing a three-dimensional space coordinate system of the scene to obtain the head position coordinates of the virtual character in the first display screen; based on the action data, obtaining the relationship between the trajectory position of the virtual character's action and the head position; based on the head position coordinates and the relationship between the trajectory position of the virtual character's action and the head position, obtaining the action position coordinates of the virtual character; adding the action data at the coordinates corresponding to the action position coordinates in the first display screen to obtain the second display screen.

[0126] In one of the embodiments, when the processor executes the computer program, determining the interaction information between the virtual character and the scene component according to the relationship between the scene component and the action data of the virtual character in the second display screen may include: obtaining the position coordinates and attributes of the scene component in the second display screen, and determining the position relationship between the virtual character and the scene component based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen; determining the interaction information between the virtual character and the scene component based on the position relationship, the action data of the virtual character, and the attributes of the scene component in the second display screen.

[0127] In one of the embodiments, when the processor executes the computer program, determining the position relationship between the virtual character and the scene component based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen may include: when at least one coordinate point of the action position coordinates of the corresponding virtual character overlaps with the position coordinates of the scene component in the second display screen, the position relationship between the virtual character and the scene component is a collision.

[0128] In one embodiment, when the processor executes the computer program to implement the above steps, it may further include: obtaining a checkpoint sequence, where the checkpoint sequence includes a plurality of checkpoints arranged in a preset order; for each checkpoint, detecting whether the distance between the virtual character and the checkpoint meets a preset condition, and when the preset condition is met and the adjacent previous checkpoint of the checkpoint in the checkpoint sequence is in an active state, activating the checkpoint.

[0129] In one embodiment, when the processor executes the computer program to implement the above steps, it may further include: when all the checkpoints in the checkpoint sequence are activated, starting the collision function between the virtual character and the scene component.

[0130] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a first display screen presented by a virtual reality device after entering a preset scene; in response to a control operation on the virtual character in the first display screen, obtaining motion data collected by a motion capture device; the motion data is generated by controlling the virtual character based on the control operation; obtaining a second display screen according to the first display screen and the motion data; determining interaction information between the virtual character and the scene component according to the relationship between the scene component and the motion data of the virtual character in the second display screen; generating an interaction result corresponding to the interaction information based on the interaction information, and displaying the interaction result in the second display screen.

[0131] In one embodiment, when the computer program is executed by the processor to further implement obtaining a second display screen according to the first display screen and the motion data, it may include: based on the first display screen, establishing a three-dimensional scene coordinate system, and obtaining the head position coordinates of the virtual character in the first display screen; based on the motion data, obtaining the relationship between the trajectory position of the virtual character's action and the head position; based on the head position coordinates and the relationship between the trajectory position of the virtual character's action and the head position, obtaining the action position coordinates of the virtual character; adding the motion data at the coordinates corresponding to the action position coordinates in the first display screen to obtain the second display screen.

[0132] In one embodiment, when the computer program is executed by the processor to further implement determining the interaction information between the virtual character and the scene component according to the relationship between the scene component and the motion data of the virtual character in the second display screen, it may include: obtaining the position coordinates and attributes of the scene component in the second display screen, and determining the position relationship between the virtual character and the scene component based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen; determining the interaction information between the virtual character and the scene component based on the position relationship, the motion data of the virtual character, and the attributes of the scene component in the second display screen.

[0133] In one embodiment, when the computer program is executed by a processor, it further implements determining the positional relationship between the virtual character and the scene component based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen, which may include: when there is at least one overlapping coordinate point between the action position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen, the positional relationship between the virtual character and the scene component is a collision.

[0134] In one embodiment, when the computer program is executed by a processor to implement the above steps, it may further include: obtaining a checkpoint sequence, where the checkpoint sequence includes a plurality of checkpoints arranged in a preset order; for each checkpoint, detecting whether the distance between the virtual character and the checkpoint meets a preset condition, and when the preset condition is met and the adjacent previous checkpoint in the checkpoint sequence is in an active state, activating the checkpoint.

[0135] In one embodiment, when the computer program is executed by a processor to implement the above steps, it may further include: when all the checkpoints in the checkpoint sequence are activated, the collision function between the virtual character and the scene component is started.

[0136] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor implements the following steps: obtaining a first display screen presented by a virtual reality device after entering a preset scene; in response to a control operation on the virtual character in the first display screen, obtaining action data collected by an action capture device; the action data is generated by controlling the virtual character based on the control operation; obtaining a second display screen according to the first display screen and the action data; determining interaction information between the virtual character and the scene component according to the relationship between the scene component in the second display screen and the action data of the virtual character; generating an interaction result corresponding to the interaction information based on the interaction information, and displaying the interaction result in the second display screen.

[0137] In one embodiment, when the computer program is executed by a processor to further implement obtaining a second display screen according to the first display screen and the action data, it may include: based on the first display screen, establishing a scene three-dimensional space coordinate system to obtain the head position coordinates of the virtual character in the first display screen; based on the action data, obtaining the relationship between the trajectory position of the virtual character's action and the head position; based on the head position coordinates and the relationship between the trajectory position of the virtual character's action and the head position, obtaining the action position coordinates of the virtual character; adding the action data at the coordinates corresponding to the action position coordinates in the first display screen to obtain the second display screen.

[0138] In one embodiment, when the computer program is executed by a processor, it also determines the interaction information between the virtual character and the scene component according to the relationship between the action data of the scene component and the virtual character in the second display screen, which may include: obtaining the position coordinates and attributes of the scene component in the second display screen, and determining the position relationship between the virtual character and the scene component based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen; determining the interaction information between the virtual character and the scene component based on the position relationship, the action data of the virtual character and the attributes of the scene component in the second display screen.

[0139] In one embodiment, when the computer program is executed by a processor, it also determines the position relationship between the virtual character and the scene component based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen, which may include: when at least one coordinate point of the action position coordinates of the corresponding virtual character overlaps with the position coordinates of the scene component in the second display screen, the position relationship between the virtual character and the scene component is a collision.

[0140] In one embodiment, when the computer program is executed by a processor to implement the above steps, it may further include: obtaining a checkpoint sequence, where the checkpoint sequence includes a plurality of checkpoints arranged in a preset order; for each checkpoint, detecting whether the distance between the virtual character and the checkpoint meets a preset condition, and when the preset condition is met and the adjacent previous checkpoint in the checkpoint sequence is in an active state, activating the checkpoint.

[0141] In one embodiment, when the computer program is executed by a processor to implement the above steps, it may further include: when all the checkpoints in the checkpoint sequence are activated, the collision function between the virtual character and the scene component is started.

[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0143] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.

[0144] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0145] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A virtual character interaction method based on virtual reality, characterized in that, The method includes: Obtaining a first display screen presented by a virtual reality device after entering a preset scene; In response to a control operation on a virtual character in the first display screen, obtaining motion data collected by a motion capture device; the motion data is generated by controlling the virtual character based on the control operation; Obtaining a second display screen according to the first display screen and the motion data; Determining interaction information between the virtual character and the scene component according to the relationship between the scene component and the motion data of the virtual character in the second display screen; Generating an interaction result corresponding to the interaction information based on the interaction information, and displaying the interaction result in the second display screen; Obtaining a checkpoint sequence, the checkpoint sequence including a plurality of checkpoints arranged in a preset order; For each checkpoint, detecting whether the distance between the virtual character and the checkpoint meets a preset condition. When the preset condition is met and the adjacent previous checkpoint in the checkpoint sequence is in an active state, activating the checkpoint; When all the checkpoints in the checkpoint sequence are activated, the collision function between the virtual character and the scene component is started.

2. The method according to claim 1, wherein The obtaining the second display screen according to the first display screen and the motion data includes: Based on the first display screen, establishing a three-dimensional scene coordinate system, and obtaining the head position coordinates of the virtual character in the first display screen; Based on the motion data, obtaining the relationship between the trajectory position of the virtual character's motion and the head position; Based on the head position coordinates and the relationship between the trajectory position of the virtual character's motion and the head position, obtaining the motion position coordinates of the virtual character; Adding the motion data at the coordinates corresponding to the motion position coordinates in the first display screen to obtain a second display screen.

3. The method according to claim 2, wherein The determining the interaction information between the virtual character and the scene component according to the relationship between the scene component and the motion data of the virtual character in the second display screen includes: Obtaining the position coordinates and attributes of the scene component in the second display screen, and determining the position relationship between the virtual character and the scene component based on the motion position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen; Determining the interaction information between the virtual character and the scene component based on the position relationship, the motion data of the virtual character, and the attributes of the scene component in the second display screen.

4. The method according to claim 3, wherein The determining the position relationship between the virtual character and the scene component based on the motion position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen includes: When at least one coordinate point of the motion position coordinates of the corresponding virtual character overlaps with the position coordinates of the scene component in the second display screen, the position relationship between the virtual character and the scene component is collision.

5. A virtual character interaction device based on virtual reality, characterized in that, The device includes: A first display screen obtaining module, configured to obtain a first display screen presented by a virtual reality device after entering a preset scene; An action data acquisition module, configured to acquire action data collected by an action capture device in response to a control operation on a virtual character in a first display screen; the action data is generated by controlling the virtual character based on the control operation. A second display screen acquisition module, configured to obtain a second display screen according to the first display screen and the action data. An interaction information determination module, configured to determine interaction information between the virtual character and the scene component according to the relationship between the scene component and the action data of the virtual character in the second display screen. An interaction result generation module, configured to generate an interaction result corresponding to the interaction information based on the interaction information, and display the interaction result in the second display screen. A checkpoint sequence acquisition module, where the checkpoint sequence includes a plurality of checkpoints arranged in a preset order. A checkpoint activation module, configured to, for each checkpoint, detect whether the distance between the virtual character and the checkpoint meets a preset condition. When the preset condition is met and the adjacent previous checkpoint in the checkpoint sequence is in an activated state, activate the checkpoint. A collision function activation module, configured to activate the collision function between the virtual character and the scene component when all the checkpoints in the checkpoint sequence are activated.

6. The device according to claim 5, characterized in that, The second display screen acquisition module includes: A character coordinate determination sub-module, configured to establish a scene three-dimensional space coordinate system based on the first display screen, and obtain the head position coordinates of the virtual character in the first display screen. A position relationship determination sub-module, configured to obtain the relationship between the trajectory position of the virtual character's action and the head position based on the action data. An action position coordinate determination sub-module, configured to obtain the action position coordinates of the virtual character based on the head position coordinates and the relationship between the trajectory position of the virtual character's action and the head position. An action data addition sub-module, configured to add action data to the coordinates corresponding to the action position coordinates in the first display screen to obtain the second display screen.

7. The device according to claim 6, characterized in that, The interaction information determination module includes: An interaction relationship determination sub-module, configured to obtain the position coordinates and attributes of the scene component in the second display screen, and determine the position relationship between the virtual character and the scene component based on the action position coordinates of the corresponding virtual character and the position coordinates of the scene component in the second display screen. An interaction information determination sub-module, configured to determine the interaction information between the virtual character and the scene component based on the position relationship, the action data of the virtual character, and the attributes of the scene component in the second display screen.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 4.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Game design method and device based on virtual VR reality technology

    CN111249721A

  • VR system

    CN209221474U