WO2023202358A1 - 虚拟对象的运动控制方法及设备 - Google Patents

虚拟对象的运动控制方法及设备 Download PDF

Info

Publication number
WO2023202358A1
WO2023202358A1 PCT/CN2023/085722 CN2023085722W WO2023202358A1 WO 2023202358 A1 WO2023202358 A1 WO 2023202358A1 CN 2023085722 W CN2023085722 W CN 2023085722W WO 2023202358 A1 WO2023202358 A1 WO 2023202358A1
Authority
WO
WIPO (PCT)
Prior art keywords
rotation
control vector
virtual object
dimension
motion
Prior art date
Application number
PCT/CN2023/085722
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 WO2023202358A1 publication Critical patent/WO2023202358A1/zh

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • 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

Definitions

  • the embodiments of the present disclosure relate to the field of motion control technology, and in particular, to a method and device for motion control of virtual objects.
  • virtual objects can continuously move in the display interface, and the movement of the virtual objects can be controlled by the user. Users can control virtual objects through keyboard, mouse, etc., and can also control virtual objects through their faces.
  • the movement process of the virtual object can be displayed on the display interface.
  • the virtual object is located at position L1 of the display interface at time t1. After movement, it reaches position L2 at time t2, position L3 at time t3, position L4 at time t4, and position L4 at time t5. Reached location 5. This forms a motion path from L1 to L5.
  • the display interface at one moment only displays the location of the virtual object at the current moment.
  • Embodiments of the present disclosure provide a method and device for motion control of virtual objects, which can control the rotation of virtual objects to improve the control experience.
  • embodiments of the present disclosure provide a method for motion control of virtual objects, including:
  • a rotation control vector is generated according to the rotation state of the user's face in the real three-dimensional space.
  • the rotation state includes: the facial rotation angle corresponding to the rotation of the face around at least one rotation axis in the three-dimensional space.
  • a component of the rotation control vector in at least one dimension is associated with the facial rotation angle corresponding to the rotation axis;
  • the virtual object movement is controlled through the rotation control vector, and the movement includes: rotation movement.
  • an embodiment of the present disclosure provides a motion control device for a virtual object, including:
  • a control vector generation module configured to generate a rotation control vector according to the rotation state of the user's face in the real three-dimensional space.
  • the rotation state includes: the face is rotated around at least one rotation axis in the three-dimensional space.
  • the facial rotation angle, the component of the rotation control vector in at least one dimension is associated with the facial rotation angle corresponding to the rotation axis;
  • a motion control module configured to control virtual object motion through the rotation control vector, where the motion includes: rotation motion.
  • embodiments of the present disclosure provide an electronic device, including: at least one processor and a memory;
  • the memory stores computer execution instructions
  • the at least one processor executes the computer execution instructions stored in the memory, so that the electronic device implements the method described in the first aspect.
  • embodiments of the present disclosure provide a computer-readable storage medium.
  • Computer-executable instructions are stored in the computer-readable storage medium.
  • the processor executes the computer-executable instructions, the computing device implements the first aspect. the method described.
  • embodiments of the present disclosure provide a computer program, the computer program being used to implement the method described in the first aspect.
  • embodiments of the present disclosure provide a computer program product, including a computer program, the computer program being used to implement the method as described in the first aspect.
  • Figure 1 is a schematic diagram of the movement process of a virtual object provided by the prior art
  • Figure 2 is a step flow chart of a motion control method for virtual objects provided by an embodiment of the present disclosure
  • Figure 3 is a schematic diagram of a facial rotation angle provided by an embodiment of the present disclosure.
  • Figure 4 is a structural block diagram of a motion control device for virtual objects provided by an embodiment of the present disclosure
  • Figure 5 is a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 6 is a structural block diagram of another electronic device provided by an embodiment of the present disclosure.
  • embodiments of the present disclosure consider controlling virtual objects to perform rotational movements.
  • FIG. 2 is a step flow chart of a method for controlling motion of a virtual object provided by an embodiment of the present disclosure.
  • the virtual object here can be any object displayed on the display screen of the electronic device.
  • the virtual object is different.
  • Book One application scenario of the disclosed embodiment is a game scenario.
  • a game interface can be displayed on the display screen, virtual objects can be understood as game characters, and the game characters can move in the game interface. This movement can be controlled by the gamer.
  • the application scenarios of the embodiments of the present disclosure are not limited to the above-mentioned game scenes, and therefore the virtual objects are not limited to the above-mentioned game characters.
  • the motion control method of the virtual object includes:
  • S101 Generate a rotation control vector according to the rotation state of the user's face in the real three-dimensional space.
  • the rotation state includes: the face rotation angle corresponding to the rotation of the face around at least one rotation axis in the three-dimensional space.
  • the rotation control vector is in at least one rotation axis.
  • the dimensional components are associated with the facial rotation angle corresponding to the rotation axis.
  • the facial rotation angle can be a vector used to represent the direction and amplitude.
  • multiple rotation axes located in the real three-dimensional space can be set, so that a facial rotation angle is a rotation angle for one rotation axis.
  • the rotation axis here can be set arbitrarily, but considering that as few rotation axes as possible can be used to represent rotation in various directions, three mutually perpendicular rotation axes can be set.
  • Figure 3 is a schematic diagram of a facial rotation angle provided by an embodiment of the present disclosure.
  • the three coordinate axes: x-axis, y-axis and z-axis can each be used as a rotation axis. Therefore, the rotation state of the face may include: the face rotation angle Pitch corresponding to the face rotation around the x-axis, the face rotation angle Yaw corresponding to the face rotation around the y-axis, and the face rotation angle Roll corresponding to the face rotation around the z-axis.
  • the above Pitch can also be understood as the rotation angle of the face in the YOZ plane formed by the y-axis and the z-axis.
  • the above-mentioned Yaw can also be understood as the rotation angle of the face in the XOZ plane formed by the x-axis and the z-axis.
  • the above-mentioned Roll can also be understood as The rotation angle of the face in the XOY plane formed by the x-axis and y-axis.
  • the above-mentioned rotation control vector can be a three-dimensional vector, and the correlation between its components in each dimension and the facial rotation angle can be flexibly set.
  • at least one facial rotation angle can be used as a component of the rotation control vector in at least one dimension, or the facial rotation angle can be used as a component after linear or nonlinear transformation.
  • a facial rotation angle when used as a component of the rotation control vector, the user can rotate the face around the corresponding rotation axis to achieve motion control of the virtual object.
  • multiple facial rotation angles are used as multiple components of the rotation control vector, the motion control of the virtual object can be achieved through the rotation of the face around multiple rotation axes, which helps to increase the diversity of rotation motion and thereby improve the fun of the game. .
  • mapping the facial rotation angle to the component of the rotation control vector it can be achieved through the following steps: first, obtain the facial rotation angle corresponding to the first rotation axis and the second rotation axis respectively, and the first rotation axis is located on the horizontal plane And parallel to the rotation axis of the screen, the second rotation axis is the rotation axis in the vertical direction; then, determine the component of the rotation control vector in the third dimension according to the facial rotation angle corresponding to the first rotation axis; and then, The facial rotation angle corresponding to the second rotation axis is determined as the component of the rotation control vector in the first dimension; finally, the component of the rotation control vector in the second dimension is set to 0.
  • the first rotation axis may be the x-axis in FIG. 3
  • the second rotation axis may be the y-axis in FIG. 3 .
  • embodiments of the present disclosure can map Pitch to the component of the rotation control vector in the third dimension, so that the user can control the rotation of the virtual object in its three-dimensional space by flipping the angle Pitch of the face up and down. the rotation angle in the third dimension, as well as controlling the translational movement of the virtual object in the third dimension of its three-dimensional space.
  • the third dimension may be a vertical dimension.
  • embodiments of the present disclosure can map Yaw to the component of the rotation control vector in the first dimension, so that the user can control the rotation of the virtual object in its three-dimensional space by flipping the angle Yaw of the face left and right.
  • first dimension The rotation angle in degrees, and the translational movement of the virtual object in the first dimension of its three-dimensional space.
  • the first dimension may be a dimension in the horizontal direction.
  • embodiments of the present disclosure set the component of the rotation control vector in the second dimension to 0, so that the virtual object does not perform rotation or translation in the second dimension of its three-dimensional space.
  • the second dimension may be a dimension perpendicular to the screen.
  • the component of the above-mentioned rotation control vector in the third dimension is determined as the facial rotation angle corresponding to the first rotation axis. Opposite number.
  • the virtual object can be guaranteed to move upward.
  • the virtual object can be guaranteed to move downward. In this way, the consistency of the movement of the user and the virtual object can be ensured, which helps to improve the accuracy of the user's control of the virtual object.
  • the rotation control vector in order to adjust the control sensitivity in the third dimension, can be determined based on the first preset coefficient and the inverse of the facial rotation angle corresponding to the first rotation axis.
  • the component in the third dimension, the first preset coefficient is used to adjust the control sensitivity in the third dimension.
  • the component of the rotation control vector in the third dimension may be the product of the first preset coefficient and the above-mentioned opposite number.
  • the user when the first preset coefficient is greater than 1, the user can control the movement of the virtual object by flipping the face up and down to a smaller extent, which helps to improve the control sensitivity in the third dimension.
  • the first preset coefficient is less than 1, the user can control the movement of the virtual object by flipping the face up and down to a large extent, and can reduce the sensitivity to avoid misoperation by the user.
  • the angle Pitch of the up and down turning can be modified. Specifically, first the sum of the facial rotation angle corresponding to the first rotation axis and the second preset coefficient is determined as the correction angle, and then the product of the inverse of the correction angle and the first preset coefficient is determined as the rotation control vector in the third components in a dimension.
  • the above-mentioned second preset coefficient can be set flexibly, and can be greater than 0 or less than 0.
  • the up-down flipping angle can be corrected downward. Therefore, if people are used to flipping upwards, they can appropriately correct the angle of flipping upwards downward to control the motion of various rotation axes of the virtual object. Therefore, if people are used to flipping upward, the angle of flipping up and down can be appropriately corrected downward, so that when the user flips upward to a smaller extent, the virtual object can be controlled to perform downward translation movement. This can help improve the motion diversity of virtual objects in scenarios where users are accustomed to flipping their faces upwards.
  • the up-down flipping angle can be corrected upward. Therefore, if people are used to flipping downwards, they can appropriately correct the angle of flipping upwards to control the virtual object to move upward when the user flips downwards by a smaller amount. This can help improve the motion diversity of virtual objects in scenarios where users are accustomed to flipping their faces downwards.
  • S102 Control the motion of the virtual object through the rotation control vector, which motion includes: rotation motion.
  • rotational movement in embodiments of the present disclosure can provide users with a better control experience. Compared with translational movement, this rotational movement has a better display effect from a bird's-eye view, thereby improving the control experience from a bird's-eye view.
  • the virtual object can be controlled to rotate in the direction pointed by the rotation control vector.
  • the rotation control vector can be a three-dimensional vector, so that the components in each dimension are used to indicate the movement of the corresponding rotation axis. direction and angle of rotation.
  • the virtual object can be controlled to perform rotational movement through the first rotation parameter corresponding to the rotation control vector.
  • steps S1021 to S1024 may be included:
  • the first rotation parameter is used to represent the rotation strategy through a preset number of first sub-parameters, and the preset number is greater than the dimension of the rotation control vector.
  • the first rotation parameter can use more first sub-parameters to represent the rotation strategy, which helps to improve the accuracy of the rotation strategy.
  • the first rotation parameter may be a quaternion corresponding to the rotation control vector, and each three-dimensional vector corresponds to a unique quaternion.
  • the second rotation parameter is used to represent the current orientation of the virtual object through a preset number of second sub-parameters.
  • the second rotation parameter can also use more second sub-parameters to represent the current orientation, thereby helping to improve the accuracy of the current orientation.
  • the second rotation parameter may be a quaternion
  • the acquisition process may include: first obtaining the three-dimensional vector corresponding to the current orientation of the virtual object as the orientation vector of the virtual object, and then converting the orientation vector into a quaternion, obtaining Second rotation parameter.
  • the first angle can also be understood as the angle between the rotation control vector and the orientation vector of the virtual object.
  • the first angle is the angle between the two quaternions.
  • S1024 may specifically include: first determining the minimum value of the first angle and the maximum character rotation angle between two adjacent frames of images as second angle; then interpolate the first rotation parameter and the second rotation parameter through the second angle to obtain the corresponding third quaternion; and finally control the virtual object to perform rotational motion through the third quaternion.
  • the maximum character rotation angle can be the product of the preset rotation angle and the time interval between two adjacent frames of images.
  • the preset rotation angle can be set according to the actual application scenario.
  • the third quaternion corresponds to the maximum character rotation angle, realizing the rotation movement of the virtual object according to the maximum character rotation angle.
  • the third quaternion corresponds to the first angle, realizing the rotation movement of the virtual object according to the first angle. That is to say, the degree of rotation of the virtual object in the embodiment of the present disclosure is at most the maximum character rotation angle. In this way, excessive rotation of the virtual object can be avoided, causing discontinuity in the picture.
  • embodiments of the present disclosure can realize rotational motion through quaternions, which helps avoid the problem of universal joint deadlock.
  • the above-mentioned movement may also include translational movement.
  • Embodiments of the present disclosure can also control the virtual object to perform translational motion through the above-mentioned rotation control vector, so that the motion of the virtual object in the embodiment of the present disclosure is a superposition of rotational motion and translational motion. Added, so that users can see the rotation and translation motion of virtual objects from a bird's-eye view, which helps to further improve the gaming experience of virtual objects from a bird's-eye view.
  • the above-mentioned rotation control vector, current motion speed and motion vector are all three-dimensional vectors.
  • the motion vector can be the cross product between the rotation control vector and the current motion speed, which can also be called an outer product.
  • the current position of the virtual object and the motion vector can be added to obtain the position after translational motion.
  • the position here is a position in the three-dimensional coordinate system.
  • the translational movement in the embodiment of the present disclosure is controlled by the rotation of the face.
  • the mapping relationship between the facial rotation angle and the rotation control vector can affect the corresponding relationship between the rotation and the translational movement of the face. Through this mapping relationship The settings can flexibly adjust the translation movement.
  • the module of the rotation control vector is greater than or equal to a preset threshold. If the module of the rotation control vector is greater than or equal to the preset threshold, the virtual object is controlled to perform the above movement through the rotation control vector. If the module of the rotation control vector is less than the preset threshold, the virtual object is controlled to maintain the current position and state, that is, the virtual object is controlled not to perform the above movement.
  • the embodiments of the present disclosure can determine that the facial rotation is the user's control instruction for the virtual object when the rotation is large, thereby controlling the movement of the virtual object.
  • the face rotation is relatively small, the face rotation is determined to be a misoperation by the user, and the virtual object is controlled not to move at this time. This can avoid user misoperation and improve the accuracy of motion control of virtual objects.
  • the rotation control vector can also be unitized, and the motion of the virtual object can be controlled by the unitized rotation control vector. In this way, the computational complexity when controlling the motion of the virtual object through the rotation control vector can be reduced.
  • unitization processing can also be called normalization processing, which specifically includes the following steps: first, determine the module of the rotation control vector; then, calculate the ratio of the rotation control vector and the module to obtain the rotation control vector after unitization processing.
  • the above unitization process can also be combined with the above-mentioned module judgment. Specifically, if the module of the rotation control vector is greater than or equal to the preset threshold, the rotation control vector is first unitized and processed through the unitization process. The subsequent rotation control vector controls the movement of the virtual object. If the module of the rotation control vector is less than the preset threshold, the virtual object is controlled to maintain the current position and state, that is, the virtual object is controlled not to perform any movement.
  • FIG. 4 is a structural block diagram of a motion control device for a virtual object provided by an embodiment of the present disclosure. For convenience of explanation, only parts related to the embodiments of the present disclosure are shown.
  • the above-mentioned motion control device 200 for a virtual object includes: a control vector generation module 201 and a motion control module 202 .
  • the control vector generation module 201 is used to generate a rotation control vector according to the rotation state of the user's face in the real three-dimensional space.
  • the rotation state includes: the face is rotated around at least one rotation axis in the three-dimensional space respectively.
  • a facial rotation angle corresponding to the rotation, and a component of the rotation control vector in at least one dimension is associated with the facial rotation angle corresponding to the rotation axis.
  • the motion control module 202 is used to control virtual object motion through the rotation control vector, where the motion includes: rotation motion.
  • the motion control module 202 is also used to:
  • the rotation control vector is converted into a first rotation parameter, where the first rotation parameter is used to represent a rotation strategy through a preset number of first sub-parameters, the preset number being greater than the dimension of the rotation control vector.
  • a first angle between the first rotation parameter and the second rotation parameter is determined.
  • the virtual object is controlled to perform rotational movement through the first angle.
  • the first rotation parameter and the second rotation parameter are both quaternions.
  • the motion control module 202 is also used to:
  • the minimum value of the first angle and the maximum character rotation angle between two adjacent frames of images is determined as the second angle.
  • An interpolation operation is performed on the first quaternion and the second quaternion through the second angle to obtain a corresponding third quaternion.
  • the virtual object is controlled to perform rotational movement through the third quaternion.
  • the motion control module 202 is also used to:
  • the movement of the virtual object is controlled through the rotation control vector.
  • the motion control module 202 is also used to:
  • the rotation control vector is unitized, and the motion of the virtual object is controlled by the unitized rotation control vector.
  • control vector generation module 201 is also used to:
  • the first rotation axis is a rotation axis located on the horizontal plane and parallel to the screen.
  • the second rotation axis is a rotation located in the vertical direction. axis.
  • the component of the rotation control vector in the third dimension is determined according to the facial rotation angle corresponding to the first rotation axis, and the third dimension is in the vertical direction.
  • the facial rotation angle corresponding to the second rotation axis is determined as the component of the rotation control vector in the first dimension, and the first dimension is in the horizontal direction.
  • control vector generation module 201 is also used to:
  • the component of the rotation control vector in the third dimension is determined according to the inverse number of the facial rotation angle corresponding to the first rotation axis.
  • control vector generation module 201 is also used to:
  • the component of the rotation control vector in the third dimension is determined by using a first preset coefficient and the inverse number of the facial rotation angle corresponding to the first rotation axis, and the first preset coefficient is used to adjust the Control sensitivity in the third dimension.
  • control vector generation module 201 is also used to:
  • the sum of the facial rotation angle corresponding to the first rotation axis and the second preset coefficient is determined as the correction angle.
  • the product of the inverse of the correction angle and the first preset coefficient is determined as the component of the rotation control vector in the third dimension.
  • the motion also includes translation motion
  • the motion control module 202 is also used to:
  • a motion vector of the virtual object is determined based on the rotation control vector and the current motion speed of the virtual object.
  • the position of the virtual object after performing the translation movement is determined through the motion vector.
  • the motion control device of the virtual object provided in this embodiment can be used to execute the technical solution of the above method embodiment shown in Figure 2. Its implementation principles and technical effects are similar, and will not be described again in this embodiment.
  • FIG. 5 is a structural block diagram of an electronic device 600 provided by an embodiment of the present disclosure.
  • the electronic device 600 includes a memory 602 and at least one processor 601 .
  • memory 602 stores computer execution instructions.
  • At least one processor 601 executes computer execution instructions stored in the memory 602, so that the electronic device 601 implements the aforementioned method in FIG. 2 .
  • the electronic device may also include a receiver 603 for receiving information from other devices or devices and forwarding it to the processor 601, and a transmitter 604 for sending information to other devices or devices. .
  • the electronic device 900 may be a terminal device.
  • terminal devices may include but are not limited to mobile phones, laptops, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA for short), tablet computers (Portable Android Device, PAD for short), portable multimedia players (Portable Mobile terminals such as Media Player (PMP for short), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs, desktop computers, etc.
  • PDA Personal Digital Assistant
  • PAD Personal Android Device
  • portable multimedia players Portable Mobile terminals such as Media Player (PMP for short
  • vehicle-mounted terminals such as vehicle-mounted navigation terminals
  • fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 6 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 900 may include a processing device (such as a central processing unit, a graphics processor, etc.) 901, which may process data according to a program stored in a read-only memory (Read Only Memory, ROM for short) 902 or from a storage device. 908 loads the program in the random access memory (Random Access Memory, RAM for short) 903 to perform various appropriate actions and processing. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored.
  • the processing device 901, ROM 902 and RAM 903 are connected to each other via a bus 904.
  • An input/output (I/O for short) interface 905 is also connected to bus 904.
  • the following devices can be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD). ), an output device 907 such as a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909.
  • the communication device 909 may allow the electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data.
  • FIG. 6 illustrates electronic device 900 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via communication device 909, or from storage device 908, or from ROM 902.
  • the processing device 901 the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof.
  • Computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmable Read Only Memory (Erasable Programmable Read Only Memory, referred to as EPROM or flash memory), optical fiber, portable compact disk Read-only memory (Compact Disc Read Only Memory, CD-ROM for short), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program codes contained on computer-readable media can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency, Radio Frequency), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
  • the computer-readable medium carries one or more programs.
  • the electronic device When the one or more programs are executed by the electronic device, the electronic device performs the method shown in the above embodiment.
  • Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional Procedural programming language—such as "C" or a similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or it can be connected to an external computer Computer (e.g. connected via the Internet using an Internet service provider).
  • LAN Local Area Network
  • WAN Wide Area Network
  • each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure can be implemented in software or hardware.
  • the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
  • the first acquisition unit can also be described as "the unit that acquires at least two Internet Protocol addresses.”
  • exemplary types of hardware logic components include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Products ( Application Specific Standard Parts (ASSP for short), System on Chip (SOC for short), Complex Programmable Logic Device (CPLD for short), etc.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • ASSP Application Specific Standard Parts
  • SOC System on Chip
  • CPLD Complex Programmable Logic Device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • an embodiment of the present disclosure provides a method for motion control of a virtual object, including:
  • a rotation control vector is generated according to the rotation state of the user's face in the real three-dimensional space.
  • the rotation state includes: the facial rotation angle corresponding to the rotation of the face around at least one rotation axis in the three-dimensional space.
  • a component of the rotation control vector in at least one dimension is associated with the facial rotation angle corresponding to the rotation axis.
  • the virtual object movement is controlled through the rotation control vector, and the movement includes: rotation movement.
  • controlling the movement of the virtual object through the rotation control vector includes:
  • the rotation control vector is converted into a first rotation parameter, where the first rotation parameter is used to represent a rotation strategy through a preset number of first sub-parameters, the preset number being greater than the dimension of the rotation control vector.
  • a first angle between the first rotation parameter and the second rotation parameter is determined.
  • the virtual object is controlled to perform rotational movement through the first angle.
  • the first rotation parameter and the second rotation parameter are both quaternions.
  • controlling the virtual object to perform a rotational movement through the first angle includes:
  • the minimum value of the first angle and the maximum character rotation angle between two adjacent frames of images is determined as the second angle.
  • An interpolation operation is performed on the first quaternion and the second quaternion through the second angle to obtain a corresponding third quaternion.
  • the virtual object is controlled to perform rotational movement through the third quaternion.
  • controlling the movement of the virtual object through the rotation control vector includes:
  • the movement of the virtual object is controlled through the rotation control vector.
  • controlling the movement of the virtual object through the rotation control vector includes:
  • the rotation control vector is unitized, and the motion of the virtual object is controlled by the unitized rotation control vector.
  • generating a rotation control vector according to the rotation state of the user's face in a real three-dimensional space includes:
  • the first rotation axis is a rotation axis located on the horizontal plane and parallel to the screen.
  • the second rotation axis is a rotation located in the vertical direction. axis.
  • the component of the rotation control vector in the third dimension is determined according to the facial rotation angle corresponding to the first rotation axis, and the third dimension is in the vertical direction.
  • the facial rotation angle corresponding to the second rotation axis is determined as the component of the rotation control vector in the first dimension, and the first dimension is in the horizontal direction.
  • the component of the rotation control vector in the third dimension is determined according to the facial rotation angle corresponding to the first rotation axis, include:
  • the component of the rotation control vector in the third dimension is determined according to the inverse number of the facial rotation angle corresponding to the first rotation axis.
  • the rotation control vector is determined in a third dimension according to the inverse number of the facial rotation angle corresponding to the first rotation axis. Amounts include:
  • the component of the rotation control vector in the third dimension is determined by using a first preset coefficient and the inverse number of the facial rotation angle corresponding to the first rotation axis, and the first preset coefficient is used to adjust the Control sensitivity in the third dimension.
  • the rotation control is determined by using a first preset coefficient and the inverse number of the facial rotation angle corresponding to the first rotation axis.
  • the components of the vector in the third dimension including:
  • the sum of the facial rotation angle corresponding to the first rotation axis and the second preset coefficient is determined as the correction angle.
  • the product of the inverse of the correction angle and the first preset coefficient is determined as the component of the rotation control vector in the third dimension.
  • the movement further includes translational movement
  • controlling the virtual object movement through the rotation control vector includes:
  • a motion vector of the virtual object is determined based on the rotation control vector and the current motion speed of the virtual object.
  • the position of the virtual object after performing the translation movement is determined through the motion vector.
  • a motion control device for a virtual object including:
  • a control vector generation module configured to generate a rotation control vector according to the rotation state of the user's face in the real three-dimensional space.
  • the rotation state includes: the face is rotated around at least one rotation axis in the three-dimensional space.
  • the facial rotation angle, the component of the rotation control vector in at least one dimension is associated with the facial rotation angle corresponding to the rotation axis.
  • a motion control module configured to control virtual object motion through the rotation control vector, where the motion includes: rotation motion.
  • the motion control module is also used to:
  • the rotation control vector is converted into a first rotation parameter, where the first rotation parameter is used to represent a rotation strategy through a preset number of first sub-parameters, the preset number being greater than the dimension of the rotation control vector.
  • a first angle between the first rotation parameter and the second rotation parameter is determined.
  • the virtual object is controlled to perform rotational movement through the first angle.
  • the first rotation parameter and the second rotation parameter are both quaternions.
  • the motion control module is also used for:
  • the minimum value of the first angle and the maximum character rotation angle between two adjacent frames of images is determined as the second angle.
  • An interpolation operation is performed on the first quaternion and the second quaternion through the second angle to obtain a corresponding third quaternion.
  • the virtual object is controlled to perform rotational movement through the third quaternion.
  • the motion control module is also used for:
  • the movement of the virtual object is controlled through the rotation control vector.
  • the motion control module is also used to:
  • the rotation control vector is unitized, and the motion of the virtual object is controlled by the unitized rotation control vector.
  • control vector generation module is further used to:
  • the first rotation axis is a rotation axis located on the horizontal plane and parallel to the screen
  • the second rotation axis is a vertical rotation axis
  • the The third dimension is in the vertical direction.
  • the facial rotation angle corresponding to the second rotation axis is determined as the component of the rotation control vector in the first dimension, and the first dimension is in the horizontal direction.
  • the facial rotation angle corresponding to the second rotation axis is determined as the component of the rotation control vector in the first dimension.
  • control vector generation module is further used to:
  • the component of the rotation control vector in the third dimension is determined according to the inverse number of the facial rotation angle corresponding to the first rotation axis.
  • control vector generation module is further used to:
  • the component of the rotation control vector in the third dimension is determined by using a first preset coefficient and the inverse number of the facial rotation angle corresponding to the first rotation axis, and the first preset coefficient is used to adjust the Control sensitivity in the third dimension.
  • control vector generation module is further used to:
  • the sum of the facial rotation angle corresponding to the first rotation axis and the second preset coefficient is determined as the correction angle.
  • the product of the inverse of the correction angle and the first preset coefficient is determined as the component of the rotation control vector in the third dimension.
  • the movement further includes translation movement
  • the motion control module is further configured to:
  • a motion vector of the virtual object is determined based on the rotation control vector and the current motion speed of the virtual object.
  • the position of the virtual object after performing the translation movement is determined through the motion vector.
  • an electronic device including: at least one processor and a memory.
  • the memory stores computer-executable instructions.
  • the at least one processor executes the computer execution instructions stored in the memory, so that the electronic device implements the method described in any one of the first aspects.
  • a computer-readable storage medium is provided.
  • Computer-executable instructions are stored in the computer-readable storage medium.
  • a processor executes the computer-executed instructions, The computing device is caused to implement the method described in any one of the first aspects.
  • a computer program is provided, the computer program being used to implement the method according to any one of the first aspects.
  • a computer program product including a computer program, the computer program being used to implement the method described in any one of the first aspects.
  • Embodiments of the present disclosure provide a method and device for motion control of virtual objects.
  • the method includes: generating a rotation control vector according to the rotation state of the user's face in a real three-dimensional space.
  • the rotation state includes: the face rotates around a position in the three-dimensional space.
  • the facial rotation angle corresponding to the rotation of at least one rotation axis respectively, the component of the rotation control vector in at least one dimension is associated with the facial rotation angle corresponding to the rotation axis; the movement of the virtual object is controlled by the rotation control vector, and the movement includes: rotation movement.
  • Embodiments of the present disclosure can control a virtual object to perform rotational motion through the rotation state of the user's face, so as to improve the motion control experience of the virtual object.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本公开实施例提供一种虚拟对象的运动控制方法及设备,涉及运动控制技术领域。该方法包括:根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,旋转状态包括:面部绕三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,旋转控制向量在至少一个维度上的分量与旋转轴对应的面部旋转角度相关联;通过旋转控制向量控制虚拟对象运动,该运动包括:旋转运动。本公开实施例可以提高对虚拟对象的控制体验。

Description

虚拟对象的运动控制方法及设备
相关申请交叉引用
本申请要求于2022年4月19日提交中国专利局、申请号为202210411519.3、发明名称为“虚拟对象的运动控制方法及设备”的中国专利申请的优先权,其全部内容通过引用并入本文。
技术领域
本公开实施例涉及运动控制技术领域,尤其涉及一种虚拟对象的运动控制方法及设备。
背景技术
在运动控制技术领域中,虚拟对象可以在显示界面中不断的运动,而该虚拟对象的运动可以由用户控制。用户可以通过键盘、鼠标等方式控制虚拟对象,还可以通过面部控制虚拟对象。
现有技术中,在用户控制虚拟对象进行运动的过程中,可以在显示界面中显示虚拟对象的运动过程。参照图1所示,虚拟对象在t1时刻位于显示界面的位置L1处,经过运动,依次在t2时刻到达位置L2处,在t3时刻到达位置L3处,在t4时刻到达位置L4处,在t5时刻到达位置5处。从而形成了L1至L5的运动路径,当然,在一个时刻显示界面仅显示当前时刻虚拟对象所在的位置。
然而,现有技术的控制体验较差。
发明内容
本公开实施例提供一种虚拟对象的运动控制方法及设备,可以控制虚拟对象旋转,以提高控制体验。
第一方面,本公开实施例提供一种虚拟对象的运动控制方法,包括:
根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,所述旋转状态包括:所述面部绕所述三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,所述旋转控制向量在至少一个维度上的分量与所述旋转轴对应的所述面部旋转角度相关联;
通过所述旋转控制向量控制虚拟对象运动,所述运动包括:旋转运动。
第二方面,本公开实施例提供一种虚拟对象的运动控制装置,包括:
控制向量生成模块,用于根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,所述旋转状态包括:所述面部绕所述三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,所述旋转控制向量在至少一个维度上的分量与所述旋转轴对应的所述面部旋转角度相关联;
运动控制模块,用于通过所述旋转控制向量控制虚拟对象运动,所述运动包括:旋转运动。
第三方面,本公开实施例提供一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述电子设备实现如第一方面所述的方法。
第四方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,使计算设备实现如第一方面所述的方法。
第五方面,本公开实施例提供一种计算机程序,所述计算机程序用于实现如第一方面所述的方法。
第六方面,本公开实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序用于实现如第一方面所述的方法。
附图说明
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是现有技术提供的虚拟对象的运动过程示意图;
图2是本公开实施例提供的一种虚拟对象的运动控制方法的步骤流程图;
图3是本公开实施例提供的一种面部旋转角度示意图;
图4是本公开实施例提供的一种虚拟对象的运动控制装置的结构框图;
图5是本公开实施例提供的一种电子设备的结构框图;
图6是本公开实施例提供的另一种电子设备的结构框图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
如背景技术所述,现有技术的控制体验较差。为了解决上述技术问题,发明人对其进行分析之后发现,出现上述问题的原因之一在于,现有技术中的虚拟对象通常是进行平移运动,导致控制体验差。
为了解决上述技术问题,本公开实施例为了提高控制体验,考虑可以控制虚拟对象进行旋转运动。
下面以具体地实施例对本公开实施例的技术方案以及本公开的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本公开实施例进行描述。
图2是本公开实施例提供的一种虚拟对象的运动控制方法的步骤流程图。这里的虚拟对象可以是电子设备的显示屏幕上显示的任意对象。在不同应用场景中,该虚拟对象不同。本 公开实施例的一个应用场景为游戏场景,在游戏场景中,显示屏幕上可以显示游戏界面,虚拟对象可以理解为游戏角色,游戏角色可以在游戏界面中运动。这个运动可以由游戏玩家控制。需要说明的是,本公开实施例的应用场景并不局限于上述游戏场景,从而虚拟对象并不局限于上述游戏角色。
参照图2所示,该虚拟对象的运动控制方法包括:
S101:根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,旋转状态包括:面部绕三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,旋转控制向量在至少一个维度上的分量与旋转轴对应的面部旋转角度相关联。
其中,面部旋转角度可以是一个矢量,用于表示方向和幅度。在实际应用中,可以设置多个位于真实的三维空间中的旋转轴,从而一个面部旋转角度是针对一个旋转轴的旋转角度。这里的旋转轴可以任意设置,但是考虑到尽可能用较少的旋转轴表示各种方向的旋转,可以设置三个相互垂直的旋转轴。
图3是本公开实施例提供的一种面部旋转角度示意图。参照图3所示,三个坐标轴:x轴、y轴和z轴可以分别作为一个旋转轴。从而,面部的旋转状态可以包括:面部绕x轴旋转所对应的面部旋转角度Pitch、面部绕y轴旋转所对应的面部旋转角度Yaw和面部绕z轴旋转所对应的面部旋转角度Roll。
上述Pitch也可以理解为面部在y轴和z轴构成的YOZ平面中的旋转角度,上述Yaw也可以理解为面部在x轴和z轴构成的XOZ平面中的旋转角度,上述Roll也可以理解为面部在x轴和y轴构成的XOY平面中的旋转角度。
上述旋转控制向量可以是三维向量,其在每个维度上的分量和面部旋转角度之间的关联关系可以灵活设置。例如,可以将至少一个面部旋转角度分别作为旋转控制向量在至少一个维度上的分量,或将面部旋转角度进行线性或非线性转换之后作为分量。
需要说明的是,当一个面部旋转角度作为旋转控制向量的一个分量时,用户可以将面部绕对应的旋转轴进行旋转,以实现对虚拟对象的运动控制。当多个面部旋转角度作为旋转控制向量的多个分量时,可以通过面部绕多个旋转轴的旋转实现对虚拟对象的运动控制,有助于提高旋转运动的多样性,进而提高游戏的趣味性。
可选地,在将面部旋转角度映射到旋转控制向量的分量时,可以通过以下步骤实现:首先,获取第一旋转轴和第二旋转轴分别对应的面部旋转角度,第一旋转轴是位于水平面且平行于屏幕的旋转轴,第二旋转轴是位于竖直方向上的旋转轴;然后,根据第一旋转轴对应的面部旋转角度确定旋转控制向量在第三个维度上的分量;再然后,将第二旋转轴对应的面部旋转角度确定为旋转控制向量在第一个维度上的分量;最后,将旋转控制向量在第二个维度上的分量设置为0。
其中,第一旋转轴可以为图3中的x轴,第二旋转轴可以为图3中的y轴。
第一方面,参照图3所示,本公开实施例可以将Pitch映射到旋转控制向量在第三个维度上的分量,以使用户通过上下翻转面部的角度Pitch,控制虚拟对象在其三维空间的第三个维度上的旋转角度,以及控制虚拟对象在其三维空间的第三个维度上的平移运动。该第三个维度可以是竖直方向上的维度。
第二方面,参照图3所示,本公开实施例可以将Yaw映射到旋转控制向量在第一个维度上的分量,以使用户通过左右翻转面部的角度Yaw,控制虚拟对象在其三维空间的第一个维 度上的旋转角度,以及控制虚拟对象在其三维空间的第一个维度上的平移运动。该第一个维度可以是水平方向上的维度。
第三方面,本公开实施例将旋转控制向量在第二个维度上的分量设置为0,以使虚拟对象在其三维空间的第二个维度上不进行旋转,也不进行平移运动。该第二个维度可以是垂直于屏幕的维度。
可以理解的是,在俯视角度下,由于虚拟对象在上述第一个维度和第三个维度构成的平面的运动过程,具有较好的显示效果,而第二个维度上的运动在俯视角度下没有较好的显示效果,从而本公开实施例通过上述方法将第二个维度上的旋转控制向量设置为0,以尽可能的降低计算复杂度。
在本公开实施例的第一种示例中,考虑到虚拟对象和用户是一种镜像关系,从而将上述旋转控制向量在第三个维度上的分量确定为第一旋转轴对应的面部旋转角度的相反数。在用户将面部向上翻转时,可以保证虚拟对象向上进行平移运动,同理,在用户将面部向下翻转时,可以保证虚拟对象向下进行平移运动。如此,可以保证用户的和虚拟对象的运动一致性,有助于提高用户对虚拟对象的控制准确度。
在本公开实施例的第二种示例中,为了调整在第三个维度上的控制灵敏度,可以根据第一预设系数和第一旋转轴对应的面部旋转角度的相反数,确定旋转控制向量在第三个维度上的分量,第一预设系数用于调整在第三个维度上的控制灵敏度。
其中,旋转控制向量在第三个维度上的分量可以为第一预设系数和上述相反数的乘积。
可以理解的是,当第一预设系数大于1时,用户可以通过较小幅度的面部上下翻转,控制虚拟对象的运动,有助于提高在第三个维度上的控制灵敏度。当第一预设系数小于1时,用户可以通过较大幅度的面部上下翻转,控制虚拟对象的运动,可以通过降低灵敏度以避免用户误操作。
在本公开实施例的第三种示例中,为了灵活的适应人们对面部的上下翻转习惯,可以对上下翻转的角度Pitch进行修正。具体地,先将第一旋转轴对应的面部旋转角度和第二预设系数之和确定为修正角度,再将修正角度的相反数和第一预设系数的乘积确定为旋转控制向量在第三个维度上的分量。
其中,上述第二预设系数可以灵活设置,可以大于0或小于0。
当第二预设系数大于0时,参照图3所示的坐标系,可以将上下翻转的角度向下修正。从而,如果人们习惯于向上翻转时,可以适当的将上下翻转的角度向下修正,以对虚拟对象进行各种旋转轴的运动控制。从而,如果人们习惯于向上翻转时,可以适当的将上下翻转的角度向下修正,以在用户向上翻转较小幅度时,控制虚拟对象向下进行平移运动。在用户习惯于将面部向上翻转的场景中,可以有助于提高虚拟对象的运动多样性。
当第二预设系数小于0时,参照图3所示的坐标系,可以将上下翻转的角度向上修正。从而,如果人们习惯于向下翻转时,可以适当的将上下翻转的角度向上修正,以在用户向下翻转较小幅度时,控制虚拟对象向上进行平移运动。在用户习惯于将面部向下翻转的场景中,可以有助于提高虚拟对象的运动多样性。
S102:通过旋转控制向量控制虚拟对象运动,该运动包括:旋转运动。
相较于平移运动,本公开实施例的旋转运动可以为用户提供更好的控制体验。相较于平移运动,该旋转运动在俯视角度下具有更好的显示效果,从而可以提高在俯视角度下的控制体验。
在本公开实施例的一种示例中,可以控制虚拟对象按照旋转控制向量指向的方向进行旋转运动,旋转控制向量可以是三维向量,从而每个维度上的分量用于指示在对应的一个旋转轴上的旋转方向和旋转角度。
在本公开实施例的另一种示例中,可以通过该旋转控制向量对应的第一旋转参数控制虚拟对象进行旋转运动。具体地,可以包括以下步骤S1021至S1024:
S1021,将旋转控制向量转换为第一旋转参数,第一旋转参数用于通过预设数量的第一子参数表示旋转策略,预设数量大于旋转控制向量的维数。
可以看出,相对于旋转控制向量,第一旋转参数可以用更多的第一子参数表示旋转策略,有助于提高旋转策略的准确度。
其中,第一旋转参数可以是旋转控制向量对应的四元数,每个三维向量都对应一个唯一的四元数。
S1022,获取虚拟对象的第二旋转参数,第二旋转参数用于通过预设数量的第二子参数表示虚拟对象的当前朝向。
与第一旋转参数对应的,第二旋转参数也可以用更多的第二子参数表示当前朝向,从而有助于提高当前朝向的准确度。
其中,第二旋转参数可以为四元数,其获取过程可以包括:先获取虚拟对象的当前朝向对应的三维向量作为该虚拟对象的朝向向量,再将该朝向向量转换为一个四元数,得到第二旋转参数。
S1023,确定第一旋转参数和第二旋转参数之间的第一角度。
其中,第一角度也可以理解为旋转控制向量和虚拟对象的朝向向量之间的夹角的角度。当第一旋转参数和第二旋转参数为四元数时,第一角度是两个四元数之间的角度。
S1024,通过第一角度控制虚拟对象进行旋转运动。
可选地,当第一旋转参数和第二旋转参数均为四元数时,S1024具体可以包括:先将第一角度和相邻两帧图像之间的最大角色旋转角度中的最小值确定为第二角度;再通过第二角度对第一旋转参数和第二旋转参数进行插值运算,得到对应的第三四元数;最后通过第三四元数控制虚拟对象进行旋转运动。
其中,最大角色旋转角度可以是预设旋转角度和相邻两帧图像之间的时间间隔的乘积,预设旋转角度是可以根据实际应用场景设定的。
可以看出,当第一角度大于最大角色旋转角度时,第三四元数对应最大角色旋转角度,实现了根据最大角色旋转角度对虚拟对象进行旋转运动。当第一角度小于最大角色旋转角度时,第三四元数对应第一角度,实现了根据第一角度对虚拟对象进行旋转运动。也就是说,本公开实施例对虚拟对象的旋转程度最多为最大角色旋转角度,这样,可以避免虚拟对象的旋转过大,导致画面不连续。
此外,本公开实施例可以通过四元数实现旋转运动,有助于避免出现万向节死锁的问题。
可选地,上述运动还可以包括平移运动。本公开实施例还可以通过上述旋转控制向量控制虚拟对象进行平移运动,从而本公开实施例的虚拟对象的运动是旋转运动和平移运动的叠 加,以使用户可以在俯视角度下看到虚拟对象的旋转运动和平移运动,有助于进一步提高虚拟对象在俯视角度下的游戏体验。
具体地,在进行上述平移运动时,先根据前述旋转控制向量和虚拟对象的当前运动速度,确定虚拟对象的运动向量,然后,通过运动向量确定虚拟对象进行平移运动后的位置,以在该位置处显示虚拟对象。
其中,上述旋转控制向量、当前运动速度和运动向量均是三维向量,运动向量可以是旋转控制向量和当前运动速度之间的叉积,也可以称为外积。
在得到上述运动向量之后,可以将虚拟对象的当前位置和该运动向量相加,得到平移运动后的位置。这里的位置是在三维坐标系中的一个位置。
需要说明的是,本公开实施例的平移运动是通过面部的旋转控制的,面部旋转角度与旋转控制向量之间的映射关系可以影响面部的旋转与平移运动之间的对应关系,通过该映射关系的设置可以灵活的调整平移运动。
可选地,在控制虚拟对象进行上述运动之前,还可以判断旋转控制向量的模是否大于或等于预设阈值。如果旋转控制向量的模大于或等于预设阈值,则通过旋转控制向量控制虚拟对象进行上述运动。如果旋转控制向量的模小于该预设阈值,则控制虚拟对象保持当前位置和当前状态,也就是说,控制虚拟对象不进行上述运动。
可以看出,本公开实施例可以在旋转较大幅度时,确定该面部旋转是用户对虚拟对象的控制指令,从而控制虚拟对象运动。而在面部旋转较小幅度时,将该面部旋转确定为用户的误操作,此时控制虚拟对象不运动。这样可以避免用户的误操作,提高虚拟对象的运动控制准确度。
可选地,在得到上述旋转控制向量之后,还可以对旋转控制向量进行单位化处理,并通过单位化处理后的旋转控制向量控制虚拟对象运动。如此,可以降低通过旋转控制向量控制虚拟对象进行运动时的运算复杂度。
其中,单位化处理也可以称为归一化处理,具体包括以下步骤:首先,确定旋转控制向量的模;然后,计算旋转控制向量和该模的比值,得到单位化处理后的旋转控制向量。
需要说明的是,上述单位化处理还可以和上述模的判断结合起来,具体地,如果旋转控制向量的模大于或等于预设阈值,则先对旋转控制向量进行单位化,并通过单位化处理后的旋转控制向量控制虚拟对象运动。如果旋转控制向量的模小于该预设阈值,则控制虚拟对象保持当前位置和当前状态,也就是说,控制虚拟对象不进行任何运动。
对应于上文实施例的虚拟对象的运动控制方法,图4是本公开实施例提供的一种虚拟对象的运动控制装置的结构框图。为了便于说明,仅示出了与本公开实施例相关的部分。参照图4,上述虚拟对象的运动控制装置200包括:控制向量生成模块201和运动控制模块202。
其中,控制向量生成模块201,用于根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,所述旋转状态包括:所述面部绕所述三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,所述旋转控制向量在至少一个维度上的分量与所述旋转轴对应的所述面部旋转角度相关联。
运动控制模块202,用于通过所述旋转控制向量控制虚拟对象运动,所述运动包括:旋转运动。
可选地,所述运动控制模块202还用于:
将所述旋转控制向量转换为第一旋转参数,所述第一旋转参数用于通过预设数量的第一子参数表示旋转策略,所述预设数量大于所述旋转控制向量的维数。
获取所述虚拟对象的第二旋转参数,所述第二旋转参数用于通过所述预设数量的第二子参数表示所述虚拟对象的当前朝向。
确定所述第一旋转参数和所述第二旋转参数之间的第一角度。
通过所述第一角度控制所述虚拟对象进行旋转运动。
可选地,所述第一旋转参数和所述第二旋转参数为均为四元数。
可选地,所述运动控制模块202还用于:
将所述第一角度和相邻两帧图像之间的最大角色旋转角度中的最小值确定为第二角度。
通过所述第二角度对所述第一四元数和所述第二四元数进行插值运算,得到对应的第三四元数。
通过所述第三四元数控制所述虚拟对象进行旋转运动。
可选地,所述运动控制模块202还用于:
若所述旋转控制向量的模大于或等于预设阈值,则通过所述旋转控制向量控制虚拟对象运动。
可选地,所述运动控制模块202还用于:
对所述旋转控制向量进行单位化处理,并通过单位化处理后的旋转控制向量控制虚拟对象运动。
可选地,所述控制向量生成模块201还用于:
获取所述第一旋转轴和第二旋转轴分别对应的面部旋转角度,所述第一旋转轴是位于水平面且平行于屏幕的旋转轴,所述第二旋转轴是位于竖直方向上的旋转轴。
根据所述第一旋转轴对应的面部旋转角度确定所述旋转控制向量在第三个维度上的分量,所述第三个维度处于竖直方向。
将所述第二旋转轴对应的面部旋转角度确定为所述旋转控制向量在第一个维度上的分量,所述第一个维度处于水平方向。
将所述旋转控制向量在第二个维度上的分量设置为0。
可选地,所述控制向量生成模块201还用于:
根据所述第一旋转轴对应的面部旋转角度的相反数确定所述旋转控制向量在第三个维度上的分量。
可选地,所述控制向量生成模块201还用于:
通过第一预设系数和所述第一旋转轴对应的面部旋转角度的相反数,确定所述旋转控制向量在第三个维度上的分量,所述第一预设系数用于调整在所述第三个维度上的控制灵敏度。
可选地,所述控制向量生成模块201还用于:
将所述第一旋转轴对应的面部旋转角度和第二预设系数之和确定为修正角度。
将所述修正角度的相反数和所述第一预设系数的乘积确定为所述旋转控制向量在第三个维度上的分量。
可选地,所述运动还包括平移运动,所述运动控制模块202还用于:
根据所述旋转控制向量和所述虚拟对象的当前运动速度,确定所述虚拟对象的运动向量。
通过所述运动向量确定所述虚拟对象进行所述平移运动后的位置。
本实施例提供的虚拟对象的运动控制装置,可用于执行上述图2所示的方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
图5是本公开实施例提供的一种电子设备600的结构框图。该电子设备600包括存储器602和至少一个处理器601。
其中,存储器602存储计算机执行指令。
至少一个处理器601执行存储器602存储的计算机执行指令,使得电子设备601实现前述图2中的方法。
此外,该电子设备还可以包括接收器603和发送器604,接收器603用于接收从其余装置或设备的信息,并转发给处理器601,发送器604用于将信息发送到其余装置或设备。
进一步地,参考图6,其示出了适于用来实现本公开实施例的电子设备900的结构示意图,该电子设备900可以为终端设备。其中,终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,简称PDA)、平板电脑(Portable Android Device,简称PAD)、便携式多媒体播放器(Portable Media Player,简称PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图6示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图6所示,电子设备900可以包括处理装置(例如中央处理器、图形处理器等)901,其可以根据存储在只读存储器(Read Only Memory,简称ROM)902中的程序或者从存储装置908加载到随机访问存储器(Random Access Memory,简称RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有电子设备900操作所需的各种程序和数据。处理装置901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(Input/Output,简称I/O)接口905也连接至总线904。
通常,以下装置可以连接至I/O接口905:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置906;包括例如液晶显示器(Liquid Crystal Display,简称LCD)、扬声器、振动器等的输出装置907;包括例如磁带、硬盘等的存储装置908;以及通信装置909。通信装置909可以允许电子设备900与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备900,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置909从网络上被下载和安装,或者从存储装置908被安装,或者从ROM 902被安装。在该计算机程序被处理装置901执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,简称EPROM或闪存)、光纤、便携式紧凑磁盘 只读存储器(Compact Disc Read Only Memory,简称CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(Radio Frequency,射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network,简称LAN)或广域网(Wide Area Network,简称WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、专用标准产品(Application Specific Standard Parts,简称ASSP)、片上系统(System on Chip,简称SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,简称CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
在第一方面的第一种示例中,本公开实施例提供了一种虚拟对象的运动控制方法,包括:
根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,所述旋转状态包括:所述面部绕所述三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,所述旋转控制向量在至少一个维度上的分量与所述旋转轴对应的所述面部旋转角度相关联。
通过所述旋转控制向量控制虚拟对象运动,所述运动包括:旋转运动。
基于第一方面的第一种示例,在第一方面的第二种示例中,所述通过所述旋转控制向量控制虚拟对象运动,包括:
将所述旋转控制向量转换为第一旋转参数,所述第一旋转参数用于通过预设数量的第一子参数表示旋转策略,所述预设数量大于所述旋转控制向量的维数。
获取所述虚拟对象的第二旋转参数,所述第二旋转参数用于通过所述预设数量的第二子参数表示所述虚拟对象的当前朝向。
确定所述第一旋转参数和所述第二旋转参数之间的第一角度。
通过所述第一角度控制所述虚拟对象进行旋转运动。
基于第一方面的第二种示例,在第一方面的第三种示例中,所述第一旋转参数和所述第二旋转参数为均为四元数。
基于第一方面的第三种示例,在第一方面的第四种示例中,所述通过所述第一角度控制所述虚拟对象进行旋转运动,包括:
将所述第一角度和相邻两帧图像之间的最大角色旋转角度中的最小值确定为第二角度。
通过所述第二角度对所述第一四元数和所述第二四元数进行插值运算,得到对应的第三四元数。
通过所述第三四元数控制所述虚拟对象进行旋转运动。
基于第一方面的第一至第四种示例,在第一方面的第五种示例中,所述通过所述旋转控制向量控制虚拟对象运动,包括:
若所述旋转控制向量的模大于或等于预设阈值,则通过所述旋转控制向量控制虚拟对象运动。
基于第一方面的第五种示例,在第一方面的第六种示例中,所述通过所述旋转控制向量控制虚拟对象运动,包括:
对所述旋转控制向量进行单位化处理,并通过单位化处理后的旋转控制向量控制虚拟对象运动。
基于第一方面的第一至第四种示例,在第一方面的第七种示例中,所述根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,包括:
获取所述第一旋转轴和第二旋转轴分别对应的面部旋转角度,所述第一旋转轴是位于水平面且平行于屏幕的旋转轴,所述第二旋转轴是位于竖直方向上的旋转轴。
根据所述第一旋转轴对应的面部旋转角度确定所述旋转控制向量在第三个维度上的分量,所述第三个维度处于竖直方向。
将所述第二旋转轴对应的面部旋转角度确定为所述旋转控制向量在第一个维度上的分量,所述第一个维度处于水平方向。
将所述旋转控制向量在第二个维度上的分量设置为0。
基于第一方面的第七种示例,在第一方面的第八种示例中,所述根据所述第一旋转轴对应的面部旋转角度确定所述旋转控制向量在第三个维度上的分量,包括:
根据所述第一旋转轴对应的面部旋转角度的相反数确定所述旋转控制向量在第三个维度上的分量。
基于第一方面的第八种示例,在第一方面的第九种示例中,所述根据所述第一旋转轴对应的面部旋转角度的相反数确定所述旋转控制向量在第三个维度上的分量,包括:
通过第一预设系数和所述第一旋转轴对应的面部旋转角度的相反数,确定所述旋转控制向量在第三个维度上的分量,所述第一预设系数用于调整在所述第三个维度上的控制灵敏度。
基于第一方面的第九种示例,在第一方面的第十种示例中,所述通过第一预设系数和所述第一旋转轴对应的面部旋转角度的相反数,确定所述旋转控制向量在第三个维度上的分量,包括:
将所述第一旋转轴对应的面部旋转角度和第二预设系数之和确定为修正角度。
将所述修正角度的相反数和所述第一预设系数的乘积确定为所述旋转控制向量在第三个维度上的分量。
基于第一方面的第一至第四种示例,在第一方面的第十一种示例中,所述运动还包括平移运动,所述通过所述旋转控制向量控制虚拟对象运动,包括:
根据所述旋转控制向量和所述虚拟对象的当前运动速度,确定所述虚拟对象的运动向量。
通过所述运动向量确定所述虚拟对象进行所述平移运动后的位置。
在第二方面的第一种示例中,提供了一种虚拟对象的运动控制装置,包括:
控制向量生成模块,用于根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,所述旋转状态包括:所述面部绕所述三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,所述旋转控制向量在至少一个维度上的分量与所述旋转轴对应的所述面部旋转角度相关联。
运动控制模块,用于通过所述旋转控制向量控制虚拟对象运动,所述运动包括:旋转运动。
基于第二方面的第一种示例,在第二方面的第二种示例中,所述运动控制模块还用于:
将所述旋转控制向量转换为第一旋转参数,所述第一旋转参数用于通过预设数量的第一子参数表示旋转策略,所述预设数量大于所述旋转控制向量的维数。
获取所述虚拟对象的第二旋转参数,所述第二旋转参数用于通过所述预设数量的第二子参数表示所述虚拟对象的当前朝向。
确定所述第一旋转参数和所述第二旋转参数之间的第一角度。
通过所述第一角度控制所述虚拟对象进行旋转运动。
基于第二方面的第二种示例,在第二方面的第三种示例中,所述第一旋转参数和所述第二旋转参数为均为四元数。
基于第二方面的第三种示例,在第二方面的第四种示例中,所述运动控制模块还用于:
将所述第一角度和相邻两帧图像之间的最大角色旋转角度中的最小值确定为第二角度。
通过所述第二角度对所述第一四元数和所述第二四元数进行插值运算,得到对应的第三四元数。
通过所述第三四元数控制所述虚拟对象进行旋转运动。
基于第二方面的第一至第四种示例,在第二方面的第五种示例中,所述运动控制模块还用于:
若所述旋转控制向量的模大于或等于预设阈值,则通过所述旋转控制向量控制虚拟对象运动。
基于第二方面的第五种示例,在第二方面的第六种示例中,所述运动控制模块还用于:
对所述旋转控制向量进行单位化处理,并通过单位化处理后的旋转控制向量控制虚拟对象运动。
基于第二方面的第一至第四种示例,在第二方面的第七种示例中,所述控制向量生成模块还用于:
获取所述第一旋转轴和第二旋转轴分别对应的面部旋转角度,所述第一旋转轴是位于水平面且平行于屏幕的旋转轴,所述第二旋转轴是竖直旋转轴,所述第三个维度处于竖直方向。
将所述第二旋转轴对应的面部旋转角度确定为所述旋转控制向量在第一个维度上的分量,所述第一个维度处于水平方向。
将所述第二旋转轴对应的面部旋转角度确定为所述旋转控制向量在第一个维度上的分量。
将所述旋转控制向量在第二个维度上的分量设置为0。
基于第二方面的第七种示例,在第二方面的第八种示例中,所述控制向量生成模块还用于:
根据所述第一旋转轴对应的面部旋转角度的相反数确定所述旋转控制向量在第三个维度上的分量。
基于第二方面的第八种示例,在第二方面的第九种示例中,所述控制向量生成模块还用于:
通过第一预设系数和所述第一旋转轴对应的面部旋转角度的相反数,确定所述旋转控制向量在第三个维度上的分量,所述第一预设系数用于调整在所述第三个维度上的控制灵敏度。
基于第二方面的第九种示例,在第二方面的第十种示例中,所述控制向量生成模块还用于:
将所述第一旋转轴对应的面部旋转角度和第二预设系数之和确定为修正角度。
将所述修正角度的相反数和所述第一预设系数的乘积确定为所述旋转控制向量在第三个维度上的分量。
基于第二方面的第一至第四种示例,在第二方面的第十一种示例中,所述运动还包括平移运动,所述运动控制模块还用于:
根据所述旋转控制向量和所述虚拟对象的当前运动速度,确定所述虚拟对象的运动向量。
通过所述运动向量确定所述虚拟对象进行所述平移运动后的位置。
第三方面,根据本公开的一个或多个实施例,提供了一种电子设备,包括:至少一个处理器和存储器。
所述存储器存储计算机执行指令。
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述电子设备实现第一方面任一项所述的方法。
第四方面,根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,使计算设备实现第一方面任一项所述的方法。
第五方面,根据本公开的一个或多个实施例,提供了一种计算机程序,所述计算机程序用于实现第一方面任一项所述的方法。
第六方面,根据本公开的一个或多个实施例,提供了一种计算机程序产品,包括计算机程序,所述计算机程序用于实现第一方面任一项所述的方法。
本公开实施例提供了一种虚拟对象的运动控制方法及设备,该方法包括:根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,旋转状态包括:面部绕三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,旋转控制向量在至少一个维度上的分量与旋转轴对应的面部旋转角度相关联;通过旋转控制向量控制虚拟对象运动,该运动包括:旋转运动。本公开实施例可以通过用户的面部的旋转状态控制虚拟对象进行旋转运动,以提高对虚拟对象的运动控制体验。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (16)

  1. 一种虚拟对象的运动控制方法,所述方法包括:
    根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,所述旋转状态包括:所述面部绕所述三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,所述旋转控制向量在至少一个维度上的分量与所述旋转轴对应的所述面部旋转角度相关联;
    通过所述旋转控制向量控制所述虚拟对象运动,所述运动包括:旋转运动。
  2. 根据权利要求1所述的方法,其中,所述通过所述旋转控制向量控制所述虚拟对象运动,包括:
    将所述旋转控制向量转换为第一旋转参数,所述第一旋转参数用于通过预设数量的第一子参数表示旋转策略,所述预设数量大于所述旋转控制向量的维数;
    获取所述虚拟对象的第二旋转参数,所述第二旋转参数用于通过所述预设数量的第二子参数表示所述虚拟对象的当前朝向;
    确定所述第一旋转参数和所述第二旋转参数之间的第一角度;
    通过所述第一角度控制所述虚拟对象进行旋转运动。
  3. 根据权利要求2所述的方法,其中,所述第一旋转参数和所述第二旋转参数为均为四元数。
  4. 根据权利要求2或3所述的方法,其中,所述通过所述第一角度控制所述虚拟对象进行旋转运动,包括:
    将所述第一角度和相邻两帧图像之间的最大角色旋转角度中的最小值确定为第二角度;
    通过所述第二角度对所述第一旋转参数和所述第二旋转参数进行插值运算,得到对应的第三四元数;
    通过所述第三四元数控制所述虚拟对象进行旋转运动。
  5. 根据权利要求1至4任一项所述的方法,其中,所述通过所述旋转控制向量控制所述虚拟对象运动,包括:
    若所述旋转控制向量的模大于或等于预设阈值,则通过所述旋转控制向量控制所述虚拟对象运动。
  6. 根据权利要求1至5任一项所述的方法,其中,所述通过所述旋转控制向量控制所述虚拟对象运动,包括:
    对所述旋转控制向量进行单位化处理,并通过单位化处理后的旋转控制向量控制所述虚拟对象运动。
  7. 根据权利要求1至6任一项所述的方法,其中,所述根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,包括:
    获取第一旋转轴和第二旋转轴分别对应的面部旋转角度,所述第一旋转轴是位于水平面且平行于屏幕的旋转轴,所述第二旋转轴是位于竖直方向上的旋转轴;
    根据所述第一旋转轴对应的面部旋转角度确定所述旋转控制向量在第三个维度上的分量,所述第三个维度处于竖直方向;
    将所述第二旋转轴对应的面部旋转角度确定为所述旋转控制向量在第一个维度上的分量,所述第一个维度处于水平方向;
    将所述旋转控制向量在第二个维度上的分量设置为0。
  8. 根据权利要求7所述的方法,其中,所述根据所述第一旋转轴对应的面部旋转角度确定所述旋转控制向量在第三个维度上的分量,包括:
    根据所述第一旋转轴对应的面部旋转角度的相反数确定所述旋转控制向量在第三个维度上的分量。
  9. 根据权利要求8所述的方法,其中,所述根据所述第一旋转轴对应的面部旋转角度的相反数确定所述旋转控制向量在第三个维度上的分量,包括:
    通过第一预设系数和所述第一旋转轴对应的面部旋转角度的相反数,确定所述旋转控制向量在第三个维度上的分量,所述第一预设系数用于调整在所述第三个维度上的控制灵敏度。
  10. 根据权利要求9所述的方法,其中,所述通过第一预设系数和所述第一旋转轴对应的面部旋转角度的相反数,确定所述旋转控制向量在第三个维度上的分量,包括:
    将所述第一旋转轴对应的面部旋转角度和第二预设系数之和确定为修正角度;
    将所述修正角度的相反数和所述第一预设系数的乘积确定为所述旋转控制向量在第三个维度上的分量。
  11. 根据权利要求1至10任一项所述的方法,其中,所述运动还包括平移运动,所述通过所述旋转控制向量控制所述虚拟对象运动,包括:
    根据所述旋转控制向量和所述虚拟对象的当前运动速度,确定所述虚拟对象的运动向量;
    通过所述运动向量确定所述虚拟对象进行所述平移运动后的位置。
  12. 一种虚拟对象的运动控制装置,其中,所述装置包括:
    控制向量生成模块,用于根据用户的面部在真实的三维空间中的旋转状态,生成旋转控制向量,所述旋转状态包括:所述面部绕所述三维空间中的至少一个旋转轴分别旋转所对应的面部旋转角度,所述旋转控制向量在至少一个维度上的分量与所述旋转轴对应的所述面部旋转角度相关联;
    运动控制模块,用于通过所述旋转控制向量控制虚拟对象运动,所述运动包括:旋转运动。
  13. 一种电子设备,包括:至少一个处理器和存储器;
    所述存储器存储计算机执行指令;
    所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述电子设备实现如权利要求1至11任一项所述的方法。
  14. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,使计算设备实现如权利要求1至11任一项所述的方法。
  15. 一种计算机程序,其中,所述计算机程序用于实现如权利要求1至11任一项所述的方法。
  16. 一种计算机程序产品,包括计算机程序,所述计算机程序用于实现如权利要求1至11任一项所述的方法。
PCT/CN2023/085722 2022-04-19 2023-03-31 虚拟对象的运动控制方法及设备 WO2023202358A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210411519.3A CN114699770A (zh) 2022-04-19 2022-04-19 虚拟对象的运动控制方法及设备
CN202210411519.3 2022-04-19

Publications (1)

Publication Number Publication Date
WO2023202358A1 true WO2023202358A1 (zh) 2023-10-26

Family

ID=82174169

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/085722 WO2023202358A1 (zh) 2022-04-19 2023-03-31 虚拟对象的运动控制方法及设备

Country Status (2)

Country Link
CN (1) CN114699770A (zh)
WO (1) WO2023202358A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114699770A (zh) * 2022-04-19 2022-07-05 北京字跳网络技术有限公司 虚拟对象的运动控制方法及设备
CN116095407A (zh) * 2022-12-22 2023-05-09 深圳创维-Rgb电子有限公司 用户界面的控制方法及相关装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060119575A1 (en) * 2004-12-06 2006-06-08 Naturalpoint, Inc. Systems and methods for using a movable object to control a computer
US20130251244A1 (en) * 2012-03-20 2013-09-26 Microsoft Corporation Real time head pose estimation
CN106873767A (zh) * 2016-12-30 2017-06-20 深圳超多维科技有限公司 一种虚拟现实应用的运行控制方法和装置
CN111638791A (zh) * 2020-06-03 2020-09-08 北京字节跳动网络技术有限公司 虚拟角色的生成方法、装置、电子设备及存储介质
CN112241203A (zh) * 2020-10-21 2021-01-19 广州博冠信息科技有限公司 三维虚拟角色的控制装置及方法、存储介质及电子设备
CN113546420A (zh) * 2021-07-23 2021-10-26 网易(杭州)网络有限公司 虚拟对象的控制方法、装置、存储介质及电子设备
CN114699770A (zh) * 2022-04-19 2022-07-05 北京字跳网络技术有限公司 虚拟对象的运动控制方法及设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060119575A1 (en) * 2004-12-06 2006-06-08 Naturalpoint, Inc. Systems and methods for using a movable object to control a computer
US20130251244A1 (en) * 2012-03-20 2013-09-26 Microsoft Corporation Real time head pose estimation
CN106873767A (zh) * 2016-12-30 2017-06-20 深圳超多维科技有限公司 一种虚拟现实应用的运行控制方法和装置
CN111638791A (zh) * 2020-06-03 2020-09-08 北京字节跳动网络技术有限公司 虚拟角色的生成方法、装置、电子设备及存储介质
CN112241203A (zh) * 2020-10-21 2021-01-19 广州博冠信息科技有限公司 三维虚拟角色的控制装置及方法、存储介质及电子设备
CN113546420A (zh) * 2021-07-23 2021-10-26 网易(杭州)网络有限公司 虚拟对象的控制方法、装置、存储介质及电子设备
CN114699770A (zh) * 2022-04-19 2022-07-05 北京字跳网络技术有限公司 虚拟对象的运动控制方法及设备

Also Published As

Publication number Publication date
CN114699770A (zh) 2022-07-05

Similar Documents

Publication Publication Date Title
WO2023202358A1 (zh) 虚拟对象的运动控制方法及设备
US20220241689A1 (en) Game Character Rendering Method And Apparatus, Electronic Device, And Computer-Readable Medium
US20170192734A1 (en) Multi-interface unified displaying system and method based on virtual reality
JP2024505995A (ja) 特殊効果展示方法、装置、機器および媒体
WO2023179346A1 (zh) 特效图像处理方法、装置、电子设备及存储介质
WO2023151524A1 (zh) 图像显示方法、装置、电子设备及存储介质
US20150186571A1 (en) Methods and systems of providing items to customers via a network
WO2023138559A1 (zh) 虚拟现实交互方法、装置、设备和存储介质
US20230401764A1 (en) Image processing method and apparatus, electronic device and computer readable medium
JP7506171B2 (ja) カーソルコントロールユニット制御方法並びにその、装置、電子デバイス、およびコンピュータプログラム
US20230306654A1 (en) Augmented reality interactive display method and device
WO2023193639A1 (zh) 图像渲染方法、装置、可读介质及电子设备
WO2020124995A1 (zh) 手掌法向量确定方法、装置、设备及存储介质
US11869195B2 (en) Target object controlling method, apparatus, electronic device, and storage medium
WO2023221409A1 (zh) 虚拟现实空间的字幕渲染方法、装置、设备及介质
WO2023121569A2 (zh) 粒子特效渲染方法、装置、设备及存储介质
WO2024120114A1 (zh) 特效处理方法、装置、设备、计算机可读存储介质及产品
US20230298265A1 (en) Dynamic fluid effect processing method and apparatus, and electronic device and readable medium
WO2023202357A1 (zh) 显示对象的运动控制方法及设备
WO2023174087A1 (zh) 特效视频生成方法、装置、设备及存储介质
WO2024027820A1 (zh) 基于图像的动画生成方法、装置、设备及存储介质
WO2023246468A1 (zh) 视觉定位参数更新方法、装置、电子设备及存储介质
WO2023231926A1 (zh) 图像处理方法、装置、设备及存储介质
US20230368422A1 (en) Interactive dynamic fluid effect processing method and device, and electronic device
US20240290026A1 (en) Method and apparatus for controlling motion of moving object, device, and storage medium

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: 23791014

Country of ref document: EP

Kind code of ref document: A1