Game camera control method and device, medium and product

By determining the target data in the game camera control and independently adjusting the camera orientation, the problems of high view angle jitter and computing resource consumption in the prior art are solved, and high-quality visual performance and immersive experience are achieved.

CN120053971APending Publication Date: 2025-05-30SHANGHAI JIAOZHAI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510444754.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Existing gaming camera control technology is difficult to meet the needs of high-quality visual performance and immersive experiences, and there are problems such as perspective jitter, high computing resource consumption and limited effects in multi-objective scenarios.

Method used

By determining the target data of the game camera, including the camera sweep track, the camera position following point and the camera orientation following point, independently adjusting the camera orientation following point, realizing that the camera moves along the sweep track and flexibly adjusting the orientation.

Benefits of technology

It improves the smoothness and flexibility of camera movement, enhances the flexibility of composition design, meets the diverse needs of camera control in game development, and provides richer visual effects and gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120053971A_ABST
    Figure CN120053971A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of information, and discloses a game camera control method and device, a medium and a product. The method comprises the following steps: determining target data of a game camera; the target data at least comprises a camera scanning track, a camera position following point and a camera orientation following point; controlling the game camera to move along the camera sweeping track according to the target data; wherein when the game camera is controlled to move along the camera sweeping track, the camera can be independently adjusted to face the following point. The technical problem that in the related technology, an existing game camera control technology still has many limitations, and the requirements of an existing game for high-quality visual performance and immersive experience are difficult to meet can be solved at least.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology, and particularly to a control method, device, medium, and product for a game camera. Background Art

[0002] The stylized camera movement scheme in games refers to a series of camera movement and perspective control methods that are different from the conventional ones and have unique styles and creativity in the game development process to achieve specific artistic effects, enhance the narrative ability of the game, or improve the player's immersion. In game development, especially in the field of action games, camera movement has become one of the key factors affecting the player's game experience. The camera is not only the window for players to observe the game world but also plays an important role in game narrative, emotional transmission, and immersion creation.

[0003] With the continuous development of game technology, camera movement has gradually evolved from a simple fixed perspective to a complex and dynamic intelligent control system. The traditional camera mainly has the following control methods:

[0004] One is the fixed perspective, where the camera position and angle remain unchanged, commonly seen in 2D games;

[0005] Two is the follow perspective, where the camera always follows the player character's movement, commonly seen in third-person games;

[0006] Three is the preset trajectory, where the camera moves along a pre-designed path, commonly seen in cutscenes.

[0007] The existing game camera control technologies still have many limitations and are difficult to meet the current game's requirements for high-quality visual performance and immersive experience. To address the above challenges, some improvement schemes have been proposed in related technologies. However, the inventor found that there are at least the following technical problems in related technologies:

[0008] One is the smooth transition algorithm, which realizes the smooth transition of camera movement through the interpolation algorithm to reduce jitter and jump. However, this may not be able to completely eliminate the perspective jump problem in complex scenes.

[0009] Two is the target tracking technology, which uses an algorithm to real-time track the player character or key objects to ensure that the camera always focuses on the target. However, this algorithm has high requirements for computing resources and has limited effects in multi-target scenarios.

[0010] Three is machine learning assistance, which uses a machine learning model to predict player behavior and optimize the camera movement trajectory. Although this scheme has potential, it requires a large amount of training data and cannot guarantee real-time requirements. Summary of the Invention

[0011] An object of the present application is to provide a control method, device, medium and product for a game camera, at least to solve the technical problem that in the related art, there are still many limitations in the existing game camera control technology, and it is difficult to meet the requirements of current games for high-quality visual performance and immersive experience.

[0012] To achieve the above object, some embodiments of the present application provide the following aspects:

[0013] In a first aspect, some embodiments of the present application further provide a control method for a game camera, the method including: determining target data of the game camera; the target data at least including: a camera sweeping orbit, a camera position following point, and a camera orientation following point; controlling the game camera to move along the camera sweeping orbit according to the target data; wherein, when controlling the game camera to move along the camera sweeping orbit, the camera orientation following point can be independently adjusted.

[0014] In a second aspect, some embodiments of the present application further provide an electronic device, the electronic device including: one or more processors; and a memory storing computer program instructions, the computer program instructions, when executed, causing the processors to execute the steps of the method as described above.

[0015] In a third aspect, some embodiments of the present application further provide a computer-readable medium, on which computer program instructions are stored, the computer program instructions being executable by a processor to implement the method as described above.

[0016] In a fourth aspect, some embodiments of the present application further provide a computer program product, including computer programs / instructions, the computer programs / instructions, when executed by a processor, implementing the steps of the method as described above.

[0017] Compared with related technologies, in the solution provided by the embodiments of the present application, target data of the game camera is determined; the target data at least includes: a camera sweeping orbit, a camera position following point, and a camera orientation following point, and then, based on the target data, the game camera is controlled to move along the camera sweeping orbit; wherein, when controlling the game camera to move along the camera sweeping orbit, the camera orientation following point can be independently adjusted. Since the camera position following point and the camera orientation following point are added in this embodiment, the single following mode of the previous camera is changed. In this embodiment, when the camera moves along the sweeping orbit, the camera orientation following point can be independently adjusted. In this way, when designing the camera composition, the target can be flexibly locked (such as the camera detecting the enemy), greatly improving the flexibility of the composition design. Since the target data includes a camera sweeping orbit, a camera position following point, and a camera orientation following point, these three elements cooperate with each other and work together to provide a complete solution for the movement and perspective control of the game camera. The camera sweeping orbit determines the movement path of the camera, the camera position following point ensures the actual position of the camera on the orbit and the accuracy of the movement, and the camera orientation following point realizes the independent adjustment of the camera orientation during the movement of the camera, thus meeting the diverse requirements for camera control in game development. This independence can provide a greater creative space for relevant personnel such as game developers, enabling them to flexibly control the camera orientation according to the plot, scene characteristics of the game, and the operations of players, and creating rich and diverse visual effects and game experiences. For example, when showing a complex building scene, the camera can move around the building along the sweeping orbit, and at the same time, according to the player's perspective switching requirements, independently adjust the camera orientation following point, allowing the player to observe the details and overall structure of the building from different angles. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplary illustrations do not limit the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.

[0019] Figure 1 It is an exemplary flowchart of a control method for a game camera provided according to some embodiments of the present application;

[0020] Figure 2 It is an exemplary schematic diagram of a position following point and an orientation following point in a control method for a game camera provided according to some embodiments of the present application;

[0021] Figure 3 It is an exemplary schematic diagram of an organization and scheduling scheme of a camera in a control method for a game camera provided according to some embodiments of the present application;

[0022] Figure 4An exemplary schematic diagram of an electronic device provided according to some embodiments of the present application. Detailed implementation manners

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0024] The following terms are used herein.

[0025] Perspective projection: In 3D games, in order to make the three-dimensional objects seen by players closer to the real visual effect, a method of mapping points in three-dimensional space to a two-dimensional plane for display is used. In perspective projection, the distance between the projection center and the projection plane is limited.

[0026] View frustum: It is the core concept used to determine the visible area of perspective projection in 3D games. It refers to the pyramidal space range defined by position, rotation, and field of view (FOV) starting from the camera's perspective. Only the objects within the view frustum range will be rendered onto the screen, and the parts outside will be automatically cropped by the system.

[0027] Camera modeling: It refers to describing the shape of the view frustum and the imaging range of the camera in 3D games through a set of geometrically meaningful parameters.

[0028] Basic camera modeling: It is the simplest parameter model used to describe the camera's view frustum. It is mainly described by parameters such as position, rotation, field of view, and clipping planes. Among them, the position determines the specific location of the camera in space; the rotation represents the orientation angle of the camera; the field of view determines the size of the camera's field of view during perspective projection; the clipping planes include the far clipping plane and the near clipping plane, and their function is to truncate the theoretically view frustum within the limited numerical precision of the computer to better present the three-dimensional space.

[0029] Bézier curve: It is a parametric curve proposed by French engineer Pierre Bézier in 1962. It was initially used in the design of car bodies and is now widely used in the field of computer graphics. As a polynomial parametric curve, the order of the Bézier curve determines the complexity of its shape, and the nth-order Bézier curve has n - 1 order of continuity, which makes it excellent in drawing smooth curves.

[0030] Spline: A special curve defined by a piecewise polynomial function. Compared with high-order polynomial parametric curves using the same control points, the core advantage of splines lies in their locality: each control point only affects a specific local area of the curve, rather than having a global impact on the entire curve like high-order polynomials. This property not only makes curve editing more flexible and controllable but also effectively avoids the Runge phenomenon (i.e., the problem of severe oscillations near the endpoints) caused by high-order polynomial interpolation.

[0031] Camera target acquisition: A lens mechanism that can cooperate with the camera to automatically select an attack target.

[0032] First Embodiment

[0033] The first embodiment of the present application relates to a control method for a game camera. As Figure 1 shown, the method may include the following steps:

[0034] Step S101, determining the target data of the game camera; the target data at least includes: the camera sweep trajectory, the camera position following point, and the camera orientation following point;

[0035] Step S102, controlling the game camera to move along the camera sweep trajectory according to the target data; wherein, when controlling the game camera to move along the camera sweep trajectory, the camera orientation following point can be independently adjusted. The following will respectively elaborate on the above steps in detail.

[0036] Exemplarily, the game camera can be, but is not limited to: a stylized combat camera. It can be understood that in the game field, a stylized combat camera refers to a virtual camera system in the game used to present combat scenes with a specific artistic style and expression method.

[0037] Regarding step S101, specifically, exemplarily, relevant personnel can perform data modeling (camera modeling) on the game camera. Among them, data modeling is the core part of the development of the game camera system, specifically referring to defining and managing the behavior, state, and attributes of the game camera through data structures and algorithms. That is to say, in this embodiment, it aims to make improvements from the aspect of data modeling to ensure that the game camera can flexibly and dynamically adjust the perspective, position, and behavior according to different requirements of the game.

[0038] It can be understood that in the related art, in the game camera, the data structure of the camera data model includes:

[0039] Position: The coordinates (x, y, z) of the camera in the world space.

[0040] Rotation: The orientation of the camera, usually represented by quaternions or Euler angles.

[0041] Field of View (FOV): The viewing angle range of the camera, which affects the size of the scene that the player can see.

[0042] Follow Dump: The speed at which the camera follows the target's movement, usually used to smooth the camera following.

[0043] Rotation Dump: The damping of the camera's rotation, usually used to smooth the camera's rotation based on screen space.

[0044] In this embodiment, compared with the camera data structure adopted by conventional games, the camera data model is expanded, and new camera position follow points (FollowTarget), camera orientation follow points (LookAtTarget), and camera sweep tracks (SweepTrack) are added.

[0045] Among them, the position follow point (FollowTarget) refers to a specific reference point in the game scene where the camera determines its own position based on its position information during movement. As Figure 2 shown by the green point in the figure. Briefly speaking, the position of the camera will be adjusted and changed accordingly according to the position of the position follow point to maintain a certain specific relationship with the follow point, so as to achieve the tracking shooting of specific objects or areas in the game scene.

[0046] Among them, the orientation follow point (LookAtTarget) refers to a specific target point in the game scene that the camera will refer to when adjusting its own orientation. As Figure 2 shown by the yellow point in the figure. The orientation of the camera will be dynamically adjusted according to the position information of this follow point to ensure that the camera always points towards this point or maintains a specific perspective relationship with this point, so that the player can observe the information of specific directions or objects in the game scene through the camera view.

[0047] Among them, the camera sweep track (SweepTrack) refers to the specific path or trajectory that the game camera follows during the sweep movement in the game scene. It is the set of points passed by the game camera in three-dimensional space during the process of moving from one position to another, describing the geometric shape and path information of the game camera's movement.

[0048] Specifically for step S102, exemplarily, during the game camera control process, the system can determine the camera movement mode according to the camera behavior model and, in combination with the target data, control the game camera to move along the camera sweep track. The camera behavior model mainly defines how the camera adjusts data such as camera position, rotation angle, and field of view based on game logic and player input.

[0049] In some examples, the camera movement modes may include, but are not limited to, a follow mode, an orbit mode, a sweep mode, etc. Different movement modes may correspond to different camera operation parameter adjustment strategies. For example, in the follow mode, the position and orientation of the camera can be adjusted in real time according to the position and orientation of the target object to achieve continuous tracking of the target and smooth transition of the screen; in the sweep mode, the camera can move along a preset sweep track and adjust the camera orientation as needed. It can be understood that the behavior of the game camera may also include detecting whether the camera collides with the game scene. In addition, the camera can lock on to game targets. In combat or special scenarios, by stretching the lens, zooming the lens, triggering lens vibration, or using a close-up lens, the screen expressiveness can be enhanced.

[0050] Furthermore, it can enter the interaction stage between the game camera and the game logic. In the game, the interaction stage between the game camera and the game logic refers to the stage where the real-time game logic drives changes in the camera data, thereby flexibly adjusting the camera behavior. Specifically, after determining the movement mode of the camera, the specific position and attitude of the camera can be calculated based on the target data to control the game camera to move along the camera sweep track. For example, in the sweep mode, the position of the camera at each moment can be calculated according to the parameters of the camera sweep track (such as the control points of the Bezier curve); at the same time, according to the position of the camera orientation following point and the current position of the camera, the orientation angle of the camera is calculated to ensure that the camera is facing the correct direction. Another example is the camera's enemy detection function. When the game detects that an enemy enters the range, the relevant logic will change the position of the camera in the sweep track plane and at the same time adjust the camera orientation following point. Subsequently, the camera algorithm calculates the new position and rotation angle of the camera based on these updated data to achieve locking on to the enemy. In this embodiment, since the adjustment of the camera orientation following point is independent of the movement of the camera along the sweep track. That is to say, during the movement of the camera along the sweep track, the camera orientation following point can be adjusted at any time according to the needs of the game and the player's input without affecting the movement trajectory of the camera on the track.

[0051] It can be understood that in the related art, as game scenes become increasingly complex, players' requirements for game experiences are also getting higher and higher. For example, in action games, characters are often in a state of high-speed movement, and at the same time, the game also pursues immersive narrative designs at the film level, which poses many challenges to traditional camera control technologies. One is the lack of expressiveness: the traditional camera movement methods are relatively single, making it difficult to achieve visual effects at the film level, such as close-up shots, slow and fast motion shots, and surround shooting; the other is the limited immersion. In complex scenes, such as narrow spaces or environments with multiple object occlusions, the traditional fixed perspective is difficult to flexibly adapt to the player's perspective, resulting in limited playing fields of view. To address the above challenges, researchers have proposed many improvement solutions, but there are still certain limitations. It is not difficult to find that compared with the related art, in the solution provided by the embodiments of the present application, by determining the target data of the game camera; the target data at least includes: a camera sweep orbit, a camera position following point, and a camera orientation following point, and then controlling the game camera to move along the camera sweep orbit according to the target data; wherein, when controlling the game camera to move along the camera sweep orbit, the camera orientation following point can be independently adjusted. Since the camera position following point and the camera orientation following point are added in this embodiment, the previous single following mode of the camera is changed. In this embodiment, when the camera moves along the sweep orbit, the camera orientation following point can be independently adjusted. In this way, when designing the camera composition, the target can be flexibly locked (such as camera enemy targeting), greatly improving the flexibility of the composition design. Since the target data includes a camera sweep orbit, a camera position following point, and a camera orientation following point, these three elements cooperate with each other and work together to provide a complete solution for the movement and perspective control of the game camera. The camera sweep orbit determines the movement path of the camera, the camera position following point ensures the actual position and movement accuracy of the camera on the orbit, and the camera orientation following point realizes the independent adjustment of the camera orientation during the camera movement, thus meeting the diverse requirements for camera control in game development. This independence can provide greater creative space for relevant personnel such as game developers, enabling them to flexibly control the orientation of the camera according to the game's plot, scene characteristics, and players' operations, creating rich and diverse visual effects and game experiences. For example, when showing a complex building scene, the camera can move around the building along the sweep orbit, and at the same time, independently adjust the camera orientation following point according to the player's perspective switching needs, allowing the player to observe the details and overall structure of the building from different angles.

[0052] Second Embodiment

[0053] The second embodiment of the present application relates to a method for controlling a game camera. The second embodiment is an improvement based on the first embodiment. The specific improvement lies in: in this embodiment, a method for determining a camera sweep orbit is provided.

[0054] Specifically, in some embodiments, the method for determining the camera sweeping trajectory may include the following steps:

[0055] Step S201: Determine a plane reference point according to the camera position following point;

[0056] Step S202: Determine a plane normal vector according to the camera orientation following point and the camera position following point;

[0057] Step S203: Determine the sweeping trajectory plane according to the plane reference point and the plane normal vector;

[0058] Step S204: Determine the camera sweeping trajectory according to the sweeping trajectory plane.

[0059] Exemplarily, assume that the camera position following point is the position of the player character, and the position coordinates of the player character are P1(10, 10, 2), representing the position where x = 10, y = 10, and height z = 2 in the game world. To determine the plane reference point, considering that the ground in the game scene is the main plane for character activities, the plane reference point can be set on the ground directly below the character position. Therefore, the coordinates of the plane reference point P0 are (10, 10, 0).

[0060] Further, the camera orientation following point is set as a target in front of the character, such as an NPC, with coordinates P2(15, 15, 2). The vector V1 from the camera position following point P1 to the camera orientation following point P2 can be calculated first:

[0061] V1 = P2 - P1 = (15 - 10, 15 - 10, 2 - 2) = (5, 5, 0)

[0062] Meanwhile, in the game scene, the normal vector perpendicular to the target plane is the gravity direction, which is a fixed known vector, usually Vg = (0, 0, -1). Through the vector cross product operation, the plane normal vector N can be obtained:

[0063] N = V1 × Vg = (-5, 5, 0);

[0064] Furthermore, after determining the plane reference point P0(10, 10, 0) and the plane normal vector N(-5, 5, 0), the point-normal equation of the plane A(x - x0) + B(y - y0) + C(z - z0) = 0 can be used to determine the sweeping trajectory plane. Substituting the coordinates of P0 and N into the equation, we get:

[0065] -5(x - 10) + 5(y - 10) + 0(z - 0) = 0

[0066] After simplification, we get: y - x = 0

[0067] The above is the equation of the swept orbital plane, representing a plane inclined at 45 degrees and passing through the origin.

[0068] Further, assume that it is desired for the camera to move in a circular orbit around the character. On the already determined swept orbital plane, a circular orbit with a radius r = 5 is set with the character position P1 as the center. By converting polar coordinates to rectangular coordinates, the position of the camera on the orbit can be determined.

[0069] Let the angle θ be the angle by which the camera rotates around the character, varying from 0 to 360 degrees. The position coordinates (x, y, z) of the camera on the orbit can be calculated by the following formulas:

[0070] x = 10 + 5cos(θ)

[0071] y = 10 + 5sin(θ)

[0072] z = 2

[0073] Through the above steps, this embodiment can determine the swept orbit of the camera in the game scene, enabling the camera to move in a circular motion around the character while maintaining attention on the target NPC, providing rich game perspectives for players.

[0074] Optionally, in some embodiments, the camera swept orbit can be constructed based on a three - dimensional Bezier curve. In this embodiment, by using the parametric curve of the third - order Bezier spline for the swept orbit (also known as the swept orbit camera model), the precise control of the camera's movement trajectory can be achieved, effectively solving the problems of character composition and collision of the camera at different angles, and providing a smoother and more stable camera performance for high - speed battles in the game.

[0075] Optionally, in some embodiments, determining the camera swept orbit according to the swept orbital plane, that is, step S204 may include:

[0076] Step S2041, according to the swept orbital plane, determine at least four control points; the positions of the control points are determined based on the coordinates of the camera position follow - point and the camera orientation follow - point;

[0077] Step S2042, according to the control points, determine the camera swept orbit.

[0078] For ease of understanding, the Bezier curve is first described.

[0079] Specifically, the Bezier curve defines the shape of the curve through control points. The third - order Bezier spline is a type of Bezier curve, generally composed of four control points (P 0 , P 1 , P 2 , P3 ) Definition, whose parametric equations are:

[0080] B(t) = (1 - t) 3 P 0 + 3(1 - t) 2 tP 1 + 3(1 - t)t 2 P 2 + t 3 P 3; t ∈ [0, 1];

[0081] Wherein, P 0 , P 1 , P 2 , P 3 are control points, P 0 is the starting point of the curve, P 3 is the ending point of the curve. P 1 and P 2 are used to control the shape of the curve. By changing the value of the parameter t, varying from 0 to 1, the coordinates of a series of points on the curve can be calculated. Connecting these points can form a cubic Bézier curve.

[0082] Corresponding to the game scenario of this embodiment, specifically, the camera sweeping orbit can be determined according to the principle of the above cubic Bézier spline. The specific steps are as follows:

[0083] Regarding step S2041, specifically, the positions of the control points are determined based on the coordinates of the camera position following point and the camera orientation following point, and they can determine the shape of the camera sweeping orbit. Determining the control points within the sweeping orbit plane can make the orbit better fit the game requirements. Generally, a cubic Bézier curve determines its shape with four control points, and at least four control points need to be determined in this embodiment.

[0084] The following uses a specific example to illustrate how to determine the four control points:

[0085] Suppose the character position (i.e., the camera position following point) is P 0 (10, 10, 2), and the position of the NPC that the character is looking at (i.e., the camera orientation following point) is P 3 (15, 15, 2), and the sweeping orbit plane equation is y - x = 0.

[0086] The first control point: The camera position following point P 0 can be used as the first control point. Since it is the core around which the camera moves, its coordinates are (10, 10, 2).

[0087] The second control point: Considering that the camera may need to first offset a certain distance to the side and then move towards the target direction. It can be slightly offset to the right and front of the character based on the character's position. Assuming an offset of 2 units on the X-axis, 2 units on the Y-axis, and 1 unit on the Z-axis, then P can be obtained 1 =(10 + 2, 10 + 2, 2 + 1) = (12, 12, 3).

[0088] The third control point: In order to make the movement trajectory of the camera approach the camera orientation following point more smoothly, it can be slightly offset in the opposite direction based on the orientation following point. Assuming an offset of -1 unit on the X-axis, -1 unit on the Y-axis, and 0 unit on the Z-axis, P is obtained 2 =(15 - 1, 15 - 1, 3) = (14, 14, 3).

[0089] The fourth control point: Set it as the camera orientation following point P 3 (15, 15, 2), so that the camera will finally move to the target position.

[0090] Regarding step S2042, specifically, after determining the control points, the curve fitting algorithm can be used to determine the camera sweep trajectory based on the parametric equation of the cubic Bezier spline. Substitute the four control points determined in step S2041 into the equation B(t) = (1 - t) 3 P 0 + 3(1 - t) 2 tP 1 + 3(1 - t)t 2 P 2 + t 3 P 3 ; t ∈ [0, 1]. By changing the value of t and taking values from 0 to 1, the coordinates of a series of points are calculated, and then these points are connected to form the camera sweep trajectory.

[0091] It can be understood that there is a problem of view jitter in the related technology. When the character moves or turns quickly, the camera is prone to jitter or jump, which destroys the immersion and affects the player's gaming experience. In the embodiment of the present application, the camera sweep trajectory can be constructed based on a three-dimensional Bezier curve.

[0092] In the camera system, the traditional camera model directly controls the pitch angle of the camera, but ignores the environmental factors in the vertical direction. Therefore, when adjusting the camera pitch, the camera will inevitably collide with the ground or the ceiling, and then the camera will experience jumps in speed and movement direction due to the collision, seriously affecting the shooting effect and the player experience. And the parametric surface trajectory camera model based on Bezier spline has at least the following beneficial effects for the above weaknesses of the traditional model:

[0093] 1. The camera sweep orbit of the present application (i.e., the sweep orbit camera model) can effectively restrict the range within which the camera can operate compared to the spherical or local space model, avoiding the problem of frequent collisions between the camera and the environment due to pitch adjustment, and making the camera operation more stable.

[0094] 2. The camera sweep orbit based on parametric curves of the present application can ensure that the camera obtains first-order or higher continuity during the pitch operation compared to the interpolation model. From a mathematical principle, this can fundamentally eliminate jitter and jump problems, making the camera movement process smoother and more fluent.

[0095] 3. The spline of the present application enables designers to have more powerful control over the orbit composition compared to high-order parametric curves. The control points of the spline curve are all located at legal positions of the orbit, which are easy for designers to edit. Moreover, during the editing process, these control points will not significantly change the overall shape of the sweep line, allowing designers to more conveniently create the desired composition effect.

[0096] Third Embodiment

[0097] The third embodiment of the present application relates to a control method for a game camera. The third embodiment is an improvement based on the second embodiment. The specific improvement lies in: in this embodiment, the implementation method of determining the camera sweep orbit according to the control points is further improved.

[0098] Specifically, in some embodiments, determining the camera sweep orbit according to the control points, that is, step S2042 may include:

[0099] S20421. Determine at least three sets of orbit parameters according to the control points; the orbit parameters are composed of height data and radius data; wherein, the height data is used to represent the offset of the control points of each orbit in the three sets of orbits relative to the camera position following point in the vertical direction; the radius data is used to represent the distance of the control points relative to the camera position following point in the horizontal plane.

[0100] S20422. Determine the camera sweep orbit according to the orbit parameters.

[0101] It can be understood that in the related art, the conventional practice in determining control points is to define a series of control points. The technical solution provided in this embodiment is different from the conventional practice. In this embodiment, by repackaging the control points, they are summarized into three groups of orbit parameters. The expression form can be: Orbit[3]{{height data 1, radius data 1}, {height data 2, radius data 2}, {height data 3, radius data 3}}. With three groups of orbit parameters, designers can easily complete parameter configuration without manually configuring a series of control points one by one, which can greatly simplify the operation process.

[0102] For example, assume that the character controlled by the player is at the position of coordinates (10, 10, 2), which is the camera position following point, and the NPC in front of the character is at (15, 15, 2), which is the camera orientation following point, and the corresponding control points have been determined. Then, in step S20421, converting the control point information into the height data and radius data of the orbit can describe the positional relationship between the control points and the camera position following point from both vertical and horizontal dimensions, providing a clear parametric representation for constructing the camera sweep orbit and enhancing the flexibility and intuitiveness of orbit definition.

[0103] For example, assume that the four control points are: P 0 =(10, 10, 2), P 1 =(12, 12, 3), P 2 =(14, 14, 4), P 3 =(15, 15, 3).

[0104] The first group of orbit parameters (corresponding to P 1 ): Calculate the offset of the control point P 1 in the vertical direction relative to the camera position following point (10, 10, 2) as the height data, that is, 3 - 2 = 1; calculate the distance of the control point P 1 in the horizontal plane relative to the camera position following point as: Therefore, the first group of orbit parameters is

[0105] The second group of orbit parameters (corresponding to P 2 ): Calculate the offset of the control point P 2 , relative to the camera position following point (10, 10, 2) in the vertical direction as the height data, that is, 4 - 2 = 2; calculate the distance of the control point P 2 in the horizontal plane relative to the camera position following point as Therefore, the second group of orbit parameters is

[0106] The third group of orbit parameters (corresponding to P 3 ): For the control point P3 , the vertical offset is 3 - 2 = 1, and the distance relative to the camera position following point on the horizontal plane is Therefore, the third set of orbit parameters is

[0107] Furthermore, based on the orbit parameters obtained in step S20421, these parameters can be converted into the movement trajectory of the camera in three-dimensional space, that is, the camera sweeping orbit.

[0108] Specifically for step S20422, a cubic Bézier curve can be used to construct the camera sweeping orbit. Incorporate the control points corresponding to the three sets of orbit parameters into the calculation model of the Bézier curve. Through the parametric equation of the Bézier curve: B(t) = (1 - t) 3 P 0 + 3(1 - t) 2 tP 1 + 3(1 - t)t 2 P 2 + t 3 P 3 ; t ∈ [0, 1] for calculation. Substitute the control points representing the three sets of orbit parameters into the equation. As the t value continuously changes from 0 to 1, a series of coordinate points are calculated. These points are connected in sequence to form the camera sweeping orbit in three-dimensional space. During the game operation, the camera will move along this orbit, presenting a specific game perspective to the player. Further, in some embodiments, determining the camera sweeping orbit according to the orbit parameters, that is, step S20422 may include:

[0109] Step S204221, determine multiple segments of cubic Bézier curves according to the orbit parameters to ensure that the adjacent curve segments meet the requirements of first-order or second-order continuity at the connection points;

[0110] Step S204222, determine the camera sweeping orbit according to the multiple segments of cubic Bézier curves.

[0111] Specifically, in this embodiment, it aims to divide the three sets of orbit parameters into multiple segments of cubic Bézier curves to ensure that the adjacent curve segments meet the requirements of first-order or second-order continuity at the connection points. In this way, the transition between curves can be made smoother, which is beneficial to the stable and smooth operation of the game camera system.

[0112] Here, continue to use the example of the previous 3D role-playing game to explain.

[0113] For step S204221, specifically, a third-order Bezier curve is a smooth curve defined by four control points. Using multiple third-order Bezier curves to construct a camera sweep trajectory can more flexibly describe complex motion trajectories. Ensuring that adjacent curve segments satisfy first-order or second-order continuity at the connection point is to prevent the camera from making sudden turns or speed changes during movement, to ensure a smooth transition of the picture, and to bring a smooth visual experience to the player. Among them, first-order continuity refers to the same tangent direction of adjacent curve segments at the connection point, that is, the direction of movement of the curve at the connection point is continuous and no sharp corners appear. Second-order continuity means that not only the tangent direction is the same, but also the curvature is the same, that is, the degree of curvature of the curve at the connection point changes continuously, which can make the movement of the camera more natural.

[0114] For example, suppose there are three sets of track parameters, each corresponding to four control points. Suppose the camera position is 0(10,10,2), and the four control points are P 1 (12,12,3),P 2 (14,14,4),P 3 (16,16,3). For example, we can first use O and P 1 Based on this, two more control points (assuming they are Q1 and R1) are added according to certain rules (such as the changing trend of orbital parameters) to define the first segment of the third-order Bezier curve C 1 By adjusting the supplementary control points, the tangent direction and speed of the curve at the starting point (i.e. point O) are consistent with the expected camera movement.

[0115] Then, with P 1 and P 2 As a basis, two more control points are added (assuming Q 2 and R 2 ), define the second segment of the third-order Bezier curve C 2 In the definition of C 2 , make sure it is in the same 1 The connection point (i.e. P 1 point) to meet the first-order or second-order continuity requirements. For example, by calculating and adjusting Q 2 and R 2 The position of C 2 In P 1 The tangent direction of the point is 1 In P 1 The tangent direction of the point is the same (first-order continuity), or further, the curvature is also the same (second-order continuity). 2 and P 3 As a basis, add two more control points (assuming Q 3 and R 3) Define the third - order cubic Bézier curve C 3 and ensure that C 3 and C 2 meet the requirements of first - order or second - order continuity at the connection point (i.e., point P 2 point).

[0116] After determining multiple segments of third - order cubic Bézier curves that meet the continuity requirements, these curves can be connected in sequence to form a complete trajectory. This trajectory is the sweeping orbit along which the camera moves in the game scene. The camera will move along this orbit to achieve a specific perspective display of the game scene. That is to say, for step S204221, the three segments of third - order cubic Bézier curves C 1 、C 2 、C 3 obtained previously can be connected in sequence. During the game operation, the camera will move along the orbit composed of multiple Bézier curves. For example, the camera first moves from the starting point O to point P 1 along C 1 point, then seamlessly switches to C 2 and continues to move to point P 2 point, and finally moves to point P 3 along C 3 point, and so on, completing the entire camera sweeping process and presenting a continuous and smooth game scene perspective to the player.

[0117] Further, in some embodiments, determining the camera sweeping orbit according to the multiple segments of third - order cubic Bézier curves, that is, step S204222 may include:

[0118] Step S2042221: Determine the sampling points on each segment of the third - order cubic Bézier curve according to the multiple segments of third - order cubic Bézier curves;

[0119] Step S2042222: Connect the sampling points on each segment of the third - order cubic Bézier curve to determine the camera sweeping orbit.

[0120] In this embodiment, in terms of parametric sweeping, define the parameter t along the Bézier curve. For each determined t value, through calculation, the point B(t) at the corresponding position on the curve can be calculated. Subsequently, the points calculated on each curve segment are connected in sequence, and all curve segments can be spliced into a complete spline curve.

[0121] Regarding step S2042221, specifically, a third-order Bézier curve is a continuous and smooth curve. To convert it into a specific motion trajectory that the camera can follow, a series of discrete points need to be selected on the curve, and these points are called sampling points. By selecting sampling points, the shape of the curve can be approximately described, and it is convenient for subsequent calculation and control of the camera motion path. The number and distribution of sampling points will affect the accuracy and smoothness of the final trajectory. Generally speaking, the more sampling points there are, the closer the trajectory is to the true shape of the Bézier curve, but the computational amount will also increase accordingly.

[0122] Exemplarily, assume there are three segments of third-order Bézier curves C 1 、C 2 、C 3 . Taking the first segment of third-order Bézier curve C 1 as an example, it is defined by four control points P 01 、P 11 、P 21 、P 31 . According to the parametric equation of the third-order Bézier curve: B(t) = (1 - t) 3 P 01 + 3(1 - t) 2 tP 11 + 3(1 - t)t 2 P 21 + t 3 P 31 ; t ∈ [0, 1].

[0123] In some examples, a sampling interval is set, for example, a sampling point is taken every 0.1. When t = 0, B(0) = P 01 , which is the starting point of the curve and serves as the first sampling point; when t = 0.1, substitute t = 0.1 into the parametric equation to calculate the coordinates of a point, which serves as the second sampling point; and so on. When t = 1, B(1) = P 31 , which is the ending point of the curve and also serves as a sampling point. In this way, a series of sampling points on C 1 are obtained. In the same way, the second segment of third-order Bézier curve C 2 and the third segment of third-order Bézier curve C 3 are sampled to obtain their respective sampling point sets.

[0124] For example, the coordinates of the four control points of C 1 are P 01 (10, 10, 2), P 11 (12, 12, 3), P 21 (14, 14, 4), P 31 (16, 16, 3). By calculation, the coordinates of the sampling point when t = 0.1 are:

[0125] B(0.1)

[0126] =(1 - 0.1) 3 ×(10, 10, 2)+3×(1 - 0.1) 2 ×0.1×(12, 12, 3)+3×(1 - 0.1)×0.1 2 ×(14, 14, 4)+0.1 3 ×(16, 16, 3)

[0127] =(0.729×(10, 10, 2)+0.243×(12, 12, 3)+0.027×(14, 14, 4)+0.001×(16, 16, 3))

[0128] =(7.29 + 2.916 + 0.378 + 0.016, 7.29 + 2.916 + 0.378 + 0.016, 1.458 + 0.729 + 0.108 + 0.003)

[0129] =(10.6, 10.6, 2.3)

[0130] For step S2042222, specifically, after obtaining the sampling points on each cubic Bézier curve, these sampling points are connected in sequence according to the order of the curve, thus forming a discrete path. This path approximately represents the overall curve shape composed of multiple cubic Bézier curves, that is, the sweeping orbit of the camera moving in the game scene. When the camera is moving, it will move successively according to these connected sampling points, so as to achieve shooting along the orbit we expect.

[0131] For example, the sampling point sequence of C 1 is S 1 ={P 01 , (10.6, 10.6, 2.3), …, P 31}, the sampling point sequence of C 2 is S 2 ={P 02 , …, P 32}, the sampling point sequence of C 3 is S 3 ={P 03 , …, P 33}, connecting them to obtain the point sequence S of the camera sweeping orbit S = S 1 + S 2 + S 3 , thereby realizing the movement of the camera.

[0132] It should be noted that this embodiment can also be an improvement based on the first embodiment.

[0133] It is not difficult to find that in the embodiments of the present application, by repackaging the control points and summarizing them into three groups of orbit parameters. The expression form can be: Orbit[3]{{height data 1, radius data 1}, {height data 2, radius data 2}, {height data 3, radius data 3}}. With three groups of orbit parameters, designers can easily complete parameter configuration without manually configuring a series of control points one by one, which can greatly simplify the operation process.

[0134] The fourth embodiment

[0135] The fourth embodiment of the present application relates to a control method for a game camera. The fourth embodiment is an improvement based on the second embodiment. The specific improvement lies in: in this embodiment, a specific implementation manner of controlling the game camera to move along the camera sweep orbit according to the target data is provided.

[0136] Specifically, in some embodiments, the controlling the game camera to move along the camera sweep orbit according to the target data, that is, step S102 may include:

[0137] Step S1021A, determining a current camera position follow point and a current camera orientation follow point according to the target data;

[0138] Step S1022A, reconstructing a camera sweep orbit plane according to the current camera position follow point;

[0139] Step S1023A, determining the position information of the game camera according to the reconstructed camera sweep orbit plane;

[0140] Step S1024A, determining the rotation angle of the game camera according to the position information of the game camera and the current camera orientation follow point to realize the adjustment of the operating parameters of the game camera.

[0141] Step S1025A, controlling the game camera to move along the camera sweep orbit according to the rotation angle of the game camera.

[0142] For step S1021A, by way of example, assume that the target data includes the current position information of the player character and the position information of a target object (such as a monster) selected by the player in the game. The position of the player character is (10, 10, 2), and this position is determined as the current camera position follow point. And the position of the monster selected by the player is (15, 15, 3), then this position is determined as the current camera orientation follow point.

[0143] Regarding step S1022A, the camera sweeping orbit plane is the plane where the camera's movement trajectory lies. Based on the current camera position following point, the plane reference point and the plane normal vector can be re-determined, thereby constructing a camera sweeping orbit plane that conforms to the current situation. This can ensure that the camera's movement orbit maintains a reasonable spatial relationship with the object that the camera needs to follow. Taking the current camera position following point (10, 10, 2) as an example, the point in contact with the ground directly below this point, such as (10, 10, 0), can be determined as the plane reference point. Then, combining the current camera orientation following point (15, 15, 3), calculate the vector v from the camera position following point to the camera orientation following point: v = (15 - 10, 15 - 10, 3 - 2) = (5, 5, 1). Then, using the known direction vector in the game scene (such as the gravity direction vector (0, 0, -1)), obtain the plane normal vector n through vector cross product operation. Finally, according to the plane reference point and the plane normal vector, use the point-normal equation of the plane A(x - x0) + B(y - y0) + C(z - z0) = 0 (where (x0, y0, z0) is the plane reference point and (A, B, C) is the plane normal vector) to determine the equation of the camera sweeping orbit plane and complete the reconstruction of the plane.

[0144] Regarding step S1023A, after determining the camera sweeping orbit plane, combining other relevant information (such as preset camera movement rules, orbit parameters, etc.), the specific position of the camera can be determined on this plane. The position information of the camera is crucial for providing a suitable game perspective and can determine the range and content of the game scene that the player can see. Assume that the camera sweeping orbit plane has been determined, and according to the game design, the camera needs to move on this plane centered on the current camera position following point at a certain distance. For example, set the distance between the camera and the current camera position following point to 5 units and in a specific direction on the plane (such as having a certain angle with the direction of the camera orientation following point). Through calculation and adjustment, determine the position coordinates of the camera on this plane, such as (13, 13, 2), which is the determined position information of the game camera.

[0145] Regarding step S1024A, the rotation angle of the camera determines the orientation of the camera. By using the known game camera position information and the current camera orientation following point, the angle by which the camera needs to rotate can be calculated, enabling the camera to accurately face the target point. This ensures that players can clearly see the target object in the game, enhancing the game experience and operability. Exemplarily, the known game camera position is (13, 13, 2), and the current camera orientation following point is (15, 15, 3). Calculate the vector u pointing from the camera position to the camera orientation following point as u = (15 - 13, 15 - 13, 3 - 2) = (2, 2, 1). According to vector operations and relevant mathematical models of camera rotation (such as using quaternions, Euler angles, etc. to represent rotation), calculate the angle by which the camera needs to rotate so that the orientation of the camera is consistent with the direction of vector u. For example, by calculation, it is obtained that the camera needs to rotate a certain angle (assumed to be 45 degrees) in the horizontal direction and also a certain angle (assumed to be 15 degrees) in the vertical direction, thereby determining the rotation angle of the game camera and completing the adjustment of the game camera operation parameters (position and rotation angle).

[0146] Regarding step S1025A, exemplarily, when controlling the game camera to move along the camera sweep track, the camera orientation following point can be independently adjusted according to the rotation angle.

[0147] It should be noted that this embodiment can also be an improvement based on the second embodiment and / or the third embodiment.

[0148] It is not difficult to find that in the embodiments of the present application, a specific implementation manner for controlling the game camera to move along the camera sweep track according to the target data is provided.

[0149] Fifth Embodiment

[0150] The fifth embodiment of the present application relates to a method for controlling a game camera. The fifth embodiment is an improvement based on the first embodiment. The specific improvement lies in that in this embodiment, another specific implementation manner for controlling the game camera to move along the camera sweep track according to the target data is provided.

[0151] Specifically, the controlling the game camera to move along the camera sweep track according to the target data, that is, step S102 may include: step S1021B, controlling the game camera to move along the camera sweep track according to the trigger condition and the target data; wherein, the trigger condition includes at least event trigger and / or environment trigger.

[0152] Specifically, in this embodiment, the ways for the camera in the game to interact with the logic may include but are not limited to: event trigger and / or environment trigger.

[0153] Among them, event triggering is based on the occurrence of specific events in the game to drive the camera to make corresponding adjustments to enhance the expressiveness of the game and the player's sense of immersion. It can capture key nodes in the game process and fully demonstrate the importance and drama of these moments through the specific performance of the camera. When a specific event occurs, the camera can respond quickly to bring a unique visual experience to the player. For example, when a specific event such as a player releasing a big move occurs, the camera automatically triggers a close-up performance, focusing on the moment when the big move is released, and clearly presents the effect and power of the skill to the player, bringing a more shocking visual experience; or in a specific plot, the camera quickly switches from a free perspective to a 2D camera perspective to create a unique game atmosphere. For example, using a 2D perspective in recalling plots and dialogue scenes can make players feel as if they are in a comic or movie, enhancing the appeal of the story.

[0154] Among them, environmental triggering refers to the adaptive adjustment of the camera based on the real-time changes of the game environment to ensure the rationality and realism of the game screen. The game scene is a complex and dynamic environment. The camera needs to be able to perceive and adapt to these changes to avoid illogical situations or situations that affect the visual experience. For example, when the camera detects a collision with the game scene, it automatically and dynamically adjusts the camera position to avoid penetrating walls and models, making the game screen more natural and realistic. For example, when the camera follows the player character in a narrow passage, if it is about to collide with the wall, the camera can automatically pull back or adjust the angle to ensure that the player can always see a complete and reasonable game scene without the phenomenon of screen goofs.

[0155] For example, in the case of event triggering, assuming that in the game, the attack action performed by the character controlled by the player is an event triggering condition. The target data may include information such as the character's current position, direction, and target of attack. When the character's attack action is triggered (event triggering), the game camera is controlled to move along the camera sweep track according to these target data.

[0156] Specifically, the camera may zoom in to more clearly show the character's attack action and attack target. The camera is originally far away from the character, with the position information being (10,10,5), and the rotation angle allows the camera to observe the character from a certain angle. When the attack action is triggered, the camera position is adjusted to (9,9,3) according to the character's position (8,8,2) in the target data, and the rotation angle is also adjusted accordingly, so that the camera is more directly aimed at the character and the attack target, so that the player can see the details of the attack more clearly. In this way, through event triggering and combining target data, the game camera is controlled to move along the camera sweep track.

[0157] For an environment-triggered situation, for example, when a character enters a narrow cave scene from an open outdoor scene, this is the environment-triggered condition. The target data will include information on the character's position change and relevant attributes of the cave scene (such as lighting, space size, etc.).

[0158] When it is detected that the character enters the cave (environment-triggered), according to the target data, the operating parameters of the game camera will be adjusted. The field of view of the camera may be narrowed to adapt to the narrow cave space and avoid showing too much unnecessary blank area. Originally, the field of view of the camera was relatively large, with a horizontal viewing angle of 90 degrees and a vertical viewing angle of 70 degrees. After entering the cave, it is adjusted to a horizontal viewing angle of 70 degrees and a vertical viewing angle of 50 degrees. At the same time, the position and rotation angle of the camera may also be slightly adjusted to ensure that the player can better observe the environment inside the cave and the actions of the character. For example, the camera position is adjusted from (15, 15, 3) to (14, 14, 2.5), and the rotation angle makes the camera more focused on the cave passage ahead.

[0159] For a situation where an event and the environment are triggered simultaneously, for example, assume that the character triggers a hidden task in the cave (event-triggered), and at the same time due to environmental changes in a specific area inside the cave (such as the appearance of some glowing ores, environment-triggered). The said target data can include the position of the character, task-related information, and parameters of the environmental change, etc.

[0160] At this time, the operating parameters of the game camera will be comprehensively adjusted. The camera can first adjust its position to a place more suitable for observing the hidden task target, for example, from (14, 14, 2.5) to (13, 13, 2), and then rotate the angle to aim at the task target. At the same time, the field of view may be further fine-tuned to highlight the glowing ores and the task target, for example, the horizontal viewing angle is adjusted to 60 degrees and the vertical viewing angle is adjusted to 40 degrees. By combining event-triggered, environment-triggered, and target data, control the game camera to move along the camera sweep track.

[0161] It should be noted that this embodiment can also be an improvement based on any one or more of the second to fourth embodiments.

[0162] It is not difficult to find that in the embodiments of the present application, by adjusting the operating parameters of the game camera according to the trigger conditions (event-triggered and / or environment-triggered) and the target data, the performance of the camera can be made more in line with the actual needs of the game, bringing a better gaming experience to players.

[0163] Sixth Embodiment

[0164] The sixth embodiment of this application relates to a control method for a game camera. The sixth embodiment is an improvement based on the first embodiment. Specifically, the improvement lies in that: in this embodiment, another specific implementation manner of controlling the game camera to move along the camera sweeping track according to the target data is provided.

[0165] Specifically, the controlling the game camera to move along the camera sweeping track according to the target data, that is, step S102 may include:

[0166] Step S1021C, determining a pre-constructed visual processing mechanism based on the game camera; the visual processing mechanism is determined based on different lens services;

[0167] Step S1022C, controlling the game camera to move along the camera sweeping track according to the visual processing mechanism and the target data.

[0168] Specifically, in this embodiment, the algorithm core of a single camera is a pipeline with a fixed calculation process constructed according to different lens services, and this pipeline is the visual processing mechanism. Further, the controlling the game camera to move along the camera sweeping track according to the visual processing mechanism and the target data, that is, step S1022C may include:

[0169] Step S1022C1, determining a current camera position following point and a current camera orientation following point according to the target data;

[0170] Step S1022C2, reconstructing a camera sweeping track plane according to the current camera position following point;

[0171] Step S1022C3, determining the position information of the game camera according to the reconstructed camera sweeping track plane;

[0172] Step S1022C4, determining the rotation angle of the game camera according to the position information of the game camera and the current camera orientation following point;

[0173] Step S1022C5, controlling the game camera to move along the camera sweeping track according to the visual processing mechanism and the rotation angle.

[0174] Exemplarily, the visual processing mechanism may include but is not limited to: a camera initialization layer, a camera core calculation layer, and a camera post-processing layer. The following takes the game combat camera pipeline as an example for illustration:

[0175] In the camera initialization layer, it is possible to process initial camera data such as the data input by the player, the camera position following point, and the camera orientation following point, etc., preparing for the precise regulation of subsequent camera behaviors. After organizing these data, at the beginning stage of the game, the system can synchronously process the player input information, as well as the relevant data of the camera position following point and the camera orientation following point, providing the necessary initial parameters for the camera behavior, corresponding to step S1022C1 above.

[0176] In the camera core calculation layer, the operation of the orbit module can include the following three core steps: Reconstruct the swept orbit plane: The system can reconstruct the camera swept orbit plane based on the information of the camera position following point, providing a reference plane for the camera movement (corresponding to step S1022C2). Then, enter step S1022C3, that is, determine the camera position: According to the player input command and the camera swept orbit plane constructed in the first step, the system calculates and determines the specific position (Position) of the camera. Then enter step S1022C4, determine the camera rotation angle: After clarifying the camera position, the system calculates the rotation angle (Rotation) of the camera based on the camera position and the camera orientation following point. Furthermore, enter step S1022C5, and control the game camera to move along the camera swept orbit according to the visual processing mechanism and the rotation angle. The algorithm corresponding to the visual processing mechanism mainly describes obtaining new camera position, rotation, and field of view data, etc. by the camera executing fixed logic within a period of time.

[0177] Optionally, in some embodiments, the visual processing mechanism includes at least one of the following: camera stretching, camera shaking, camera field of view zooming, and camera obstacle avoidance.

[0178] Specifically, to enhance the important visual effects in the game experience, the visual processing mechanism in this embodiment can be specifically provided by at least four algorithm modules, and the four algorithm modules can be respectively a camera stretching module, a camera shaking module, a camera field of view zooming module, and a camera obstacle avoidance module.

[0179] Among them, camera stretching refers to changing the relative position relationship between the camera and the shooting object (such as the camera position following point), so as to achieve the stretching or zooming effect of the picture in space. By adjusting the position of the camera, players can observe the details of a specific scene or character more clearly, or create a fast-paced, exciting atmosphere. In game development, the camera stretching module is specifically used to implement the camera stretching function. Relevant personnel such as designers can trigger this module according to different game logics, such as in certain combat scenes, climax parts of the plot, etc. Taking the extreme blade parry scene as an example, after enabling the camera stretching module, the distance between the camera and the camera position following point is shortened, enabling players to see the fierce confrontation between the character and the monster at a closer distance, enhancing the impact and tension of the picture. At the same time, combined with narrowing the field of view, it can further focus on the key scene, highlight the main body, and make the players' attention more concentrated.

[0180] Among them, camera shake simulates the camera shaking effect caused by various external forces in the real world, bringing a more realistic and shocking feeling to players. In the game, camera shake can be used to represent scenes such as explosions, collisions, and intense battles, enhancing the immersion of the game. The camera shake module can calculate the shaking amplitude and frequency of the camera within a specific time period according to the preset logic, so as to make the camera produce corresponding shaking effects. This shaking effect can be a slight tremor or a violent shake, depending on the requirements of the game scene. For example, in an explosion scene, the camera can shake violently, making players feel as if they are experiencing the impact of the explosion firsthand; when a character is slightly attacked, the camera can shake slightly to remind the player that the character has been damaged.

[0181] Among them, camera field of view scaling refers to adjusting the field of view of the camera, that is, changing the size of the scene that the camera can see. By scaling the field of view, game developers can flexibly control the angle and range of players observing the game world, thus creating different visual effects and game atmospheres. The camera field of view scaling module can dynamically adjust the field of view of the camera according to the game logic. In some cases, narrowing the field of view can focus on a specific scene or character, highlight key information, and enhance the tension and focus of the picture; in other cases, expanding the field of view can allow players to see a wider game world, showing the grand scene and rich details of the game. For example, when exploring a large open world, expanding the field of view can enable players to better understand the surrounding environment; when performing precise aiming or observing details, narrowing the field of view can improve the operation accuracy of players.

[0182] Among them, camera obstacle avoidance means that when the camera moves in the game scene, it automatically detects and avoids obstacles to avoid the camera passing through walls, models, and other situations that affect the visual experience. In complex game scenes, the camera may encounter various obstacles, such as walls, buildings, trees, etc. If obstacle avoidance is not performed, unreasonable goofs will appear on the screen, destroying the realism and immersion of the game. The camera obstacle avoidance module monitors the position and surrounding environment of the camera in real time. When it detects that the camera is about to collide with an obstacle, it will automatically adjust the position and angle of the camera to bypass the obstacle. This ensures that players can always see a complete and reasonable game scene, making the game screen more natural and realistic. For example, when the camera follows the player character in a narrow passage, if there is a wall blocking the front, the camera obstacle avoidance module will automatically pull the camera away or adjust the angle to prevent the camera from passing through the wall.

[0183] In summary, relevant personnel can flexibly trigger and combine the above algorithm modules according to actual needs to create a rich variety of visual effects. Each algorithm module can set a specific logic, and can calculate the new position, rotation angle, field of view and other data of the camera within a period of time. The specific algorithms involved in the above algorithm modules can be implemented using existing technologies and are not the focus of this embodiment.

[0184] Experiments have shown that the camera movement effect of the technical solution in the related art is relatively bland and lacks visual impact. However, the technical solution provided by this embodiment can create a visual composition with performance effect by using the battle camera pipeline output. Under this composition, the tension of the action interaction between the character and the monster is fully highlighted, which can greatly enhance the expressiveness of the picture.

[0185] It should be noted that this embodiment may also be an improvement based on any one or more of the second to fifth embodiments.

[0186] It can be understood that in the relevant technology, the design of game cameras plays a pivotal role in game development. Compared with the common game camera modeling, the stylized camera movement design is much more complex and large. In the embodiment of the present application, in order to bring players a smoother, more immersive, and more expressive gaming experience, developers and other relevant personnel can perform data abstraction on the visual composition in the game, design algorithms for different business camera types, and thus obtain different visual processing mechanisms, which is conducive to greatly improving the quality and expressiveness of the game camera.

[0187] Seventh embodiment

[0188] The seventh embodiment of this application relates to a control method for a game camera. The seventh embodiment is an improvement based on the sixth embodiment. Specifically, the improvement lies in that in this embodiment, an organization and scheduling scheme for the camera is provided.

[0189] Specifically, in some embodiments, the method may further include the following steps:

[0190] Step S301, determine a tree structure according to multiple game cameras; wherein, each leaf node corresponds to a different visual processing mechanism;

[0191] Step S302, implement the conversion between different visual processing mechanisms according to the tree structure.

[0192] Exemplarily, as Figure 3 shown, the above steps are specifically executed by the camera organization scheduler in the camera system. It includes camera pipeline A (visual processing mechanism A) corresponding to the combat camera, camera pipeline B (visual processing mechanism B) corresponding to the corresponding camera, camera pipeline C (visual processing mechanism C) corresponding to the close-up camera, camera pipeline D (visual processing mechanism D) corresponding to the settlement camera, and camera pipeline E (visual processing mechanism E) corresponding to the fixed camera.

[0193] Specifically, the purpose of this embodiment is to provide the organization and scheduling of the camera, specifically referring to constructing all the cameras that serve a single business in the game into a tree structure. In this structure, each leaf node represents one of the above-mentioned camera lenses, and the internal nodes are developed and designed according to different functions.

[0194] When a specific event occurs in the game and camera switching and scheduling are required, the system can use a smoothing algorithm to perform transitional processing on the camera data. Taking the switch from the combat camera to the dialogue camera as an example, the visual processing mechanisms of the combat camera and the dialogue camera will output specific camera position, rotation angle, and field of view range data. At this time, the scheduler can select smoothing algorithms such as hard cut, linear, spherical, and cylindrical according to business requirements to perform transitional processing on the two sets of camera data to ensure natural and smooth camera switching.

[0195] It should be noted that this embodiment can also be an improvement based on any one or more of the first to fifth embodiments.

[0196] It can be understood that in the related art, the design of game cameras plays a crucial role in game development. Compared with the common game camera modeling, the stylized camera movement design is much more complex and huge. In the embodiments of this application, in order to bring a more smooth, immersive, and expressive game experience to players, developers and other relevant personnel can greatly improve the quality and expressiveness of game cameras by properly organizing and managing different camera lenses.

[0197] Moreover, action game players often criticize the lack of game lens language, poor immersion, and insufficient sense of impact. In this application, the above problems are solved by the single lens algorithm of the sixth embodiment and the multi-lens scheduling organization designed in this embodiment. The single lens algorithm is responsible for controlling the movement and behavior of a single camera, and the multi-lens scheduling organization is responsible for switching and coordinating between multiple cameras. These two technologies work together to help games achieve more complex narrative expressions and create more impactful visual effects.

[0198] Based on the above embodiments, it can be seen that in this application, the design and implementation of the camera system in the game is divided into three parts. It includes camera data modeling, camera algorithms within a single lens, and lens organization that meets the needs of massive lenses in the game. Compared with the traditional camera data model, this application can introduce a parametric surface track camera data model based on Bezier splines at the modeling level. This model effectively reduces the jump and jitter problems during camera movement by optimizing the data structure, making the picture more stable. At the algorithm and lens organization level, on the one hand, a modular algorithm is designed for a single camera; on the other hand, multiple lenses are reasonably organized and scheduled. This can simulate the commonly used camera techniques in movies, such as pushing, pulling, shaking, moving, surrounding, zooming, close-ups, etc., to create a smooth and natural film-level gaming experience for players.

[0199] It can be seen that the present application has at least the following beneficial effects:

[0200] 1) Make the camera movement as smooth as possible.

[0201] 2) Under the premise of continuous change of camera parameters, the continuity of first order and above is guaranteed.

[0202] 3) Avoid camera smoothness issues due to collisions as much as possible.

[0203] 4) Try to present a personalized camera close-up effect as much as possible.

[0204] 5) Allow players to customize the composition of each perspective during free operation.

[0205] 6) Allows players to add camera effects in high-speed battles. The above methods are divided into steps for the sake of clarity. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications or introducing insignificant designs to the algorithm or process, but not changing the core design of the algorithm and process, are all within the scope of protection of this application.

[0206] In addition, some embodiments of the present application further provide an electronic device. The electronic device may be various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and so on. The electronic device may also be various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices.

[0207] The electronic device includes: one or more processors; and a memory storing computer program instructions, which when executed cause the processors to perform the steps of the method provided in any one or more of the above embodiments. Figure 4 An exemplary structural diagram of the electronic device is disclosed. As Figure 4 shown, the electronic device includes: one or more processors 1101, a memory 1102, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component is interconnected using different buses and may be mounted on a common motherboard or otherwise as needed. The processor can process instructions executed within the electronic device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some other embodiments, if necessary, multiple processors and / or multiple buses may be used together with multiple memories and multiple memories. Similarly, multiple electronic devices may be connected, with each device providing some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Among them, the components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.

[0208] The electronic device may further include: an input device 1103 and an output device 1104. The processor 1101, the memory 1102, the input device 1103, and the output device 1104 may be connected via a bus or other means, Figure 4 taking connection via a bus as an example.

[0209] The input device 1103 can receive input digital or character information and generate key signal inputs related to the user settings and function controls of the electronic device. Examples of input devices include touchscreens, keypads, mice, trackpads, touchpads, pointing sticks, one or more mouse buttons, trackballs, joysticks, etc. The output device 1104 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), etc. The display device may include, but is not limited to, liquid crystal displays (LCDs), light-emitting diode (LED) displays, and plasma displays. In some embodiments, the display device may be a touchscreen.

[0210] To provide interaction with the user, the electronic device may be a computer. The computer has: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide inputs to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback); and inputs from the user can be received in any form (including sound input, voice input, or haptic input).

[0211] In the embodiments of the present application, computer programs / instructions are stored on a computer-readable medium. When the computer programs / instructions are executed by a processor, the steps of the methods provided in any one or more of the above embodiments are implemented. The computer-readable medium may be included in the electronic device described in the above embodiments; or it may exist separately without being assembled into the device. The above computer-readable medium carries one or more computer-readable instructions.

[0212] The memory 1102 can be used as a non-transitory computer-readable storage medium for storing non-transitory software programs, non-transitory computer-executable programs, and modules. By running the non-transitory software programs, instructions, and modules stored in the memory 1102, the processor 1101 executes various functional applications and data processing of the server to implement the program instructions / modules corresponding to the methods provided in any one or more of the above embodiments of the present application.

[0213] The memory 1102 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the electronic device and the like. In addition, the memory 1102 may include a high-speed random access memory and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 1102 may optionally include a memory remotely disposed relative to the processor 1101, and these remote memories may be connected to the electronic device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0214] It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, the computer-readable medium may be any tangible medium that contains or stores a program, and this program may be used by or in combination with an instruction execution system, apparatus, or device.

[0215] The computer-readable medium includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information may be computer-readable instructions, data structures, program modules, or other data. Examples of the computer's storage medium include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette tapes, magnetic disk storage, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0216] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0217] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. For example, an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device can be used. In some embodiments, the software program of this application can be executed by a processor to implement the above steps or functions. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive, or a floppy disk and similar devices. In addition, some steps or functions of this application can be implemented by hardware, for example, as a circuit that cooperates with a processor to execute each step or function.

[0218] The computer program product provided by the embodiments of this application includes one or more computer programs / instructions. When the computer programs / instructions are executed by a processor, they wholly or partly generate the processes or functions described in the embodiments of this application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, fiber optic, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)), etc.

[0219] The flowcharts or block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of devices, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0220] The scope of the present application is defined by the appended claims rather than the above description. Therefore, all changes that fall within the meaning and scope of the equivalent elements of the claims are intended to be included in the present application. Any reference numerals in the claims should not be construed as limiting the claims involved. In addition, it is obvious that the term "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the apparatus claims may also be implemented by one unit or device through software or hardware. The terms "first", "second", etc. are only used for descriptive distinction and do not represent any specific order, nor can they be construed as indicating or implying relative importance.

[0221] As described above, these are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.

Claims

1. A method for controlling a game camera, characterized in that: The method comprises: Determine target data of the game camera; the target data at least includes: a camera sweep trajectory, a camera position follow point, and a camera orientation follow point; According to the target data, the game camera is controlled to move along the camera sweep track; wherein, when the game camera is controlled to move along the camera sweep track, the camera direction can be independently adjusted to a following point.

2. The method according to claim 1, characterized in that The camera sweep trajectory is specifically obtained based on a three-dimensional Bezier curve.

3. The method according to claim 1, characterized in that The method for determining the camera sweep trajectory includes: Determine a plane reference point according to the camera position following point; Determining a plane normal vector according to the camera orientation following point and the camera position following point; Determining a sweep track plane according to the plane reference point and the plane normal vector; The camera sweep trajectory is determined according to the sweep trajectory plane.

4. The method according to claim 3, characterized in that Determining the camera sweep trajectory according to the sweep trajectory plane comprises: Determine at least four control points according to the sweep track plane; the positions of the control points are determined based on the coordinates of the camera position following point and the camera orientation following point; The camera sweep trajectory is determined according to the control points.

5. The method according to claim 4, characterized in that Determining the camera sweep trajectory according to the control point comprises: According to the control point, at least three sets of track parameters are determined; the track parameters are composed of height data and radius data; wherein the height data is used to characterize the vertical offset of the control point of each track in the three sets of tracks relative to the camera position following point; the radius data is used to characterize the distance of the control point relative to the camera position following point on the horizontal plane; The camera sweep trajectory is determined according to the trajectory parameters.

6. The method according to claim 5, characterized in that Determining the camera sweep trajectory according to the trajectory parameters comprises: Determine a plurality of third-order Bezier curves according to the track parameters to ensure that adjacent curve segments meet the first-order or second-order continuity requirements at the connection points; The camera sweep trajectory is determined according to the multiple segments of third-order Bezier curves.

7. The method according to claim 1, wherein controlling the game camera to move along the camera sweep track according to the target data comprises: Determine a current camera position following point and a current camera orientation following point according to the target data; Reconstructing the camera sweep track plane according to the current camera position following point; Determining the position information of the game camera according to the reconstructed camera sweep track plane; Determine the rotation angle of the game camera according to the position information of the game camera and the current camera direction following point; According to the rotation angle of the game camera, the game camera is controlled to move along the camera sweep track.

8. The method according to any one of claims 1 to 7, characterized in that The controlling the game camera to move along the camera sweep track according to the target data comprises: According to the trigger condition and the target data, the game camera is controlled to move along the camera sweep track; wherein the trigger condition at least includes event triggering and / or environment triggering.

9. The method according to claim 1, characterized in that: The controlling the game camera to move along the camera sweep track according to the target data comprises: Determining a pre-built visual processing mechanism based on the game camera; the visual processing mechanism is determined based on different lens services; According to the visual processing mechanism and the target data, the game camera is controlled to move along the camera sweep trajectory.

10. The method according to claim 9, characterized in that The controlling the game camera to move along the camera sweep track according to the visual processing mechanism and the target data comprises: Determine a current camera position following point and a current camera orientation following point according to the target data; Reconstructing the camera sweep track plane according to the current camera position following point; Determining the position information of the game camera according to the reconstructed camera sweep track plane; Determine the rotation angle of the game camera according to the position information of the game camera and the current camera direction following point; According to the visual processing mechanism and the rotation angle, the game camera is controlled to move along the camera sweep track.

11. The method according to claim 10, characterized in that The visual processing mechanism includes at least one of the following: camera stretching, camera shaking, camera field of view zooming and camera obstacle avoidance.

12. The method according to claim 9, characterized in that The method further comprises: Determine a tree structure according to the plurality of game cameras, wherein each leaf node corresponds to a different visual processing mechanism; According to the tree structure, conversion between different visual processing mechanisms is achieved.

13. An electronic device, characterized in that: The electronic device comprises: one or more processors; and A memory storing computer program instructions, which when executed cause the processor to perform the steps of the method as claimed in any one of claims 1 to 12.

14. A computer readable medium having a computer program / instructions stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.