Virtual camera sequence generation method and device, electronic equipment and storage medium
By acquiring the preset camera movement mode and absolute pose of the virtual camera, the relative camera movement parameters of the virtual camera movement sequence are generated, which solves the problems of high production cost and poor reusability of virtual camera movement sequences, and realizes the ability to generate camera movement sequences efficiently and adapt quickly to new scenes.
Patent Information
- Application Number
- CN202210930932.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-04
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-08-04
AI Technical Summary
Existing virtual camera movement sequences are costly to produce and cannot be reused in different projects. They also cannot be adjusted simultaneously for multiple virtual camera movement sequences, making it difficult to meet camera movement requirements.
By acquiring the preset camera movement mode of the virtual camera relative to the shooting target and the absolute pose of the current scene, and responding to parameter configuration operations, multiple virtual camera movement sequences in the current scene are generated. The preset camera movement mode and absolute pose are used to generate relative camera movement parameters, and a camera movement framework is constructed, reducing the time and manpower costs of individual production.
It enables standardized generation of virtual camera movement sequences, reduces production and usage costs, improves reusability, and allows for the rapid generation of camera movement sequences for new scenes when the shooting target changes.
Smart Images

Figure CN115294212B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a virtual camera movement sequence generation method and device, electronic equipment and a storage medium. BACKGROUND
[0002] As a new television / network live program production carrier, the virtual studio is widely used in the project design and production of game event live broadcast. For a full-virtual studio project without a tracking camera, all camera movement effects in the live program are presented by virtual camera movement. The current virtual camera movement production technology generates a single virtual camera movement sequence in a blank sequencer through multiple settings and production steps. However, this method has defects such as the need for numerous repeated production steps to produce multiple virtual camera movement sequences, the inability to reuse the produced virtual camera movement sequences in other projects, and the inability to simultaneously adjust multiple virtual camera movement sequences, which cannot meet the camera movement requirements.
[0003] Therefore, the existing game event live broadcast scene has the technical problem of high cost of virtual camera movement sequence production and use, which needs to be improved. SUMMARY
[0004] The embodiments of the present application provide a virtual camera movement sequence generation method, device, electronic equipment and storage medium to alleviate the technical problem of high cost of existing virtual camera movement sequence production and use.
[0005] To solve the above technical problems, the embodiments of the present application provide the following technical solutions:
[0006] The present application provides a virtual camera movement sequence generation method applied to a virtual studio, and the method comprises:
[0007] Obtaining a preset camera movement mode of a virtual camera relative to a shooting target in each virtual camera movement sequence;
[0008] Obtaining an absolute pose of the shooting target in a current scene;
[0009] In response to a parameter configuration operation of each virtual camera movement sequence on a sequence generation interface, obtaining key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene;
[0010] According to the key camera movement parameters and the preset camera movement mode, obtaining relative camera movement parameters of the virtual camera and the shooting target in each virtual camera movement sequence in the current scene, and generating multiple virtual camera movement sequences in the current scene according to the absolute pose and the relative camera movement parameters.
[0011] Meanwhile, the embodiments of the present application also provide a virtual camera movement sequence generation device applied to a virtual studio, and the device comprises:
[0012] The first obtaining module is configured to obtain a preset camera movement mode of a virtual camera relative to a shooting target in each virtual camera movement sequence.
[0013] The second obtaining module is configured to obtain an absolute pose of the shooting target in the current scene.
[0014] The obtaining module is configured to obtain key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene in response to a parameter configuration operation on each virtual camera movement sequence on a sequence generation interface.
[0015] The sequence generation module is configured to obtain relative camera movement parameters of the virtual camera and the shooting target in each virtual camera movement sequence in the current scene according to the key camera movement parameters and the preset camera movement mode, and generate a plurality of virtual camera movement sequences in the current scene according to the absolute pose and the relative camera movement parameters.
[0016] The application further provides an electronic device including a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to perform the steps in the virtual camera movement sequence generation method of any one of the preceding embodiments.
[0017] The application provides a computer readable storage medium, which stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to perform the steps in the virtual camera movement sequence generation method.
[0018] The application provides a virtual camera sequence generation method and device, electronic equipment and a storage medium. The method is applied to a virtual studio. A preset camera movement mode of a virtual camera in each virtual camera sequence relative to a shooting target is obtained, and an absolute pose of the shooting target in a current scene is obtained. Then, in response to a parameter configuration operation of each virtual camera sequence on a sequence generation interface, key camera movement parameters of the virtual camera in each virtual camera sequence in the current scene are obtained. Finally, according to the key camera movement parameters and the preset camera movement mode, relative camera movement parameters of the virtual camera and the shooting target in each virtual camera sequence in the current scene are obtained. According to the absolute pose and the relative camera movement parameters, a plurality of virtual camera sequences in the current scene are generated. The application first constructs a camera movement framework of a plurality of virtual camera sequences in the same scene. Subsequently, only the absolute pose of the shooting target in the current scene and the key camera movement parameters of each virtual camera sequence need to be set. Then, the plurality of virtual camera sequences in the current scene can be directly generated by performing relevant logical operations according to the camera movement framework. By standardizing the virtual camera sequences, the time and labor cost of individually producing a plurality of virtual camera sequences can be reduced, and the operation threshold can be lowered. When the shooting target is replaced, a plurality of virtual camera sequences in a new scene can be quickly generated through corresponding shooting target selection operations and parameter setting operations. Therefore, the application has high reusability, and thus the production and use cost of the virtual camera sequences is greatly reduced. BRIEF DESCRIPTION OF DRAWINGS
[0019] The technical solutions and other beneficial effects of the application will become apparent from the following detailed description of the application, taken in conjunction with the accompanying drawings.
[0020] Figure 1 FIG. 1 is an application scenario diagram of a virtual camera sequence generation method provided by an embodiment of the application.
[0021] Figure 2 FIG. 2 is a flowchart of a virtual camera sequence generation method in an embodiment of the application.
[0022] Figure 3 FIG. 3 is a preset camera movement mode diagram of each virtual camera sequence in an embodiment of the application.
[0023] Figure 4 FIG. 4 is a diagram of a sequence generation interface in an embodiment of the application.
[0024] Figure 5 FIG. 5 is a generation and application process diagram of a virtual camera sequence in an embodiment of the application.
[0025] Figure 6 FIG. 6 is a logic diagram for defining external input parameters in an embodiment of the application.
[0026] Figure 7A logic diagram for a virtual camera sequence generation framework in the embodiments of the present application.
[0027] Figure 8 A logic diagram for a safe position changing with a commentator changing in the embodiments of the present application.
[0028] Figure 9 A logic diagram for generating a virtual camera sequence starting key frame and an ending key frame according to external input parameters in the embodiments of the present application.
[0029] Figure 10 A logic diagram for generating a camera package in the embodiments of the present application.
[0030] Figure 11 A structure diagram of a virtual camera sequence generation apparatus provided by the embodiments of the present application.
[0031] Figure 12 A structure diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0032] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0033] The embodiments of the present application provide a virtual camera sequence generation method, apparatus, electronic device and storage medium, wherein the virtual camera sequence generation apparatus can be integrated in an electronic device, which can be a server, a terminal or the like.
[0034] Please refer to Figure 1 , Figure 1 A scene diagram in which the virtual camera sequence generation method provided by the embodiments of the present application is applied, which can include terminals and servers, and the terminals, servers and terminals and servers are connected and communicated through various gateways in the Internet and the like, wherein the application scene includes a user terminal 11 and a server 12, the user terminal 11 is a device used by a camera designer when designing a camera scheme, and the server 12 includes a local server and / or a remote server and the like.
[0035] The user terminal 11 and the server 12 are located in a wireless network or a wired network to realize data interaction between the two, wherein:
[0036] The server 12 first acquires the preset panning mode of the virtual camera relative to the shooting target in each virtual panning sequence, then acquires the absolute pose of the shooting target in the current scene, the user terminal 11 displays a sequence generation interface, a panning designer performs a parameter configuration operation on each virtual panning sequence on the sequence generation interface, the server 12 responds to the operation to obtain the key panning parameters of the virtual camera in each virtual panning sequence in the current scene, and finally the server 12 calculates the relative panning parameters of the virtual camera and the shooting target in each virtual panning sequence in the current scene according to the key panning parameters and the preset panning mode, and generates a plurality of virtual panning sequences in the current scene according to the absolute pose and the relative panning parameters.
[0037] It should be noted that, Figure 1 The system scenario diagram shown is only an example, and the server and the scenario described in the embodiments of the application are used to more clearly illustrate the technical solutions of the embodiments of the application, and do not constitute a limitation on the technical solutions provided by the embodiments of the application. Those skilled in the art can know that, as the system evolves and new business scenarios appear, the technical solutions provided by the embodiments of the application are also applicable to similar technical problems. The following will be described in detail. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.
[0038] In the embodiments of the application, please refer to Figure 2 , Figure 2 is a flowchart of the virtual panning sequence generation method provided by the embodiments of the application, and specifically includes:
[0039] S1: Acquire the preset panning mode of the virtual camera relative to the shooting target in each virtual panning sequence.
[0040] The virtual panning sequence generation method of the application is applicable to a scenario in which multiple virtual panning sequences need to be designed for the same shooting target. The scenario can be a virtual studio applied to game event live broadcast, and the shooting target refers to a commentary platform in a fixed position in the virtual studio. For a full-virtual studio project without a tracking camera, all panning effects in the live program are presented by virtual panning, so it is necessary for a panning designer to design virtual panning sequences in the scene in advance, and then generate corresponding panning pictures based on the virtual panning sequences. The virtual panning sequence is a collection of multiple virtual panning frames arranged in a preset order, each virtual panning frame is used to control one frame of panning of the virtual camera, and each virtual panning sequence controls the virtual camera to complete a continuous shooting with the commentary platform as the shooting target. In order to enrich the panning effect, multiple virtual panning sequences such as push-in, pull-out, and surround are often designed for the commentary platform, different virtual panning sequences correspond to different panning trajectories, and different panning effects can be achieved.
[0041] In this step, the preset camera movement method relative to the shooting target in each virtual camera movement sequence is first obtained. The preset camera movement method includes the type of each virtual camera movement sequence, the direction of the camera movement trajectory of each type of virtual camera movement sequence, the orientation of the virtual camera during the camera movement, and other basic frameworks related to camera movement. For example... Figure 3 As shown, the types of virtual camera movement sequences pre-designed in this application can include nine types: large advance, small advance, very small advance, left advance, right advance, small circle, large circle, pull-out, and safety shot. The camera movement trajectory of a large advance is a straight line from A1 to S; the camera movement trajectory of a small advance is a straight line from A2 to S; the camera movement trajectory of a very small advance is a straight line from A3 to S; the camera movement trajectory of a left advance is an arc from B1 to S; the camera movement trajectory of a right advance is an arc from B2 to S; the camera movement trajectory of a small circle is a bidirectional arc from C1 to C2 and from C2 to C1; the camera movement trajectory of a large circle is a bidirectional arc from C3 to C4 and from C4 to C3; the camera movement trajectory of a pull-out is a straight line from S to A1; and the camera movement trajectory of a safety shot is to stop at S. For virtual camera movement sequences including large advance, small advance, very small advance, pull-out, small circle, large circle, and safety shot, the virtual camera always faces the center of the narration platform during the camera movement. For virtual camera movement sequences with left and right advances, the orientation of the virtual camera during the camera movement is consistent with the direction of the camera movement trajectory.
[0042] The preset camera movement mode is the relative camera movement mode between the virtual camera and the subject. Therefore, when the subject changes from the narration platform in one virtual studio to the narration platform in another virtual studio, the above nine virtual camera movement sequences still follow the preset camera movement mode. Figure 3 The method shown controls the virtual camera to move around the new narration platform. The preset camera movement only defines the camera's movement relative to the target in each virtual camera movement sequence; however, the position and orientation of the virtual camera in each frame during the movement are uncertain. Taking a large-progression virtual camera movement sequence as an example, according to the preset camera movement method, the virtual camera's trajectory from A1 to S is fixed, but the specific positions of A1 and S are uncertain. The position and orientation of the virtual camera in each frame while moving from A1 to S are also uncertain and need to be determined in subsequent steps.
[0043] S2: Obtain the absolute pose of the target in the current scene.
[0044] The comment platform is different in different scenes. When making a virtual camera movement scheme for the current scene, the virtual camera movement scheme for the current scene needs to be made by taking the comment platform in the current scene as a shooting target. When obtaining, the camera movement designer can perform a selection operation on the comment platform in the art interface in which the current virtual studio is located, the server determines the shooting target in the current scene in response to the selection operation, and obtains the absolute pose of the comment platform as the reference system origin of each virtual camera movement sequence. The absolute pose refers to the position and attitude of the comment platform in the world coordinate system.
[0045] S3: In response to the parameter configuration operation on each virtual camera movement sequence in the sequence generation interface, the key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene are obtained.
[0046] The virtual camera movement method of the present application is mainly completed through the underlying code, the control blueprint and the front-end visual interface. Specifically, the program personnel write the basic framework of each virtual camera movement sequence in the underlying code, the basic framework sets the preset camera movement mode of the virtual camera in the virtual camera movement sequence relative to the shooting target, and defines the parameters that need to be input on the front-end visual interface, that is, the key camera movement parameters. The front-end visual interface has a plurality of parameter configuration areas and function controls. The camera movement designer can perform parameter configuration in the parameter configuration area and trigger operation on the corresponding function control to realize the transmission of the key camera movement parameters. The control blueprint is used as a bridge between the front-end visual interface and the underlying code. The control blueprint includes various types of nodes, and the nodes have a connection relationship. Each node in the control blueprint is associated with the related logic in the front-end visual interface and the underlying code, and the data interaction between the input parameters and the underlying code and the execution order of the related logic are controlled through the connection relationship between the nodes. The underlying code is coded in Python language to take advantage of its accurate and low-delay execution response characteristics.
[0047] The sequence generation interface is a visual interface as shown in Figure 4 When the shooting target is determined, the camera movement designer performs a parameter configuration operation on each virtual camera movement sequence in the sequence generation interface to configure the key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene. The server obtains the key camera movement parameters in response to the parameter configuration operation, and transmits the key camera movement parameters to the basic framework of the virtual camera movement sequence through the process designed in the control blueprint, and calls the corresponding function to perform subsequent operations.
[0048] Key camera movement parameters refer to the critical parameters required in the relevant computational logic when generating each virtual camera movement sequence. These are parameters pre-defined in the underlying code and need to be passed to the front-end visualization interface. Specifically, they can include the first camera position parameters for the safe camera position, the second camera position parameters for each virtual camera movement sequence using the safe camera position as a reference, and the camera movement duration of each virtual camera movement sequence. The safe camera position provides a reference for the key camera positions in each virtual camera movement sequence. Key camera positions include at least the starting and / or ending camera positions for each virtual camera movement sequence, and the positions of each key camera position are set with reference to the safe camera position. The first camera position parameters include the first relative position of the virtual camera to the target and the first lens parameters when in the safe camera position. The second camera position parameters include the second relative position of the virtual camera to the target and the second lens parameters when in the key camera positions. The first and second relative positions represent the relative positional relationship between the virtual camera and the target at each camera position. The first and second lens parameters can include the focal length of the virtual camera and related shooting parameters. The camera movement time includes the total time for each virtual camera to move from the starting camera position to the ending camera position.
[0049] In the aforementioned nine virtual camera movement sequences, for a portion of these sequences, the safe camera position itself serves as either the starting or ending camera position. Therefore, for this portion of the virtual camera movement sequences, the key camera positions only include the ending camera position or only the starting camera position, such as... Figure 3 As shown, point S represents the safe camera position, and A1, A2, A3, B1, B2, C1, C2, C3, and C4 represent the key camera positions. For large advances, small advances, very small advances, left advances, and right advances, the starting camera positions are the key camera positions A1, A2, A3, B1, and B2, respectively, and the ending camera position is the safe camera position S. For pull-outs, the starting camera position is the safe camera position S, and the ending camera position is the key camera position A1. However, for another part of the virtual camera movement sequence, the safe camera position itself is not used as the starting or ending camera position. Therefore, for this part of the virtual camera movement sequence, the key camera positions include both the ending and starting camera positions, such as... Figure 3 As shown, for small and large loops, the starting camera positions for looping from left to right are key camera positions C1 and C3, and the ending camera positions are key camera positions C2 and C4, respectively. For looping from right to left, the starting camera positions are key camera positions C2 and C4, and the ending camera positions are key camera positions C1 and C3, respectively. For a safety shot, both the starting and ending camera positions are safety camera positions S. Therefore, the safety camera position coincides with its key camera position, and the parameters of the second camera position are the same as those of the first camera position.
[0050] In the above 9 virtual camera sequences, the virtual camera track of some virtual camera sequences is always perpendicular to the commentary platform, such as the big push, the small push, the small-small push and the pull-out, and this part of the virtual camera sequence is called a straight virtual camera sequence. In the key camera parameters of the straight virtual camera sequence, the second relative position can be represented by the distance between the virtual camera and the shooting target. The virtual camera track of another part of the virtual camera sequence is a curve, such as the left advance, the right advance, the small loop and the large loop, and this part of the virtual camera sequence is called a curve virtual camera sequence. In the key camera parameters of the curve virtual camera sequence, the second relative position can be represented by the distance between the virtual camera and the shooting target, and / or the angle between the line connecting the virtual camera and the preset reference point and the preset reference line, and the preset reference point and the preset reference line are related to the commentary platform and the case camera position.
[0051] As shown in Figure 3 the top center of the commentary platform as the reference center O, the first camera position parameters include the distance r between the safe camera position S and O, the offset height of S and O, and the focal length of the virtual camera. For the big push, the small push, and the small-small push, the second camera position parameters respectively include the distance between A1, A2, A3 and O, and the focal length of the virtual camera. For the right advance, the second camera position parameter includes the angle α between the line connecting B2 and the preset reference point O1 and the preset reference line L2. The left advance and the right advance are mirror images about the preset reference line L (i.e. the midline of the commentary platform), so the second camera position parameters of the left advance and the right advance are the same. For the small loop and the large loop, the camera track on the left and right sides of the preset reference line L is a mirror image, so the second camera position parameters of the small loop include the distance between C1 and O, the angle β between C1 and the preset reference point O with respect to the preset reference line L, the distance between C2 and O, and the angle β between C2 and the preset reference point O with respect to the preset reference line L. The second camera position parameters of the large loop include the distance between C3 and O, the angle β between C3 and the preset reference point O with respect to the preset reference line L, the distance between C4 and O, and the angle β between C4 and the preset reference point O with respect to the preset reference line L.
[0052] In an embodiment, S3 specifically includes: in response to a display request of the sequence generation interface, displaying the first camera position parameters, the second camera position parameters and the default value of the camera time on the sequence generation interface; in response to a parameter confirmation operation on the currently displayed key camera parameters, obtaining the key camera parameters of the virtual camera in each virtual camera sequence under the current scene. For a standard or approximately standard virtual studio, the default values of the first camera position parameters, the second camera position parameters of each virtual camera sequence and the camera time can be preset, and after receiving the display request of the sequence generation interface, the server displays the default values of the key camera parameters in response to the request. Figure 4The sequence generation interface shown obtains the above default values from the preset framework and directly displays the default values in the parameter configuration area of the sequence generation interface. Then, a parameter confirmation operation is triggered on the "generate commentary shot package" function control. The server responds to the parameter confirmation operation to obtain the assigned key camera movement parameters.
[0053] When setting the default values, the distance between the safe position S and O is usually set to 300 cm, the height offset distance h from the commentary platform is set to 10 cm (the height of the commentary platform from the ground is 85 cm, and the height of the camera from the ground when in the safe position S is 95 cm), and the focal length f is set to 22 mm. The default values are based on experience data accumulated from a large number of virtual studio productions. For the second camera position parameters of other key positions, the default values are obtained by reasonably setting the first camera position parameters of the safe position S. The above default values can be applied to most virtual studios.
[0054] In this way, after selecting the commentary platform in the current scene, the key camera movement parameters can be obtained on the sequence generation interface based on a one-key parameter confirmation operation. The entire process is simple and fast, greatly saving time and labor costs.
[0055] In an embodiment, before the step of obtaining the key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene in response to the parameter confirmation operation on the currently displayed key camera movement parameters, the method further includes: in response to a parameter update operation on the safe position, displaying updated values of the first camera position parameters on the sequence generation interface; in response to a parameter confirmation operation on the updated values of the first camera position parameters, obtaining preset reference relationships between the key positions and the safe position in each virtual camera movement sequence; and displaying updated values of the second camera position parameters and the camera movement time based on the updated values of the first camera position parameters and the preset reference relationships on the sequence generation interface.
[0056] For unconventional virtual studios, the default values of the above key camera movement parameters cannot meet the camera movement requirements and need to be changed. When changing, since all key positions are obtained by taking the safe position as a reference, that is, there is a preset reference relationship between the key positions and the safe position, only the parameter update operation needs to be performed on the first camera position parameters of the safe position on the sequence generation interface, specifically, the values of the "focal length", "distance from commentary platform", and "height offset distance" are modified, and the server responds to the parameter update operation to display these updated values on the sequence generation interface. Then, a parameter confirmation operation is performed on the updated values of the first camera position parameters, specifically, the "automatic setting of other parameters" function control is triggered, the server responds to the parameter confirmation operation to obtain the preset reference relationships between the key positions and the safe position in each virtual camera movement sequence from the preset framework, and the updated values of the second camera position parameters and the camera movement time are obtained through related logical operations.
[0057] like Figure 3 As shown, the preset reference line L is a vertical line passing through O, the preset reference line L1 is a horizontal line passing through O, the preset reference line L2 is a horizontal line passing through S, the preset reference line L3 is a horizontal line passing through C3, S, and C4, the preset reference line L4 is a horizontal line passing through B1 and B2, the preset reference line L5 is a horizontal line passing through A2, and the preset reference line L6 is a horizontal line passing through A1. The small circle centered at O is tangent to L2, the large circle centered at O is tangent to L4, and the circle centered at O1 is tangent to L1, L, and L5. Let the distance between the safe position S and O be r, the distance between A1 and O during the large thrust be r1, the distance between A2 and O during the small thrust be r2, the distance between A3 and O during the very small thrust be r3, the radius of the small circle centered at O be r4, the radius of the large circle centered at O be r5, the radius of the circle centered at O1 be r6, the angle between B2-O1 and L2 during the right advance be α, the distance between C1 and C2 and O during the small circumduction be r7, the angle between C1-O and C2-O and L be β, the distance between C3 and C4 and O during the large circumduction be r8, and the angle between C3-O and C4-O and L be β.
[0058] Based on the positional relationships between points, lines, and circles, it can be seen that among the above parameters, r4, r6, and r7 are all equal to r, r2 equals 2r, r5 is equal to r8, C3, B1, B2, and C4 are on the same great circle, and C3, A3, and C4 are on the same preset reference line L3. Therefore, knowing r and α, we can determine B2 and B1; knowing B2, B1, and β, we can determine C3 and C4, and thus determine r5, r8, and r3. A preset relationship can also be established between r1 and r, such as setting r1 as a constant, r1 being directly proportional to r, or the difference between r1 and r being a constant. α and β can be preset to fixed values, such as both being 30 degrees. Furthermore, the camera movement duration can be set; for example, when r increases or decreases, the duration of each camera movement will increase or decrease accordingly.
[0059] In other words, once r is known, the values of α and β, the relationships between the aforementioned intervals and r, and the relationship between camera movement duration and r can be obtained. These together constitute the preset reference relationships between the first camera position parameters and the second camera position parameters. After obtaining these preset reference relationships, the updated values of the first camera position parameters are calculated to obtain the updated values of the second camera position parameters and the camera movement duration, which are then displayed on the sequence generation interface. Finally, the "Generate Narration Shot Package" function control is triggered to confirm the parameters. The server responds to this parameter confirmation operation and obtains the reassigned key camera movement parameters.
[0060] Through the above process, when the key camera parameters of a special virtual studio need to be obtained, all the key camera parameters do not need to be updated, only the first camera parameter of the safe position needs to be modified, and then the updated key camera parameters can be obtained by one key, so that the whole process is simpler and faster, and the time and labor cost are greatly saved.
[0061] In an embodiment, the second camera parameter of each virtual camera sequence is provided with an "adjust" function control on the sequence generation interface, that is, the key camera parameter in a certain virtual camera sequence can be adjusted individually to achieve personalized camera effects. In addition, when the first camera parameter of the safe position in a certain virtual camera sequence is changed, the "overall adjustment of the safe position" function control can be triggered, so that the first camera parameter of the safe position in all virtual camera sequences can be updated, that is, the starting point and / or the end point of all virtual camera sequences can be adjusted by one key.
[0062] In the prior art, the key camera positions of each virtual camera sequence are made separately, and the key camera positions of each virtual camera sequence are not associated. When the key camera positions need to be modified, the key camera parameters of each virtual camera sequence need to be modified once, that is, even if a certain key camera position of two virtual camera sequences is the same, when the parameters of the camera position need to be modified, two modifications need to be made in the two virtual camera sequences respectively, so that the engineering quantity is large.
[0063] In the embodiments of the present application, the safe position is provided as a reference for each virtual camera sequence, so that the virtual camera sequences are associated. Whether the default key camera parameters or the updated key camera parameters are generated, the related parameter values of each virtual camera sequence can be quickly obtained through the related parameter values of the safe position, which is simple to operate and efficient. In addition, the present application sets two modification modes of synchronous modification and individual modification for the parameters, which can meet the high customization and is suitable for various conventional and unconventional scenes.
[0064] S4: According to the key camera parameters and the preset camera movement mode, the relative camera movement parameters of the virtual camera and the shooting target in each virtual camera sequence under the current scene are obtained, and according to the absolute pose and the relative camera movement parameters, a plurality of virtual camera sequences under the current scene are generated.
[0065] Since the preset camera movement mode defines the type of each virtual camera movement sequence, the movement trajectory of each type of virtual camera movement sequence, the orientation of the virtual camera during the movement process, and other basic frameworks of the movement, the key camera movement parameters provide the parameters that need to participate in the operation in the basic framework of each virtual camera movement sequence. After obtaining the key camera movement parameters and the preset camera movement mode, the relative camera movement parameters of the virtual camera and the shooting target in each virtual camera movement sequence under the current scene can be obtained through relevant logical operations. The relative camera movement parameters are used to describe the relative pose and lens parameters of the virtual camera and the commentary platform at each frame during the movement time. Taking the virtual camera movement sequence of large advance as an example, according to the preset camera movement mode, the movement trajectory of the virtual camera is determined from A1 to S, but the pose of the virtual camera at each frame when moving from A1 to S is uncertain. The key camera movement parameters of large advance include the first camera position parameter of the safe camera position S, the second camera position parameter of the key camera position A1, and the movement time. Then, the relative camera movement parameters obtained by performing relevant logical operations on the key camera movement parameters and the movement framework can be used to describe the relative pose and lens parameters of the virtual camera and the commentary platform at each frame during the movement time from S to A1.
[0066] The relative camera movement parameters are used to describe the relative camera movement of the virtual camera and the commentary platform. When the position of the commentary platform is different, the positions of each camera will change with the change of the position of the commentary platform. When the orientation of the commentary platform is different, the positions and orientations of each virtual camera will also change with the change of the position of the commentary platform. Therefore, only after the pose of the commentary platform is determined, the pose of the virtual camera will be determined. Then, according to the absolute pose of the commentary platform and the relative camera movement parameters of the virtual camera movement sequence, the pose of each frame of the virtual camera movement sequence in the world coordinate system can be determined, that is, the absolute pose of the virtual camera at each frame is determined, and a virtual camera movement sequence of multiple virtual camera movement frames is generated.
[0067] In an embodiment, S4 specifically comprises: obtaining, according to the first camera position parameter, the second camera position parameter and the preset camera movement mode, the start key frame camera movement parameter and the end key frame camera movement parameter of each virtual camera movement sequence in the current scene; and obtaining, according to the start key frame camera movement parameter, the end key frame camera movement parameter and the camera movement time length, the relative camera movement parameter of the virtual camera and the shooting target in each virtual camera movement sequence in the current scene. In the preparation of the virtual camera movement sequence, it is not necessary to make each frame, but a plurality of key frames are made first, and then the total relative camera movement parameter is obtained in combination with the total camera movement time length. Therefore, after the first camera position parameter and the second camera position parameter are obtained, the start key frame camera movement parameter and the end key frame camera movement parameter of each virtual camera movement sequence are obtained in combination with the preset camera movement mode of each virtual camera movement sequence. The start key frame is the first frame in the sequence, the start key frame camera movement parameter is used to control the camera movement of the virtual camera at the start key frame, the end key frame is the last frame in the sequence, and the end key frame camera movement parameter is used to control the camera movement of the virtual camera at the end key frame. Finally, in combination with the total camera movement time length, the relative camera movement parameter in the entire sequence can be obtained.
[0068] In an embodiment, the step of obtaining, according to the first camera position parameter, the second camera position parameter and the preset camera movement mode, the start key frame camera movement parameter and the end key frame camera movement parameter of each virtual camera movement sequence in the current scene comprises: determining, according to the preset camera movement mode, the start camera position and the end camera position of each virtual camera movement sequence from the safe camera position and the key camera positions of each virtual camera movement sequence; determining, according to the first relative position, the second relative position and the preset camera movement mode, the first relative pose of the virtual camera at each start camera position and the second relative pose of the virtual camera at each end camera position; and obtaining, according to the first relative pose, the second relative pose, the first lens parameter and the second lens parameter, the start key frame camera movement parameter and the end key frame camera movement parameter of each virtual camera movement sequence in the current scene.
[0069] In the above-mentioned nine virtual camera movement sequences, according to the preset camera movement mode, for a part of the virtual camera movement sequences, the safe camera position itself is used as the start camera position or the end camera position, and therefore for this part of the virtual camera movement sequences, the key camera positions only include the end camera position or only include the start camera position, and for another part of the virtual camera movement sequences, the safe camera position itself is not used as the start camera position and the end camera position, and therefore for this part of the virtual camera movement sequences, the key camera positions include both the end camera position and the start camera position. Therefore, according to the preset camera movement mode, the start camera position and the end camera position of each virtual camera movement sequence can be determined.
[0070] According to the first camera position parameter and the second camera position parameter, the relative positions of the start camera position and the end camera position of each virtual camera movement sequence to the commentary platform can be determined, but the types of the virtual camera movement sequences are different, and the orientations of the virtual camera in the camera movement process are different, for example, the virtual camera is directly opposite to the O point at the A1 point, the virtual camera is obliquely opposite to the O point at the C3 point, and the orientation of the virtual camera at the B2 point is consistent with the arc line of B1 to S. Therefore, when the start key frame camera movement parameter and the end key frame camera movement parameter are obtained, in addition to determining the positions of the start camera position and the end camera position, the specific orientations of the virtual camera at the start camera position and the end camera position need to be determined according to the preset camera movement mode.
[0071] For different types of virtual camera movement sequences, the positions and orientations of the virtual camera at each frame are different, and the positions and orientations of the virtual camera are represented by the relative poses between the virtual camera and the shooting target, which can be represented by six parameters of x, y, z, pitch, roll and yaw, wherein x, y and z are used to represent the positions of the virtual camera in the three-dimensional coordinate axes established with the reference center O of the commentary platform as the coordinate origin, and pitch, roll and yaw are used to represent the rotation components of the virtual camera on the three coordinate axes. After obtaining the first relative poses of the virtual camera at the start camera positions and the second relative poses of the virtual camera at the end camera positions, the start key frame camera movement parameter and the end key frame camera movement parameter of each virtual camera movement sequence in the current scene can be obtained by combining the first lens parameters of the virtual camera at the start camera positions and the second lens parameters of the virtual camera at the end camera positions.
[0072] In an embodiment, the step of obtaining the relative camera movement parameters of the virtual camera and the shooting target in each virtual camera movement sequence in the current scene according to the start key frame camera movement parameter, the end key frame camera movement parameter and the camera movement duration includes: determining the relative movement trajectory of each virtual camera movement sequence according to the start key frame camera movement parameter, the end key frame camera movement parameter and the preset camera movement mode; generating the intermediate frame camera movement parameters of each virtual camera movement sequence according to the relative movement trajectory and the camera movement duration; and obtaining the relative camera movement parameters according to the start key frame camera movement parameter, the intermediate frame camera movement parameters and the end key frame camera movement parameter. The preset camera movement mode defines the movement trajectory of each type of virtual camera movement sequence. After obtaining the start key frame camera movement parameter and the end key frame camera movement parameter for each sequence, the relative movement trajectory can be determined according to the movement trajectory. For the same movement trajectory, the number of intermediate frames required is different when the camera movement duration is different, and the pose of the virtual camera at each frame is also different, so the number of intermediate frames required needs to be determined according to the relative movement trajectory and the camera movement duration, and then all the intermediate frame camera movement parameters are obtained by using the interpolation method or other calculation methods, and the total camera movement parameters are obtained by combining the key frame camera movement parameters, the end key frame camera movement parameters and the intermediate frame camera movement parameters.
[0073] In an embodiment, after S4, further comprising: determining a target virtual camera movement sequence from the plurality of virtual camera movement sequences according to picture display requirements of the current scene; and generating a camera movement animation based on the target virtual camera movement sequence. In the above steps, the plurality of virtual camera movement sequences under the current scene are obtained, each virtual camera movement sequence can be called individually, and when called, only the "open" function control on the sequence generation interface needs to be triggered, which is very simple. In the explanation process, according to different explanation contents or explanation stages, the virtual studio has different picture display requirements. If a fixed picture of the commentary platform needs to be displayed in a certain period, and a picture gradually approaching the commentary platform from the front of the commentary platform needs to be displayed in another period, then according to the current picture display requirements, the corresponding virtual camera movement sequence is selected from the camera movement package. Since each virtual camera frame of the virtual camera movement sequence is used to control a frame of camera movement of the virtual camera, the virtual camera can be controlled to shoot the commentary platform accordingly based on the virtual camera movement sequence, and finally a camera movement animation is generated.
[0074] The following will be described in combination with Figure 5 The generation and application process of the virtual camera movement sequence in the embodiment of the present application will be described in whole. First, the camera movement framework of the plurality of virtual camera movement sequences under the same scene is constructed, then the safe lens focal length, the distance between the safe lens and the commentary platform, and the height of the safe lens from the ground are set to obtain the first camera position parameters and the first lens parameters of the virtual camera in the safe camera position, and the set values are used as default values. Then, according to the preset camera movement mode, the second camera position parameters and the second lens parameters of the virtual camera in the key camera positions of each virtual camera movement sequence, and the camera movement time length of each virtual camera movement sequence are designed, and the set values are also used as default values. In the initial application, the commentary platform in the current scene is selected in the art interface to obtain the absolute pose of the commentary platform, and then the default values of the first camera position parameters, the second camera position parameters and the camera movement time length are displayed on the sequence generation interface. These default values together constitute the key camera movement parameters of each virtual camera movement sequence under the current virtual studio.
[0075] The background generates a basic commentary camera movement package according to the key camera movement parameters, the preset camera movement mode and the absolute pose. The basic commentary camera movement package includes all virtual camera movement sequences with the commentary platform in the current scene as a shooting target, including 16s of large advance, 7s of small advance, 5s of small small advance, 7s of left advance, 7s of right advance, 6s of small loop, 6s of large loop, 6s of pull-out and a safety shot. When selecting a virtual camera movement sequence, the corresponding camera movement of the sequence can be generated, and the key camera movement parameters of each virtual camera movement sequence can be individually adjusted, such as individually adjusting the camera movement time and start point interval for large advance, small advance and small small advance, individually adjusting the camera movement time, track radius and track start point for left advance and right advance, individually adjusting the camera movement time, start point interval and loop angle for small loop and large loop, and individually adjusting the camera movement time and end point interval for pull-out. Of course, the related parameters of the safety shot can also be overall reset on the sequence interface. After various individual or overall adjustments, new camera movements can be generated based on the updated values of the virtual camera movement sequences to adapt to unconventional virtual studio scenes or other personalized scenes.
[0076] As shown in Figures 6 to 11 , part of the logic involved in the sequence generation method of the present application. In Figure 6 , the first camera position parameter requiring the externally input newly generated safety camera position, the second camera position parameter of the key camera position in each virtual camera movement sequence and the camera movement time are defined, the communication between the underlying code and the control blueprint is realized by sys.argv[], and sys.argv[1] to sys.argv
[26] correspond to the parameters required to be input on the interface shown in Figure 4 . In Figure 7 , for each virtual camera movement sequence, its corresponding framework is generated, the framework defines the sequence name, sequence storage address, related functions, calling relationship between functions and other components, and six parameters x, y, z, pitch, roll and yaw required for the start key frame and end key frame of each virtual camera movement sequence are added, which constitute the start key frame parameters and end key frame parameters. As shown in Figure 8 , the data related to the position and rotation angle of the commentary platform are defined, and the correct offset value of the newly generated safety camera position is calculated according to the commentary platform related data. In general, the commentary platform faces the studio window, and the virtual camera also faces the studio window in the safety camera position. However, there may be a rotation angle between the commentary platform and the studio window, in which case the virtual camera will have a certain offset value relative to the above-mentioned facing condition. Therefore, the logic in Figure 8 is required to define this part of the logic. The above logics are used to build the preset camera movement mode.
[0077] As shown in Figure 9As shown, when each key motion parameter is adjusted on the front-end page, the start key frame and the end key frame can be formed according to the input key motion parameter and the preset motion mode. Figure 10 In the sequence generation page, when each virtual motion sequence needs to be generated based on all configured parameters, the "generate commentary lens package" button is clicked first, and the background will query whether the virtual motion sequence has been generated. If yes, the front-end page prompts "the current lens sequence already exists", and if not, the preset motion mode of each virtual motion sequence is obtained according to the above logic, and nine virtual motion sequences are generated in turn to obtain the lens package. After generation, the front-end page prompts "the commentary lens package is successfully generated". When the first camera parameter of the safety camera in a sequence is adjusted, the adjustment needs to be synchronized to all other sequences, and the "overall safety camera adjustment" button is clicked to execute the corresponding logic to update and adjust each virtual motion sequence to obtain the updated lens package. Each virtual motion sequence in the generated or updated commentary package is stored in the manner defined in the Figure 7 In the sequence generation page, when each virtual motion sequence needs to be generated based on all configured parameters, the "generate commentary lens package" button is clicked first, and the background will query whether the virtual motion sequence has been generated. If yes, the front-end page prompts "the current lens sequence already exists", and if not, the preset motion mode of each virtual motion sequence is obtained according to the above logic, and nine virtual motion sequences are generated in turn to obtain the lens package. After generation, the front-end page prompts "the commentary lens package is successfully generated". When the first camera parameter of the safety camera in a sequence is adjusted, the adjustment needs to be synchronized to all other sequences, and the "overall safety camera adjustment" button is clicked to execute the corresponding logic to update and adjust each virtual motion sequence to obtain the updated lens package. Each virtual motion sequence in the generated or updated commentary package is stored in the manner defined in the
[0078] As can be seen from the above embodiments, the virtual motion sequence generation method of the present application first constructs the motion framework of multiple virtual motion sequences in the same scene, and subsequently only needs to obtain the absolute pose of the shooting target in the current scene and set the key motion parameters of each virtual motion sequence, so as to directly generate multiple virtual motion sequences in the current scene according to the motion framework through related logical operations. By standardizing the virtual motion sequence, the correct visual presentation can be ensured, the time and labor cost of individually producing multiple virtual motion sequences is reduced, the operation threshold is lowered, and when the shooting target is replaced, multiple virtual motion sequences in the new scene can be quickly generated through corresponding shooting target selection operation and parameter setting operation, so that the reusability is high, and the method can be adapted to various types of full-virtual studio projects, and has great advantages over the existing scheme of individually producing a single virtual motion sequence for each scene.
[0079] Correspondingly, as shown in Figure 11 The present application also provides a virtual motion sequence generation device applied to a virtual studio, which specifically comprises:
[0080] A first acquisition module 10 is configured to acquire a preset motion mode of a virtual camera relative to a shooting target in each virtual motion sequence;
[0081] A second acquisition module 20 is configured to obtain an absolute pose of the shooting target in the current scene in response to a selection operation of the shooting target on the first interface;
[0082] The obtaining module 30 is configured to obtain key camera parameters of the virtual camera in each virtual camera movement sequence in the current scene in response to a parameter configuration operation on the virtual camera movement sequence in the sequence generation interface.
[0083] The sequence generation module 40 is configured to obtain relative camera movement parameters of the virtual camera and the shooting target in each virtual camera movement sequence in the current scene according to the key camera parameters and the preset camera movement mode, and generate a plurality of virtual camera movement sequences in the current scene according to the absolute pose and the relative camera movement parameters.
[0084] In an embodiment, the key camera parameters include first camera position parameters of a safe camera position, second camera position parameters of a key camera position in each virtual camera movement sequence with the safe camera position as a reference, and a camera movement duration of each virtual camera movement sequence. The obtaining module 30 includes:
[0085] The first display submodule is configured to display default values of the first camera position parameters, the second camera position parameters, and the camera movement duration in the sequence generation interface in response to a display request of the sequence generation interface.
[0086] The first obtaining submodule is configured to obtain the key camera parameters of the virtual camera in each virtual camera movement sequence in the current scene in response to a parameter confirmation operation on the currently displayed key camera parameters.
[0087] In an embodiment, the obtaining module 30 further includes:
[0088] The second display submodule is configured to display updated values of the first camera position parameters in the sequence generation interface in response to a parameter update operation on the safe camera position.
[0089] The first obtaining submodule is configured to obtain a preset reference relationship between the key camera position and the safe camera position in each virtual camera movement sequence in response to a parameter confirmation operation on the updated values of the first camera position parameters.
[0090] The third display submodule is configured to display updated values of the second camera position parameters and the camera movement duration in the sequence generation interface according to the updated values of the first camera position parameters and the preset reference relationship.
[0091] In an embodiment, the sequence generation module 40 includes:
[0092] The second obtaining submodule is configured to obtain start key frame camera movement parameters and end key frame camera movement parameters of each virtual camera movement sequence in the current scene according to the first camera position parameters, the second camera position parameters, and the preset camera movement mode.
[0093] The third obtaining sub-module is configured to obtain, according to the start key frame motion parameter, the end key frame motion parameter and the motion time length, a relative motion parameter between a virtual camera and the shooting target in each virtual motion sequence in the current scene.
[0094] In an embodiment, the first camera position parameter comprises a first relative position and a first lens parameter between the virtual camera and the shooting target at the safe camera position, and the second camera position parameter comprises a second relative position and a second lens parameter between the virtual camera and the shooting target at the key camera position, and the second obtaining sub-module comprises:
[0095] The first determining unit is configured to determine, according to the preset motion mode, a start camera position and an end camera position of each virtual motion sequence from the safe camera position and the key camera positions of the virtual motion sequences;
[0096] The second determining unit is configured to determine, according to the first relative position, the second relative position and the preset motion mode, a first relative pose of the virtual camera at each start camera position and a second relative pose of the virtual camera at each end camera position;
[0097] The first obtaining unit is configured to obtain, according to the first relative pose, the second relative pose, the first lens parameter and the second lens parameter, start key frame motion parameters and end key frame motion parameters of each virtual motion sequence in the current scene.
[0098] In an embodiment, the third obtaining sub-module comprises:
[0099] The third determining unit is configured to determine, according to the start key frame motion parameter, the end key frame motion parameter and the preset motion mode, a relative motion track of each virtual motion sequence;
[0100] The generating unit is configured to generate, according to the relative motion track and the motion time length, intermediate frame motion parameters of each virtual motion sequence;
[0101] The second obtaining unit is configured to obtain, according to the start key frame motion parameter, the intermediate frame motion parameter and the end key frame motion parameter, the relative motion parameter.
[0102] In an embodiment, the virtual motion sequence generation apparatus further comprises:
[0103] The determining module is configured to determine, according to a picture display requirement of a current scene, a target virtual motion sequence from the plurality of virtual motion sequences;
[0104] The animation generation module is configured to generate a motion animation based on the target virtual motion sequence.
[0105] Unlike existing technologies, the virtual camera movement sequence generation device provided in this application first constructs a camera movement framework for multiple virtual camera movement sequences in the same scene. Subsequently, it only needs to obtain the absolute pose of the shooting target in the current scene and set the key camera movement parameters of each virtual camera movement sequence. Based on the camera movement framework, it can directly generate multiple virtual camera movement sequences in the current scene by performing relevant logical operations. By standardizing the virtual camera movement sequences, it can ensure correct visual presentation, reduce the time and manpower costs of producing multiple virtual camera movement sequences individually, and lower the operation threshold. When the shooting target changes, it can also quickly generate multiple virtual camera movement sequences in the new scene through the corresponding shooting target selection operation and parameter setting operation, making it highly reusable and adaptable to various types of fully virtual studio projects. It has significant advantages over the existing solutions that produce a single virtual camera movement sequence for each scene individually.
[0106] Accordingly, embodiments of this application also provide an electronic device, such as... Figure 12 As shown, the electronic device may include a radio frequency (RF) circuit 101, a memory 102 including one or more computer-readable storage media, an input unit 103, a display unit 104, a sensor 105, an audio circuit 106, a WiFi module 107, a processor 108 including one or more processing cores, and a power supply 109, among other components. Those skilled in the art will understand that... Figure 12 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0107] The radio frequency circuit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and hands it over to one or more processors 108 for processing; additionally, it transmits uplink data to the base station. The memory 102 can be used to store software programs and modules. The processor 108 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The input unit 103 can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0108] The display unit 104 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the server. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof.
[0109] The electronic device can also include at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. The audio circuit 106 includes a speaker that can provide an audio interface between the user and the electronic device.
[0110] WiFi belongs to a short-range wireless transmission technology, and the electronic device can help the user to send and receive emails, browse web pages, and access streaming media through the WiFi module 107, which provides the user with wireless broadband Internet access. Although Figure 12 The WiFi module 107 is shown, but it is understood that it does not belong to the necessary components of the electronic device, and can be omitted as needed without changing the essence of the application.
[0111] The processor 108 is the control center of the electronic device, which connects all parts of the mobile phone through various interfaces and lines, executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 102, and calling data stored in the memory 102, thereby overall monitoring the mobile phone.
[0112] The electronic device also includes a power supply 109 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 108 through the power management system, so that the power management system can realize functions such as charge management, discharge management, and power consumption management.
[0113] Although not shown, the electronic device can also include a camera, a Bluetooth module, and the like, which will not be described here. In the specific embodiment, the processor 108 in the server will load one or more executable files corresponding to the processes of one or more application programs into the memory 102 according to the following instructions, and run the application programs stored in the memory 102 by the processor 108, thereby realizing the following functions:
[0114] Obtaining a preset lensing mode of a virtual camera relative to a shooting target in each virtual lensing sequence;
[0115] Obtaining an absolute pose of the shooting target in the current scene;
[0116] In response to a parameter configuration operation of each virtual lensing sequence on the sequence generation interface, obtaining key lensing parameters of the virtual camera in each virtual lensing sequence in the current scene;
[0117] According to the key lensing parameters and the preset lensing mode, obtaining relative lensing parameters of the virtual camera and the shooting target in each virtual lensing sequence in the current scene, and generating a plurality of virtual lensing sequences in the current scene according to the absolute pose and the relative lensing parameters.
[0118] In an embodiment, the key dolly parameters include a first dolly parameter of a safe shot, a second dolly parameter of a key shot of each virtual dolly sequence with the safe shot as a reference, and a dolly duration of each virtual dolly sequence, and the functions are implemented as follows:
[0119] In response to a display request of the sequence generation interface, default values of the first dolly parameter, the second dolly parameter, and the dolly duration are displayed on the sequence generation interface;
[0120] In response to a parameter confirmation operation on the currently displayed key dolly parameters, key dolly parameters of a virtual camera in each virtual dolly sequence under the current scene are obtained.
[0121] In an embodiment, the functions are implemented as follows:
[0122] In response to a parameter update operation on the safe shot, an updated value of the first dolly parameter is displayed on the sequence generation interface;
[0123] In response to a parameter confirmation operation on the updated value of the first dolly parameter, a preset reference relationship between the key shot and the safe shot in each virtual dolly sequence is obtained;
[0124] According to the updated value of the first dolly parameter and the preset reference relationship, updated values of the second dolly parameter and the dolly duration are displayed on the sequence generation interface.
[0125] In an embodiment, the functions are implemented as follows:
[0126] According to the first dolly parameter, the second dolly parameter, and the preset dolly mode, start keyframe dolly parameters and end keyframe dolly parameters of each virtual dolly sequence under the current scene are obtained;
[0127] According to the start keyframe dolly parameters, the end keyframe dolly parameters, and the dolly duration, relative dolly parameters of a virtual camera and the shooting target in each virtual dolly sequence under the current scene are obtained.
[0128] In an embodiment, the first dolly parameter includes a first relative position and a first lens parameter of the virtual camera and the shooting target when the virtual camera is at the safe shot, and the second dolly parameter includes a second relative position and a second lens parameter of the virtual camera and the shooting target when the virtual camera is at the key shot, and the functions are implemented as follows:
[0129] According to the preset dolly mode, a start shot and an end shot of each virtual dolly sequence are determined from the safe shot and the key shots of each virtual dolly sequence;
[0130] determine a first relative pose of the virtual camera at each start camera position and a second relative pose of the virtual camera at each end camera position according to the first relative position, the second relative position and the preset camera movement mode;
[0131] obtain start key frame camera movement parameters and end key frame camera movement parameters of each virtual camera movement sequence in the current scene according to the first relative pose, the second relative pose, the first lens parameter and the second lens parameter.
[0132] In an embodiment, the function is implemented as follows:
[0133] determine a relative camera movement track of each virtual camera movement sequence according to the start key frame camera movement parameters, the end key frame camera movement parameters and the preset camera movement mode;
[0134] generate intermediate frame camera movement parameters of each virtual camera movement sequence according to the relative camera movement track and the camera movement duration;
[0135] obtain the relative camera movement parameters according to the start key frame camera movement parameters, the intermediate frame camera movement parameters and the end key frame camera movement parameters.
[0136] In an embodiment, the function is implemented as follows:
[0137] determine a target virtual camera movement sequence from the plurality of virtual camera movement sequences according to a picture display requirement of the current scene;
[0138] generate a camera movement animation based on the target virtual camera movement sequence.
[0139] Compared with the prior art, the electronic device provided by the application first constructs a camera movement framework of a plurality of virtual camera movement sequences in the same scene, and then only needs to obtain an absolute pose of a shooting target in the current scene and set key camera movement parameters of each virtual camera movement sequence, so as to directly generate a plurality of virtual camera movement sequences in the current scene according to the camera movement framework. By standardizing the virtual camera movement sequences, correct visual presentation can be ensured, time and labor costs for separately producing a plurality of virtual camera movement sequences are reduced, and the operation threshold is lowered. When the shooting target is replaced, a plurality of virtual camera movement sequences in a new scene can also be quickly generated through corresponding shooting target selection operations and parameter setting operations, so that the reusability is high, the electronic device can be adapted to various types of full-virtual studio projects, and has great advantages compared with the prior art of separately producing a single virtual camera movement sequence for each scene.
[0140] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the detailed description above, which will not be repeated here.
[0141] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware by instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0142] To this end, an embodiment of the present application provides a computer readable storage medium, which stores a plurality of instructions capable of being loaded by a processor to implement the following functions:
[0143] Obtaining a preset camera operation mode of a virtual camera in each virtual camera operation sequence relative to a shooting target;
[0144] Obtaining an absolute pose of a shooting target in a current scene;
[0145] In response to a parameter configuration operation of each virtual camera operation sequence on a sequence generation interface, obtaining key camera operation parameters of a virtual camera in each virtual camera operation sequence in the current scene;
[0146] According to the key camera operation parameters and the preset camera operation mode, obtaining relative camera operation parameters of a virtual camera and the shooting target in each virtual camera operation sequence in the current scene, and generating a plurality of virtual camera operation sequences in the current scene according to the absolute pose and the relative camera operation parameters.
[0147] In an embodiment, the key camera operation parameters include first camera position parameters of a safe camera position, second camera position parameters of a key camera position in each virtual camera operation sequence with the safe camera position as a reference, and a camera operation time length of each virtual camera operation sequence, to implement the following functions:
[0148] In response to a display request of a sequence generation interface, displaying default values of the first camera position parameters, the second camera position parameters and the camera operation time length on the sequence generation interface;
[0149] In response to a parameter confirmation operation of a currently displayed key camera operation parameter, obtaining key camera operation parameters of a virtual camera in each virtual camera operation sequence in the current scene.
[0150] In an embodiment, the following functions are implemented:
[0151] In response to a parameter update operation of the safe camera position, displaying an updated value of the first camera position parameter on the sequence generation interface;
[0152] In response to a parameter confirmation operation of the updated value of the first camera position parameter, obtaining a preset reference relationship between a key camera position and the safe camera position in each virtual camera operation sequence;
[0153] According to the updated value of the first camera parameter and the preset reference relationship, updated values of the second camera parameter and the camera movement time are displayed on the sequence generation interface.
[0154] In an embodiment, the function is implemented as follows:
[0155] According to the first camera parameter, the second camera parameter and the preset camera movement mode, start key frame camera movement parameters and end key frame camera movement parameters of each virtual camera movement sequence in the current scene are obtained.
[0156] According to the start key frame camera movement parameters, the end key frame camera movement parameters and the camera movement time, relative camera movement parameters of a virtual camera and the shooting target in each virtual camera movement sequence in the current scene are obtained.
[0157] In an embodiment, the first camera parameter includes a first relative position and a first lens parameter of the virtual camera and the shooting target in the safe camera position, and the second camera parameter includes a second relative position and a second lens parameter of the virtual camera and the shooting target in the key camera position, and the function is implemented as follows:
[0158] According to the preset camera movement mode, a start camera position and an end camera position of each virtual camera movement sequence are determined from the safe camera position and the key camera positions of each virtual camera movement sequence.
[0159] According to the first relative position, the second relative position and the preset camera movement mode, a first relative pose of a virtual camera in each start camera position and a second relative pose of the virtual camera in each end camera position are determined.
[0160] According to the first relative pose, the second relative pose, the first lens parameter and the second lens parameter, start key frame camera movement parameters and end key frame camera movement parameters of each virtual camera movement sequence in the current scene are obtained.
[0161] In an embodiment, the function is implemented as follows:
[0162] According to the start key frame camera movement parameters, the end key frame camera movement parameters and the preset camera movement mode, a relative camera movement trajectory of each virtual camera movement sequence is determined.
[0163] According to the relative camera movement trajectory and the camera movement time, intermediate frame camera movement parameters of each virtual camera movement sequence are generated.
[0164] According to the start key frame camera movement parameters, the intermediate frame camera movement parameters and the end key frame camera movement parameters, the relative camera movement parameters are obtained.
[0165] In an embodiment, the function is implemented as follows:
[0166] According to the picture display requirement of the current scene, a target virtual camera movement sequence is determined from the plurality of virtual camera movement sequences;
[0167] A camera movement animation is generated based on the target virtual camera movement sequence.
[0168] Compared with the prior art, the computer readable storage medium provided in the application first constructs the camera movement framework of the plurality of virtual camera movement sequences in the same scene, and then only needs to obtain the absolute pose of the shooting target in the current scene and set the key camera movement parameters of each virtual camera movement sequence, so as to directly generate the plurality of virtual camera movement sequences in the current scene according to the camera movement framework through related logical operations. By standardizing the virtual camera movement sequences, correct visual presentation can be ensured, the time and labor cost of separately producing the plurality of virtual camera movement sequences are reduced, the operation threshold is lowered, and when the shooting target is replaced, the plurality of virtual camera movement sequences in the new scene can be quickly generated through corresponding shooting target selection operation and parameter setting operation, so that the reusability is high, each type of full virtual studio project can be matched, and the application has great advantages compared with the prior art of separately producing a single virtual camera movement sequence for each scene.
[0169] The above provides a detailed introduction to the virtual camera movement sequence generation method, device, electronic equipment and computer readable storage medium provided by the embodiments of the application. The principle and implementation mode of the application are described by applying specific examples. The above embodiment description is only used to help understand the technical solutions and core ideas of the application; those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the application.
Claims
1. A method for generating virtual camera movement sequences, characterized in that, Applied to a virtual studio, the method includes: Obtain the preset camera movement mode of the virtual camera relative to the shooting target in each virtual camera movement sequence under the same scene. The preset camera movement mode is used to define the camera movement frame of the corresponding virtual camera movement sequence. Obtain the absolute pose of the target in the current scene; In response to the parameter configuration operation of each virtual camera movement sequence on the sequence generation interface, the key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene are obtained. The key camera movement parameters are used to indicate the parameters that need to participate in the calculation in the corresponding camera movement frame. Based on the key camera movement parameters and the preset camera movement method, the relative camera movement parameters between the virtual camera and the shooting target in each virtual camera movement sequence in the current scene are obtained. Based on the absolute pose and the relative camera movement parameters, multiple virtual camera movement sequences in the current scene are generated.
2. The virtual camera movement sequence generation method as described in claim 1, characterized in that, The key camera movement parameters include the first camera position parameters of the safe camera position, the second camera position parameters of the key camera position in each virtual camera movement sequence with the safe camera position as a reference, and the camera movement duration of each virtual camera movement sequence. The steps for obtaining the key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene, in response to parameter configuration operations on the sequence generation interface, include: In response to a request to display the sequence generation interface, the default values of the first camera position parameters, the second camera position parameters, and the camera movement duration are displayed on the sequence generation interface. In response to the parameter confirmation operation of the currently displayed key camera movement parameters, the key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene are obtained.
3. The virtual camera movement sequence generation method as described in claim 2, characterized in that, Prior to the step of confirming the parameters of the currently displayed key camera movement parameters, the following steps are also included: In response to the parameter update operation of the security position, the updated value of the first position parameter is displayed on the sequence generation interface; In response to the parameter confirmation operation of the updated value of the first camera position parameter, the preset reference relationship between the key camera position and the safe camera position in each virtual camera movement sequence is obtained; Based on the updated values of the first camera position parameters and the preset reference relationship, the updated values of the second camera position parameters and the camera movement duration are displayed on the sequence generation interface.
4. The virtual camera movement sequence generation method as described in claim 2 or 3, characterized in that, The step of obtaining the relative camera movement parameters between the virtual camera and the target in each virtual camera movement sequence in the current scene based on the key camera movement parameters and the preset camera movement method includes: Based on the first camera position parameters, the second camera position parameters, and the preset camera movement method, the starting keyframe camera movement parameters and the ending keyframe camera movement parameters of each virtual camera movement sequence in the current scene are obtained. Based on the starting keyframe camera movement parameters, the ending keyframe camera movement parameters, and the camera movement duration, the relative camera movement parameters between the virtual camera and the shooting target in each virtual camera movement sequence in the current scene are obtained.
5. The virtual camera movement sequence generation method as described in claim 4, characterized in that, The first camera position parameters include the first relative position of the virtual camera with respect to the target and the first lens parameters when the camera is in the safe position. The second camera position parameters include the second relative position of the virtual camera with respect to the target and the second lens parameters when the camera is in the key position. The step of obtaining the starting keyframe camera movement parameters and the ending keyframe camera movement parameters of each virtual camera movement sequence in the current scene based on the first camera position parameters, the second camera position parameters, and the preset camera movement method includes: According to the preset camera movement method, the starting and ending camera positions of each virtual camera movement sequence are determined from the safe camera positions and the key camera positions of each virtual camera movement sequence; Based on the first relative position, the second relative position, and the preset camera movement method, determine the first relative pose of the virtual camera at each starting camera position and the second relative pose at each ending camera position; Based on the first relative pose, the second relative pose, the first camera parameters, and the second camera parameters, the starting keyframe camera parameters and the ending keyframe camera parameters of each virtual camera movement sequence in the current scene are obtained.
6. The virtual camera movement sequence generation method as described in claim 4, characterized in that, The step of obtaining the relative camera movement parameters between the virtual camera and the target in each virtual camera movement sequence in the current scene based on the starting keyframe camera movement parameters, the ending keyframe camera movement parameters, and the camera movement duration includes: Based on the starting keyframe camera movement parameters, the ending keyframe camera movement parameters, and the preset camera movement method, the relative camera movement trajectory of each virtual camera movement sequence is determined; Based on the relative camera movement trajectory and the camera movement duration, generate the intermediate frame camera movement parameters for each virtual camera movement sequence; The relative camera parameters are obtained based on the starting keyframe camera parameters, the intermediate frame camera parameters, and the ending keyframe camera parameters.
7. The virtual camera movement sequence generation method as described in claim 1, characterized in that, After the step of generating multiple virtual camera movement sequences for the current scene, the method further includes: Based on the display requirements of the current scene, a target virtual camera sequence is determined from the multiple virtual camera sequences; A camera movement animation is generated based on the target virtual camera movement sequence.
8. A virtual camera movement sequence generation device, characterized in that, The device, used in virtual studios, includes: The first acquisition module is used to acquire the preset camera movement mode of the virtual camera relative to the shooting target in each virtual camera movement sequence under the same scene. The preset camera movement mode is used to define the camera movement frame of the corresponding virtual camera movement sequence. The second acquisition module is used to acquire the absolute pose of the target in the current scene; The module is used to respond to the parameter configuration operation of each virtual camera movement sequence on the sequence generation interface, and obtain the key camera movement parameters of the virtual camera in each virtual camera movement sequence in the current scene. The key camera movement parameters are used to indicate the parameters that need to participate in the calculation in the corresponding camera movement frame. The sequence generation module is used to obtain the relative camera movement parameters between the virtual camera and the shooting target in each virtual camera movement sequence in the current scene according to the key camera movement parameters and the preset camera movement method, and to generate multiple virtual camera movement sequences in the current scene according to the absolute pose and the relative camera movement parameters.
9. An electronic device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to perform the steps in the virtual camera movement sequence generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the steps of the virtual camera movement sequence generation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Control method and device of virtual camera in virtual studio, implementation method of virtual studio, virtual studio system, computer readable storage medium and electronic equipment
CN111698390A
Virtual shooting method and device and storage medium
CN114422696A