Method, device, electronic device and medium for displaying virtual camera position map
By generating a two-dimensional top view of the virtual rehearsal scene in virtual film and television production and obtaining the moving trajectory of the virtual camera, the machine bitmap is generated in real time and the rehearsal picture is displayed, the problem of incomplete display effects when the virtual camera is moved is solved, and the real-time correlation between the machine bitmap and the picture effect is realized.
Patent Information
- Application Number
- CN202211707636.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-12-27
AI Technical Summary
In virtual film and television production, it is difficult for the prior art to visually display the preview screen, camera bitmap and camera position while the virtual camera is moving, resulting in the disconnection of the camera bitmap and the screen effect.
By generating a two-dimensional top view of the virtual rehearsal scene and obtaining the moving trajectory of the virtual camera, a bitmap of the virtual camera is generated in real time, and the rehearsal picture associated with it is displayed while acquiring the moving trajectory.
It realizes intuitive display of virtual cameras when moving, avoids the disconnection between the camera bitmap and the picture effect, and enhances the operational interactivity of virtual cameras.
Smart Images

Figure CN115967779B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of virtual film and television production technology, in particular to a virtual camera position map
[0002] A display method, a display device for a virtual camera position map, an electronic device and a computer-readable storage medium. Background Art
[0003] Preview is used in the early stages of film and television production. It can be used to simulate the camera's movement, movement route and picture preview during the actual shooting process, thereby assisting the actual shooting process.
[0004] In the traditional preview method, the photographer is usually required to draw a camera position map, and the lines in the camera position map are used to indicate the movement route of the camera. When drawing the camera position map, the photographer usually determines the camera position corresponding to the shooting picture by imagining the shooting picture, and then draws the movement route. However, after the photographer draws the camera position map, he cannot intuitively see the picture effect when the camera moves according to the camera position map, and other photographers can only trace the picture effect based on the camera position map, that is, the camera position map is disconnected from the picture effect.
[0005] 5With the development of virtual film and television production, the construction of preview scenes is no longer just on paper, but gradually becomes 3D intuitive, and the preview scene effects can be simulated in the software through modeling. The movement of the camera during the preview process can also be separated from the paper. With the help of software and graphics computing power, it can be moved in the virtual preview scene, and the preview pictures taken when the virtual camera moves can be observed in real time, and the actual shooting picture effects can be simulated through the preview pictures. At this time, although the movement of the camera and the simulated picture effects are related in real time, there is a lack of camera position diagrams for guiding actual shooting, and the camera position diagrams still need to be drawn manually again. Summary of the invention
[0006] In view of the above problems, embodiments of the present invention are proposed to provide a method for displaying a virtual camera position map, a device for displaying a virtual camera position map, an electronic device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0007] In order to solve the above problem, an embodiment of the present invention discloses a method for displaying a virtual camera position map, comprising:
[0008] Generate a two-dimensional top view of the virtual preview scene;
[0009] Acquire the movement trajectory of the virtual camera in the virtual preview scene and the preview picture taken along the movement trajectory;
[0010] Generate a camera position diagram of the virtual camera according to the two-dimensional top view of the virtual preview scene and the movement trajectory of the virtual camera;
[0011] Display each frame of the preview picture and the position of the virtual camera when shooting each frame of the preview picture in the camera position map.
[0012] Optionally, generating a two-dimensional top view of the virtual preview scene includes:
[0013] Establishing map cameras in virtual pre-stage scenes;
[0014] The map camera is used to shoot the virtual preview scene to obtain a two-dimensional top view of the virtual preview scene.
[0015] Optionally, establishing a map camera in a virtual preview scene includes:
[0016] Get the preset 2D top view length and the viewing angle of the map camera;
[0017] Determine the position coordinates of the center point of the two-dimensional top view according to the preset two-dimensional top view length, and use the position coordinates of the center point as the plane position coordinates of the map camera;
[0018] Calculate the height position coordinates of the map camera according to the preset two-dimensional top view length and the viewing angle;
[0019] The map camera is established in a virtual preview scene according to the plane position coordinates and the height position coordinates.
[0020] Optionally, the calculating according to the preset two-dimensional top view length and the viewing angle to obtain the height position coordinates of the map camera includes:
[0021] The height position coordinates of the map camera are calculated by taking the tangent value of half the viewing angle as the denominator and taking half the length of the preset two-dimensional top view as the numerator.
[0022] Optionally, the method further comprises:
[0023] In response to a first click operation on the moving track in the camera position map, a first target position corresponding to the click operation is determined, and a preview picture corresponding to the first target position, a lens direction of the virtual camera, and a position coordinate of the virtual camera are displayed.
[0024] Optionally, the method further comprises:
[0025] In response to a second click operation on the camera position map, a second target position corresponding to the second click operation is determined, and the virtual camera is controlled to move to the second target position.
[0026] Optionally, the method further comprises:
[0027] In response to a sliding operation on the camera position map, a sliding track corresponding to the sliding operation is determined, and the virtual camera is controlled to move along the sliding track.
[0028] The embodiment of the present invention further discloses a display device for a virtual camera position map, comprising:
[0029] A top view generation module, used to generate a two-dimensional top view of a virtual preview scene;
[0030] A trajectory acquisition module, used to acquire the movement trajectory of the virtual camera in the virtual preview scene and the preview picture taken along the movement trajectory;
[0031] A camera position map generating module, used to generate a camera position map of the virtual camera according to the two-dimensional top view of the virtual preview scene and the movement track of the virtual camera;
[0032] The display module is used to display each frame of the preview picture and the position of the virtual camera in the camera position map when shooting each frame of the preview picture.
[0033] An embodiment of the present invention further discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the method for displaying the virtual camera position map as described above are implemented.
[0034] The embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for displaying a virtual camera position map as described above are implemented.
[0035] The embodiments of the present invention include the following advantages:
[0036] In an embodiment of the present invention, by generating a two-dimensional overhead view of a virtual rehearsal scene and acquiring the movement trajectory of a virtual camera in the virtual rehearsal scene, a camera position map of the virtual camera can be generated based on the two-dimensional overhead view and the movement trajectory. By acquiring the movement trajectory and generating the camera position map in real time, the rehearsal picture acquired simultaneously with the movement trajectory is displayed. The rehearsal picture taken by the virtual camera and the camera position map of the virtual camera can be output together, which can avoid the disconnection between the camera position map and the picture effect. When the virtual camera moves, the rehearsal picture, the movement trajectory of the virtual camera and the position of the virtual camera in the virtual rehearsal scene can be intuitively displayed at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a camera position diagram used in traditional film and television production;
[0038] Figure 2 It is a flowchart of the steps of a method for displaying a virtual camera position map provided by an embodiment of the present invention;
[0039] Figure 3 It is a schematic diagram of a virtual preview;
[0040] Figure 4 It is a flowchart of another method for displaying a virtual camera position map provided by an embodiment of the present invention;
[0041] Figure 4A It is a sub-step flow chart of another method for displaying a virtual camera position map provided by an embodiment of the present invention;
[0042] Figure 5 It is a schematic diagram of a map camera shooting a preview scene from a bird's-eye view provided by an embodiment of the present invention;
[0043] Figure 6 is a camera position map provided by an embodiment of the present invention;
[0044] Figure 7 It is a flow chart of generating a virtual camera position map provided by an embodiment of the present invention;
[0045] Figure 8 It is a flow chart of exporting preview video and camera position map provided by an embodiment of the present invention;
[0046] Fig. 9 It is a structural block diagram of a device for displaying a virtual camera position map provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0048] In traditional film and television production, the photographer needs to draw a camera plane map and use lines to indicate the movement route of the camera. Figure 1 , shows a camera position diagram in traditional film and television production, in which the camera can perform preview shooting in the preview scene, camera A can move forward and backward to shoot the preview picture, and camera B can move left and right to shoot the preview picture. However, using the traditional camera flat position diagram, it is impossible to intuitively see the picture effect when the camera moves according to the camera position diagram, and the camera position diagram is out of touch with the picture effect.
[0049] With the development of virtual film and television production, it is possible to build a virtual preview scene, simulate the movement of a physical camera through a virtual camera, and observe the preview picture taken when the virtual camera moves in real time. At this time, although the movement of the camera and the simulated picture effect are linked in real time, the camera position map of the virtual camera cannot be viewed, and it is still impossible to intuitively view the picture effect and the camera position map at the same time.
[0050] One of the core concepts of an embodiment of the present invention is that, by generating a two-dimensional overhead view of a virtual rehearsal scene and obtaining the movement trajectory of a virtual camera in the virtual rehearsal scene, a camera position map of the virtual camera can be generated based on the two-dimensional overhead view and the movement trajectory. By obtaining the movement trajectory and generating the camera position map in real time, the rehearsal picture obtained simultaneously with the movement trajectory is displayed. The rehearsal picture taken by the virtual camera and the camera position map of the virtual camera can be output together, which can avoid the disconnection between the camera position map and the picture effect. When the virtual camera moves, the rehearsal picture, the movement trajectory of the virtual camera and the position of the virtual camera in the virtual rehearsal scene can be intuitively displayed at the same time.
[0051] Reference Figure 2 , shows a flowchart of a method for displaying a virtual camera position map provided by an embodiment of the present invention, and the method may specifically include the following steps:
[0052] Step 201, generating a two-dimensional top view of the virtual preview scene.
[0053] The method for displaying a virtual camera position map provided in the embodiment of the present invention can be applied to a terminal device that can present a graphical user interface, such as a mobile phone, a tablet computer, a laptop computer, etc., and the embodiment of the present invention is not limited to this.
[0054] The virtual preview scene may refer to a three-dimensional scene modeled by simulating a real preview scene in the film and television production software, and the two-dimensional overhead view may refer to a two-dimensional view obtained by shooting the virtual preview scene from above. In actual applications, the movement of the actual physical camera can be simulated by controlling the movement of the virtual camera in the constructed virtual preview scene. As the virtual camera moves, the preview screen content shot by the virtual camera can be viewed on the screen of the terminal device, thereby performing virtual preview. Figure 3 As shown in Figure 1, it is a schematic diagram of a virtual preview. Figure 3 As shown in the figure on the right, the position of the virtual camera in the virtual preview scene can be displayed by the terminal device, such as Figure 3 As shown in the left figure, when the virtual camera is controlled to move and shoot the virtual preview scene, the preview picture obtained by the virtual camera shooting the virtual preview scene can be displayed through the terminal device.
[0055] During the virtual preview process, the virtual camera can be moved in the virtual preview scene, and the terminal device can generate a two-dimensional top view of the virtual preview scene, thereby generating a camera position map of the virtual camera based on the two-dimensional top view.
[0056] Step 202: Acquire the movement trajectory of the virtual camera in the virtual preview scene and the preview picture shot along the movement trajectory.
[0057] Specifically, a video production software can be run on a terminal device. When a virtual camera moves in a virtual preview scene, the motion of the virtual camera can be captured by the video production software, and the position coordinates of the virtual camera can be recorded, thereby obtaining the position coordinates of the virtual camera at each moment and the preview pictures taken at each moment, and generating the movement track of the virtual camera according to the position coordinates of the virtual camera at each moment. The preview picture can refer to the video picture obtained by the virtual camera shooting the virtual preview scene during the preview process.
[0058] Exemplarily, when the virtual camera moves in the virtual rehearsal scene at time t1, the terminal device can obtain the position coordinates of the virtual camera at time t1; when the virtual camera moves at time t2, the terminal device can obtain the position coordinates of the virtual camera at time t2, and generate a movement trajectory M of the virtual camera based on the position coordinates at times t1 and t2; when the virtual camera moves at time t3, the terminal device can obtain the position coordinates of the virtual camera at time t3 and the rehearsal picture taken by the virtual camera at time t3, draw the position coordinates at time t3 along the movement trajectory M, and generate the movement trajectory N of the virtual camera at time t3.
[0059] Step 203: Generate a camera position map of the virtual camera according to the two-dimensional top view of the virtual preview scene and the movement trajectory of the virtual camera.
[0060] Specifically, the terminal device can draw the movement track of the virtual camera on the two-dimensional top view of the virtual preview scene to generate a virtual camera position map. The virtual camera position map can refer to a two-dimensional view used to record the position of the virtual camera when the virtual camera shoots each preview frame.
[0061] In practical applications, a video production software can be run on a terminal device. When a virtual camera moves in a virtual preview scene, the video production software can capture the movement of the virtual camera, record the position coordinates of the virtual camera, and project the position coordinates of the virtual camera onto a two-dimensional top view of the virtual preview scene, thereby marking the track points of the virtual camera on the two-dimensional top view. As the virtual camera moves, the position coordinates of the virtual camera at each moment can be recorded, and the position coordinates of each moment can be projected onto a two-dimensional top view of the virtual preview scene, and the track points of the virtual camera at each moment can be marked on the two-dimensional top view. The track points are connected in sequence, thereby drawing the movement track of the virtual camera on the two-dimensional top view, and obtaining the camera position map of the virtual camera. The camera position map of the virtual camera can be updated as the virtual camera moves. At time t1, the terminal device can record the position coordinates of the virtual camera at time t1, mark the trajectory points of the virtual camera at time t1 on the two-dimensional overhead view of the virtual rehearsal scene, generate a camera position map P1 of the virtual camera at time t1, and display the position of the virtual camera at time t1 on the camera position map P1; at time t2, the terminal device can record the position coordinates of the virtual camera at time t2, mark the trajectory points of the virtual camera at time t2 on the two-dimensional overhead view of the virtual rehearsal scene, connect the trajectory points of the virtual camera at times t1 and t2 to draw the movement trajectory M of the virtual camera, generate a camera position map P2 of the virtual camera at time t2, and display the position of the virtual camera at time t2 on the camera position map P2.
[0062] By generating a camera position map of the virtual camera based on the two-dimensional overhead view of the virtual preview scene and the movement trajectory of the virtual camera, when the virtual camera moves in the virtual preview scene, the movement trajectory of the virtual camera at a certain moment and the position of the virtual camera in the virtual preview scene at that moment can be viewed from the camera position map.
[0063] Step 204, displaying each frame of the preview picture and the position of the virtual camera in the camera position map when shooting each frame of the preview picture.
[0064] The position of the virtual camera in the preview scene can be displayed in the camera position map, and each preview frame shot by the virtual camera and the position of the virtual camera when shooting each preview frame can be displayed on the screen of the terminal device. In practical applications, the film and television production software can be run on the terminal device, and the position coordinates of the virtual camera at the current moment can be recorded by the film and television production software, and the preview frame shot by the virtual camera at the current moment can be captured at the same time, and the position coordinates of the virtual camera at the current moment can be projected and mapped to the two-dimensional top view of the two-dimensional virtual scene, and the track points of the virtual camera can be marked on the two-dimensional top view, and the track points can be connected with the track points at the previous moment, so as to draw the movement track of the virtual camera at the current moment and generate the camera position map of the virtual camera at the current moment. While drawing the camera position map of the virtual camera at the current moment, the captured preview frame at the current moment can be rendered in real time, and the rendered preview frame can be output in real time. At this time, the rendered preview frame output in real time is associated with the camera position map generated in real time in real time, and the position of the virtual camera in the camera position map at the same moment and the rendered preview frame can be displayed on the screen of the terminal device at the same time.
[0065] It should be noted that, using traditional film and television production software, only the virtual camera moving in the virtual preview scene and the preview screen shot by the virtual camera can be viewed, and the camera position map still needs to be drawn manually. The film and television production software used in the embodiment of the present invention records the position coordinates of the virtual camera, and projects the position coordinates onto the two-dimensional top view to mark the track points of the virtual camera. It can not only draw and generate the movement track of the virtual camera on the two-dimensional top view, but also associate the track points with each captured preview screen frame, thereby simultaneously displaying the preview screen at the current moment and the position of the virtual camera when shooting the preview screen at the current moment in the camera position map, so that the user can simultaneously view the movement track of the virtual camera, the position of the virtual camera at the current moment, and the preview screen shot by the virtual camera at the current moment.
[0066] In an embodiment of the present invention, by generating a two-dimensional overhead view of a virtual rehearsal scene and acquiring the movement trajectory of a virtual camera in the virtual rehearsal scene, a camera position map of the virtual camera can be generated based on the two-dimensional overhead view and the movement trajectory. By acquiring the movement trajectory and generating the camera position map in real time, the rehearsal picture acquired simultaneously with the movement trajectory is displayed. The rehearsal picture taken by the virtual camera and the camera position map of the virtual camera can be output together, which can avoid the disconnection between the camera position map and the picture effect. When the virtual camera moves, the rehearsal picture, the movement trajectory of the virtual camera and the position of the virtual camera in the virtual rehearsal scene can be intuitively displayed at the same time.
[0067] Reference Figure 4 , shows a flowchart of a method for displaying a virtual camera position map provided by an embodiment of the present invention, and the method may specifically include the following steps:
[0068] Step 401, establishing a map camera in a virtual preview scene.
[0069] The map camera may refer to a virtual camera used to shoot a virtual preview scene from a bird's-eye view to obtain a two-dimensional map of the virtual preview scene. In an embodiment of the present invention, by establishing a map camera in the virtual preview scene, the map camera can be used to shoot a two-dimensional map of the preview scene from a bird's-eye view, thereby generating a camera position diagram of the virtual camera based on the two-dimensional map and displaying it together with the preview screen shot by the virtual camera, so that the movement trajectory of the virtual camera, the position of the virtual camera at the current moment, and the preview screen shot by the virtual camera at the current moment can be viewed at the same time.
[0070] In an optional embodiment, step 401 may include the following sub-steps S11-S14:
[0071] Sub-step S11, obtaining a preset two-dimensional top view length and a viewing angle of a map camera.
[0072] Reference Figure 5 , shows a schematic diagram of a map camera looking down and shooting a preview scene provided by an embodiment of the present invention. Figure 5 Left picture and Figure 5 The figures on the right are schematic diagrams of different preset 2D top view lengths. ① can represent the preset 2D top view length set by the user, and ② can represent the height at which the map camera is looking down to shoot the virtual preview scene. Since the viewing angle of the map camera to be established is fixed, when the preset 2D top view length is different, the height position of the map camera will also be different.
[0073] The user can select the preview scene map area to be photographed through the terminal device, and set the size of the corresponding map range, that is, the preset two-dimensional top view length, and the terminal device can obtain the preset two-dimensional top view length. The viewing angle of the map camera to be established can be fixed, for example, the viewing angle of the map camera to be established can be 60°.
[0074] Sub-step S12, determining the position coordinates of the center point of the two-dimensional top view according to the preset two-dimensional top view length, and using the position coordinates of the center point as the plane position coordinates of the map camera.
[0075] Specifically, on the map area of the preview scene that needs to be shot, the map range can be divided according to the preset two-dimensional overhead view length to obtain the two-dimensional overhead view and determine the position coordinates of the center point of the two-dimensional overhead view, and the position coordinates of the center point of the two-dimensional overhead view are used as the plane position coordinates of the map camera.
[0076] In actual applications, when the map that the user needs to shoot is a square, the terminal device can obtain a preset two-dimensional top view length, and the preview scene map area can be divided according to the preset two-dimensional top view length to obtain a square two-dimensional top view, and the position of the center point of the square two-dimensional top view is used as the plane position coordinate of the map camera; when the map that the user needs to shoot is a rectangle, the terminal device can obtain two preset two-dimensional top view lengths, and divide the preview scene map area based on the two preset lengths to obtain a rectangular two-dimensional top view, and the position of the center point of the rectangular two-dimensional top view is used as the plane position coordinate of the map camera. The shape type of the above-mentioned two-dimensional top view can be square or rectangle, which is only an example of the present invention. Those skilled in the art can set the shape of the two-dimensional top view according to actual needs. For example, when the map to be shot is circular, the two-dimensional top view can be obtained by dividing the map radius with the preset two-dimensional top view length, and so on. The present invention is not limited here.
[0077] In the embodiment of the present invention, by using the position coordinates of the center point of the two-dimensional top view as the plane position coordinates of the map camera to be established, the shooting range of the map camera can be made to meet the map range required by the user.
[0078] Sub-step S13, calculating according to the preset two-dimensional top view length and the viewing angle to obtain the height position coordinates of the map camera.
[0079] Specifically, the height position coordinates of the map camera can be obtained by using trigonometric functions to calculate according to the preset two-dimensional bird's-eye view length and the viewing angle of the map camera to be established.
[0080] In an optional embodiment, the sub-step S13 may include: using the tangent value of half the viewing angle as the denominator and using half the length of the preset two-dimensional top view as the numerator to calculate the height position coordinates of the map camera.
[0081] Specifically, θ can represent the viewing angle of the virtual camera to be established, L can represent the length of the preset two-dimensional top view, h can represent the height of the map camera to be established, and h=(L / 2) / [tan(θ / 2)] can be used to calculate the height of the map camera to be established as the height position coordinate of the map camera to be established.
[0082] Sub-step S14, establishing the map camera in the virtual preview scene according to the plane position coordinates and the height position coordinates.
[0083] Exemplarily, when the map that the user needs to shoot is a square, the preset two-dimensional overhead view length can be 10m, and a plane rectangular coordinate system can be constructed with the vertices of the square map as the origin. The viewing angle of the map camera to be established can be 60°, and the horizontal axis coordinate range of the two-dimensional overhead view obtained by dividing the preset two-dimensional overhead view length can be (0, 10), and the vertical axis coordinate range can be (0, 10). The position coordinates of the center point of the two-dimensional overhead view are (5, 5), and 5, 5 are used as the plane position coordinates of the virtual camera to be established; the height of the map camera to be established is calculated to be 8.66 through h=(L / 2) / [tan(θ / 2)], and is used as the height position coordinate of the virtual camera to be established. According to the plane position coordinates and the height position coordinates, a map camera is established at (5, 5, 8.66), thereby establishing a map camera in the virtual rehearsal scene.
[0084] Step 402: Use the map camera to shoot the virtual preview scene to obtain a two-dimensional top view of the virtual preview scene.
[0085] After a map camera is established in the virtual preview scene, the virtual preview scene can be photographed from above by the map camera to obtain a two-dimensional top view of the virtual preview scene, thereby generating a camera position map of the virtual camera based on the two-dimensional top view.
[0086] Step 403: Acquire the movement trajectory of the virtual camera in the virtual preview scene and the preview picture shot along the movement trajectory.
[0087] Step 404: Generate a camera position map of the virtual camera according to the two-dimensional top view of the virtual preview scene and the movement trajectory of the virtual camera.
[0088] The terminal device can generate a virtual camera position map based on the two-dimensional top view of the virtual preview scene and the movement trajectory of the virtual camera. Figure 7 , showing a flow chart of generating a virtual camera position map provided by an embodiment of the present invention. After the virtual preview scene is built, a map camera can be established, and a two-dimensional overhead view of the virtual preview scene can be captured by the map camera. When the virtual camera moves in the preview scene, the terminal device can obtain the position information of the virtual camera, record the position coordinates of the virtual camera at each time, thereby drawing the movement trajectory of the virtual camera, drawing the movement trajectory of the virtual camera on the two-dimensional overhead view of the virtual preview scene and displaying the current position of the virtual camera, thereby generating a virtual camera position map.
[0089] Step 405, displaying each frame of the preview picture and the position of the virtual camera in the camera position map when shooting each frame of the preview picture.
[0090] Multiple virtual cameras can move in the virtual preview scene at the same time. The terminal device can obtain the movement tracks of multiple virtual cameras at the same time and draw them in the two-dimensional top view of the virtual preview scene, thereby generating a virtual camera position map. Figure 6 , showing a camera position diagram provided by an embodiment of the present invention, wherein track ① may be the moving track of virtual camera A, track ② may be the moving track of virtual camera B. Through the camera position diagram, the moving track of the virtual camera, the position of the virtual camera in the virtual preview scene at the current moment, and the lens direction of the virtual camera at the current moment may be viewed.
[0091] In an embodiment of the present invention, when displaying the preview picture at the current moment and the position of the virtual camera corresponding to the preview picture at the current moment in the camera position map, the terminal device can respond to the camera position map export instruction at any time and export the camera position map of the virtual camera at any time; the film and television production software can be run on the terminal device, and the film and television production software can also respond to the preview video export instruction at any time and export the preview video based on the preview picture shot by the virtual camera at any time.
[0092] Reference Figure 8 , showing a flow chart of exporting a preview video and a camera position map provided by an embodiment of the present invention. After the user sets the preset two-dimensional top view length, the terminal device can obtain the preset two-dimensional top view length and the viewing angle of the map camera to be established, and calculate the position coordinates of the map camera based on the preset two-dimensional top view length and the viewing angle, so as to establish the map camera at the position coordinates, and shoot the two-dimensional top view of the virtual preview scene through the map camera. When the user controls the movement of the virtual camera used to shoot the virtual preview picture, the terminal device can obtain the position information of the virtual camera to record the position coordinates of the virtual camera at each moment in real time and obtain the preview picture shot at each moment, so as to record the preview picture shot at each moment to generate a preview video, and export the preview video in response to the preview video export instruction; draw the movement trajectory of the virtual camera on the two-dimensional top view based on the position coordinates at each moment to generate a camera position map of the virtual camera, and export the camera position map in response to the camera position map export instruction.
[0093] In an optional embodiment, the method further includes: responding to a first click operation on the moving trajectory in the camera position map, determining a first target position corresponding to the click operation, and displaying a preview picture corresponding to the first target position, the lens direction of the virtual camera, and the position coordinates of the virtual camera.
[0094] In practical applications, in the process of generating the camera position map, not only can the position coordinates of the virtual camera at the current moment be projected onto the two-dimensional top view of the two-dimensional virtual scene to obtain the track points, but the lens direction of the virtual camera at the current moment can also be projected onto the two-dimensional top view at the same time, so that the track points at the current moment, the position coordinates of the virtual camera, and the lens direction of the virtual camera are recorded on the same frame of the top view image, and the track points are associated with the lens direction of the virtual camera when shooting the preview screen and the position coordinates projected as the track points on the same frame of the top view image, so that all the track points constituting the moving track are associated with the corresponding lens direction and position coordinates. When the terminal device detects a click operation on the moving track in the camera position map, it can identify the target position corresponding to the click operation, find the track point closest to the target position, display the lens direction and position coordinates associated with the track point, and simultaneously display the preview screen after real-time rendering.
[0095] During the process of moving and shooting the virtual camera, the preview screen shot by the virtual camera and the camera position map of the virtual camera can be output simultaneously, and the preview screen, the movement track of the virtual camera and the position of the virtual camera in the virtual preview scene can be viewed. At this time, the user can click on the movement track, and the terminal device can respond to the click operation on the movement track, determine the target position corresponding to the click operation, and display the preview screen corresponding to the target position, the lens direction of the virtual camera when shooting the preview screen at the target position, and the target position coordinates, that is, the position coordinates of the virtual camera, on the screen of the terminal device at the same time.
[0096] In an embodiment of the present invention, when a user simultaneously views the preview picture, the movement trajectory of the virtual camera and the position of the virtual camera in the virtual preview scene, the user can click any position on the movement trajectory to view the preview picture taken by the virtual camera at any position, the lens direction of the virtual camera when taking the preview picture at any position, and the position coordinates of the virtual camera.
[0097] In an optional embodiment, the method further includes: responding to a second click operation on the camera position map, determining a second target position corresponding to the second click operation, and controlling the virtual camera to move to the second target position.
[0098] In practical applications, a plane rectangular coordinate system is constructed with the vertices of the two-dimensional top view as the origin. By projecting the position coordinates of the virtual camera, a plane rectangular coordinate system can be constructed with the vertices of the camera position map as the origin. The position coordinates of each track point in the camera position map can be the position coordinates of the associated virtual camera. When the terminal device detects a click operation on the camera position map, it can identify the position coordinates of the target position corresponding to the click operation, adjust the position parameters of the virtual camera, and adjust the position coordinates of the virtual camera to the position coordinates of the target position, thereby controlling the virtual camera to move to the target position.
[0099] When the user is viewing the preview screen and the virtual camera's camera position map at the same time, the user can click anywhere in the camera position map. The terminal device can respond to the click operation on the camera position map, determine the target position corresponding to the click operation, and thus control the virtual camera to move to the target position.
[0100] In an embodiment of the present invention, the terminal device can control the virtual camera to move to the shooting position desired by the user by responding to a click operation on the camera position map, thereby simplifying the control operation for controlling the movement of the virtual camera and improving the interactivity of the camera position map.
[0101] In an optional embodiment, the method further includes: responding to a sliding operation on the camera position map, determining a sliding trajectory corresponding to the sliding operation, and controlling the virtual camera to move along the sliding trajectory.
[0102] In actual applications, when the terminal device detects a sliding operation on the camera position map, it can identify the position coordinates of multiple points on the sliding trajectory corresponding to the sliding operation, adjust the position parameters of the virtual camera, and adjust the position coordinates of the virtual camera to the position coordinates of each point on the sliding trajectory in turn, thereby controlling the virtual camera to move along the sliding trajectory.
[0103] When the user views the preview screen and the camera position map of the virtual camera, the user can slide at any position in the camera position map. The terminal device can respond to the sliding operation on the camera position map, determine the sliding trajectory corresponding to the sliding operation, and thus control the virtual camera to move along the sliding trajectory.
[0104] In an embodiment of the present invention, the terminal device can control the virtual camera to move to the shooting position desired by the user by responding to the sliding operation on the camera position map, thereby simplifying the control operation for controlling the movement of the virtual camera and improving the interactivity of the camera position map.
[0105] In an embodiment of the present invention, by generating a two-dimensional overhead view of a virtual rehearsal scene and acquiring the movement trajectory of a virtual camera in the virtual rehearsal scene, a camera position map of the virtual camera can be generated based on the two-dimensional overhead view and the movement trajectory. By acquiring the movement trajectory and generating the camera position map in real time, the rehearsal picture acquired simultaneously with the movement trajectory is displayed. The rehearsal picture taken by the virtual camera and the camera position map of the virtual camera can be output together, which can avoid the disconnection between the camera position map and the picture effect. When the virtual camera moves, the rehearsal picture, the movement trajectory of the virtual camera and the position of the virtual camera in the virtual rehearsal scene can be intuitively displayed at the same time.
[0106] In an embodiment of the present invention, by establishing a map camera in a virtual rehearsal scene, the map camera can be used to shoot a two-dimensional map of the rehearsal scene from a bird's-eye view, thereby generating a camera position map of the virtual camera based on the two-dimensional map and displaying it together with the rehearsal picture shot by the virtual camera.
[0107] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0108] Reference Fig. 9 , shows a structural block diagram of a display device for a virtual camera position map provided by an embodiment of the present invention, which may specifically include the following modules:
[0109] A top view generation module 901 is used to generate a two-dimensional top view of a virtual preview scene;
[0110] A trajectory acquisition module 902 is used to acquire the movement trajectory of the virtual camera in the virtual preview scene and the preview picture taken along the movement trajectory;
[0111] A camera position diagram generating module 903 is used to generate a camera position diagram of the virtual camera according to the two-dimensional top view of the virtual preview scene and the moving track of the virtual camera;
[0112] The display module 904 is used to display each frame of the preview picture and the position of the virtual camera in the camera position map when shooting each frame of the preview picture.
[0113] In an optional embodiment, the top view generating module includes:
[0114] Establish a submodule for establishing a map camera in a virtual preview scene;
[0115] The two-dimensional top view generation submodule is used to use the map camera to shoot the virtual preview scene to obtain a two-dimensional top view of the virtual preview scene.
[0116] In an optional embodiment, the establishing submodule includes:
[0117] A preset length acquisition unit, used to acquire a preset two-dimensional top view length and a viewing angle of a map camera;
[0118] A center point determination unit, used to determine the position coordinates of the center point of the two-dimensional top view according to the preset two-dimensional top view length, and use the position coordinates of the center point as the plane position coordinates of the map camera;
[0119] A height position calculation unit, used for calculating according to the preset two-dimensional top view length and the viewing angle to obtain the height position coordinates of the map camera;
[0120] A camera establishing unit is used to establish the map camera in the virtual preview scene according to the plane position coordinates and the height position coordinates.
[0121] In an optional embodiment, the height position calculation unit includes:
[0122] The tangent calculation subunit is used to calculate the height position coordinates of the map camera using the tangent value of half the viewing angle as the denominator and half the length of the preset two-dimensional top view as the numerator.
[0123] In an optional embodiment, the method further includes:
[0124] A click display module is used to respond to a first click operation on the moving trajectory in the camera position map, determine a first target position corresponding to the click operation, and display a preview picture corresponding to the first target position, the lens direction of the virtual camera, and the position coordinates of the virtual camera.
[0125] In an optional embodiment, the method further includes:
[0126] The click movement module is used to respond to a second click operation on the camera position map, determine a second target position corresponding to the second click operation, and control the virtual camera to move to the second target position.
[0127] In an optional embodiment, the method further includes:
[0128] The sliding movement module is used to respond to the sliding operation acting on the camera position map, determine the sliding track corresponding to the sliding operation, and control the virtual camera to move along the sliding track.
[0129] In the embodiment of the present invention, by generating a two-dimensional top view of a virtual preview scene and obtaining the movement trajectory of a virtual camera in the virtual preview scene, a camera position map of the virtual camera can be generated based on the two-dimensional top view and the movement trajectory. By obtaining the movement trajectory and generating the camera position map in real time, the preview picture obtained simultaneously with the movement trajectory is displayed. The preview picture taken by the virtual camera and the camera position map of the virtual camera can be output together, which can avoid the disconnection between the camera position map and the picture effect, thereby achieving the desired effect in the virtual camera.
[0130] When the virtual camera moves, the preview picture, the movement trajectory of the virtual camera and the position of the virtual camera 5 in the virtual preview scene are intuitively displayed at the same time.
[0131] In an embodiment of the present invention, by establishing a map camera in a virtual rehearsal scene, the map camera can be used to shoot a two-dimensional map of the rehearsal scene from a bird's-eye view, thereby generating a camera position map of the virtual camera based on the two-dimensional map and displaying it together with the rehearsal picture shot by the virtual camera.
[0132] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0133] An embodiment of the present invention further provides an electronic device, including:
[0134] The system comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the virtual camera position map is realized.
[0135] The various processes of the method implementation example are displayed, and the same technical effect can be achieved. To avoid repetition, they will not be described again here.
[0136] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned virtual camera position map display method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0137] 0 The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to in detail.
[0138] Those skilled in the art will appreciate that the embodiments of the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0139] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0142] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0143] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0144] The method and device for displaying a virtual camera position map provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for displaying a virtual camera position map, characterized in that: include: Generate a two-dimensional top view of a virtual preview scene, wherein the two-dimensional top view is obtained by shooting from a top view using a map camera established in the virtual preview scene; Acquire the movement trajectory of the virtual camera in the virtual preview scene and the preview picture taken along the movement trajectory; According to the two-dimensional top view of the virtual preview scene and the moving trajectory of the virtual camera, a camera position diagram of the virtual camera is generated, wherein the movement of the virtual camera is captured by film and television production software, and the position coordinates of the virtual camera at each moment are recorded; the position coordinates of the virtual camera at each moment are projected and mapped onto the two-dimensional top view of the virtual preview scene; the trajectory points of the virtual camera at each moment are marked on the two-dimensional top view according to the projection mapping result; and the trajectory points are connected in sequence to determine the moving trajectory of the virtual camera on the two-dimensional top view; Display each frame of the preview picture and the position of the virtual camera when shooting each frame of the preview picture in the camera position map; In response to a sliding operation on the camera position map, a sliding track corresponding to the sliding operation is determined, and the virtual camera is controlled to move along the sliding track.
2. The method according to claim 1, characterized in that The step of generating a two-dimensional top view of a virtual preview scene includes: Establishing map cameras in virtual pre-show scenes; The map camera is used to shoot the virtual preview scene to obtain a two-dimensional top view of the virtual preview scene.
3. The method according to claim 2, characterized in that The step of establishing a map camera in a virtual preview scene includes: Get the preset 2D top view length and the viewing angle of the map camera; Determine the position coordinates of the center point of the two-dimensional top view according to the preset two-dimensional top view length, and use the position coordinates of the center point as the plane position coordinates of the map camera; Calculate the height position coordinates of the map camera according to the preset two-dimensional top view length and the viewing angle; The map camera is established in a virtual preview scene according to the plane position coordinates and the height position coordinates.
4. The method according to claim 3, characterized in that The calculating according to the preset two-dimensional top view length and the viewing angle to obtain the height position coordinates of the map camera includes: The height position coordinates of the map camera are calculated by taking the tangent value of half the viewing angle as the denominator and taking half the length of the preset two-dimensional top view as the numerator.
5. The method according to claim 1, characterized in that The method further comprises: In response to a first click operation on the moving track in the camera position map, a first target position corresponding to the click operation is determined, and a preview picture corresponding to the first target position, a lens direction of the virtual camera, and a position coordinate of the virtual camera are displayed.
6. The method according to claim 1, characterized in that The method further comprises: In response to a second click operation on the camera position map, a second target position corresponding to the second click operation is determined, and the virtual camera is controlled to move to the second target position.
7. A display device for a virtual camera position map, characterized in that: include: A bird's-eye view generation module is used to generate a two-dimensional bird's-eye view of a virtual preview scene, wherein the two-dimensional bird's-eye view is obtained by shooting from a top view using a map camera established in the virtual preview scene; A trajectory acquisition module, used to acquire the movement trajectory of the virtual camera in the virtual preview scene and the preview picture taken along the movement trajectory; The camera position diagram generation module is used to generate the camera position diagram of the virtual camera according to the two-dimensional top view of the virtual preview scene and the moving trajectory of the virtual camera, wherein the movement of the virtual camera is captured by the film and television production software, and the position coordinates of the virtual camera at each moment are recorded; the position coordinates of the virtual camera at each moment are projected and mapped onto the two-dimensional top view of the virtual preview scene; the trajectory points of the virtual camera at each moment are marked on the two-dimensional top view according to the projection mapping result; and the trajectory points are connected in sequence to determine the moving trajectory of the virtual camera on the two-dimensional top view; A display module, used for displaying each frame of the preview picture and the position of the virtual camera when shooting each frame of the preview picture in the camera position map; The sliding movement module is used to respond to the sliding operation acting on the camera position map, determine the sliding track corresponding to the sliding operation, and control the virtual camera to move along the sliding track.
8. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the method for displaying a virtual camera position map as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for displaying a virtual camera position map according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Virtual prototype room display method and device and computer equipment
CN110162236A
Mirror splitting method and device
CN115442542A