WO2018177075A1 - 虚拟现实中人体的模拟方法和装置、存储介质和电子装置 - Google Patents

虚拟现实中人体的模拟方法和装置、存储介质和电子装置 Download PDF

Info

Publication number
WO2018177075A1
WO2018177075A1 PCT/CN2018/077922 CN2018077922W WO2018177075A1 WO 2018177075 A1 WO2018177075 A1 WO 2018177075A1 CN 2018077922 W CN2018077922 W CN 2018077922W WO 2018177075 A1 WO2018177075 A1 WO 2018177075A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
node
human body
tracker
position information
Prior art date
Application number
PCT/CN2018/077922
Other languages
English (en)
French (fr)
Inventor
程东哲
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018177075A1 publication Critical patent/WO2018177075A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/01Indexing scheme relating to G06F3/01
    • G06F2203/012Walk-in-place systems for allowing a user to walk in a virtual environment while constraining him to a given position in the physical environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2016Rotation, translation, scaling

Definitions

  • the present application relates to the field of virtual reality, and in particular to a method and device for simulating a human body in a virtual reality, a storage medium, and an electronic device.
  • the embodiment of the present application provides a simulation method and device for a human body in a virtual reality, a storage medium, and an electronic device, so as to at least solve the technical problem that the virtual reality cannot perform real simulation on the human body motion.
  • a method for simulating a human body in virtual reality includes: acquiring a human body model displayed in virtual reality, wherein the human body model is used to simulate a target human body in a real environment Obtaining position information of all trackers in the tracker set of the target human body, wherein the tracker set includes at least one tracker disposed on a predetermined body part of the target human body; controlling according to the acquired position information The human body model in the virtual reality is moved such that the human body model simulates the motion of the target human body.
  • a simulation device for a human body in a virtual reality including: a first acquiring unit, configured to acquire a human body model displayed in virtual reality, wherein the human body model is used for Simulating a target human body in a real environment; a second acquiring unit, configured to acquire position information of all trackers in the tracker set of the target human body, wherein the tracker set includes at least one set in the target human body a tracker on the predetermined body part; a control unit configured to control the mannequin in the virtual reality to move according to the acquired position information, so that the human body model simulates the action of the target human body.
  • a human body model displayed in a virtual reality is acquired, wherein the human body model is used to simulate a target human body in a real environment; and all trackers in the tracker set of the target human body are acquired.
  • Position information wherein the tracker set includes at least one tracker disposed on a predetermined body part of the target human body; controlling the human body model in the virtual reality to move according to the acquired position information, so that the The human body model simulates the action of the target human body, and controls the human body model in the virtual reality to move according to the position information of the tracker on the predetermined body part of the target human body, thereby achieving the purpose of controlling the human body model to simulate the target human body motion, thereby realizing According to the position information of the predetermined body part of the target human body, the technical effect of simulating the movement of the target human body by the human body model is controlled, thereby solving the technical problem that the virtual reality cannot perform real simulation on the human body motion.
  • FIG. 1 is a schematic diagram of a scene layout of a human body simulation method in an alternative virtual reality according to an embodiment of the present application
  • FIG. 2 is a flow chart of an alternative method for simulating a human body in virtual reality according to an embodiment of the present application
  • FIG. 3 is a schematic view of a standard human body skeleton in accordance with an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a process of controlling a target node to move with a parent node of a target node according to an embodiment of the present application
  • FIG. 5 is a partial skeleton diagram including a head, a body, and legs according to an embodiment of the present application;
  • FIG. 6 is a schematic diagram of a partial skeleton including both hands and arms according to an embodiment of the present application
  • FIG. 7 is a partial skeleton diagram of a simplified skeleton of a leg according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an optional simulation device for a human body in virtual reality according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a terminal in accordance with an embodiment of the present application.
  • an embodiment of a method that can be performed by an embodiment of the apparatus of the present application is provided. It is noted that the steps illustrated in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions. The execution is performed, and although the logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
  • a simulation method of a human body in virtual reality is provided.
  • FIG. 1 is a schematic diagram of a scene layout of a human body simulation method in an optional virtual reality according to an embodiment of the present application. As shown in FIG.
  • a tracker is disposed on a predetermined body part of a target human body, wherein the target human body is configured
  • the head is wearing a visual helmet (equivalent to a head tracker), and the left and right hands of the target human body respectively hold a handle (equivalent to a hand tracker), when the target human body performs any action in a predetermined area
  • the virtual reality device shown in FIG. 1 acquires the position information of the visual helmet and the two handles through the position information receiving device, thereby acquiring the position information of the target human head and the hand, and controlling the virtual reality according to the acquired position information.
  • the human body model is moved correspondingly to simulate various actions made by the target human body, thereby realizing the technical effect of simulating the movement of the human body model according to the position information of the predetermined body part of the target human body, Furthermore, it solves the technical problem that virtual reality cannot simulate the human body movement and makes people interact in virtual reality. Closer to the real feeling.
  • the virtual reality device should include a necessary tracker to obtain the position of the predetermined body part of the target human body.
  • Information such as a head tracker, a hand tracker, a foot tracker, etc., wherein the head tracker is mainly used to acquire the head position information of the target human body, and then control the human body model to the target according to the head position information.
  • the movement of the head, neck and torso of the human body is simulated.
  • the hand tracker is used to obtain the position information of the hands of the target human body, and then according to the position information of the hands, the human body model is controlled to simulate the hands and arms of the target human body, and the feet are simulated.
  • the part tracker is used to obtain the position information of the feet of the target human body, and then according to the position information of the feet, the human body model is controlled to simulate the movement of the feet and legs of the target human body.
  • the tracker included in the virtual reality device should include at least a head tracker to control the body model to simulate the body motion of the target human body at least through the head position information of the target human body.
  • the virtual reality device can simulate the hands and arm movements of the target human body through the hand tracker, thereby making the human body model target the human body.
  • the simulation is closer to reality.
  • the virtual reality device can include a head tracker, a hand tracker, and a foot tracker to control the body model to simulate the body movements of the target body, both hands and arms, and both feet and legs.
  • FIG. 2 is a flowchart of a method for simulating a human body in a virtual reality according to an embodiment of the present application.
  • the simulation method of the human body in the virtual reality provided by the embodiment of the present application is specifically described below with reference to FIG. 2 , as shown in FIG. 2 .
  • the simulation method of the human body in the virtual reality mainly includes the following steps S202 to S206:
  • Step S202 Acquire a human body model displayed in the virtual reality, wherein the human body model is used to simulate the target human body in the real environment.
  • Virtual reality technology is a computer simulation system that can create a virtual world. It uses a computer to generate a multi-source information fusion, interactive 3D dynamic vision simulation environment, in which the user's entity behavior is simulated. Immerse users into the environment.
  • the human body model displayed in virtual reality is used to simulate the user's physical behavior, control the human body model to simulate the user, and make the human body model simulate the action closer to the user's physical behavior, thereby making the user in virtual reality.
  • the interaction is more realistic and improves the user experience.
  • Step S204 Acquire location information of all trackers in the tracker set of the target human body, wherein the tracker set includes at least one tracker disposed on a predetermined body part of the target human body.
  • the tracker is disposed on a predetermined body part of the target human body, and when the predetermined body part of the target human body acts, the position of the tracker also changes accordingly. Therefore, the position information of the tracker is the target.
  • the position information of the predetermined body part of the human body As shown in Fig.
  • the orientation of the helmet worn by the target human body also changes, and according to the orientation of the helmet, the head orientation of the target human body can be obtained;
  • the position of the handle held by the target human body also changes, and the position of the hand and the arm of the target human body can be obtained according to the position of the handle held by the target human body.
  • Step S206 controlling the human body model in the virtual reality to move according to the acquired position information, so that the human body model simulates the action of the target human body.
  • the position of the n-level parent bone on the bone chain in which it is located can be determined by first determining the position of the child bone, and then determining the position of the entire bone chain.
  • the position information of each part of the human body model is determined according to the acquired position information of the tracker, and then the position of the other parts is derived according to the inverse dynamics. Information, thereby determining the positional information of all parts of the entire human body model, so that the human body model can realistically simulate the action of the target human body.
  • the human body model displayed in the virtual reality is acquired, wherein the human body model is used to simulate the target human body in the real environment; and the position information of all the trackers in the tracker set of the target human body is acquired, wherein
  • the tracker set includes at least one tracker disposed on the predetermined body part of the target human body; controlling the human body model in the virtual reality to move according to the acquired position information, so that the human body model simulates the action of the target human body, according to the target human body
  • the position information of the tracker on the predetermined body part controls the human body model in the virtual reality to move, and achieves the purpose of controlling the human body model to simulate the target human body motion, thereby realizing the position information of the predetermined body part according to the target human body, and controlling the human body.
  • the model simulates the technical effects of the action of the target human body, and further solves the technical problem that the virtual reality cannot perform real simulation on the human body motion.
  • the location information includes a location of the tracker
  • controlling the human body model in the virtual reality to move according to the acquired location information includes: determining, by using the location information of any one of the acquired location information, a target location; Whether the distance between the current position of the target node of the human body model and the target position is greater than a first preset threshold, wherein the target node is associated with a predetermined body part of the target human body corresponding to the target position; if the current position and the target position of the target node If the distance between the distances is greater than the first preset threshold, all the parent nodes of the control target node and the target node are moved, wherein the target node and the parent node are used to simulate multiple bones of one bone chain in the target human body.
  • the position information of the tracker includes the position of the tracker, and the position of the tracker is the target position, and the corresponding part of the human body model for simulating the target human body is targeted. Node, then controlling the human body model to simulate the target human body needs to control the target node to move to the target position.
  • a preset threshold is set.
  • the target node needs to be moved to the target location, and the control target node moves to the target location, and At the same time, the parent node of the target node is controlled to move with the movement of the target node, so as to achieve the purpose of real simulation of the target human body. If the distance between the target node and the target location is less than or equal to the preset threshold, then the target node is considered to be approximately at the target location, and the target node does not need to be moved.
  • the target node is a human body model node corresponding to a predetermined body part of the target human body at the target position.
  • the parent node of the target node also corresponds to the target human body part, which is the same bone body as the predetermined body part of the target human body, and is the parent bone of the predetermined body part of the target human body.
  • each bone in FIG. 3 corresponds to a node in a human body model, wherein the neck bone and the spine are the parent bone of the skull, and the neck bone and the spine are in the human body model.
  • the corresponding node is the parent node of the node corresponding to the head bone.
  • the arm and the clavicle are the parent bone of the hand
  • the upper leg bone and the leg bone are the parent bone of the foot
  • the corresponding node of the arm and the clavicle in the human body model is the parent node of the node corresponding to the hand
  • the corresponding node in the human body model is the parent node of the node corresponding to the foot.
  • controlling the movement of all the parent nodes of the target node and the target node comprises: acquiring a positional relationship between all the parent nodes of the target node and the target location; selecting a parent node adjacent to the target node as the rotation node according to the positional relationship; maintaining rotation The distance between the node and all the child nodes of the rotating node is unchanged, and all the child nodes of the rotating node are rotated to move the target node to the line connecting the rotating node and the target position; the parent node adjacent to the rotating node is reselected as the rotation Node until all parent nodes of the target node are selected.
  • the target node and the parent node of the target node are moved to simulate the human body model to the target human body.
  • the specific control movement mode is shown in FIG. 4.
  • N1, N2, N3, and N4 are four nodes in the human body model, and the body parts of the target human body corresponding to N1, N2, N3, and N4 are in the same bone chain.
  • Upper, and the body part corresponding to N1, N2, and N3 is the parent bone of the body part corresponding to N4, and N1, N2, and N3 are the parent nodes of N4.
  • N4 is the target node
  • the tracker is disposed on the predetermined body part of the target human body corresponding to N4
  • T is the position of the acquired tracker, that is, the target position.
  • the parent node N3 adjacent to the target node N4 is first selected as the rotation node, and the distance between the rotation node N3 and all its child nodes (node N4) is kept unchanged, that is, the length of the N3N4 is kept unchanged, and the mobile node N4 is rotated, and the N4 is rotated.
  • the angle moved by the node N4 is the minimum angle that may be moved, and during the first movement, the angle of the movement of the node N4 is a1.
  • the parent node (N2) adjacent to the current rotating node N3 is selected as a new rotating node, and the distance between the rotating node N2 and all its child nodes (nodes N3, N4) is kept unchanged, that is, N2N3, N2N4, and N3N4 are maintained.
  • the length of the node N3 and the node N4 are rotated, and N4 is moved to the line connecting the node N2 and the target position T.
  • the angle at which the node N3 and the node N4 move is a2. According to the above moving method, until all the parent nodes of the target node N4 are selected. In FIG.
  • the third moving process selects the parent node N1 of the target node N4 as a rotating node, and keeps the distance between the nodes N1, N2, N3, and N4 unchanged, and rotates the mobile nodes N2, N3, and N4 to make the node N4 moves to the line connecting node N1 to the target location.
  • a simulation of the human body model to the target human body motion is completed.
  • the simulation of the target human body by the human body model is completed, if the distance between the target node N4 and the target position T is If the threshold value is greater than the preset threshold, the human body model needs to be controlled again to move according to the above moving process until the distance between the target node N4 and the target position T is less than or equal to a preset threshold.
  • the location information includes an orientation of the tracker
  • controlling the human body model in the virtual reality to move according to the acquired location information includes: using a direction indicated by any one of the acquired location information as a target orientation; Whether the target angle between the current orientation of the target node of the human body model and the target orientation is greater than a second preset threshold; if the target angle is greater than the second preset threshold, controlling all target nodes of the target node and the target node according to the first preset
  • the angle is rotated, wherein the angle of rotation of the target node is equal to the second preset threshold, and the rotation angle of all the parent nodes of the target node is less than or equal to the rotation angle of the target node; if the target angle is less than or equal to the second preset threshold, then the control is performed.
  • the target node rotates according to the target angle, and controls the parent node of the target node to rotate according to the second preset angle, wherein the second preset angle is less than or equal to the target angle.
  • the body part of the human body model is controlled to rotate according to the obtained angle of the tracker to simulate the target human body. Since the rotation angle of the body part of the target body is limited, when the control human body model simulates the rotation of the target human body, the second threshold is set, and the target angle required to be rotated according to the angle information of the acquired tracker is greater than the second threshold.
  • the control target node and the target node's parent node rotate according to the first preset angle.
  • the control target node follows the second threshold.
  • the parent node of the target node rotates according to the second preset angle. Specifically, the control target node rotates according to the target angle, and the parent node of the control target node rotates according to a rotation angle smaller than or equal to the target angle.
  • the angles of rotation of the multiple parent nodes of the target node are less than or equal to the rotation angle of the target node, and in all the nodes, the rotation angle of the parent node is less than or equal to the rotation of the child node. angle.
  • the human body model simulates the target human body, when the target angle required to be rotated according to the angle information of the tracker is greater than 90 degrees, the human body is controlled.
  • the model rotates the head at 90 degrees.
  • the neck can be controlled to rotate 70 degrees in the same direction to control the spine to rotate 50 degrees in the same direction. If the target angle to be rotated is 60 degrees according to the angle information of the tracker, the human body model is controlled to rotate the head according to 60 degrees. Alternatively, the neck can be controlled to rotate 30 degrees in the same direction to control the spine to rotate in the same direction. 15 degrees.
  • the tracker set includes at least a head tracker
  • acquiring location information of all the trackers in the tracker set of the target human body includes: acquiring head position information of the head tracker; and controlling the virtual reality according to the acquired position information.
  • the moving of the human body model includes: controlling the human body model according to the head position information to perform at least one of the following actions: head rotation, body bending, and body movement.
  • the tracker set includes at least a head tracker, and according to the position information of the head tracker, the human body model is controlled to simulate the motion of the target human body, wherein the human body model can rotate the head of the target human body. Simulation of body bending and body movement.
  • the method before controlling the movement of the human body model in the virtual reality according to the acquired position information, the method comprises: combining the left-hand node and the right-hand node of the human body model into a hand node; and/or the left leg node of the human body model And the right leg node is merged into a leg node, wherein the merged hand node and the leg node are the parent nodes of the mannequin head node.
  • the location information of the head tracker is obtained, and the human body model is simplified according to the position information, and the node of the human body model can be simplified, and
  • the head node is used as the target node, and the parent node of the control head node and the head node is moved to simulate the movement of the target human body by the human body model.
  • the left-hand node and the right-hand node may be merged into a hand node, the left leg node and the right leg node are merged into a leg node, and the merged hand node and/or leg node are used as a parent node of the head node.
  • the hand node and/or the leg node are controlled to move accordingly.
  • the human body model when the human body model is controlled to simulate the target human body, the head and body movements of the target human body are simulated through the head node, and the hands and the doubles of the target human body are simulated through the hand node.
  • the arm movement, the human skeleton shown in Fig. 3 can be split into two parts shown in Fig. 5 and Fig. 6, wherein Fig. 5 shows the skeleton parts of the head, the body and the legs, and Fig. 6 shows the hands. And the skeleton portion of the arms, as shown in Fig. 7, can simplify the skeleton portion shown in Fig. 6.
  • the tracker set includes at least a head tracker and a hand tracker
  • acquiring location information of all trackers in the target human body tracker set includes: acquiring a head tracker head position information and a hand tracker Hand position information
  • controlling the movement of the human body model in the virtual reality according to the acquired position information comprises: controlling the human body model according to the head position information and the hand position information to perform at least one of the following actions: head rotation, body bending, body Movement, arm movement, arm bending and arm rotation.
  • the head tracker obtains the head position information of the target human body
  • the target tracker obtains the target.
  • the hand position information of the human body simulates the head and body movements of the target human body based on the head position information, and simulates the movement of the hand and the arm of the target human body based on the hand position information.
  • the tracker set includes at least a head tracker, a hand tracker, and a foot tracker
  • acquiring location information of all trackers in the target human body tracker set includes: acquiring a head tracker head position information
  • the hand position information of the hand tracker and the foot position information of the foot tracker includes: according to the head position information, the hand position information, and the foot
  • the positional information controls the mannequin to perform at least one of the following actions: head rotation, body bending, body movement, arm movement, arm bending, arm rotation, leg movement, leg bending, and leg rotation.
  • the head tracker obtains the head position information of the target human body through the hand.
  • the part tracker acquires the hand position information of the target human body, acquires the foot position information of the target human body through the foot tracker, simulates the head and body movements of the target human body according to the head position information, and targets the target according to the hand position information.
  • the human body's hand and arm movements are simulated, and the target's feet and legs are simulated according to the foot position information.
  • the method before acquiring the human body model displayed in the virtual reality, the method further includes: establishing a human body model having a preset body proportion; acquiring an actual body proportion of the target human body according to the position information of the tracker; and scaling the human body according to the actual body proportion
  • the model is such that the body proportion of the human body model is consistent with the body proportion of the target human body.
  • a human body model conforming to the actual body proportion of the target human body is established. Specifically, a human body model having a standard body ratio is first established, and then the actual body proportion relationship of the target human body is obtained according to the position information of the tracker configured on the target human body, for example, according to the position information of the target human body head tracker. Knowing the height of the target human body, and then knowing the arm length of the target human body based on the position information of the target human body. Finally, according to the actual body proportion relationship of the target human body, the above-mentioned human body model with a standard body proportion is scaled so that the body proportional relationship of the human body model is consistent with the actual body proportion of the target human body.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the related art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present application.
  • a simulation device for a human body in a virtual reality for implementing a simulation method of a human body in the virtual reality, wherein the simulation device of the human body in the virtual reality is mainly used to execute the foregoing content of the embodiment of the present application.
  • the simulation method of the human body in the virtual reality is provided. The following describes the human body simulation device in the virtual reality provided by the embodiment of the present application:
  • FIG. 8 is a schematic diagram of an optional simulation device for a human body in a virtual reality according to an embodiment of the present application.
  • the simulation device of the human body in the virtual reality mainly includes:
  • the first obtaining unit 810 is configured to acquire a human body model displayed in the virtual reality, wherein the human body model is used to simulate the target human body in the real environment.
  • Virtual reality technology is a computer simulation system that can create a virtual world. It uses a computer to generate a multi-source information fusion, interactive 3D dynamic vision simulation environment, in which the user's entity behavior is simulated. Immerse users into the environment.
  • the human body model displayed in virtual reality is used to simulate the user's physical behavior, control the human body model to simulate the user, and make the human body model simulate the action closer to the user's physical behavior, thereby making the user in virtual reality.
  • the interaction is more realistic and improves the user experience.
  • the second obtaining unit 820 is configured to acquire location information of all trackers in the tracker set of the target human body, wherein the tracker set includes at least one tracker disposed on a predetermined body part of the target human body.
  • the tracker is disposed on a predetermined body part of the target human body, and when the predetermined body part of the target human body acts, the position of the tracker also changes accordingly. Therefore, the position information of the tracker is the target.
  • the position information of the predetermined body part of the human body As shown in Fig.
  • the orientation of the helmet worn by the target human body also changes, and according to the orientation of the helmet, the head orientation of the target human body can be obtained;
  • the position of the handle held by the target human body also changes, and the position of the hand and the arm of the target human body can be obtained according to the position of the handle held by the target human body.
  • the control unit 830 is configured to control the human body model in the virtual reality to move according to the acquired position information, so that the human body model simulates the action of the target human body.
  • the position of the n-level parent bone on the bone chain in which it is located can be determined by first determining the position of the child bone, and then determining the position of the entire bone chain.
  • the position information of each part of the human body model is determined according to the acquired position information of the tracker, and then the position of the other parts is derived according to the inverse dynamics. Information, thereby determining the positional information of all parts of the entire human body model, so that the human body model can realistically simulate the action of the target human body.
  • the human body model displayed in the virtual reality is acquired, wherein the human body model is used to simulate the target human body in the real environment; and the position information of all the trackers in the tracker set of the target human body is acquired, wherein
  • the tracker set includes at least one tracker disposed on the predetermined body part of the target human body; controlling the human body model in the virtual reality to move according to the acquired position information, so that the human body model simulates the action of the target human body, according to the target human body
  • the position information of the tracker on the predetermined body part controls the human body model in the virtual reality to move, and achieves the purpose of controlling the human body model to simulate the target human body motion, thereby realizing the position information of the predetermined body part according to the target human body, and controlling the human body.
  • the model simulates the technical effects of the action of the target human body, and further solves the technical problem that the virtual reality cannot perform real simulation on the human body motion.
  • the location information includes a location of the tracker
  • the control unit includes: a location module, configured to use a location represented by any one of the acquired location information as a target location; and a first determining module configured to determine the human body Whether the distance between the current location of the target node of the model and the target location is greater than a first predetermined threshold, wherein the target node is associated with a predetermined body part of the target human body corresponding to the target location; and the first control module is configured to When the distance between the current position of the node and the target position is greater than the first preset threshold, all the parent nodes of the control target node and the target node are moved, wherein the target node and the parent node are used to simulate a bone chain in the target human body. Bones.
  • the position information of the tracker includes the position of the tracker, and the position of the tracker is the target position, and the corresponding part of the human body model for simulating the target human body is targeted. Node, then controlling the human body model to simulate the target human body needs to control the target node to move to the target position.
  • a preset threshold is set. If the distance between the target node and the target location is greater than the preset threshold, the target node needs to be moved to the target location, and the control target node moves to the target location, and It is necessary to control the parent node of the target node to move with the movement of the target node, so as to achieve the purpose of real simulation of the target human body.
  • the target node is a human body model node corresponding to a predetermined body part of the target human body at the target position.
  • the parent node of the target node also corresponds to the target human body part, which is the same bone body as the predetermined body part of the target human body, and is the parent bone of the predetermined body part of the target human body.
  • each bone in FIG. 3 corresponds to a node in a human body model, wherein the neck bone and the spine are the parent bone of the skull, and the neck bone and the spine are in the human body model.
  • the corresponding node is the parent node of the node corresponding to the head bone.
  • the arm and the clavicle are the parent bone of the hand
  • the upper leg bone and the leg bone are the parent bone of the foot
  • the corresponding node of the arm and the clavicle in the human body model is the parent node of the node corresponding to the hand
  • the corresponding node in the human body model is the parent node of the node corresponding to the foot.
  • the first control module includes: an acquiring submodule, configured to acquire a positional relationship between all the parent nodes of the target node and the target location; and a rotating node submodule, configured to select a parent node adjacent to the target node according to the location relationship a rotation node; a rotation submodule, configured to keep the distance between the rotation node and all the child nodes of the rotation node unchanged, and rotate all the child nodes of the rotation node to move the target node to the line connecting the rotation node and the target position; A submodule for reselecting a parent node adjacent to the rotating node as a rotating node until all parent nodes of the target node are selected.
  • the target node and the parent node of the target node are moved to simulate the human body model to the target human body.
  • the specific control movement mode is shown in FIG. 4.
  • N1, N2, N3, and N4 are four nodes in the human body model, and the body parts of the target human body corresponding to N1, N2, N3, and N4 are in the same bone chain.
  • Upper, and the body part corresponding to N1, N2, and N3 is the parent bone of the body part corresponding to N4, and N1, N2, and N3 are the parent nodes of N4.
  • N4 is the target node
  • the tracker is disposed on the predetermined body part of the target human body corresponding to N4
  • T is the position of the acquired tracker, that is, the target position.
  • the parent node N3 adjacent to the target node N4 is first selected as the rotation node, and the distance between the rotation node N3 and all its child nodes (node N4) is kept unchanged, that is, the length of the N3N4 is kept unchanged, and the mobile node N4 is rotated, and the N4 is rotated.
  • the angle moved by the node N4 is the minimum angle that may be moved, and during the first movement, the angle of the movement of the node N4 is a1.
  • the parent node (N2) adjacent to the current rotating node N3 is selected as a new rotating node, and the distance between the rotating node N2 and all its child nodes (nodes N3, N4) is kept unchanged, that is, N2N3, N2N4, and N3N4 are maintained.
  • the length of the node N3 and the node N4 are rotated, and N4 is moved to the line connecting the node N2 and the target position T.
  • the angle at which the node N3 and the node N4 move is a2. According to the above moving method, until all the parent nodes of the target node N4 are selected. In FIG.
  • the third moving process selects the parent node N1 of the target node N4 as a rotating node, and keeps the distance between the nodes N1, N2, N3, and N4 unchanged, and rotates the mobile nodes N2, N3, and N4 to make the node N4 moves to the line connecting node N1 to the target location.
  • a simulation of the human body model to the target human body motion is completed.
  • the simulation of the target human body by the human body model is completed, if the distance between the target node N4 and the target position T is If the threshold value is greater than the preset threshold, the human body model needs to be controlled again to move according to the above moving process until the distance between the target node N4 and the target position T is less than or equal to a preset threshold.
  • the location information includes an orientation of the tracker
  • the control unit includes: an orientation module, configured to use a direction indicated by any one of the acquired location information as a target orientation; and a second determining module, configured to determine the human body Whether the target angle between the current orientation of the target node of the model and the target orientation is greater than a second preset threshold;
  • the second control module is configured to control all the parents of the target node and the target node when the target angle is greater than the second preset threshold The node rotates according to the first preset angle, wherein the angle of rotation of the target node is equal to the second preset threshold, and the rotation angle of all the parent nodes of the target node is less than or equal to the rotation angle of the target node;
  • the third control module is configured to When the target angle is less than or equal to the second preset threshold, the control target node rotates according to the target angle, and controls the parent node of the target node to rotate according to the second preset angle, wherein the second preset angle is less than
  • the body part of the human body model is controlled to rotate according to the obtained angle of the tracker to simulate the target human body. Since the rotation angle of the body part of the target body is limited, when the control human body model simulates the rotation of the target human body, the second threshold is set, and the target angle required to be rotated according to the angle information of the acquired tracker is greater than the second threshold.
  • the control target node and the target node's parent node rotate according to the first preset angle.
  • the control target node follows the second threshold.
  • the parent node of the target node rotates according to the second preset angle. Specifically, the control target node rotates according to the target angle, and the parent node of the control target node rotates according to a rotation angle smaller than or equal to the target angle.
  • the angles of rotation of the multiple parent nodes of the target node are less than or equal to the rotation angle of the target node, and in all the nodes, the rotation angle of the parent node is less than or equal to the rotation of the child node. angle.
  • the human body model simulates the target human body, when the target angle required to be rotated according to the angle information of the tracker is greater than 90 degrees, the human body is controlled.
  • the model rotates the head at 90 degrees.
  • the neck can be controlled to rotate 70 degrees in the same direction to control the spine to rotate 50 degrees in the same direction. If the target angle to be rotated is 60 degrees according to the angle information of the tracker, the human body model is controlled to rotate the head according to 60 degrees. Alternatively, the neck can be controlled to rotate 30 degrees in the same direction to control the spine to rotate in the same direction. 15 degrees.
  • the set of trackers includes at least a head tracker
  • the second obtaining unit includes: a first acquiring module, configured to acquire head position information of the head tracker
  • the control unit includes: a fourth control module, configured to: The head position information controls the mannequin to perform at least one of the following actions: head rotation, body bending, and body movement.
  • the tracker set includes at least a head tracker, and according to the position information of the head tracker, the human body model is controlled to simulate the motion of the target human body, wherein the human body model can rotate the head of the target human body. Simulation of body bending and body movement.
  • the device includes: a first merging unit, configured to merge the left-hand node and the right-hand node of the human body model into a hand node before controlling the human body model in the virtual reality according to the acquired location information; and/or a second merging unit, configured to merge the left leg node and the right leg node of the human body model into a leg node before controlling the human body model in the virtual reality according to the acquired position information, wherein the merged hand node is obtained And the leg node is the parent node of the mannequin head node.
  • the location information of the head tracker is obtained, and the human body model is simplified according to the position information, and the node of the human body model can be simplified, and
  • the head node is used as the target node, and the parent node of the control head node and the head node is moved to simulate the movement of the target human body by the human body model.
  • the left-hand node and the right-hand node may be merged into a hand node, the left leg node and the right leg node are merged into a leg node, and the merged hand node and/or leg node are used as a parent node of the head node.
  • the hand node and/or the leg node are controlled to move accordingly.
  • the human body model when the human body model is controlled to simulate the target human body, the head and body movements of the target human body are simulated through the head node, and the hands and the doubles of the target human body are simulated through the hand node.
  • the arm movement, the human skeleton shown in Fig. 3 can be split into two parts shown in Fig. 5 and Fig. 6, wherein Fig. 5 shows the skeleton parts of the head, the body and the legs, and Fig. 6 shows the hands. And the skeleton portion of the arms, as shown in Fig. 7, can simplify the skeleton portion shown in Fig. 6.
  • the tracker set includes at least a head tracker and a hand tracker
  • the second acquiring unit includes: a second acquiring module, configured to acquire head position information of the head tracker and a hand of the hand tracker Position information
  • the control unit comprises: a fifth control module, configured to control the human body model according to the head position information and the hand position information to perform at least one of the following actions: head rotation, body bending, body movement, arm movement, arm bending, and arm Rotate.
  • the head tracker obtains the head position information of the target human body
  • the target tracker obtains the target.
  • the hand position information of the human body simulates the head and body movements of the target human body based on the head position information, and simulates the movement of the hand and the arm of the target human body based on the hand position information.
  • the tracker set includes at least a head tracker, a hand tracker and a foot tracker
  • the second obtaining unit comprises: a third acquiring module, configured to acquire head position information of the head tracker, and the hand part The hand position information of the tracker and the foot position information of the foot tracker
  • the control unit comprises: a sixth control module, configured to control the human body model according to the head position information, the hand position information and the foot position information to perform at least the following One action: head rotation, body bending, body movement, arm movement, arm bending, arm rotation, leg movement, leg bending, and leg rotation.
  • the head tracker obtains the head position information of the target human body through the hand.
  • the part tracker acquires the hand position information of the target human body, acquires the foot position information of the target human body through the foot tracker, simulates the head and body movements of the target human body according to the head position information, and targets the target according to the hand position information.
  • the human body's hand and arm movements are simulated, and the target's feet and legs are simulated according to the foot position information.
  • the device further includes: an establishing unit, configured to establish a human body model having a preset body proportion before acquiring the human body model displayed in the virtual reality; and a third acquiring unit, configured to acquire the target according to the position information of the tracker The actual body proportion of the human body; a scaling unit for scaling the human body model according to the actual body proportion so that the body proportion of the human body model is consistent with the body proportion of the target human body.
  • a human body model conforming to the actual body proportion of the target human body is established. Specifically, a human body model having a standard body ratio is first established, and then the actual body proportion relationship of the target human body is obtained according to the position information of the tracker configured on the target human body, for example, according to the position information of the target human body head tracker. Knowing the height of the target human body, and then knowing the arm length of the target human body based on the position information of the target human body. Finally, according to the actual body proportion relationship of the target human body, the above-mentioned human body model with a standard body proportion is scaled so that the body proportional relationship of the human body model is consistent with the actual body proportion of the target human body.
  • an electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being arranged to perform the above method by the computer program.
  • a terminal for implementing the simulation method of the human body in the virtual reality is provided.
  • the terminal can be used as the electronic device.
  • the terminal mainly includes a processor 901, a display 902, and Network interface 903, wherein:
  • the network interface 903 is mainly used for network communication with the tracker to obtain location information of the tracker.
  • the display 902 is mainly used to display a human body model for simulating a target human body.
  • the processor 901 is mainly configured to perform the following operations:
  • Obtaining a human body model displayed in a virtual reality wherein the human body model is used to simulate a target human body in a real environment; and acquiring position information of all trackers in the target human body tracker set, wherein the tracker set includes at least one setting a tracker on a predetermined body part of the target human body; controlling the human body model in the virtual reality to move according to the acquired position information, so that the human body model simulates the action of the target human body.
  • the processor 901 is further configured to use, as the target location, a location represented by any one of the acquired location information, and determine whether a distance between the current location of the target node of the human body model and the target location is greater than a first preset threshold.
  • the target node is associated with a predetermined body part of the target human body corresponding to the target position; if the distance between the current position of the target node and the target position is greater than the first preset threshold, controlling all the parent nodes of the target node and the target node Move, where the target node and the parent node are used to simulate multiple bones of a bone chain in the target human body.
  • the processor 901 is further configured to acquire a positional relationship between all the parent nodes of the target node and the target location; select a parent node adjacent to the target node as the rotation node according to the positional relationship; and keep the distance between the rotating node and all the child nodes of the rotating node unchanged. Rotating all the child nodes of the rotating node to move the target node to the line connecting the rotating node and the target position; reselecting the parent node adjacent to the rotating node as the rotating node until all the parent nodes of the target node are selected .
  • the processor 901 is further configured to use, as the target orientation, the orientation indicated by any one of the acquired location information, and determine whether the target angle between the current orientation of the target node of the human body model and the target orientation is greater than a second preset threshold. If the target angle is greater than the second preset threshold, all the parent nodes of the control target node and the target node are rotated according to the first preset angle, wherein the angle of rotation of the target node is equal to the second preset threshold, and all the parents of the target node The rotation angle of the node is less than or equal to the rotation angle of the target node; if the target angle is less than or equal to the second preset threshold, the control target node rotates according to the target angle, and controls the parent node of the target node to rotate according to the second preset angle. Wherein the second preset angle is less than or equal to the target angle.
  • the processor 901 is further configured to acquire head position information of the head tracker; and control the human body model according to the head position information to perform at least one of the following actions: head rotation, body bending, and body movement.
  • the processor 901 is further configured to merge the left-hand node and the right-hand node of the human body model into a hand node; and/or merge the left-leg node and the right-leg node of the human body model into a leg node, wherein the merged hand node and The leg node is the parent node of the mannequin head node.
  • the processor 901 is further configured to acquire head position information of the head tracker and hand position information of the hand tracker; and control the human body model according to the head position information and the hand position information to perform at least one of the following actions: head rotation, Body bending, body movement, arm movement, arm bending and arm rotation.
  • the processor 901 is further configured to acquire head position information of the head tracker, hand position information of the hand tracker, and foot position information of the foot tracker; according to the head position information, the hand position information, and the foot part
  • the position information controls the mannequin to perform at least one of the following actions: head rotation, body bending, body movement, arm movement, arm bending, arm rotation, leg movement, leg bending, and leg rotation.
  • the processor 901 is further configured to establish a human body model having a preset body proportion; obtain an actual body proportion of the target human body according to the position information of the tracker; and scale the human body model according to the actual body proportion, so that the body proportion of the human body model and the body of the target human body The ratio is the same.
  • Embodiments of the present application also provide a storage medium.
  • a computer program is stored in the storage medium, wherein the computer program is configured to execute the method described above at runtime.
  • the foregoing storage medium may be used to store program code of a simulation method of a human body in virtual reality in the embodiment of the present application.
  • the foregoing storage medium may be located in at least one of a plurality of network devices in a network of a mobile communication network, a wide area network, a metropolitan area network, or a local area network.
  • the storage medium is arranged to store program code for performing the following steps:
  • S3 Control the human body model in the virtual reality to move according to the acquired position information, so that the human body model simulates the action of the target human body.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs, according to the stored program code in the storage medium, a location represented by any one of the acquired location information as a target location; determining a current state of the target node of the human body model Whether the distance between the position and the target position is greater than a first preset threshold, wherein the target node is associated with a predetermined body part of the target human body corresponding to the target position; if the distance between the current position of the target node and the target position is greater than the first
  • the preset threshold controls all the parent nodes of the target node and the target node to move, wherein the target node and the parent node are used to simulate multiple bones of one bone chain in the target human body.
  • the processor performs, according to the stored program code in the storage medium, the location relationship of all the parent nodes of the target node and the target location; and selects the parent node adjacent to the target node as the rotation according to the location relationship. Node; keep the distance between the rotating node and all the child nodes of the rotating node unchanged, rotate all the child nodes of the node to move the target node to the line connecting the rotating node and the target position; reselect the parent node adjacent to the rotating node As a rotating node, all the parent nodes of the target node are selected.
  • the processor performs, according to the stored program code in the storage medium, an orientation indicated by any one of the acquired location information as a target orientation; determining a current target node of the human body model Whether the target angle between the orientation and the target orientation is greater than a second preset threshold; if the target angle is greater than the second preset threshold, all the parent nodes of the control target node and the target node are rotated according to the first preset angle, wherein the target The angle of rotation of the node is equal to the second preset threshold, and the rotation angle of all the parent nodes of the target node is less than or equal to the rotation angle of the target node; if the target angle is less than or equal to the second preset threshold, the control target node rotates according to the target angle. And controlling the parent node of the target node to rotate according to a second preset angle, wherein the second preset angle is less than or equal to the target angle.
  • the processor performs acquiring the head position information of the head tracker according to the stored program code in the storage medium; and controlling the human body model according to the head position information to perform at least one of the following actions: head rotation Body bending and body movement.
  • the processor performs combining the left-hand node and the right-hand node of the human body model into a hand node according to the stored program code in the storage medium; and/or the left leg node and the right leg of the human body model
  • the nodes are merged into leg nodes, wherein the merged hand nodes and leg nodes are the parent nodes of the human body model head node.
  • the processor performs acquiring the head position information of the head tracker and the hand position information of the hand tracker according to the stored program code in the storage medium; according to the head position information and the hand
  • the positional information controls the mannequin to perform at least one of the following actions: head rotation, body bending, body movement, arm movement, arm bending, and arm rotation.
  • the processor performs acquiring the head position information of the head tracker, the hand position information of the hand tracker, and the foot of the foot tracker according to the stored program code in the storage medium.
  • Position information controlling the human body model according to the head position information, the hand position information, and the foot position information to perform at least one of the following actions: head rotation, body bending, body movement, arm movement, arm bending, arm rotation, leg movement, The legs are bent and the legs are rotated.
  • the processor performs a human body model with a preset body proportion according to the stored program code in the storage medium; and obtains an actual body proportion of the target human body according to the position information of the tracker;
  • the human body model is scaled so that the body proportion of the human body model is consistent with the body proportion of the target human body.
  • the integrated unit in the above embodiment if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium.
  • the technical solution of the present application may be embodied in the form of a software product, or the whole or part of the technical solution, which is stored in the storage medium, including
  • the instructions are used to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
  • the disclosed client may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Architecture (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请公开了一种虚拟现实中人体的模拟方法和装置、存储介质和电子装置。其中,该方法包括:获取在虚拟现实中显示的人体模型,其中,人体模型用于对真实环境中的目标人体进行模拟;获取目标人体的追踪器集合中所有追踪器的位置信息,其中,追踪器集合包括至少一个设置在目标人体的预定身体部分上的追踪器;根据获取到的位置信息控制虚拟现实中的人体模型进行移动,以使人体模型模拟目标人体的动作。本申请解决了虚拟现实中无法对人体动作进行真实模拟的技术问题。

Description

虚拟现实中人体的模拟方法和装置、存储介质和电子装置
本申请要求于2017年03月31日提交中国专利局、申请号为201710209562.0、发明名称为“虚拟现实中人体的模拟方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及虚拟现实领域,具体而言,涉及一种虚拟现实中人体的模拟方法和装置、存储介质和电子装置。
背景技术
随着虚拟现实的技术被一点点的突破,民用家庭设备逐渐出现,成为娱乐生活重要的组成部分,让人们体验到前所未有的感觉。为了让人们更加好的在场景里面更好的交互,已经更加接近真实的感觉,在虚拟环境中的人与人的真实交互就显得尤为重要,而真实交互的第一步就是要求形象动作与人类接近。
现有的虚拟现实交互游戏中,大多用非真实的人类来表示人物形象,但模拟出的人物形象要么是身体不能动,要么是通过播放动画的形式以假乱真,还有一些直接取消掉胳膊和腿部,只有头部、身体和手,无法真实的模拟出人物动作,影响用户体验。
针对上述的问题,目前尚未提出有效的解决方案。
发明内容
本申请实施例提供了一种虚拟现实中人体的模拟方法和装置、存储介质和电子装置,以至少解决虚拟现实中无法对人体动作进行真实模拟的技术问题。
根据本申请实施例的一个方面,提供了一种虚拟现实中人体的模拟方法,包括:获取在虚拟现实中显示的人体模型,其中,所述人体模型用于对真实环境中的目标人体进行模拟;获取所述目标人体的追踪器集合中所有追踪器的位置信息,其中,所述追踪器集合包括至少一个设置在所述目标人体的预定身体部分上的追踪器;根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动,以使所述人体模型模拟所述目标人体的动作。
根据本申请实施例的另一方面,还提供了一种虚拟现实中人体的模拟装置,包括:第一获取单元,用于获取在虚拟现实中显示的人体模型,其中,所述人体模型用于对真实环境中的目标人体进行模拟;第二获取单元,用于获取所述目标人体的追踪器集合中所有追踪器的位置信息,其中,所述追踪器集合包括至少一个设置在所述目标人体的预定身体部分上的追踪器;控制单元,用于根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动,以使所述人体模型模拟所述目标人体的动作。
在本申请实施例中,采用获取在虚拟现实中显示的人体模型,其中,所述人体模型用于对真实环境中的目标人体进行模拟;获取所述目标人体的追踪器集合中所有追踪器的位置信息,其中,所述追踪器集合包括至少一个设置在所述目标人体的预定身体部位上的追踪器;根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动,以使所述人体模型模拟所述目标人体的动作,通过根据目标人体的预定身体部位上的追踪器的位置信息,控制虚拟现实中的人体模型进行移动,达到了控制人体模型模拟目标人体动作的目的,从而实现了根据目标人体的预定身体部位的位置信息,控制人体模型对目标人体的动作进行模拟的技术效果,进而解决了虚拟现实中无法对人体动作进行真实模拟的技术问题。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是根据本申请实施例的一种可选的虚拟现实中人体的模拟方法的场景布局的示意图;
图2是根据本申请实施例的一种可选的虚拟现实中人体的模拟方法的流程图;
图3是根据本申请实施例的标准人体骨架的示意图;
图4是根据本申请实施例的控制目标节点与目标节点的父节点进行移动的过程示意图;
图5是根据本申请实施例的包括头部、身体和双腿的部分骨架示意图;
图6是根据本申请实施例的包括双手和双臂的部分骨架示意图;
图7是根据本申请实施例的对腿部骨架进行简化后的部分骨架示意图;
图8是根据本申请实施例的一种可选的虚拟现实中人体的模拟装置的示意图;
图9是根据本申请实施例的终端的示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实 施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
根据本申请实施例,提供了一种可以通过本申请装置实施例执行的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
根据本申请实施例,提供了一种虚拟现实中人体的模拟方法。
该方法可以应用于各种虚拟现实设备上,通过在目标人体上设置追踪器,以获取目标人体的预定身体部位的位置信息,并根据获取到的位置信息,控制虚拟现实中人体模型进行移动,以使人体模型对目标人体的各种动作进行模拟。图1是根据本申请实施例的一种可选的虚拟现实中人体的模拟方法的场景布局的示意图,如图1所示,目标人体的预定身体部位上配置有追踪器,其中,目标人体的头部佩带有可视头盔(相当于头部追踪器),目标人体的左手和右手分别持有一个手柄(相当于手部追踪器),当目标人体在预定的区域内做出任意动作时,图1中示出的虚拟现实设备通过位置信息接收装置获取可视头盔和两个手柄的位置信息,进而获取目标人体头部和手部的位置信息,并根据获取到的位置信息,控制虚拟现实中的人体模型进行相应的移动,以对目标人体做出的各种动作进行模拟,从而实现了根据目标人体的预定身体部位的位置信息,控制人体模型对目标人体的动作进行模拟的技术效果,进而解决了虚拟现实中无法对人体动作进行真实模拟的技术问题,使人们在虚拟现实中的交互更加接近真实的感觉。
需要说明的是,本申请实施例所提供的虚拟现实中人体的模拟方法在应用于各种虚拟现实设备时,该虚拟现实设备应当包括有必要的追踪器, 以获取目标人体预定身体部位的位置信息,如:头部追踪器、手部追踪器、脚部追踪器等,其中,头部追踪器主要用于获取目标人体的头部位置信息,进而根据头部位置信息,控制人体模型对目标人体的头部、颈部以及躯干的动作进行模拟,手部追踪器用于获取目标人体的双手的位置信息,进而根据双手的位置信息,控制人体模型对目标人体的双手及手臂动作进行模拟,脚部追踪器用于获了以目标人体的双脚的位置信息,进而根据双脚的位置信息,控制人体模型对目标人体的双脚及双腿动作进行模拟。虚拟现实设备所包括的追踪器应当至少包括头部追踪器,以至少通过目标人体的头部位置信息控制人体模型对目标人体的身体动作进行模拟。如图1示出的虚拟现实设备则包括头部追踪器和手部追踪器,则该虚拟现实设备可以通过手部追踪器对目标人体的双手及手臂动作进行模拟,从而使人体模型对目标人体的模拟更加接近真实。同样的,虚拟现实设备可以同时包括头部追踪器、手部追踪器和脚部追踪器,以控制人体模型模拟目标人体的身体动作,双手和双臂动作以及双脚和双腿动作。
图2是根据本申请实施例的一种可选的虚拟现实中人体的模拟方法的流程图,以下结合图2对本申请实施例所提供的虚拟现实中人体的模拟方法做具体介绍,如图2所示,该虚拟现实中人体的模拟方法主要包括如下步骤S202至步骤S206:
步骤S202,获取在虚拟现实中显示的人体模型,其中,人体模型用于对真实环境中的目标人体进行模拟。
虚拟现实技术是一种可以创建虚拟世界的计算机仿真系统,它利用计算机生成一种多源信息融合的、交互式的三维动态视景的模拟环境,通过在该环境中对用户的实体行为进行仿真使用户沉浸到该环境中。在虚拟现实中显示的人体模型用于对用户的实体行为进行模拟,通过控制人体模型对用户进行的模拟,并使人体模型模拟出的动作更加接近用户的实体行为,从而使用户在虚拟现实中的交互更加真实,提高用户体验。
步骤S204,获取目标人体的追踪器集合中所有追踪器的位置信息,其 中,追踪器集合包括至少一个设置在目标人体的预定身体部分上的追踪器。
在本申请实施例中,追踪器配置在目标人体的预定身体部位上,在目标人体的预定身体部位做出动作时,追踪器的位置也相应的发生变化,因此,追踪器的位置信息即目标人体的预定身体部位的位置信息。如图1所示,当目标人体转头时,目标人体所佩带的头盔(相当于头部追踪器)的朝向也发生变化,而根据头盔的朝向,即可获取目标人体的头部朝向;当目标人体抬高手臂时,目标人体所持的手柄(相当于手部追踪器)的位置也会发生变化,而根据目标人体所持的手柄的位置,即可获取目标人体的手部及手臂的位置。
步骤S206,根据获取到的位置信息控制虚拟现实中的人体模型进行移动,以使人体模型模拟目标人体的动作。
根据逆向动力学的原理,可以通过先确定子骨骼的位置,然后反求推导出其所在的骨骼链上n级父骨骼的位置,从而确定整条骨骼链的位置。在本申请实施例中,在控制人体模型对目标人体进行模拟时,根据获取到的追踪器的位置信息,确定人体模型各部位的位置信息,进而根据逆向动力学反求推导出其他部位的位置信息,从而确定出整个人体模型的所有部位的位置信息,以使人体模型对目标人体的动作进行真实的模拟。
在本申请实施例中,采用获取在虚拟现实中显示的人体模型,其中,人体模型用于对真实环境中的目标人体进行模拟;获取目标人体的追踪器集合中所有追踪器的位置信息,其中,追踪器集合包括至少一个设置在目标人体的预定身体部位上的追踪器;根据获取到的位置信息控制虚拟现实中的人体模型进行移动,以使人体模型模拟目标人体的动作,通过根据目标人体的预定身体部位上的追踪器的位置信息,控制虚拟现实中的人体模型进行移动,达到了控制人体模型模拟目标人体动作的目的,从而实现了根据目标人体的预定身体部位的位置信息,控制人体模型对目标人体的动作进行模拟的技术效果,进而解决了虚拟现实中无法对人体动作进行真实模拟的技术问题。
可选地,位置信息包括追踪器的位置,根据获取到的位置信息控制虚拟现实中的人体模型进行移动包括:将获取到的位置信息中的任意一个位置信息所表示的位置作为目标位置;判断人体模型的目标节点的当前位置与目标位置之间的距离是否大于第一预设阈值,其中,目标节点与目标位置对应的目标人体的预定身体部位相关联;如果目标节点的当前位置与目标位置之间的距离大于第一预设阈值,则控制目标节点和目标节点的所有父节点进行移动,其中,目标节点与父节点用于模拟目标人体中一个骨骼链的多个骨骼。
作为本申请实施例的一种可选的实施方式,追踪器的位置信息包括追踪器的位置,将追踪器位置为作目标位置,将用于对目标人体进行模拟的人体模型的相应部位作为目标节点,则控制人体模型对目标人体进行模拟需要控制目标节点移动到目标位置。在本申请实施例中,设置一个预设阈值,如果目标节点与目标位置的距离大于该预设阈值,则需要控制目标节点移动到目标位置,在控制目标节点移动到目标位置是过程中,还要同时控制目标节点的父节点随目标节点为的移动而移动,从而达到对目标人体进行真实模拟的目的。如果目标节点与目标位置的距离小于或者等于预设阈值,则认为目标节点近似位于目标位置,无需再移动目标节点。在本申请实施例中,目标节点为处于目标位置的目标人体的预定身体部位所对应的人体模型节点。目标节点的父节点同样对应的目标人体身体部位,该身体部位为与目标人体的预定身体部位处于同一骨骼链上,且为目标人体的预定身体部位的父骨骼。
图3是标准人体骨架的示意图,如图3所示,图3中每一个骨骼对应于人体模型中的一个节点,其中,颈骨和脊柱为头骨的父骨骼,颈骨和脊柱在人体模型中对应的节点为头骨骼所对应的节点的父节点。同样地,胳膊和锁骨为手的父骨骼,上腿骨和腿骨为脚的父骨骼,则胳膊和锁骨在人体模型中对应的节点为手对应的节点的父节点,上腿骨和腿骨在人体模型中对应的节点为脚对应的节点的父节点。
可选地,控制目标节点和目标节点的所有父节点进行移动包括:获取目标节点的所有父节点与目标位置的位置关系;根据位置关系选择与目标节点相邻的父节点作为旋转节点;保持旋转节点与旋转节点的所有子节点的距离不变,旋转该旋转节点的所有子节点,以使目标节点移动到旋转节点与目标位置的连线上;重新选择与旋转节点相邻的父节点作为旋转节点,直到目标节点的所有父节点全部选择完毕。
作为本申请实施例的一种可选的实施方式,在目标节点与目标位置的距离大于预设阈值时,控制目标节点和目标节点的父节点进行移动,以使人体模型对目标人体进行模拟,具体的控制移动方式如图4所示,在图4中,N1,N2,N3,N4为人体模型中的4个节点,N1,N2,N3,N4对应的目标人体的身体部位处于同一骨骼链上,且N1,N2,N3对应的身体部位为N4对应的身体部位的父骨骼,则N1,N2,N3为N4的父节点。在控制人体模型对目标人体进行模拟时,N4为目标节点,N4对应的目标人体的预定身体部位上配置有追踪器,T为获取到的追踪器的位置,即目标位置。在控制目标节点N4和目标节点N4的所有父节点移动之前,首先获取目标节点N4的所有父节点N1,N2,N3与目标位置T的位置关系,可选的,可以通过将父节点N1,N2,N3与目标位置T进行连线以确定其位置关系。首次移动,首先选择与目标节点N4相邻的父节点N3作为旋转节点,保持旋转节点N3与其所有子节点(节点N4)的距离不变,即保持N3N4长度不变,旋转移动节点N4,将N4移动至节点N3和目标位置T的连线上。可选的,在旋转移动过程中,节点N4所移动的角度为可能移动的最小角度,在上述首次移动过程中,节点N4移动的角度为a1。第二次移动,选择当前旋转节点N3相邻的父节点(N2)作为新的旋转节点,保持旋转节点N2与其所有子节点(节点N3,N4)的距离不变,即保持N2N3、N2N4和N3N4的长度不变,旋转移动节点N3和节点N4,将N4移动至节点N2和目标位置T的连线上,在上述第二次移动过程中,节点N3和节点N4移动的角度为a2。按上述移动方法,直到目标节点N4的所有父节点全部被选择完毕。在图4中,第三次移动过程选择目标节点N4 的父节点N1作为旋转节点,并保持节点N1,N2,N3,N4之间的距离不变,旋转移动节点N2,N3,N4,使节点N4移动到节点N1与目标位置的连线上。至此,完成一次人体模型对目标人体动作的模拟。需要说明的是,如果在完成上述移动之后,目标节点N4与目标位置T之间的距离小于等于预设阈值,则人体模型对目标人体的模拟完毕,如果目标节点N4与目标位置T之前的距离大于预设阈值,则需要再一次控制人体模型按上述移动过程进行移动,直到目标节点N4与目标位置T之间的距离小于等于预设阈值。
可选地,位置信息包括追踪器的朝向,根据获取到的位置信息控制虚拟现实中的人体模型进行移动包括:将获取到的位置信息中的任意一个位置信息所表示的朝向作为目标朝向;判断人体模型的目标节点的当前朝向与目标朝向之间的目标角度是否大于第二预设阈值;如果目标角度大于第二预设阈值,则控制目标节点和目标节点的所有父节点按照第一预设角度进行旋转,其中,目标节点旋转的角度等于第二预设阈值,目标节点的所有父节点的旋转角度小于或者等于目标节点的旋转角度;如果目标角度小于或者等于第二预设阈值,则控制目标节点按照目标角度进行旋转,并控制目标节点的父节点按照第二预设角度进行旋转,其中,第二预设角度小于或者等于目标角度。
作为本申请实施例的一种可选的实施方式,根据获取到的追踪器的角度,控制人体模型的身体部位进行转动,以对目标人体进行模拟。由于目标人体身体部位的转动角度是有限制的,在控制人体模型模拟目标人体进行转动时,设置第二阈值,在根据获取到的追踪器的角度信息确定的需要转动的目标角度大于第二阈值时,控制目标节点与目标节点的父节点按照第一预设角度进行旋转,可选地,控制目标节点与目标节点的父节点按照第一预设角度进行旋转时,控制目标节点按照第二阈值进行转动,同时控制目标节点的父节点按照小于等于第二阈值的角度进行旋转,如果根据获取到的追踪器的角度信息确定的需要转动的目标角度小于或者等于第二阈值时,控制目标节点与目标节点的父节点按照第二预设角度进行旋转, 具体地,控制目标节点按照目标角度进行旋转,控制目标节点的父节点按照小于等于目标角度的旋转角度进行旋转。可选地,在目标节点有多个父节点时,目标节点的多个父节点转动的角度均小于等于目标节点的转动角度,并且所有节点中,父节点的转动角度小于等于其子节点的转动角度。
例如:目标节点为头部节点,第二预设阈值为90度,则在人体模型对目标人体进行模拟时,当根据追踪器的角度信息确定的需要转动的目标角度大于90度时,控制人体模型按照90度转动头部,可选地,可以控制颈部按同一方向转动70度,控制脊柱按同一方向转动50度。如果根据追踪器的角度信息确定的需要转动的目标角度为60度时,控制人体模型按照60度转动头部,可选地,可以控制颈部按同一方向转动30度,控制脊柱按同一方向转动15度。
可选地,追踪器集合至少包括头部追踪器,获取目标人体的追踪器集合中所有追踪器的位置信息包括:获取头部追踪器的头部位置信息;根据获取到的位置信息控制虚拟现实中的人体模型进行移动包括:根据头部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲和身体移动。
在本申请实施例中,追踪器集合中至少包括头部追踪器,根据头部追踪器的位置信息,控制人体模型对目标人体的动作进行模拟,其中,人体模型可以对目标人体的头部转动、身体弯曲和身体移动进行模拟。
可选地,在根据获取到的位置信息控制虚拟现实中的人体模型进行移动之前,方法包括:将人体模型的左手节点和右手节点合并为手部节点;和/或将人体模型的左腿节点和右腿节点合并为腿部节点,其中,合并得到的手部节点和腿部节点为人体模型头部节点的父节点。
作为本申请实施例的一种可选的实施方式,获取头部追踪器的位置信息,并根据该位置信息控制人体模型对目标人体的动作进行模拟之前,可以将人体模型的节点进行简化,并以头部节点作为目标节点,控制头部节点和头部节点的父节点进行移动,以使人体模型对目标人体的动作进行模 拟。具体地,可以将左手节点和右手节点合并为手部节点,将左腿节点和右腿节点合并为腿部节点,将合并得到的手部节点和/或腿部节点作为头部节点的父节点,在头部节点移动时,控制手部节点和/或腿部节点进行相应的移动。
以追踪器集合包括头部追踪器和手部追踪器为例,控制人体模型模拟目标人体时,通过头部节点模拟目标人体的头部及身体动作,通过手部节点模拟目标人体的双手和双臂动作,图3所示的人体骨架可以拆分为图5和图6所示的两个部分,其中,图5示出了头部、身体、双腿的骨架部分,图6示出了双手和双臂的骨架部分,如图7所示,可以对图6所示的骨架部分进行简化。将左腿骨与右腿骨进行合并,以左腿骨和右腿骨的中点作为合并后的腿骨所在的位置,将左脚与右脚进行合并,以左脚和右脚的中点作为合并后的脚所在的位置,合并得到的腿骨与脚作为头部的父节点。
可选地,追踪器集合至少包括头部追踪器和手部追踪器,获取目标人体的追踪器集合中所有追踪器的位置信息包括:获取头部追踪器的头部位置信息和手部追踪器的手部位置信息;根据获取到的位置信息控制虚拟现实中的人体模型进行移动包括:根据头部位置信息和手部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲和手臂旋转。
作为本申请实施例的一种可选的实施方式,追踪器集合包括头部追踪器和手部追踪器时,通过头部追踪器获取目标人体的头部位置信息,通过手部追踪器获取目标人体的手部位置信息,根据头部位置信息对目标人体的头部及身体动作进行模拟,根据手部位置信息对目标人体的手部及手臂动作进行模拟。
可选地,追踪器集合至少包括头部追踪器、手部追踪器和脚部追踪器,获取目标人体的追踪器集合中所有追踪器的位置信息包括:获取头部追踪器的头部位置信息、手部追踪器的手部位置信息和脚部追踪器的脚部位置信息;根据获取到的位置信息控制虚拟现实中的人体模型进行移动包括: 根据头部位置信息、手部位置信息和脚部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲、手臂旋转、腿部移动、腿部弯曲和腿部旋转。
作为本申请实施例的一种可选的实施方式,追踪器集合包括头部追踪器、手部追踪器和脚部追踪器时,通过头部追踪器获取目标人体的头部位置信息,通过手部追踪器获取目标人体的手部位置信息,通过脚部追踪器获取目标人体的脚部位置信息,根据头部位置信息对目标人体的头部及身体动作进行模拟,根据手部位置信息对目标人体的手部及手臂动作进行模拟,根据脚部位置信息对目标人体的双脚及双腿动作进行模拟。
可选地,在获取在虚拟现实中显示的人体模型之前,方法还包括:建立具有预设身体比例的人体模型;根据追踪器的位置信息获取目标人体的实际身体比例;根据实际身体比例缩放人体模型,以使人体模型的身体比例与目标人体的身体比例一致。
作为本申请实施例的一种可选的实施方式,为了提高人体模型与目标人体的相似度,建立一个与目标人体的实际身体比例一致的人体模型。具体地,先建立一个具有标准身体比例的人体模型,然后根据配置在目标人体上的追踪器的位置信息,获取目标人体的实际身体比例关系,如:根据目标人体头部追踪器的位置信息可以得知目标人体的身高,再根据目标人体的手部的位置信息,得知目标人体的手臂长度。最后,按照目标人体的实际身体比例关系,对上述具有标准身体比例的人体模型进行缩放,以使人体模型的身体比例关系与目标人体的实际身体比例一致。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根 据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
根据本申请实施例,还提供了一种用于实施上述虚拟现实中人体的模拟方法的虚拟现实中人体的模拟装置,该虚拟现实中人体的模拟装置主要用于执行本申请实施例上述内容所提供的虚拟现实中人体的模拟方法,以下对本申请实施例所提供的虚拟现实中人体的模拟装置做具体介绍:
图8是根据本申请实施例的一种可选的虚拟现实中人体的模拟装置的示意图,如图8所示,该虚拟现实中人体的模拟装置主要包括:
第一获取单元810,用于获取在虚拟现实中显示的人体模型,其中,人体模型用于对真实环境中的目标人体进行模拟。
虚拟现实技术是一种可以创建虚拟世界的计算机仿真系统,它利用计算机生成一种多源信息融合的、交互式的三维动态视景的模拟环境,通过在该环境中对用户的实体行为进行仿真使用户沉浸到该环境中。在虚拟现实中显示的人体模型用于对用户的实体行为进行模拟,通过控制人体模型对用户进行的模拟,并使人体模型模拟出的动作更加接近用户的实体行为,从而使用户在虚拟现实中的交互更加真实,提高用户体验。
第二获取单元820,用于获取目标人体的追踪器集合中所有追踪器的位置信息,其中,追踪器集合包括至少一个设置在目标人体的预定身体部分上的追踪器。
在本申请实施例中,追踪器配置在目标人体的预定身体部位上,在目标人体的预定身体部位做出动作时,追踪器的位置也相应的发生变化,因 此,追踪器的位置信息即目标人体的预定身体部位的位置信息。如图1所示,当目标人体转头时,目标人体所佩带的头盔(相当于头部追踪器)的朝向也发生变化,而根据头盔的朝向,即可获取目标人体的头部朝向;当目标人体抬高手臂时,目标人体所持的手柄(相当于手部追踪器)的位置也会发生变化,而根据目标人体所持的手柄的位置,即可获取目标人体的手部及手臂的位置。
控制单元830,用于根据获取到的位置信息控制虚拟现实中的人体模型进行移动,以使人体模型模拟目标人体的动作。
根据逆向动力学的原理,可以通过先确定子骨骼的位置,然后反求推导出其所在的骨骼链上n级父骨骼的位置,从而确定整条骨骼链的位置。在本申请实施例中,在控制人体模型对目标人体进行模拟时,根据获取到的追踪器的位置信息,确定人体模型各部位的位置信息,进而根据逆向动力学反求推导出其他部位的位置信息,从而确定出整个人体模型的所有部位的位置信息,以使人体模型对目标人体的动作进行真实的模拟。
在本申请实施例中,采用获取在虚拟现实中显示的人体模型,其中,人体模型用于对真实环境中的目标人体进行模拟;获取目标人体的追踪器集合中所有追踪器的位置信息,其中,追踪器集合包括至少一个设置在目标人体的预定身体部位上的追踪器;根据获取到的位置信息控制虚拟现实中的人体模型进行移动,以使人体模型模拟目标人体的动作,通过根据目标人体的预定身体部位上的追踪器的位置信息,控制虚拟现实中的人体模型进行移动,达到了控制人体模型模拟目标人体动作的目的,从而实现了根据目标人体的预定身体部位的位置信息,控制人体模型对目标人体的动作进行模拟的技术效果,进而解决了虚拟现实中无法对人体动作进行真实模拟的技术问题。
可选地,位置信息包括追踪器的位置,控制单元包括:位置模块,用于将获取到的位置信息中的任意一个位置信息所表示的位置作为目标位置;第一判断模块,用于判断人体模型的目标节点的当前位置与目标位置 之间的距离是否大于第一预设阈值,其中,目标节点与目标位置对应的目标人体的预定身体部位相关联;第一控制模块,用于在如果目标节点的当前位置与目标位置之间的距离大于第一预设阈值时,控制目标节点和目标节点的所有父节点进行移动,其中,目标节点与父节点用于模拟目标人体中一个骨骼链的多个骨骼。
作为本申请实施例的一种可选的实施方式,追踪器的位置信息包括追踪器的位置,将追踪器位置为作目标位置,将用于对目标人体进行模拟的人体模型的相应部位作为目标节点,则控制人体模型对目标人体进行模拟需要控制目标节点移动到目标位置。在本申请实施例中,设置一个预设阈值,如果目标节点与目标位置的距离大于该预设阈值,则需要控制目标节点移动到目标位置,在控制目标节点移动到目标位置是过程中,还要同时控制目标节点的父节点随目标节点的移动而移动,从而达到对目标人体进行真实模拟的目的。如果目标节点与目标位置的距离小于或者等于预设阈值,则认为目标节点近似位于目标位置,无需再移动目标节点。在本申请实施例中,目标节点为处于目标位置的目标人体的预定身体部位所对应的人体模型节点。目标节点的父节点同样对应的目标人体身体部位,该身体部位为与目标人体的预定身体部位处于同一骨骼链上,且为目标人体的预定身体部位的父骨骼。
图3是标准人体骨架的示意图,如图3所示,图3中每一个骨骼对应于人体模型中的一个节点,其中,颈骨和脊柱为头骨的父骨骼,颈骨和脊柱在人体模型中对应的节点为头骨骼所对应的节点的父节点。同样地,胳膊和锁骨为手的父骨骼,上腿骨和腿骨为脚的父骨骼,则胳膊和锁骨在人体模型中对应的节点为手对应的节点的父节点,上腿骨和腿骨在人体模型中对应的节点为脚对应的节点的父节点。
可选地,第一控制模块包括:获取子模块,用于获取目标节点的所有父节点与目标位置的位置关系;旋转节点子模块,用于根据位置关系选择与目标节点相邻的父节点作为旋转节点;旋转子模块,用于保持旋转节点 与旋转节点的所有子节点的距离不变,旋转该旋转节点的所有子节点,以使目标节点移动到旋转节点与目标位置的连线上;重复子模块,用于重新选择与旋转节点相邻的父节点作为旋转节点,直到目标节点的所有父节点全部选择完毕。
作为本申请实施例的一种可选的实施方式,在目标节点与目标位置的距离大于预设阈值时,控制目标节点和目标节点的父节点进行移动,以使人体模型对目标人体进行模拟,具体的控制移动方式如图4所示,在图4中,N1,N2,N3,N4为人体模型中的4个节点,N1,N2,N3,N4对应的目标人体的身体部位处于同一骨骼链上,且N1,N2,N3对应的身体部位为N4对应的身体部位的父骨骼,则N1,N2,N3为N4的父节点。在控制人体模型对目标人体进行模拟时,N4为目标节点,N4对应的目标人体的预定身体部位上配置有追踪器,T为获取到的追踪器的位置,即目标位置。在控制目标节点N4和目标节点N4的所有父节点移动之前,首先获取目标节点N4的所有父节点N1,N2,N3与目标位置T的位置关系,可选的,可以通过将父节点N1,N2,N3与目标位置T进行连线以确定其位置关系。首次移动,首先选择与目标节点N4相邻的父节点N3作为旋转节点,保持旋转节点N3与其所有子节点(节点N4)的距离不变,即保持N3N4长度不变,旋转移动节点N4,将N4移动至节点N3和目标位置T的连线上。可选的,在旋转移动过程中,节点N4所移动的角度为可能移动的最小角度,在上述首次移动过程中,节点N4移动的角度为a1。第二次移动,选择当前旋转节点N3相邻的父节点(N2)作为新的旋转节点,保持旋转节点N2与其所有子节点(节点N3,N4)的距离不变,即保持N2N3、N2N4和N3N4的长度不变,旋转移动节点N3和节点N4,将N4移动至节点N2和目标位置T的连线上,在上述第二次移动过程中,节点N3和节点N4移动的角度为a2。按上述移动方法,直到目标节点N4的所有父节点全部被选择完毕。在图4中,第三次移动过程选择目标节点N4的父节点N1作为旋转节点,并保持节点N1,N2,N3,N4之间的距离不变,旋转移动节点N2,N3,N4,使节点N4移动到节点N1与目标位置 的连线上。至此,完成一次人体模型对目标人体动作的模拟。需要说明的是,如果在完成上述移动之后,目标节点N4与目标位置T之间的距离小于等于预设阈值,则人体模型对目标人体的模拟完毕,如果目标节点N4与目标位置T之前的距离大于预设阈值,则需要再一次控制人体模型按上述移动过程进行移动,直到目标节点N4与目标位置T之间的距离小于等于预设阈值。
可选地,位置信息包括追踪器的朝向,控制单元包括:朝向模块,用于将获取到的位置信息中的任意一个位置信息所表示的朝向作为目标朝向;第二判断模块,用于判断人体模型的目标节点的当前朝向与目标朝向之间的目标角度是否大于第二预设阈值;第二控制模块,用于在目标角度大于第二预设阈值时,控制目标节点和目标节点的所有父节点按照第一预设角度进行旋转,其中,目标节点旋转的角度等于第二预设阈值,目标节点的所有父节点的旋转角度小于或者等于目标节点的旋转角度;第三控制模块,用于在目标角度小于或者等于第二预设阈值时,控制目标节点按照目标角度进行旋转,并控制目标节点的父节点按照第二预设角度进行旋转,其中,第二预设角度小于或者等于目标角度。
作为本申请实施例的一种可选的实施方式,根据获取到的追踪器的角度,控制人体模型的身体部位进行转动,以对目标人体进行模拟。由于目标人体身体部位的转动角度是有限制的,在控制人体模型模拟目标人体进行转动时,设置第二阈值,在根据获取到的追踪器的角度信息确定的需要转动的目标角度大于第二阈值时,控制目标节点与目标节点的父节点按照第一预设角度进行旋转,可选地,控制目标节点与目标节点的父节点按照第一预设角度进行旋转时,控制目标节点按照第二阈值进行转动,同时控制目标节点的父节点按照小于等于第二阈值的角度进行旋转,如果根据获取到的追踪器的角度信息确定的需要转动的目标角度小于或者等于第二阈值时,控制目标节点与目标节点的父节点按照第二预设角度进行旋转,具体地,控制目标节点按照目标角度进行旋转,控制目标节点的父节点按照小于等于目标角度的旋转角度进行旋转。可选地,在目标节点有多个父 节点时,目标节点的多个父节点转动的角度均小于等于目标节点的转动角度,并且所有节点中,父节点的转动角度小于等于其子节点的转动角度。
例如:目标节点为头部节点,第二预设阈值为90度,则在人体模型对目标人体进行模拟时,当根据追踪器的角度信息确定的需要转动的目标角度大于90度时,控制人体模型按照90度转动头部,可选地,可以控制颈部按同一方向转动70度,控制脊柱按同一方向转动50度。如果根据追踪器的角度信息确定的需要转动的目标角度为60度时,控制人体模型按照60度转动头部,可选地,可以控制颈部按同一方向转动30度,控制脊柱按同一方向转动15度。
可选地,追踪器集合至少包括头部追踪器,第二获取单元包括:第一获取模块,用于获取头部追踪器的头部位置信息;控制单元包括:第四控制模块,用于根据头部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲和身体移动。
在本申请实施例中,追踪器集合中至少包括头部追踪器,根据头部追踪器的位置信息,控制人体模型对目标人体的动作进行模拟,其中,人体模型可以对目标人体的头部转动、身体弯曲和身体移动进行模拟。
可选地,装置包括:第一合并单元,用于在根据获取到的位置信息控制虚拟现实中的人体模型进行移动之前,将人体模型的左手节点和右手节点合并为手部节点;和/或第二合并单元,用于在根据获取到的位置信息控制虚拟现实中的人体模型进行移动之前,将人体模型的左腿节点和右腿节点合并为腿部节点,其中,合并得到的手部节点和腿部节点为人体模型头部节点的父节点。
作为本申请实施例的一种可选的实施方式,获取头部追踪器的位置信息,并根据该位置信息控制人体模型对目标人体的动作进行模拟之前,可以将人体模型的节点进行简化,并以头部节点作为目标节点,控制头部节点和头部节点的父节点进行移动,以使人体模型对目标人体的动作进行模拟。具体地,可以将左手节点和右手节点合并为手部节点,将左腿节点和 右腿节点合并为腿部节点,将合并得到的手部节点和/或腿部节点作为头部节点的父节点,在头部节点移动时,控制手部节点和/或腿部节点进行相应的移动。
以追踪器集合包括头部追踪器和手部追踪器为例,控制人体模型模拟目标人体时,通过头部节点模拟目标人体的头部及身体动作,通过手部节点模拟目标人体的双手和双臂动作,图3所示的人体骨架可以拆分为图5和图6所示的两个部分,其中,图5示出了头部、身体、双腿的骨架部分,图6示出了双手和双臂的骨架部分,如图7所示,可以对图6所示的骨架部分进行简化。将左腿骨与右腿骨进行合并,以左腿骨和右腿骨的中点作为合并后腿骨,将左脚与右脚进行合并,以左脚和右脚的中点作为合并后的脚,合并得到的腿骨与脚作为头部的父节点。
可选地,追踪器集合至少包括头部追踪器和手部追踪器,第二获取单元包括:第二获取模块,用于获取头部追踪器的头部位置信息和手部追踪器的手部位置信息;控制单元包括:第五控制模块,用于根据头部位置信息和手部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲和手臂旋转。
作为本申请实施例的一种可选的实施方式,追踪器集合包括头部追踪器和手部追踪器时,通过头部追踪器获取目标人体的头部位置信息,通过手部追踪器获取目标人体的手部位置信息,根据头部位置信息对目标人体的头部及身体动作进行模拟,根据手部位置信息对目标人体的手部及手臂动作进行模拟。
可选地,追踪器集合至少包括头部追踪器、手部追踪器和脚部追踪器,第二获取单元包括:第三获取模块,用于获取头部追踪器的头部位置信息、手部追踪器的手部位置信息和脚部追踪器的脚部位置信息;控制单元包括:第六控制模块,用于根据头部位置信息、手部位置信息和脚部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲、手臂旋转、腿部移动、腿部弯曲和腿部旋转。
作为本申请实施例的一种可选的实施方式,追踪器集合包括头部追踪器、手部追踪器和脚部追踪器时,通过头部追踪器获取目标人体的头部位置信息,通过手部追踪器获取目标人体的手部位置信息,通过脚部追踪器获取目标人体的脚部位置信息,根据头部位置信息对目标人体的头部及身体动作进行模拟,根据手部位置信息对目标人体的手部及手臂动作进行模拟,根据脚部位置信息对目标人体的双脚及双腿动作进行模拟。
可选地,装置还包括:建立单元,用于在获取在虚拟现实中显示的人体模型之前,建立具有预设身体比例的人体模型;第三获取单元,用于根据追踪器的位置信息获取目标人体的实际身体比例;缩放单元,用于根据实际身体比例缩放人体模型,以使人体模型的身体比例与目标人体的身体比例一致。
作为本申请实施例的一种可选的实施方式,为了提高人体模型与目标人体的相似度,建立一个与目标人体的实际身体比例一致的人体模型。具体地,先建立一个具有标准身体比例的人体模型,然后根据配置在目标人体上的追踪器的位置信息,获取目标人体的实际身体比例关系,如:根据目标人体头部追踪器的位置信息可以得知目标人体的身高,再根据目标人体的手部的位置信息,得知目标人体的手臂长度。最后,按照目标人体的实际身体比例关系,对上述具有标准身体比例的人体模型进行缩放,以使人体模型的身体比例关系与目标人体的实际身体比例一致。
根据本申请实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行上述的方法。
根据本申请实施例,还提供了一种用于实施上述虚拟现实中人体的模拟方法的终端,该终端可以作为上述电子装置,如图9所示,该终端主要包括处理器901、显示器902和网络接口903,其中:
网络接口903主要用于与追踪器进行网络通信,以获取追踪器的位置信息。
显示器902主要用于显示用于模拟目标人体的人体模型。
处理器901主要用于执行如下操作:
获取在虚拟现实中显示的人体模型,其中,人体模型用于对真实环境中的目标人体进行模拟;获取目标人体的追踪器集合中所有追踪器的位置信息,其中,追踪器集合包括至少一个设置在目标人体的预定身体部分上的追踪器;根据获取到的位置信息控制虚拟现实中的人体模型进行移动,以使人体模型模拟目标人体的动作。
处理器901还用于将获取到的位置信息中的任意一个位置信息所表示的位置作为目标位置;判断人体模型的目标节点的当前位置与目标位置之间的距离是否大于第一预设阈值,其中,目标节点与目标位置对应的目标人体的预定身体部位相关联;如果目标节点的当前位置与目标位置之间的距离大于第一预设阈值,则控制目标节点和目标节点的所有父节点进行移动,其中,目标节点与父节点用于模拟目标人体中一个骨骼链的多个骨骼。
处理器901还用于获取目标节点的所有父节点与目标位置的位置关系;根据位置关系选择与目标节点相邻的父节点作为旋转节点;保持旋转节点与旋转节点的所有子节点的距离不变,旋转该旋转节点的所有子节点,以使目标节点移动到旋转节点与目标位置的连线上;重新选择与旋转节点相邻的父节点作为旋转节点,直到目标节点的所有父节点全部选择完毕。
处理器901还用于将获取到的位置信息中的任意一个位置信息所表示的朝向作为目标朝向;判断人体模型的目标节点的当前朝向与目标朝向之间的目标角度是否大于第二预设阈值;如果目标角度大于第二预设阈值,则控制目标节点和目标节点的所有父节点按照第一预设角度进行旋转,其中,目标节点旋转的角度等于第二预设阈值,目标节点的所有父节点的旋转角度小于或者等于目标节点的旋转角度;如果目标角度小于或者等于第二预设阈值,则控制目标节点按照目标角度进行旋转,并控制目标节点的父节点按照第二预设角度进行旋转,其中,第二预设角度小于或者等于目标角度。
处理器901还用于获取头部追踪器的头部位置信息;根据头部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲和身体移动。
处理器901还用于将人体模型的左手节点和右手节点合并为手部节点;和/或将人体模型的左腿节点和右腿节点合并为腿部节点,其中,合并得到的手部节点和腿部节点为人体模型头部节点的父节点。
处理器901还用于获取头部追踪器的头部位置信息和手部追踪器的手部位置信息;根据头部位置信息和手部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲和手臂旋转。
处理器901还用于获取头部追踪器的头部位置信息、手部追踪器的手部位置信息和脚部追踪器的脚部位置信息;根据头部位置信息、手部位置信息和脚部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲、手臂旋转、腿部移动、腿部弯曲和腿部旋转。
处理器901还用于建立具有预设身体比例的人体模型;根据追踪器的位置信息获取目标人体的实际身体比例;根据实际身体比例缩放人体模型,以使人体模型的身体比例与目标人体的身体比例一致。
可选地,本实施例中的具体示例可以参考上述实施例1和实施例2中所描述的示例,本实施例在此不再赘述。
本申请的实施例还提供了一种存储介质。所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述的方法。
可选地,在本实施例中,上述存储介质可以用于存储本申请实施例的虚拟现实中人体的模拟方法的程序代码。
可选地,在本实施例中,上述存储介质可以位于移动通信网络、广域网、城域网或局域网的网络中的多个网络设备中的至少一个网络设备。
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:
S1,获取在虚拟现实中显示的人体模型,其中,人体模型用于对真实环境中的目标人体进行模拟;
S2,获取目标人体的追踪器集合中所有追踪器的位置信息,其中,追踪器集合包括至少一个设置在目标人体的预定身体部分上的追踪器;
S3,根据获取到的位置信息控制虚拟现实中的人体模型进行移动,以使人体模型模拟目标人体的动作。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行将获取到的位置信息中的任意一个位置信息所表示的位置作为目标位置;判断人体模型的目标节点的当前位置与目标位置之间的距离是否大于第一预设阈值,其中,目标节点与目标位置对应的目标人体的预定身体部位相关联;如果目标节点的当前位置与目标位置之间的距离大于第一预设阈值,则控制目标节点和目标节点的所有父节点进行移动,其中,目标节点与父节点用于模拟目标人体中一个骨骼链的多个骨骼。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行获取目标节点的所有父节点与目标位置的位置关系;根据位置关系选择与目标节点相邻的父节点作为旋转节点;保持旋转节点与旋转节点的所有子节点的距离不变,旋转节点的所有子节点,以使目标节点移动到旋转节点与目标位置的连线上;重新选择与旋转节点相邻的父节点作为旋转节点,直到目标节点的所有父节点全部选择完毕。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执 行将获取到的位置信息中的任意一个位置信息所表示的朝向作为目标朝向;判断人体模型的目标节点的当前朝向与目标朝向之间的目标角度是否大于第二预设阈值;如果目标角度大于第二预设阈值,则控制目标节点和目标节点的所有父节点按照第一预设角度进行旋转,其中,目标节点旋转的角度等于第二预设阈值,目标节点的所有父节点的旋转角度小于或者等于目标节点的旋转角度;如果目标角度小于或者等于第二预设阈值,则控制目标节点按照目标角度进行旋转,并控制目标节点的父节点按照第二预设角度进行旋转,其中,第二预设角度小于或者等于目标角度。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行获取头部追踪器的头部位置信息;根据头部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲和身体移动。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行将人体模型的左手节点和右手节点合并为手部节点;和/或将人体模型的左腿节点和右腿节点合并为腿部节点,其中,合并得到的手部节点和腿部节点为人体模型头部节点的父节点。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行获取头部追踪器的头部位置信息和手部追踪器的手部位置信息;根据头部位置信息和手部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲和手臂旋转。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行获取头部追踪器的头部位置信息、手部追踪器的手部位置信息和脚部追踪器的脚部位置信息;根据头部位置信息、手部位置信息和脚部位置信息控制人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲、手臂旋转、腿部移动、腿部弯曲和腿部旋转。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行建立具有预设身体比例的人体模型;根据追踪器的位置信息获取目标人体的实际身体比例;根据实际身体比例缩放人体模型,以使人体模型的身 体比例与目标人体的身体比例一致。
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的 普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。

Claims (20)

  1. 一种虚拟现实中人体的模拟方法,包括:
    获取在虚拟现实中显示的人体模型,其中,所述人体模型用于对真实环境中的目标人体进行模拟;
    获取所述目标人体的追踪器集合中所有追踪器的位置信息,其中,所述追踪器集合包括至少一个设置在所述目标人体的预定身体部分上的追踪器;
    根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动,以使所述人体模型模拟所述目标人体的动作。
  2. 根据权利要求1所述的方法,其中,所述位置信息包括所述追踪器的位置,根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动包括:
    将获取到的位置信息中的任意一个位置信息所表示的位置作为目标位置;
    判断所述人体模型的目标节点的当前位置与所述目标位置之间的距离是否大于第一预设阈值,其中,所述目标节点与所述目标位置对应的所述目标人体的预定身体部位相关联;
    如果所述目标节点的当前位置与所述目标位置之间的距离大于所述第一预设阈值,则控制所述目标节点和所述目标节点的所有父节点进行移动,其中,所述目标节点与所述父节点用于模拟所述目标人体中一个骨骼链的多个骨骼。
  3. 根据权利要求2所述的方法,其中,控制所述目标节点和所述目标节点的所有父节点进行移动包括:
    获取所述目标节点的所有父节点与所述目标位置的位置关系;
    根据所述位置关系选择与所述目标节点相邻的父节点作为旋转节点;
    保持所述旋转节点与所述旋转节点的所有子节点的距离不变,旋转所述旋转节点的所有子节点,以使所述目标节点移动到所述旋转节点与所述目标位置的连线上;
    重新选择与所述旋转节点相邻的父节点作为所述旋转节点,直到所述目标节点的所有父节点全部选择完毕。
  4. 根据权利要求1所述的方法,其中,所述位置信息包括所述追踪器的朝向,根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动包括:
    将获取到的位置信息中的任意一个位置信息所表示的朝向作为目标朝向;
    判断所述人体模型的目标节点的当前朝向与所述目标朝向之间的目标角度是否大于第二预设阈值;
    如果所述目标角度大于所述第二预设阈值,则控制所述目标节点和所述目标节点的所有父节点按照第一预设角度进行旋转,其中,所述目标节点旋转的角度等于所述第二预设阈值,所述目标节点的所有父节点的旋转角度小于或者等于所述目标节点的旋转角度;
    如果所述目标角度小于或者等于第二预设阈值,则控制所述目标节点按照所述目标角度进行旋转,并控制所述目标节点的父节点按照第二预设角度进行旋转,其中,所述第二预设角度小于或者等于所述目标角度。
  5. 根据权利要求1至4中任一项所述的方法,其中,所述追踪器集合至少包括头部追踪器,
    获取所述目标人体的追踪器集合中所有追踪器的位置信息包括:获取所述头部追踪器的头部位置信息;
    根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动包括:根据所述头部位置信息控制所述人体模型进行以下至少一个动作:头部转动、身体弯曲和身体移动。
  6. 根据权利要求5所述的方法,其中,在根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动之前,所述方法包括:
    将所述人体模型的左手节点和右手节点合并为手部节点;和/或
    将所述人体模型的左腿节点和右腿节点合并为腿部节点,其中,合并得到的所述手部节点和所述腿部节点为所述人体模型头部节点的父节点。
  7. 根据权利要求1至4中任一项所述的方法,其中,所述追踪器集合至少包括头部追踪器和手部追踪器,
    获取所述目标人体的追踪器集合中所有追踪器的位置信息包括:获取所述头部追踪器的头部位置信息和所述手部追踪器的手部位置信息;
    根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动包括:根据所述头部位置信息和所述手部位置信息控制所述人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲和手臂旋转。
  8. 根据权利要求1至4中任一项所述的方法,其中,所述追踪器集合至少包括头部追踪器、手部追踪器和脚部追踪器,
    获取所述目标人体的追踪器集合中所有追踪器的位置信息包括:获取所述头部追踪器的头部位置信息、所述手部追踪器的手部位置信息和所述脚部追踪器的脚部位置信息;
    根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动包括:
    根据所述头部位置信息、所述手部位置信息和所述脚部位置信息控制所述人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲、手臂旋转、腿部移动、腿部弯曲和腿部旋转。
  9. 根据权利要求1所述的方法,其中,在获取在虚拟现实中显示的人体模型之前,所述方法还包括:
    建立具有预设身体比例的人体模型;
    根据所述追踪器的位置信息获取所述目标人体的实际身体比例;
    根据所述实际身体比例缩放所述人体模型,以使所述人体模型的身体比例与所述目标人体的身体比例一致。
  10. 一种虚拟现实中人体的模拟装置,包括:
    第一获取单元,用于获取在虚拟现实中显示的人体模型,其中,所述人体模型用于对真实环境中的目标人体进行模拟;
    第二获取单元,用于获取所述目标人体的追踪器集合中所有追踪器的位置信息,其中,所述追踪器集合包括至少一个设置在所述目标人体的预定身体部分上的追踪器;
    控制单元,用于根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动,以使所述人体模型模拟所述目标人体的动作。
  11. 根据权利要求10所述的装置,其中,所述位置信息包括所述追踪器的位置,所述控制单元包括:
    位置模块,用于将获取到的位置信息中的任意一个位置信息所表示的位置作为目标位置;
    第一判断模块,用于判断所述人体模型的目标节点的当前位置与所述目标位置之间的距离是否大于第一预设阈值,其中,所述目标节点与所述目标位置对应的所述目标人体的预定身体部位相关联;
    第一控制模块,用于在如果所述目标节点的当前位置与所述目标位置之间的距离大于所述第一预设阈值时,控制所述目标节点和所述目标节点的所有父节点进行移动,其中,所述目标节点与所述父节点用于模拟所述目标人体中一个骨骼链的多个骨骼。
  12. 根据权利要求11所述的装置,其中,所述第一控制模块包括:
    获取子模块,用于获取所述目标节点的所有父节点与所述目标位 置的位置关系;
    旋转节点子模块,用于根据所述位置关系选择与所述目标节点相邻的父节点作为旋转节点;
    旋转子模块,用于保持所述旋转节点与所述旋转节点的所有子节点的距离不变,旋转所述旋转节点的所有子节点,以使所述目标节点移动到所述旋转节点与所述目标位置的连线上;
    重复子模块,用于重新选择与所述旋转节点相邻的父节点作为所述旋转节点,直到所述目标节点的所有父节点全部选择完毕。
  13. 根据权利要求10所述的装置,其中,所述位置信息包括所述追踪器的朝向,所述控制单元包括:
    朝向模块,用于将获取到的位置信息中的任意一个位置信息所表示的朝向作为目标朝向;
    第二判断模块,用于判断所述人体模型的目标节点的当前朝向与所述目标朝向之间的目标角度是否大于第二预设阈值;
    第二控制模块,用于在所述目标角度大于所述第二预设阈值时,控制所述目标节点和所述目标节点的所有父节点按照第一预设角度进行旋转,其中,所述目标节点旋转的角度等于所述第二预设阈值,所述目标节点的所有父节点的旋转角度小于或者等于所述目标节点的旋转角度;
    第三控制模块,用于在所述目标角度小于或者等于第二预设阈值时,控制所述目标节点按照所述目标角度进行旋转,并控制所述目标节点的父节点按照第二预设角度进行旋转,其中,所述第二预设角度小于或者等于所述目标角度。
  14. 根据权利要求10至13中任一项所述的装置,其中,所述追踪器集合至少包括头部追踪器,
    所述第二获取单元包括:第一获取模块,用于获取所述头部追踪器的头部位置信息;
    所述控制单元包括:第四控制模块,用于根据所述头部位置信息控制所述人体模型进行以下至少一个动作:头部转动、身体弯曲和身体移动。
  15. 根据权利要求14所述的装置,其中,所述装置包括:
    第一合并单元,用于在根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动之前,将所述人体模型的左手节点和右手节点合并为手部节点;和/或
    第二合并单元,用于在根据获取到的位置信息控制虚拟现实中的所述人体模型进行移动之前,将所述人体模型的左腿节点和右腿节点合并为腿部节点,其中,合并得到的所述手部节点和所述腿部节点为所述人体模型头部节点的父节点。
  16. 根据权利要求10至13中任一项所述的装置,其中,所述追踪器集合至少包括头部追踪器和手部追踪器,
    所述第二获取单元包括:第二获取模块,用于获取所述头部追踪器的头部位置信息和所述手部追踪器的手部位置信息;
    所述控制单元包括:第五控制模块,用于根据所述头部位置信息和所述手部位置信息控制所述人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯曲和手臂旋转。
  17. 根据权利要求10至13中任一项所述的装置,其中,所述追踪器集合至少包括头部追踪器、手部追踪器和脚部追踪器,
    所述第二获取单元包括:第三获取模块,用于获取所述头部追踪器的头部位置信息、所述手部追踪器的手部位置信息和所述脚部追踪器的脚部位置信息;
    所述控制单元包括:第六控制模块,用于根据所述头部位置信息、所述手部位置信息和所述脚部位置信息控制所述人体模型进行以下至少一个动作:头部转动、身体弯曲、身体移动、手臂移动、手臂弯 曲、手臂旋转、腿部移动、腿部弯曲和腿部旋转。
  18. 根据权利要求10所述的装置,其中,所述装置还包括:
    建立单元,用于在获取在虚拟现实中显示的人体模型之前,建立具有预设身体比例的人体模型;
    第三获取单元,用于根据所述追踪器的位置信息获取所述目标人体的实际身体比例;
    缩放单元,用于根据所述实际身体比例缩放所述人体模型,以使所述人体模型的身体比例与所述目标人体的身体比例一致。
  19. 一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至9任一项中所述的方法。
  20. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至9任一项中所述的方法。
PCT/CN2018/077922 2017-03-31 2018-03-02 虚拟现实中人体的模拟方法和装置、存储介质和电子装置 WO2018177075A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710209562.0 2017-03-31
CN201710209562.0A CN107122043B (zh) 2017-03-31 2017-03-31 虚拟现实中人体的模拟方法和装置

Publications (1)

Publication Number Publication Date
WO2018177075A1 true WO2018177075A1 (zh) 2018-10-04

Family

ID=59724585

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/077922 WO2018177075A1 (zh) 2017-03-31 2018-03-02 虚拟现实中人体的模拟方法和装置、存储介质和电子装置

Country Status (3)

Country Link
CN (1) CN107122043B (zh)
TW (1) TWI657263B (zh)
WO (1) WO2018177075A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122043B (zh) * 2017-03-31 2019-01-08 腾讯科技(深圳)有限公司 虚拟现实中人体的模拟方法和装置
CN109542225B (zh) * 2018-11-21 2022-01-25 英华达(上海)科技有限公司 重定向虚拟实境空间系统及其方法
CN111190826B (zh) * 2019-12-30 2024-01-23 上海曼恒数字技术股份有限公司 一种虚拟现实沉浸式追踪环境的测试方法、装置、存储介质及设备
CN112379771A (zh) * 2020-10-10 2021-02-19 杭州翔毅科技有限公司 基于虚拟现实的实时交互方法、装置、设备及存储介质
CN116977501A (zh) * 2022-04-22 2023-10-31 北京字跳网络技术有限公司 虚拟形象的控制方法、装置、设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101579238A (zh) * 2009-06-15 2009-11-18 吴健康 人体运动捕获三维再现系统及其方法
CN103488291A (zh) * 2013-09-09 2014-01-01 北京诺亦腾科技有限公司 一种基于运动捕捉的浸入式虚拟现实系统
CN203405772U (zh) * 2013-09-09 2014-01-22 北京诺亦腾科技有限公司 一种基于运动捕捉的浸入式虚拟现实系统
CN104508709A (zh) * 2012-07-31 2015-04-08 微软公司 使用人体对对象进行动画化
CN105225262A (zh) * 2015-10-23 2016-01-06 深圳华侨城文化旅游科技股份有限公司 一种动态捕捉3d数据处理方法及其3d模型
CN106251387A (zh) * 2016-07-29 2016-12-21 武汉光之谷文化科技股份有限公司 一种基于动作捕捉的成像系统
CN107122043A (zh) * 2017-03-31 2017-09-01 腾讯科技(深圳)有限公司 虚拟现实中人体的模拟方法和装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106484110A (zh) * 2016-09-30 2017-03-08 珠海市魅族科技有限公司 一种模拟躯体动作的方法及虚拟现实设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101579238A (zh) * 2009-06-15 2009-11-18 吴健康 人体运动捕获三维再现系统及其方法
CN104508709A (zh) * 2012-07-31 2015-04-08 微软公司 使用人体对对象进行动画化
CN103488291A (zh) * 2013-09-09 2014-01-01 北京诺亦腾科技有限公司 一种基于运动捕捉的浸入式虚拟现实系统
CN203405772U (zh) * 2013-09-09 2014-01-22 北京诺亦腾科技有限公司 一种基于运动捕捉的浸入式虚拟现实系统
CN105225262A (zh) * 2015-10-23 2016-01-06 深圳华侨城文化旅游科技股份有限公司 一种动态捕捉3d数据处理方法及其3d模型
CN106251387A (zh) * 2016-07-29 2016-12-21 武汉光之谷文化科技股份有限公司 一种基于动作捕捉的成像系统
CN107122043A (zh) * 2017-03-31 2017-09-01 腾讯科技(深圳)有限公司 虚拟现实中人体的模拟方法和装置

Also Published As

Publication number Publication date
CN107122043A (zh) 2017-09-01
TWI657263B (zh) 2019-04-21
TW201830090A (zh) 2018-08-16
CN107122043B (zh) 2019-01-08

Similar Documents

Publication Publication Date Title
WO2018177075A1 (zh) 虚拟现实中人体的模拟方法和装置、存储介质和电子装置
WO2021143261A1 (zh) 一种动画实现方法、装置、电子设备和存储介质
CN107667331B (zh) 共享空间多人沉浸式虚拟现实中共享触觉交互和用户安全
Latoschik et al. FakeMi: A fake mirror system for avatar embodiment studies
US8217995B2 (en) Providing a collaborative immersive environment using a spherical camera and motion capture
US9520072B2 (en) Systems and methods for projecting images onto an object
US8615383B2 (en) Immersive collaborative environment using motion capture, head mounted display, and cave
TWI752502B (zh) 一種分鏡效果的實現方法、電子設備及電腦可讀儲存介質
CN106484115A (zh) 用于增强和虚拟现实的系统和方法
US20230334744A1 (en) Method and apparatus for generating walk animation of virtual role, device and storage medium
NL2002841A (en) Immersive collaborative environment using motion capture, head mounted display, and cave.
WO2022051460A1 (en) 3d asset generation from 2d images
Zhang et al. Exploring virtual environments by visually impaired using a mixed reality cane without visual feedback
US20230120883A1 (en) Inferred skeletal structure for practical 3d assets
Mathi Augment HoloLens’ Body Recognition and Tracking Capabilities Using Kinect
Pranith et al. Real‐Time Applications of Virtual Reality
Skulimowski et al. Design and optimisation methods for interactive mobile VR visualisation
CN113041616A (zh) 游戏中控制跳字显示的方法、装置、电子设备及存储介质
Basori et al. Telerobotic 3D articulated arm-assisted surgery tools with augmented reality for surgery training
Lin et al. Space connection: a new 3D tele-immersion platform for web-based gesture-collaborative games and services
Gobira et al. Expansion of uses and applications of virtual reality
Chung et al. Optimizing Camera Setup for In-Home First-person Rendering Mixed Reality Gaming System
US11769297B2 (en) Simulation of rigid bodies
EP4280226A1 (en) Remote reproduction method, system, and apparatus, device, medium, and program product
Chung Home-based Lower Limb Immersive Serious Game for Phantom Pain Management

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18776478

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18776478

Country of ref document: EP

Kind code of ref document: A1