CN117395510B - Virtual machine position control method and device - Google Patents

Virtual machine position control method and device Download PDF

Info

Publication number
CN117395510B
CN117395510B CN202311696077.2A CN202311696077A CN117395510B CN 117395510 B CN117395510 B CN 117395510B CN 202311696077 A CN202311696077 A CN 202311696077A CN 117395510 B CN117395510 B CN 117395510B
Authority
CN
China
Prior art keywords
virtual machine
follow
main body
heel
distance
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202311696077.2A
Other languages
Chinese (zh)
Other versions
CN117395510A (en
Inventor
何建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
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 Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN202311696077.2A priority Critical patent/CN117395510B/en
Publication of CN117395510A publication Critical patent/CN117395510A/en
Application granted granted Critical
Publication of CN117395510B publication Critical patent/CN117395510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides a control method and device for virtual machine positions, wherein the method comprises the following steps: determining a follow-up main body, an optimal follow-up distance and a follow-up distance range in a virtual scene; detecting whether the real-time distance between the virtual machine position in the locking state and the follow-up main body is within the follow-up distance range; if the virtual machine position is within the following shooting distance range, controlling the virtual machine position to move according to a first movement instruction of a user; if the control command is out of the following distance range, identifying the control command of the user; when the control instruction is a first control instruction, controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the follow-up main body; when the control instruction is a second control instruction, determining an optimal follow-up position according to the optimal follow-up distance and the position of the follow-up main body, resetting the virtual machine to the optimal follow-up position, and determining the reset shooting angle according to the azimuth of the follow-up main body; when the control instruction is a third control instruction, the locking state of the virtual machine position is released, and the virtual machine position is moved according to a second movement instruction of a user.

Description

Virtual machine position control method and device
Technical Field
The present invention relates to the field of virtual shooting technologies, and in particular, to a method and an apparatus for controlling a virtual machine position.
Background
Virtual shooting refers to a technique of shooting a subject in a virtual scene of a computer by using a virtual camera to obtain a video or image of the movement of the subject in the virtual scene. Taking fig. 1 as an example, through a virtual shooting technology, a virtual camera can be used to shoot movement of a virtual character in a virtual scene, so as to obtain a corresponding image or video. The position where the virtual camera is located is referred to as a virtual machine position, and the virtual camera generally needs to move along with the movement of the photographed subject, so the photographed subject may also be referred to as a follow-up subject.
In a scene where the heel-strike subject moves greatly, it is often difficult for the virtual camera to stably follow the motion of the heel-strike subject.
In the existing virtual shooting technology, one solution to the problem is to bind a real camera with a virtual machine position, control the motion of the real camera and map the motion of the real camera to the virtual machine position in a mapping control manner.
The problem with this solution is that there is a high demand on the shooting site where the real camera is located, which makes it difficult to control the virtual machine position to the optimal shooting position when there is insufficient space available for the real camera to move in the shooting scene.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a control method and a device for a virtual machine position, which are used for solving the problem of controlling the virtual machine position to follow the movement of a follow-up shooting main body in virtual shooting.
The first aspect of the present application provides a method for controlling a virtual machine location, including:
determining a heel-beat main body and an optimal heel-beat distance and a heel-beat distance range corresponding to the heel-beat main body in a virtual scene;
detecting whether the real-time distance between the virtual machine position in the locking state and the follow-up main body is within the follow-up distance range or not;
if the real-time distance is within the following shooting distance range, controlling the virtual machine to move according to a first movement instruction of a user;
if the real-time distance is out of the following distance range, identifying a control instruction of the user;
when the control instruction is a first control instruction, controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the follow-up main body;
when the control instruction is a second control instruction, determining an optimal follow-up position according to the optimal follow-up distance and the position of the follow-up main body, resetting the virtual machine position to the optimal follow-up position, and determining a reset shooting angle according to the position of the follow-up main body;
and when the control instruction is a third control instruction, releasing the locking state of the virtual machine position, and enabling the virtual machine position to move according to the second movement instruction of the user.
Optionally, the controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the following main body includes:
determining whether the absolute value of the difference between the real-time distance and the optimal follow-up distance is smaller than a preset follow-up threshold;
if the absolute value is smaller than the follow-up threshold, controlling the virtual machine to move according to the moving speed and the moving direction of the follow-up main body;
if the absolute value is larger than or equal to the heel-beat threshold value, determining a virtual machine position moving speed according to the absolute value and the moving speed of the heel-beat main body, wherein the virtual machine position moving speed is larger than the moving speed of the heel-beat main body;
and controlling the virtual machine position to move according to the moving speed of the virtual machine position and the moving direction of the follow-up main body.
Optionally, after controlling the movement of the virtual machine according to the real-time distance, the movement speed and the movement direction of the following main body, the method further includes:
and if the target control instruction of the user for the virtual machine position is continuously obtained within the preset duration threshold, releasing the locking state of the virtual machine position, and controlling the virtual machine position to move according to the target control instruction.
Optionally, determining the optimal heel-beat distance and the heel-beat distance range corresponding to the heel-beat main body includes at least one of:
obtaining a distance setting instruction of the user, and determining an optimal heel-beat distance and a heel-beat distance range of the heel-beat main body according to the distance setting instruction;
and identifying the type of the heel-beating main body, and determining the optimal heel-beating distance and the heel-beating distance range corresponding to the heel-beating main body according to the type of the heel-beating main body.
Optionally, after controlling the movement of the virtual machine according to the real-time distance, the movement speed and the movement direction of the following main body, the method further includes:
and after the virtual machine position is controlled to move to a first position according to the moving speed and the moving direction of the follow-up main body, the virtual machine position is controlled to move in a fine adjustment range taking the first position as the center according to a third moving instruction of the user.
A second aspect of the present application provides a control device for a virtual machine location, including:
the determining unit is used for determining a follow-up main body and an optimal follow-up distance and a follow-up distance range corresponding to the follow-up main body in the virtual scene;
the detection unit is used for detecting whether the real-time distance between the virtual machine position in the locking state and the follow-up main body is within the follow-up distance range or not;
a control unit for:
if the real-time distance is within the following shooting distance range, controlling the virtual machine to move according to a first movement instruction of a user;
if the real-time distance is out of the following distance range, identifying a control instruction of the user;
when the control instruction is a first control instruction, controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the follow-up main body;
when the control instruction is a second control instruction, determining an optimal follow-up position according to the optimal follow-up distance and the position of the follow-up main body, resetting the virtual machine position to the optimal follow-up position, and determining a reset shooting angle according to the position of the follow-up main body;
and when the control instruction is a third control instruction, releasing the locking state of the virtual machine position, and enabling the virtual machine position to move according to the second movement instruction of the user.
Optionally, the control unit is specifically configured to, when controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the following main body:
determining whether the absolute value of the difference between the real-time distance and the optimal follow-up distance is smaller than a preset follow-up threshold;
if the absolute value is smaller than the follow-up threshold, controlling the virtual machine to move according to the moving speed and the moving direction of the follow-up main body;
if the absolute value is larger than or equal to the heel-beat threshold value, determining a virtual machine position moving speed according to the absolute value and the moving speed of the heel-beat main body, wherein the virtual machine position moving speed is larger than the moving speed of the heel-beat main body;
and controlling the virtual machine position to move according to the moving speed of the virtual machine position and the moving direction of the follow-up main body.
Optionally, the control unit is further configured to:
and if the target control instruction of the user for the virtual machine position is continuously obtained within the preset duration threshold, releasing the locking state of the virtual machine position, and controlling the virtual machine position to move according to the target control instruction.
Optionally, when the determining unit determines the optimal following distance and the following distance range corresponding to the following main body, at least one of the following is specifically executed:
obtaining a distance setting instruction of the user, and determining an optimal heel-beat distance and a heel-beat distance range of the heel-beat main body according to the distance setting instruction;
and identifying the type of the heel-beating main body, and determining the optimal heel-beating distance and the heel-beating distance range corresponding to the heel-beating main body according to the type of the heel-beating main body.
Optionally, the control unit is further configured to:
and after the virtual machine position is controlled to move to a first position according to the moving speed and the moving direction of the follow-up main body, the virtual machine position is controlled to move in a fine adjustment range taking the first position as the center according to a third moving instruction of the user.
The beneficial effects of this application lie in:
when the real-time distance between the virtual machine position and the follow-up shooting main body exceeds the follow-up shooting distance range, the virtual machine position can be controlled to move along with the movement of the follow-up shooting main body according to the real-time distance, the movement speed and the movement direction of the follow-up shooting main body and a control instruction of a user, the problem that the virtual camera follows the shooting in the virtual shooting can be solved without controlling the movement of the real camera in the real shooting field, and therefore the problem that the virtual machine position is difficult to control to reach the optimal shooting position due to insufficient movable space of the real camera is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a virtual shooting technique according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for controlling virtual machine bits according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a virtual machine position control device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
An embodiment of the present application provides a method for controlling a virtual machine, please refer to fig. 2, which is a flowchart of the method, and the method may include the following steps.
S201, determining a follow-up main body and an optimal follow-up distance and a follow-up distance range corresponding to the follow-up main body in the virtual scene.
The heel-shooting main body can be any virtual object in a virtual scene, for example, can be a virtual article, a virtual character, a specific limb part of the virtual character, a certain component of the virtual article and the like, and is not limited.
The follow-up subject may be manually specified by a user of a computer device (hereinafter referred to as a computer device) that performs virtual shooting, or may be automatically identified.
For example, a virtual object that is frequently displaced in a virtual scene may be determined as a heel-beat subject, a virtual object of a specific color in the virtual scene may be determined as a heel-beat subject, a virtual object of a maximum or minimum volume in the virtual scene may be determined as a heel-beat subject, and the like.
The virtual object that is displaced frequently is a virtual object whose cumulative moving distance per unit time (for example, 1 minute) is greater than a certain displacement distance threshold.
After determining the heel-strike subject, an optimal heel-strike distance and heel-strike distance range may be determined in at least one of the following ways:
in the first mode, a distance setting instruction of a user is obtained, and an optimal heel-beat distance and a heel-beat distance range of a heel-beat main body are determined according to the distance setting instruction;
and secondly, identifying the type of the heel-beating main body, and determining the optimal heel-beating distance and the heel-beating distance range corresponding to the heel-beating main body according to the type of the heel-beating main body.
In a first manner, the computer device may display a setup interface in which the user inputs values of the optimal following distance and following distance range, and then the computer device determines the input values as the optimal following distance and following distance range.
The optimal following distance and the following distance range may be in units of pixels, or may be in units of physical length units such as meters or centimeters.
In the second mode, the computer device may be preconfigured with a correspondence table of the type of the following main body, the optimal following distance and the following distance range, and after the computer device detects the type of the following main body through an algorithm for identifying the type of the object, the computer device searches the correspondence table for the optimal following distance and the following distance range corresponding to the type. This has the advantage that the efficiency of the method execution of the present embodiment can be improved.
S202, detecting whether the real-time distance between the virtual machine position in the locking state and the follow-up main body is within the follow-up distance range.
If the real-time distance is within the following distance range, step S203 is executed, and if the real-time distance is not within the following distance range, step S204 is executed.
The virtual machine position is the position of the virtual camera of the shooting follow-up main body.
The virtual machine position can be in a locking state or an unlocking state, and the specific state can be determined according to the configuration of a user or the state of the follow-up main body.
The state of the following main body can be specifically that the following main body moves at a speed, if the following main body moves at a speed lower than a preset motion threshold, the virtual machine position can be in an unlocked state, and if the following main body moves at a speed higher than or equal to the motion threshold, the virtual machine position can be in a locked state.
The virtual machine bit in the unlocked state can move under the control of the user, and if the user does not input an instruction for controlling the movement of the virtual machine bit, the virtual machine bit in the unlocked state does not move.
The virtual machine position in the locking state can move under the control of a user, and can also move along with the movement of the follow-up main body under the condition that the user does not input a corresponding instruction.
Under the locking state, the following shooting distance and the shooting angle of the virtual machine position are locked at the same time, and the virtual machine position automatically follows the following shooting main body and keeps the following shooting distance and the shooting angle. The user has no virtual machine position control authority during locking. The virtual machine position can be unlocked to keep pace with the shooting distance and the shooting angle.
After unlocking, the virtual machine is in an unlocking state, and at the moment, a user can freely control the virtual machine, lock the heel-shooting main body again, and reset the optimal heel-shooting distance and the heel-shooting distance range for the heel-shooting main body.
In step S202, three-dimensional space coordinates corresponding to the virtual machine position and three-dimensional space coordinates of the following main body may be detected, and then a distance between the two three-dimensional space coordinates is calculated, where the obtained result is used as a real-time distance. The detection mode of the three-dimensional space coordinates of the virtual machine position and the heel-shooting main body in the virtual scene can be referred to related prior art documents, and will not be repeated.
S203, controlling the virtual machine to move according to the first movement instruction of the user.
The first movement instruction for controlling the movement of the virtual machine position by the user can be obtained in various ways.
As one example, a control handle may be connected to the computer device, and a user may move a control lever on the control handle, the computer device obtaining a first movement instruction based on the amplitude and direction of the swing of the control lever.
As another example, a keyboard may be connected to the computer device, and the user may press a key on the keyboard for controlling movement of the virtual machine location, and the computer device obtains the first movement instruction according to the key pressed by the user and the time of continuous pressing.
S204, identifying a control instruction of a user.
In step S204, the computer device may display a control interface including a plurality of options, prompt the user to select one of the options, and then identify a corresponding control command according to the selected option of the user.
For example, when the user selects the first option, the computer device obtains the first control command, when the user selects the second option, the computer device obtains the second control command, and when the user selects the third option, the computer device obtains the third control command.
S205, when the control instruction is a first control instruction, controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the follow-up main body.
The specific embodiment of step S205 may include:
determining whether the absolute value of the difference between the real-time distance and the optimal follow-up distance is smaller than a preset follow-up threshold;
if the absolute value is smaller than the follow-up threshold, controlling the virtual machine position to move according to the moving speed and the moving direction of the follow-up main body;
if the absolute value is larger than or equal to the heel-beat threshold value, determining the movement speed of the virtual machine position according to the absolute value and the movement speed of the heel-beat main body, wherein the movement speed of the virtual machine position is larger than the movement speed of the heel-beat main body;
and controlling the virtual machine position to move according to the moving speed of the virtual machine position and the moving direction of the follow-up main body.
The absolute value of the difference between the real-time distance and the optimal following distance can be represented by the formula (1), when the formula (1) satisfies the inequality (2), the multiplying factor R can be determined to be equal to 1, then the moving speed of the following main body is multiplied by the multiplying factor to obtain the moving speed of the virtual machine position, the moving direction of the following main body is determined to be the moving direction of the virtual machine position, the virtual machine position is controlled to move along with the following main body according to the moving speed and the moving direction of the virtual machine position, and at the moment, the moving speed and the moving direction of the virtual machine position are consistent with the moving speed and the moving direction of the following main body.
Wherein Disn represents the real-time distance, dis0 represents the optimal following distance, and Dismax represents the upper limit of the following distance range. The following distance range may not be set to a lower limit, and may be set to a lower limit of 0.
When equation (1) satisfies inequality (3), the multiplying power coefficient R can be calculated according to equation (4) by the absolute value, then the multiplying power coefficient is multiplied by the moving speed of the following main body to obtain the moving speed of the virtual machine position, the moving direction of the following main body is determined to be the moving direction of the virtual machine position, the virtual machine position is controlled to move along with the following main body according to the moving speed and the moving direction of the virtual machine position, at the moment, the moving speed of the virtual machine position is larger than the moving speed of the following main body, and the moving direction of the virtual machine position is consistent with the moving direction of the following main body, so that the distance between the virtual machine position and the following main body can be shortened rapidly.
Wherein, K, x and T can be preset adjustable parameters for comprehensively controlling the elastic strength when the virtual machine position distance exceeds the follow-up distance range. The values of these parameters may be fixed values set in advance, or may be dynamic values set dynamically according to the acceleration of the following subject, for example, the larger the acceleration of the following subject, the larger the values of these parameters may be.
Optionally, when controlling the virtual machine bit in the manner of S205, the computer device may further perform the following steps:
and if the target control instruction of the user for the virtual machine position is continuously obtained within the preset duration threshold, releasing the locking state of the virtual machine position, and controlling the virtual machine position to move according to the target control instruction.
That is, if the user continuously inputs a target control instruction for controlling the movement of the virtual machine, for example, continuously pressing a key for controlling the movement of the virtual machine, or continuously toggling a lever for controlling the movement of the virtual machine, and the duration reaches a preset duration threshold during the control of the virtual machine by the computer device in the manner of S205, the computer device may release the locked state of the virtual machine, and control the movement of the virtual machine according to the target control instruction for controlling the movement of the virtual machine by the user in the manner of S207.
The duration threshold may be configured according to the needs of the user, for example, to be 2 seconds.
In some alternative embodiments, during the control of the virtual machine bit movement by the computer device in the manner of S205, the following steps may also be performed:
after the virtual machine position is controlled to move to the first position according to the moving speed and the moving direction of the follow-up main body, the virtual machine position is controlled to move in a fine adjustment range taking the first position as the center according to a third moving instruction of a user.
The fine tuning range may be a spherical range centered on a first position to which the virtual machine moves in the virtual scene and having a radius equal to a preset fine tuning distance.
The fine adjustment distance can be preset by a user according to actual conditions.
Optionally, when the virtual machine is controlled to move within the trimming range, the moving distance and the moving direction of the virtual machine in the whole virtual scene can be determined according to a third moving instruction of the user, then the ratio between the size of the trimming range and the size of the whole virtual scene is calculated, the moving distance in the whole virtual scene is reduced to the moving distance within the trimming range according to the ratio, and finally the virtual machine is controlled to move within the trimming range according to the moving direction and the moving distance within the trimming range.
For example, according to a third movement instruction of the user, the virtual machine position may be translated to the left by 20 cm in the whole virtual scene, the ratio between the calculated size of the fine tuning range and the size of the whole virtual scene is 1:20, and then the computer device may reduce the movement distance of 20 cm in the whole virtual scene to 1 cm according to the ratio, and then control the virtual machine position to translate to the left by 1 cm in the fine tuning range.
S206, when the control instruction is a second control instruction, determining an optimal following shooting position according to the optimal following shooting distance and the position of the following shooting main body, and resetting the virtual machine position to the optimal following shooting position.
In step S206, a spherical surface with the position of the heel-beat main body as the center and the optimal heel-beat distance as the radius may be determined in the virtual scene according to the optimal heel-beat distance and the position of the heel-beat main body, then a position is selected on the spherical surface to determine the optimal heel-beat position, and then the virtual machine position is reset to the optimal heel-beat position.
The strategy for selecting the optimal follow-up position may be to select a position closest to the current virtual machine position on the sphere as the optimal follow-up position, or may be to determine the optimal follow-up position according to the shooting requirement of the follow-up main body.
For example, if the virtual camera needs to capture the back of the heel-strike subject, then the position on the sphere that faces the back of the heel-strike subject may be selected as the optimal heel-strike position.
Optionally, the shooting angle of the virtual camera located at the optimal following position after reset may be determined according to the range of the following main body. Specifically, the virtual camera can be rotated to the position of the lens axis to coincide with the connecting line of the shooting main body, and the lens faces the shooting angle of the shooting main body.
Resetting the virtual machine position, setting the distance between the virtual machine position and the follow-up main body as the preset optimal follow-up distance, resetting the shooting angle to align with the follow-up main body, after the reset, the user can freely control the displacement, the advancing direction and the shooting angle of the virtual machine.
Optionally, after the virtual machine position is reset to the optimal follow-up position, the virtual machine position can be moved according to a control instruction of a user, specifically, at this time, the virtual machine position can be moved according to displacement, a travelling direction and a shooting angle designated by the user.
The method comprises the steps that the virtual machine position is reset to the optimal follow-up position, namely, the computer equipment directly deletes the virtual camera on the current virtual machine position, then a new virtual camera is arranged at the optimal follow-up position, and parameters of the new virtual camera, such as aperture size, flash lamp duration, exposure and the like, are consistent with the deleted virtual camera.
S207, when the control command is the third control command, the locking state of the virtual machine position is released, and the virtual machine position is moved according to the second movement command of the user.
After the locking state is released, a user can freely control the displacement, the advancing direction and the shooting angle of the virtual machine.
The second movement instruction is obtained in a manner consistent with the first movement instruction, and will not be described again.
The beneficial effects of this embodiment lie in:
when the real-time distance between the virtual machine position and the follow-up shooting main body exceeds the follow-up shooting distance range, the virtual machine position can be controlled to move along with the movement of the follow-up shooting main body according to the real-time distance, the movement speed and the movement direction of the follow-up shooting main body and a control instruction of a user, the problem that the virtual camera follows the shooting in the virtual shooting can be solved without controlling the movement of the real camera in the real shooting field, and therefore the problem that the virtual machine position is difficult to control to reach the optimal shooting position due to insufficient movable space of the real camera is solved.
An embodiment of the present application provides a control device for a virtual machine, please refer to fig. 3, which is a schematic structural diagram of the device, and the device may include the following units.
A determining unit 301, configured to determine a heel-beat subject and an optimal heel-beat distance and a heel-beat distance range corresponding to the heel-beat subject in the virtual scene;
a detection unit 302, configured to detect whether a real-time distance between the virtual machine position in the locked state and the following main body is within a following distance range;
a control unit 303 for:
if the real-time distance is within the following distance range, controlling the virtual machine to move according to a first movement instruction of a user;
if the real-time distance is out of the following distance range, identifying a control instruction of a user;
when the control instruction is a first control instruction, controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the follow-up main body;
when the control instruction is a second control instruction, determining an optimal follow-up position according to the optimal follow-up distance and the position of the follow-up main body, resetting the virtual machine to the optimal follow-up position, and determining the reset shooting angle according to the azimuth of the follow-up main body;
and when the control instruction is a third control instruction, releasing the locking state of the virtual machine position, and enabling the virtual machine position to move according to a second movement instruction of the user.
Optionally, the control unit 303 is specifically configured to, when controlling the movement of the virtual machine according to the real-time distance, the moving speed and the moving direction of the following main body:
determining whether the absolute value of the difference between the real-time distance and the optimal follow-up distance is smaller than a preset follow-up threshold;
if the absolute value is smaller than the follow-up threshold, controlling the virtual machine position to move according to the moving speed and the moving direction of the follow-up main body;
if the absolute value is larger than or equal to the heel-beat threshold value, determining the movement speed of the virtual machine position according to the absolute value and the movement speed of the heel-beat main body, wherein the movement speed of the virtual machine position is larger than the movement speed of the heel-beat main body;
and controlling the virtual machine position to move according to the moving speed of the virtual machine position and the moving direction of the follow-up main body.
Optionally, the control unit 303 is further configured to:
and if the target control instruction of the user for the virtual machine position is continuously obtained within the preset duration threshold, releasing the locking state of the virtual machine position, and controlling the virtual machine position to move according to the target control instruction.
Optionally, when the determining unit 301 determines the optimal heel distance and the heel distance range corresponding to the heel subject, at least one of the following is specifically performed:
obtaining a distance setting instruction of a user, and determining an optimal heel-shooting distance and a heel-shooting distance range of the heel-shooting main body according to the distance setting instruction;
and identifying the type of the heel-beating main body, and determining the optimal heel-beating distance and the heel-beating distance range corresponding to the heel-beating main body according to the type of the heel-beating main body.
Optionally, the control unit 303 is further configured to:
after the virtual machine position is controlled to move to the first position according to the moving speed and the moving direction of the follow-up main body, the virtual machine position is controlled to move in a fine adjustment range taking the first position as the center according to a third moving instruction of a user.
The specific working principle and the beneficial effects of the control device for the virtual machine position provided in this embodiment can be referred to the steps and beneficial effects of the control method for the virtual machine position provided in any embodiment of the present application, and are not described in detail.
An embodiment of the present application further provides an electronic device, please refer to fig. 4, which is a schematic structural diagram of the electronic device, and the electronic device may include a memory 401 and a processor 402.
Wherein the memory 401 is used for storing a computer program.
The processor 402 is configured to execute the computer program, and is specifically configured to implement a method for controlling a virtual machine location provided in any one of embodiments of the present application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
It should be noted that the terms "first," "second," and the like herein are merely used for distinguishing between different devices, modules, or units and not for limiting the order or interdependence of the functions performed by such devices, modules, or units.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The control method of the virtual machine position is characterized by comprising the following steps:
determining a heel-beat main body and an optimal heel-beat distance and a heel-beat distance range corresponding to the heel-beat main body in a virtual scene;
detecting whether the real-time distance between the virtual machine position in the locking state and the follow-up main body is within the follow-up distance range or not;
if the real-time distance is within the following shooting distance range, controlling the virtual machine to move according to a first movement instruction of a user;
if the real-time distance is out of the following distance range, identifying a control instruction of the user;
when the control instruction is a first control instruction, controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the follow-up main body;
when the control instruction is a second control instruction, determining an optimal follow-up position according to the optimal follow-up distance and the position of the follow-up main body, resetting the virtual machine position to the optimal follow-up position, and determining a reset shooting angle according to the position of the follow-up main body;
and when the control instruction is a third control instruction, releasing the locking state of the virtual machine position, and enabling the virtual machine position to move according to the second movement instruction of the user.
2. The method of claim 1, wherein controlling the virtual machine position movement according to the real-time distance, the moving speed and the moving direction of the heel beat main body comprises:
determining whether the absolute value of the difference between the real-time distance and the optimal follow-up distance is smaller than a preset follow-up threshold;
if the absolute value is smaller than the follow-up threshold, controlling the virtual machine to move according to the moving speed and the moving direction of the follow-up main body;
if the absolute value is larger than or equal to the heel-beat threshold value, determining a virtual machine position moving speed according to the absolute value and the moving speed of the heel-beat main body, wherein the virtual machine position moving speed is larger than the moving speed of the heel-beat main body;
and controlling the virtual machine position to move according to the moving speed of the virtual machine position and the moving direction of the follow-up main body.
3. The method of claim 1, wherein after controlling the virtual machine position movement according to the real-time distance, the moving speed and the moving direction of the following main body, further comprising:
and if the target control instruction of the user for the virtual machine position is continuously obtained within the preset duration threshold, releasing the locking state of the virtual machine position, and controlling the virtual machine position to move according to the target control instruction.
4. The method of claim 1, wherein determining the optimal heel beat distance and heel beat distance range corresponding to the heel beat subject comprises at least one of:
obtaining a distance setting instruction of the user, and determining an optimal heel-beat distance and a heel-beat distance range of the heel-beat main body according to the distance setting instruction;
and identifying the type of the heel-beating main body, and determining the optimal heel-beating distance and the heel-beating distance range corresponding to the heel-beating main body according to the type of the heel-beating main body.
5. The method of claim 1, wherein after controlling the virtual machine position movement according to the real-time distance, the moving speed and the moving direction of the following main body, further comprising:
and after the virtual machine position is controlled to move to a first position according to the moving speed and the moving direction of the follow-up main body, the virtual machine position is controlled to move in a fine adjustment range taking the first position as the center according to a third moving instruction of the user.
6. A control device for a virtual machine location, comprising:
the determining unit is used for determining a follow-up main body and an optimal follow-up distance and a follow-up distance range corresponding to the follow-up main body in the virtual scene;
the detection unit is used for detecting whether the real-time distance between the virtual machine position in the locking state and the follow-up main body is within the follow-up distance range or not;
a control unit for:
if the real-time distance is within the following shooting distance range, controlling the virtual machine to move according to a first movement instruction of a user;
if the real-time distance is out of the following distance range, identifying a control instruction of the user;
when the control instruction is a first control instruction, controlling the virtual machine to move according to the real-time distance, the moving speed and the moving direction of the follow-up main body;
when the control instruction is a second control instruction, determining an optimal follow-up position according to the optimal follow-up distance and the position of the follow-up main body, resetting the virtual machine position to the optimal follow-up position, and determining a reset shooting angle according to the position of the follow-up main body;
and when the control instruction is a third control instruction, releasing the locking state of the virtual machine position, and enabling the virtual machine position to move according to the second movement instruction of the user.
7. The device according to claim 6, wherein the control unit is configured to, when controlling the virtual machine position to move according to the real-time distance, the moving speed and the moving direction of the follow-up main body:
determining whether the absolute value of the difference between the real-time distance and the optimal follow-up distance is smaller than a preset follow-up threshold;
if the absolute value is smaller than the follow-up threshold, controlling the virtual machine to move according to the moving speed and the moving direction of the follow-up main body;
if the absolute value is larger than or equal to the heel-beat threshold value, determining a virtual machine position moving speed according to the absolute value and the moving speed of the heel-beat main body, wherein the virtual machine position moving speed is larger than the moving speed of the heel-beat main body;
and controlling the virtual machine position to move according to the moving speed of the virtual machine position and the moving direction of the follow-up main body.
8. The apparatus of claim 6, wherein the control unit is further configured to:
and if the target control instruction of the user for the virtual machine position is continuously obtained within the preset duration threshold, releasing the locking state of the virtual machine position, and controlling the virtual machine position to move according to the target control instruction.
9. The apparatus of claim 6, wherein the determining unit, when determining the optimal heel beat distance and the heel beat distance range corresponding to the heel beat subject, specifically performs at least one of:
obtaining a distance setting instruction of the user, and determining an optimal heel-beat distance and a heel-beat distance range of the heel-beat main body according to the distance setting instruction;
and identifying the type of the heel-beating main body, and determining the optimal heel-beating distance and the heel-beating distance range corresponding to the heel-beating main body according to the type of the heel-beating main body.
10. The apparatus of claim 6, wherein the control unit is further configured to:
and after the virtual machine position is controlled to move to a first position according to the moving speed and the moving direction of the follow-up main body, the virtual machine position is controlled to move in a fine adjustment range taking the first position as the center according to a third moving instruction of the user.
CN202311696077.2A 2023-12-12 2023-12-12 Virtual machine position control method and device Active CN117395510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311696077.2A CN117395510B (en) 2023-12-12 2023-12-12 Virtual machine position control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311696077.2A CN117395510B (en) 2023-12-12 2023-12-12 Virtual machine position control method and device

Publications (2)

Publication Number Publication Date
CN117395510A CN117395510A (en) 2024-01-12
CN117395510B true CN117395510B (en) 2024-02-06

Family

ID=89468757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311696077.2A Active CN117395510B (en) 2023-12-12 2023-12-12 Virtual machine position control method and device

Country Status (1)

Country Link
CN (1) CN117395510B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119700A (en) * 2019-04-30 2019-08-13 广州虎牙信息科技有限公司 Virtual image control method, virtual image control device and electronic equipment
CN110310300A (en) * 2018-03-20 2019-10-08 腾讯科技(深圳)有限公司 Target track shot method and device, electronic equipment in a kind of virtual environment
CN113908543A (en) * 2021-10-15 2022-01-11 北京果仁互动科技有限公司 Virtual camera control method and device and computer equipment
EP3937138A1 (en) * 2020-07-10 2022-01-12 X-Rite Europe GmbH Displaying a virtual object in a real-life scene
CN114422696A (en) * 2022-01-19 2022-04-29 浙江博采传媒有限公司 Virtual shooting method and device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003334382A (en) * 2002-05-21 2003-11-25 Sega Corp Game apparatus, and apparatus and method for image processing
US9299184B2 (en) * 2009-04-07 2016-03-29 Sony Computer Entertainment America Llc Simulating performance of virtual camera
US20230077552A1 (en) * 2017-10-09 2023-03-16 Tim Pipher Video Game Engine Assisted Virtual Studio Production Process
US10685679B1 (en) * 2018-11-27 2020-06-16 Canon Kabushiki Kaisha System and method of determining a virtual camera path
US11776577B2 (en) * 2019-09-22 2023-10-03 Mean Cat Entertainment Llc Camera tracking system for live compositing
US11420122B2 (en) * 2019-12-23 2022-08-23 Activision Publishing, Inc. Systems and methods for controlling camera perspectives, movements, and displays of video game gameplay

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110310300A (en) * 2018-03-20 2019-10-08 腾讯科技(深圳)有限公司 Target track shot method and device, electronic equipment in a kind of virtual environment
CN110119700A (en) * 2019-04-30 2019-08-13 广州虎牙信息科技有限公司 Virtual image control method, virtual image control device and electronic equipment
EP3937138A1 (en) * 2020-07-10 2022-01-12 X-Rite Europe GmbH Displaying a virtual object in a real-life scene
CN113908543A (en) * 2021-10-15 2022-01-11 北京果仁互动科技有限公司 Virtual camera control method and device and computer equipment
CN114422696A (en) * 2022-01-19 2022-04-29 浙江博采传媒有限公司 Virtual shooting method and device and storage medium

Also Published As

Publication number Publication date
CN117395510A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
KR100812506B1 (en) Remotely-operated robot, and robot self position identifying method
CN105578026B (en) A kind of image pickup method and user terminal
JP2007208453A (en) Automatic tracking apparatus and method
CN108055459B (en) Shooting method based on rotary camera and related product
JP5509044B2 (en) Multi-viewpoint robot camera system, multi-viewpoint robot camera control device and program
KR20150107597A (en) Gesture recognition apparatus and control method of gesture recognition apparatus
CN104601889A (en) Photographing method and device of mobile terminal
US20150201124A1 (en) Camera system and method for remotely controlling compositions of self-portrait pictures using hand gestures
CN110456829B (en) Positioning tracking method, device and computer readable storage medium
CN109981972B (en) Target tracking method of robot, robot and storage medium
JP2021512418A5 (en)
WO2017215351A1 (en) Method and apparatus for adjusting recognition range of photographing apparatus
JP2016146143A (en) Method for image processing and device system
CN107592458B (en) Shooting method and mobile terminal
CN113329179B (en) Shooting alignment method, device, equipment and storage medium
KR101703013B1 (en) 3d scanner and 3d scanning method
JP2020047049A (en) Image processing device and image processing method
CN104168407B (en) The image pickup method of full-view image
CN108989765B (en) Tripod system for dynamically tracking self-timer
KR20110094664A (en) Apparatus for controlling pan/tilt/zoom camera in omnidirectional and method for the same
JP2021067853A5 (en)
CN117395510B (en) Virtual machine position control method and device
WO2020062281A1 (en) Cradle head control method, cradle head, movable platform and readable storage medium
CN110248148B (en) Method and device for determining positioning parameters
CN112189333B (en) Following shooting, holder control method, shooting device, handheld holder and shooting system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant