Display control method, display control device, storage medium and electronic device
By adjusting the display perspective using rotation data from the terminal device and combining it with preset operation controls for virtual objects, the problem of users having difficulty adjusting the display perspective when controlling virtual objects is solved, resulting in a convenient operating experience and optimized interface layout.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-09-22
- Publication Date
- 2026-07-31
AI Technical Summary
Users often find it difficult to adjust the display view while controlling virtual objects, leading to confusion and a poor user experience.
The display perspective of the graphical user interface is adjusted by using rotation data from the terminal device, and virtual objects are controlled by preset operations to avoid confusion in operation recognition.
It enables convenient operation of simultaneously controlling virtual objects and adjusting the display perspective, reducing interface space usage, improving user experience, and avoiding operational confusion.
Smart Images

Figure CN117224952B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of human-computer interaction technology, and in particular to a display control method, a display control device, a computer-readable storage medium, and an electronic device. Background Technology
[0002] Virtual objects refer to virtual people or things in games and other programs. When users control virtual objects, they generally need to continuously operate with their fingers. This makes it difficult to adjust the display perspective at the same time, which may result in users not being able to observe the virtual objects from a suitable perspective during operation, thus adversely affecting the user's operation and experience. Summary of the Invention
[0003] This disclosure provides a display control method, display control device, computer-readable storage medium, and electronic device to at least partially solve the problem of difficulty in adjusting the display viewing angle when a user controls a virtual object.
[0004] According to a first aspect of this disclosure, a display control method is provided, which provides a graphical user interface (GUI) via a terminal device, the GUI displaying at least a portion of a virtual scene, the virtual scene including one or more virtual objects; the method includes: determining a controlled virtual object from the one or more virtual objects; controlling the controlled virtual object according to the preset operation in response to the preset operation on the controlled virtual object; and, in the case of determining the controlled virtual object, adjusting the display perspective of the GUI displaying the virtual scene according to rotation data of the terminal device in response to a rotation of the terminal device.
[0005] According to a second aspect of this disclosure, a display control device is provided, which provides a graphical user interface (GUI) via a terminal device. The GUI displays at least a portion of a virtual scene, the virtual scene including one or more virtual objects. The device includes: a controlled virtual object determination module configured to determine a controlled virtual object from the one or more virtual objects; a virtual object control module configured to control the controlled virtual object according to the preset operation in response to the controlled virtual object; and a display perspective adjustment module configured to, upon determining the controlled virtual object, adjust the display perspective of the GUI displaying the virtual scene according to rotation data of the terminal device in response to rotation of the terminal device.
[0006] According to a third aspect of this disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the display control method of the first aspect and its possible implementations.
[0007] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the display control method of the first aspect and possible implementations thereof by executing the executable instructions.
[0008] The technical solution disclosed herein has the following beneficial effects:
[0009] Given a controlled virtual object, users can control it through preset operations and simultaneously adjust the display perspective of the virtual scene in the graphical user interface by rotating the terminal device. Firstly, this provides a solution that balances controlling virtual objects and adjusting the display perspective, resolving the difficulty in adjusting the display perspective when controlling virtual objects in related technologies. Secondly, preset operations and rotating the terminal device are two different operation methods, preventing the program from misidentifying the two operations; that is, it will not recognize rotating the terminal device as controlling the virtual object, thus resolving the conflict and confusion in operation results when the two operations coexist. Thirdly, users can adjust the display perspective simply by rotating the terminal device, eliminating the need for finger operation, making it more convenient for users to control virtual objects and adjust the display perspective simultaneously, resulting in a better user experience. Fourthly, there is no need to set up operation controls or operation areas for adjusting the display perspective in the graphical user interface, reducing the footprint of the graphical user interface and leaving more space for displaying other operation controls or information, which is beneficial for improving the interface layout and reducing user error. Attached Figure Description
[0010] Figure 1 This diagram illustrates the game editing scene and scene component selection control in this exemplary embodiment;
[0011] Figure 2 A schematic diagram illustrating the perspective of setting up a game editing scene in this exemplary embodiment;
[0012] Figure 3A A schematic diagram showing the viewing angle in this exemplary embodiment;
[0013] Figure 3B A schematic diagram illustrating the game perspective in this exemplary embodiment is shown;
[0014] Figure 4 A flowchart of a display control method in this exemplary embodiment is shown;
[0015] Figure 5 A schematic diagram showing the terminal device and the terminal reference axis in this exemplary embodiment is shown;
[0016] Figure 6This diagram illustrates the controlled virtual object and the virtual object reference axis in this exemplary embodiment.
[0017] Figure 7 This example illustrates a flowchart of controlling the rotation of a virtual camera in this exemplary embodiment;
[0018] Figure 8 This diagram illustrates the adjustment of the display viewing angle in this exemplary embodiment.
[0019] Figure 9 This diagram illustrates the structure of a display control device according to this exemplary embodiment.
[0020] Figure 10 A schematic diagram of the structure of an electronic device in this exemplary embodiment is shown. Detailed Implementation
[0021] Exemplary embodiments of this disclosure will be described more fully below with reference to the accompanying drawings.
[0022] The accompanying drawings are schematic illustrations of this disclosure and are not necessarily drawn to scale. Some block diagrams shown in the drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in hardware modules or integrated circuits, or in networks, processors, or microcontrollers. Implementations can be carried out in various forms and should not be construed as limited to the examples set forth herein. The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough description of embodiments of this disclosure. However, those skilled in the art will recognize that one or more specific details may be omitted when implementing the technical solutions of this disclosure, or other methods, components, apparatuses, steps, etc., may be used to replace one or more specific details.
[0023] In games or other programs involving virtual objects, there is a problem where users have difficulty adjusting the display perspective when controlling virtual objects. Take a game editor as an example. A game editor is a tool used to edit game scenes. In a game editor, a user can select a virtual object and perform control operations such as moving and scaling it. This generally requires continuous finger input, such as dragging the touchscreen to move the virtual object. During this process, if the user simultaneously adjusts the display perspective, the program may interpret this as a control operation, leading to conflicting and confusing results. Alternatively, the user may need to use both hands to control the virtual object simultaneously, making it impossible to adjust the display perspective.
[0024] In view of the above problems, the exemplary embodiments of this disclosure provide a display control method so that users can conveniently adjust the display perspective when controlling virtual objects.
[0025] In this exemplary embodiment, a graphical user interface (GUI) is displayed via a terminal device. The terminal device can be a mobile phone, personal computer, tablet computer, smart wearable device, game console, etc., and has a display function capable of displaying a GUI. Furthermore, the terminal device can rotate and sense rotation data. For example, the terminal device can be a mobile device with built-in inertial sensors such as a gyroscope, capable of sensing the rotation of the terminal device and outputting rotation data. For instance, a gyroscope can sense the angular velocity of the terminal device during rotation, and the rotation angle can be calculated from the angular velocity. In one embodiment, the terminal device can consist of multiple components, and the component for displaying the GUI and the component capable of rotation can be different components. For example, the terminal device can include a display and an external controller; the display can show the GUI, and the controller can rotate and sense rotation data.
[0026] A graphical user interface (GUI) can include a screen showing the terminal device running an operating system or application, such as a desktop, system settings interface, or application interface. The GUI can display at least a portion of a virtual scene; it can display the entire virtual scene or only a portion of it. A virtual scene can be a game scene or a scene from simulation software (such as software used for design or animation). A virtual scene includes one or more virtual objects, which are people or objects within the virtual scene. These virtual objects can include controlled virtual objects, which are virtual objects currently controlled by the user.
[0027] The virtual scene displayed by the graphical user interface (GUI) is a virtual scene from a specific viewing angle. Users sometimes need to adjust the viewing angle to see information about the virtual scene or virtual objects from different directions or positions. In one implementation, the virtual scene can be a three-dimensional scene, and the virtual object can be a three-dimensional virtual object. The virtual scene displayed by the GUI is a two-dimensional projection of the three-dimensional scene onto the display plane; it cannot display the three-dimensional information of the virtual scene. Users need to adjust the viewing angle to see the virtual scene or virtual object from different perspectives to obtain three-dimensional information.
[0028] In one implementation, a virtual camera is set up in the virtual scene. The virtual camera is a tool used in games and other programs to simulate a real camera and capture images of the virtual scene. It can be placed anywhere in the virtual scene and capture images from any perspective; that is, the virtual camera can have any pose within the virtual scene. The graphical user interface displays the image captured by the virtual camera. By adjusting the pose of the virtual camera, the display perspective of the graphical user interface can be changed.
[0029] In one implementation, the virtual scene can be a game editing scene, the one or more virtual objects mentioned above can be one or more scene components in the game editing scene, and the controlled virtual object can be a component of the current editing scene.
[0030] The game editing scene is an editable game scene. When the terminal device runs the game program, the graphical user interface can display the game editing scene provided by the game program. This game program can be the main game program, which provides game scene editing functions (such as a game editor built into the game program). When the user uses this function, they can enter the game editing scene. Alternatively, the game program can also be a game scene editing program associated with the main game program, such as a game editor that can run independently without relying on the main game program. Users can choose to create a new game scene and edit it, or they can choose to edit an existing game scene, thus triggering entry into the game editing scene for editing operations.
[0031] Scene components refer to the elements (such as people, objects, or components that make up a person or object) that make up a game editing scene. Users can select a scene component to edit; this component becomes the currently edited scene component, and the graphical user interface typically displays a screen with the currently edited scene component as the primary focus. Of course, users can also switch to other scene components for editing, and can also edit the scene's background, etc. The final result is a game scene that can be used in the game.
[0032] The game program in this exemplary embodiment can support players to customize and edit game scenes. Therefore, the user in this article can refer to the game developers (such as artists) of the game company or the player.
[0033] In one implementation, reference Figure 1 As shown, the graphical user interface displays the game editing scene to be edited, along with multiple scene component selection controls. The game editing scene can include the scene background and pre-generated scene components. The scene component selection controls are used to manipulate pre-configured scene components within the game program; in response to operations on the scene component selection controls, corresponding scene components can be generated within the game editing scene. For example, Figure 1The interface displays scene component selection controls such as "block component," "cylinder component," and "semi-cylinder component." When users interact with these controls, corresponding block components, cylinder components, semi-cylinder components, etc., can be generated in the game editing scene. For example, users can drag the controls to a specific location in the game editing scene to trigger the generation of the corresponding scene component at that location.
[0034] Game programs can come with multiple different scene components, which can be pre-configured and stored in the game program by artists. Alternatively, players can pre-configure scene components, such as creating and storing scene components not originally present in the game program by modeling in the game's scene editing or other editing interfaces. When editing game scenes, scene component selection controls corresponding to these components can be displayed in the graphical user interface, allowing players to easily use these components for scene editing.
[0035] When pre-configuring scene components, one or more settings such as size, position, orientation, color, texture, and shape can be configured. This allows users to directly access these configured settings when using the scene components in the game's editing scene, making it very convenient and efficient. Of course, users can also adjust the configured settings within the scene components, such as modifying one or more of the aforementioned settings, to better suit their needs and preferences.
[0036] The game program can show or hide the scene component selection control in the graphical user interface through preset logic, or the user can show or hide the scene component selection control in the graphical user interface through specific operations. For example, when the user selects a scene component in the game's editing scene as the current editing object, the scene component selection control can be hidden; when the user does not select any scene component, the scene component selection control can be shown.
[0037] refer to Figure 2 As shown, the game editing scene can present two different perspectives: the observation perspective and the game perspective. The observation perspective refers to observing the game editing scene from a third-person point of view. Figure 3A As shown, from the observation perspective, users in the game editing scene can directly control a virtual camera (such as the first virtual camera) to move the viewpoint without controlling the game character. The game perspective refers to observing the game editing scene from a first-person viewpoint. Figure 3BAs shown, from a game perspective, a user can control a game character in the game editing scene. This game character can be bound to a virtual camera (such as a first virtual camera), meaning the positional relationship between the game character and the virtual camera is fixed. For example, the game character can be located at the focal point of the virtual camera. When the user moves the game character, the virtual camera moves synchronously, thereby changing the viewing angle. From either the observation or game perspective, the game editing scene can include virtual joysticks, up / down controls, etc., allowing the user to move the virtual camera or the game character by manipulating these controls. The display control method in this exemplary embodiment is applicable to both the observation and game perspectives within a game editing scene.
[0038] Figure 4 An exemplary flow of a display control method is shown, which may include the following steps S410 to S430:
[0039] Step S410: Determine the controlled virtual object from the above one or more virtual objects;
[0040] Step S420: In response to a preset operation for the controlled virtual object, control the controlled virtual object according to the preset operation;
[0041] In step S430, when the controlled virtual object is determined, in response to the rotation of the terminal device, the display perspective of the virtual scene displayed in the graphical user interface is adjusted according to the rotation data of the terminal device.
[0042] based on Figure 4 This method, given a defined controlled virtual object, allows users to control the virtual object through preset operations while simultaneously adjusting the display perspective of the virtual scene in the graphical user interface by rotating the terminal device. Firstly, it provides a solution that simultaneously controls the virtual object and adjusts the display perspective, solving the problem of difficulty in adjusting the display perspective when controlling the virtual object in related technologies. Secondly, preset operations and rotating the terminal device are two different operation methods, preventing the program from misidentifying the two operations; that is, it will not recognize the operation of rotating the terminal device as an operation of controlling the virtual object, thus solving the problem of conflicting and confusing operation results when the two operations coexist. Thirdly, users can adjust the display perspective simply by rotating the terminal device, without using their fingers, making it more convenient for users to control the virtual object and adjust the display perspective simultaneously, resulting in a better user experience. Fourthly, it eliminates the need to set up operation controls or operation areas for adjusting the display perspective in the graphical user interface, reducing the footprint of the graphical user interface and leaving more interface controls for displaying other operation controls or information, which is beneficial for improving the interface layout and reducing user error.
[0043] The following is about Figure 4Each step in the process will be explained in detail.
[0044] refer to Figure 4 In step S410, a controlled virtual object is determined from the one or more virtual objects mentioned above.
[0045] In this context, a controlled virtual object is a virtual object that the user currently controls. A virtual scene may include one or more virtual objects. If the user can only control a specific virtual object, that virtual object is defined as a controlled virtual object. If the user can control multiple virtual objects, the controlled virtual object can be selected from those that the user can control. For example, the user can select a virtual object as a controlled virtual object through click, double-click, or other selection operations.
[0046] For example, in a game editing scene, virtual objects are scene components. All scene components can be controlled and edited by the user. The user can select the currently edited scene component from all scene components, which is the controlled virtual object.
[0047] In one implementation, the controlled virtual object can also be determined automatically by the program. For example, when a user switches controlled virtual objects while already controlling one, the program can automatically select another virtual object as the controlled virtual object, such as the virtual object closest to the currently controlled virtual object. Alternatively, when a user enters a virtual scene, a virtual object can be randomly selected as the controlled virtual object.
[0048] In one implementation, the controlled virtual object can be displayed differently to distinguish it from other virtual objects. For example, once a controlled virtual object is identified, its color can be changed, a brightly colored outline can be added, or a specific marker (such as an arrow pointing to the controlled virtual object) can be displayed. This allows the user to clearly see which virtual object is currently being controlled.
[0049] Continue to refer to Figure 4 In step S420, in response to a preset operation for the controlled virtual object, the controlled virtual object is controlled according to the preset operation.
[0050] The preset operations are used to control the controlled virtual object. This disclosure does not limit the operation method of the preset operations. For example, preset operations may include, but are not limited to, the following: touch operations applied to the controlled virtual object, such as dragging the controlled virtual object to move or rotate it, or using two fingers to separate or join to zoom the controlled virtual object; operations applied to virtual controls, such as using a virtual joystick to control the movement or direction of the controlled virtual object, using a jump control to control the controlled virtual object to jump, or using a skill control to control the controlled virtual object to cast a skill; operations applied to physical controls, such as using gamepad buttons to control the operation of the controlled virtual object; and gesture operations, such as a user making a specific gesture in front of the terminal device's camera, mapping the gesture to instructions in the program to control the controlled virtual object to perform corresponding actions.
[0051] Upon receiving a preset operation, the controlled virtual object can be controlled according to the operation method and parameters of the preset operation. For example, the controlled virtual object can be controlled to perform specific behaviors, or the attributes of the controlled virtual object can be adjusted.
[0052] In one implementation, the controlled virtual object is a component of the current editing scene in the game editing scene. The control of the controlled virtual object according to the preset operation may include the following steps:
[0053] Edit at least one of the following information of the current editing scene component according to the preset operation: size, position, orientation, color, texture, and shape.
[0054] For example, users can zoom in and out of the currently edited scene component by spreading or pinching two fingers to change its size; they can drag the component to move its position; they can slide along a specific rotation path to change its direction; and they can select a different color, texture, or shape for the component within the game's editing interface to alter its appearance. This allows users to flexibly edit and optimize the currently edited scene component to meet their needs or preferences.
[0055] Continue to refer to Figure 4 In step S430, when the controlled virtual object is determined, in response to the rotation of the terminal device, the display perspective of the virtual scene displayed in the graphical user interface is adjusted according to the rotation data of the terminal device.
[0056] Rotation of the terminal device can refer to a change in the tilt angle of the terminal device. Once a controlled virtual object is identified, the user needs to perform preset operations with their fingers to control it. Simultaneously, the user can adjust the display perspective of the virtual scene in the graphical user interface by rotating the terminal device, allowing them to observe the controlled virtual object or scene from different angles.
[0057] The rotation data of the terminal device may include: the angular velocity or angular acceleration of the terminal device, or the rotation angle calculated from the angular velocity or angular acceleration, etc.
[0058] In one implementation, the terminal device has a coordinate system, which can be a reference coordinate system based on itself, such as a gyroscope coordinate system determined by a gyroscope built into the terminal device. The terminal device's coordinate system has multiple terminal reference axes. These reference axes are used to provide reference information in different directions, and may be the coordinate axes of the coordinate system. Figure 5 As shown, the coordinate system of the terminal device has three terminal reference axes: the X-axis, the Y-axis, and the Z-axis, where any two terminal reference axes can be perpendicular to each other. The terminal device can rotate around one or more terminal reference axes. The rotation of the terminal device can be broken down into individual terminal reference axes, so the rotation data of the terminal device can include the rotation angle of the terminal device around each terminal reference axis.
[0059] If the rotation data of the terminal device is obtained, the rotation data of the terminal device can be mapped to the rotation data of the display viewing angle, thereby adjusting the display viewing angle.
[0060] In one implementation, a virtual camera is provided in the virtual scene, and the graphical user interface displays the image of the virtual scene captured by the virtual camera. Adjusting the display perspective of the virtual scene in the graphical user interface based on the rotation data of the terminal device may include the following steps:
[0061] The virtual camera is controlled to rotate around the controlled virtual object based on the rotation data of the terminal device, so as to adjust the display perspective of the virtual scene displayed in the graphical user interface.
[0062] In this way, the rotation data of the terminal device can be mapped to the rotation data of the virtual camera, thereby controlling the rotation of the virtual camera. This changes the shooting angle of the virtual camera, which in turn changes the display angle of the virtual scene displayed by the graphical user interface.
[0063] Rotation around a controlled virtual object refers to rotation around an axis of rotation that passes through the controlled virtual object. This axis can pass through the center point of the controlled virtual object or other points on the object (such as corners). During rotation, the virtual camera maintains its field of view focused on the controlled virtual object, ensuring that the controlled virtual object is the primary focus of the image. This prevents problems with chaotic viewing angles and avoids the image shifting away from the controlled virtual object due to changes in viewing angle.
[0064] In one implementation, the controlled virtual object may have a coordinate system, which can be a reference coordinate system based on itself. The coordinate system of the controlled virtual object has multiple virtual object reference axes. Figure 6 As shown, in the game editing scene 600, the controlled virtual object 610 is the current editing scene component. Its three coordinate axes can be used as reference axes for the virtual object, namely the X' axis, Y' axis, and Z' axis (to distinguish it from the terminal reference axes mentioned above, it is referred to here as X' axis, Y' axis, and Z' axis, rather than X' axis, Y' axis, and Z' axis), where any two virtual object reference axes are perpendicular to each other. The virtual camera can be controlled to rotate around one or more virtual object reference axes.
[0065] In one implementation, reference Figure 7 As shown, controlling the virtual camera to rotate around the controlled virtual object based on the rotation data of the terminal device may include the following steps S710 and S720:
[0066] Step S710: Determine the second rotation angle of the virtual camera based on the first rotation angle and rotation coefficient of the terminal device;
[0067] Step S720: Control the virtual camera to rotate around the controlled virtual object according to the second rotation angle.
[0068] To easily distinguish between the rotation angle of the terminal device and the rotation angle of the virtual camera, the rotation angle of the terminal device is referred to as the first rotation angle, and the rotation angle of the virtual camera is referred to as the second rotation angle. Generally, the first rotation angle and the second rotation angle are positively correlated; that is, the more the terminal device rotates, the more the virtual camera rotates. A mapping relationship can be established between the first rotation angle and the second rotation angle, with a rotation coefficient as the mapping parameter. The rotation coefficient can be determined empirically or based on the rotation state of the terminal device, the rotation state of the virtual camera, etc. In one embodiment, a linear mapping relationship can be established between the first rotation angle and the second rotation angle, with the rotation coefficient being a linear coefficient. For example, the second rotation angle can be obtained by multiplying the first rotation angle by the rotation coefficient.
[0069] With the second rotation angle determined, the virtual camera is controlled to rotate around the controlled virtual object by a corresponding angle, so that the degree of rotation of the virtual camera is adapted to the degree of rotation of the terminal device. The user has a strong sense of interactive feedback by rotating the terminal device to control and adjust the display view.
[0070] In one embodiment, the display control method may further include the following steps:
[0071] The rotation angle of the terminal device when determining the controlled virtual object is used as the reference angle;
[0072] After identifying the controlled virtual object, the relative rotation angle of the terminal device with respect to the reference angle is obtained as the first rotation angle.
[0073] For example, when a user selects a controlled virtual object, the rotation angle of the terminal device at that moment is used as a reference angle, denoted as P0. Subsequently, during the user's control of the controlled virtual object, the rotation angle of the terminal device can be obtained in real time. This rotation angle can be an absolute angle, denoted as P... ABS Calculate the relative rotation angle ΔP1 = P relative to the reference angle. ABS -P0, as the first rotation angle mentioned above.
[0074] Therefore, the second rotation angle is determined based on the relative rotation angle of the terminal device after the controlled virtual object is determined. For example, the relative rotation angle can be multiplied by a rotation coefficient to obtain the second rotation angle. In this way, the user can adjust the display viewing angle by rotating the terminal device from any starting position, making rotation control more free and flexible.
[0075] In one embodiment, the display control method may further include the following steps:
[0076] The rotation coefficient is determined based on the reference angle, and the rotation coefficient is positively correlated with the reference angle.
[0077] When the reference angle is large, it indicates that the terminal device is already tilted at a significant angle. To adjust the viewing angle, the user would need to rotate the terminal device further, potentially leading to an excessively large tilt and a significant difference in angle from eye level, making it difficult to view the screen or perform normal operations. Therefore, a rotation coefficient is set that is positively correlated with the reference angle; the larger the reference angle, the larger the rotation coefficient. For the same initial rotation angle, the calculated second rotation angle will be larger. This way, to rotate the virtual camera to the desired angle, the user doesn't need to control a large initial rotation angle; only a small rotation of the terminal device is required to adjust the viewing angle.
[0078] A positive correlation between the reference angle and the rotation coefficient can be established in advance, such as by setting a linear coefficient greater than 0 to establish a linear positive correlation. Based on this positive correlation, the rotation coefficient can be calculated when the reference angle is determined. Furthermore, after obtaining the first rotation angle, the second rotation angle can be calculated based on the first rotation angle and the rotation coefficient.
[0079] For example, the calculation of the second rotation angle can refer to the following formula:
[0080] ΔP2=k1·ΔP1=(1+k2·|P0|)·(P ABS -P0) (1)
[0081] Where ΔP1 is the first rotation angle, ΔP2 is the second rotation angle, k1 is the rotation coefficient, and k2 is the linear coefficient between the reference angle and the rotation coefficient. For example, if P0 is -20 degrees and k2 is 0.01, then k1 is calculated to be 1.2. Thus, the second rotation angle is 1.2 times the first rotation angle, meaning that when rotating the terminal device, the virtual camera can be controlled to rotate at 1.2 times the angle, resulting in a larger rotation range for the virtual camera.
[0082] In one implementation, the coordinate system of the terminal device has multiple terminal reference axes, and the coordinate system of the controlled virtual object has multiple virtual object reference axes. The terminal reference axes and virtual object reference axes correspond one-to-one, and this correspondence can be pre-configured. For example, refer to the above... Figure 5 and Figure 6 As shown, the X-axis corresponds to the X'-axis, the Y-axis corresponds to the Y'-axis, and the Z-axis corresponds to the Z'-axis. Determining the second rotation angle of the virtual camera based on the first rotation angle and rotation coefficient of the terminal device can include the following steps:
[0083] Based on the first rotation angle of the terminal device around a terminal reference axis and the rotation coefficient, determine the second rotation angle of the virtual camera around the virtual object reference axis corresponding to the terminal reference axis.
[0084] The rotation of a terminal device can be considered as the superposition of its rotations around different terminal reference axes. Therefore, the rotation of the terminal device can be decomposed into rotations around different terminal reference axes, and the first rotation angle of the terminal device around each terminal reference axis can be obtained. Similarly, the rotation of the virtual camera can be decomposed into rotations around different virtual object reference axes. Based on the first rotation angle of the terminal device around each terminal reference axis, the second rotation angle of the virtual camera around each virtual object reference axis is calculated. The final rotation of the virtual camera can be considered as the superposition of its rotations around different virtual object reference axes.
[0085] refer to Figure 8As shown, the graphical user interface 600 displays the controlled virtual object 610. If the terminal device rotates around its Z-axis, the second rotation angle of the virtual camera around the Z' axis can be calculated based on the first rotation angle around the Z-axis. Furthermore, the virtual camera can be controlled to rotate around the Z' axis by the corresponding angle, i.e., along the rotation trajectory shown in the figure. After rotation, the display perspective changes accordingly, allowing the user to observe the controlled virtual object 610 and other surrounding virtual objects, local virtual scenes, etc., from different perspectives, such as more clearly seeing the positional relationship between the controlled virtual object 610 and other virtual objects.
[0086] In one implementation, the virtual camera can be controlled to rotate around the corresponding virtual object reference axis whenever the terminal device rotates around any terminal reference axis. For example, in Figure 8 In this scenario, if the terminal device rotates not only around its Z-axis but also around its X-axis and Y-axis, then the second rotation angle of the virtual camera around the X'-axis can be calculated based on the first rotation angle of the terminal device around the X-axis, and the second rotation angle of the virtual camera around the Y'-axis can be calculated based on the first rotation angle of the terminal device around the Y-axis. Furthermore, the virtual camera can be controlled to rotate around the X', Y', and Z'-axis by the corresponding angles, ultimately creating a superimposed effect of the three rotations.
[0087] In one implementation, the terminal device can be configured to rotate around a specific terminal reference axis in order to control the virtual camera to rotate around the corresponding virtual object reference axis. For example, the terminal device can be configured to control the virtual camera to rotate around the X' and Z' axes when rotating around its X or Z axis, but have no effect on the virtual camera when rotating around its Y axis. In other words, the terminal device can change the display viewing angle when rotating around its X or Z axis, but not when rotating around its Y axis. This simplifies the complexity of rotation control to some extent.
[0088] In one implementation, the reference angle may include reference angles of the terminal device around different terminal reference axes, such as three angles corresponding to the X-axis, Y-axis, and Z-axis. Rotation coefficients can be calculated separately for each terminal reference axis, resulting in three rotation coefficients corresponding to the X-axis, Y-axis, and Z-axis; that is, the rotation coefficients can be different in different rotation directions. When calculating the second rotation angle, the second rotation angle corresponding to the X' axis can be calculated based on the first rotation angle and rotation coefficient corresponding to the X-axis; the second rotation angle corresponding to the Y' axis can be calculated based on the first rotation angle and rotation coefficient corresponding to the Y-axis; and the second rotation angle corresponding to the Z' axis can be calculated based on the first rotation angle and rotation coefficient corresponding to the Z-axis. This enables precise control over the rotation of the virtual camera and the adjustment of the display viewing angle.
[0089] In one embodiment, the display control method may further include the following steps:
[0090] The depth of field of the virtual camera is controlled based on the proportion of the controlled virtual object in the virtual scene display interface; the virtual scene display interface is the interface in the graphical user interface used to display the virtual scene.
[0091] The virtual scene display interface can occupy the entire graphical user interface (GUI) or only a portion of it. The proportion of the controlled virtual object within the virtual scene display interface refers to the percentage of the virtual camera's field of view that the controlled virtual object projects onto the camera's imaging plane. A larger proportion generally indicates a closer distance between the controlled virtual object and the virtual camera, or a larger size of the controlled virtual object.
[0092] The depth of field of a virtual camera refers to the range of distances in front of and behind an object that can be clearly imaged at the front edge of the lens; it is a range of distances in front of and behind a corner point. Depth of field typically includes foreground depth of field and background depth of field. When the distance between the controlled virtual object and the virtual camera is between the foreground depth of field and the background depth of field, the controlled virtual object can be clearly imaged on the imaging plane of the virtual camera.
[0093] During the adjustment of the display viewpoint, the virtual camera rotates, which may change the distance between the virtual camera and the controlled virtual object. In particular, if the virtual camera rotates around an axis of rotation that does not pass through the controlled virtual object (such as rotating around the coordinate axes of the virtual scene's world coordinate system), the distance between the virtual camera and the controlled virtual object will change. This may result in the controlled virtual object being outside the depth of field and unable to be clearly imaged.
[0094] Therefore, the depth of field of the virtual camera can be controlled based on the proportion of the controlled virtual object in the virtual scene display interface. Depth of field control can include two aspects: First, shifting the depth of field forward or backward as a whole. Generally, the larger the proportion of the controlled virtual object in the virtual scene display interface, the closer the controlled virtual object is to the virtual camera, and the depth of field can be shifted forward as a whole. Second, expanding or shrinking the depth of field. Generally, the larger the proportion of the controlled virtual object in the virtual scene display interface, the larger the controlled virtual object is, and the depth of field can be expanded to ensure a clear overall image. Of course, the two aspects of control can also be combined, such as shifting the depth of field forward as a whole while appropriately expanding the depth of field. By controlling the depth of field, the controlled virtual object can always be clearly presented in the virtual scene display interface, solving the problem of focusing depth of field confusion caused by adjusting the display perspective.
[0095] In one implementation, controlling the depth of field of the virtual camera based on the proportion of the controlled virtual object in the virtual scene display interface may include the following steps:
[0096] If the proportion of the controlled virtual object in the virtual scene display interface reaches the preset proportion, the target depth of field is determined according to the proportion of the controlled virtual object in the virtual scene display interface, and the depth of field of the virtual camera is adjusted to the target depth of field.
[0097] The preset ratio is a threshold used to measure the proportion of the controlled virtual object. It can be determined based on experience or specific needs; for example, the preset ratio could be 1 / 3. If the proportion of the controlled virtual object in the virtual scene display interface does not reach the preset ratio, it indicates that the controlled virtual object itself is small, or its distance from the virtual camera is appropriate, and the depth of field of the virtual camera does not need to be adjusted. If the proportion of the controlled virtual object in the virtual scene display interface reaches the preset ratio, it indicates that the controlled virtual object itself is large, or its distance from the virtual camera is too close, and the depth of field of the virtual camera needs to be adjusted. Generally, to ensure that the entire controlled virtual object is clearly imaged, the depth of field range can be appropriately expanded. For example, a positive correlation can be preset between the proportion of the controlled virtual object and the depth of field range (here, the depth of field range can refer to the span of the depth of field, i.e., the difference between the foreground and background depth of field). A linear coefficient greater than 0 can be set to establish a linear positive correlation. Through this positive correlation, the target depth of field can be calculated from the proportion of the controlled virtual object. The target depth of field can include the target depth of field range, or the target foreground depth of field and the target background depth of field.
[0098] In one implementation, the magnification factor for the depth of field can be determined based on the proportion of the controlled virtual object in the virtual scene display interface; the larger the proportion of the controlled virtual object, the greater the magnification factor. The current depth of field of the virtual camera is multiplied by this magnification factor to obtain the target depth of field. After obtaining the target depth of field, the center point of the current depth of field can be used as the center point of the target depth of field (i.e., the current depth of field is not shifted forward or backward, only the depth of field is magnified), or the center point of the current depth of field can be appropriately shifted forward and used as the center point of the target depth of field, thereby calculating the target foreground depth and the target background depth. Finally, the foreground depth of the virtual camera is adjusted to the target foreground depth, and the background depth is adjusted to the target background depth.
[0099] Based on the mechanism of determining and adjusting the target depth of field when the proportion of the controlled virtual object reaches a preset proportion, it can improve the problem that the controlled virtual object cannot be fully imaged due to its large size or its close proximity to the virtual camera, thereby improving the image quality of the virtual scene display interface.
[0100] Exemplary embodiments of this disclosure also provide a display control device that can provide a graphical user interface (GUI) via a terminal device. The GUI displays at least a portion of a virtual scene, which includes one or more virtual objects. (See reference...) Figure 9 As shown, the display control device 900 may include the following program modules:
[0101] Controlled virtual object determination module 910 is configured to determine a controlled virtual object from one or more virtual objects;
[0102] The virtual object control module 920 is configured to respond to a preset operation on the controlled virtual object and control the controlled virtual object according to the preset operation;
[0103] The display perspective adjustment module 930 is configured to adjust the display perspective of the virtual scene displayed in the graphical user interface in response to the rotation of the terminal device when a controlled virtual object is determined.
[0104] In one implementation, a virtual camera is provided in the virtual scene, and the graphical user interface displays the image of the virtual scene captured by the virtual camera. The aforementioned adjustment of the display angle of the virtual scene displayed in the graphical user interface based on the rotation data of the terminal device includes:
[0105] The virtual camera is controlled to rotate around the controlled virtual object based on the rotation data of the terminal device, so as to adjust the display perspective of the virtual scene displayed in the graphical user interface.
[0106] In one embodiment, controlling the virtual camera to rotate around the controlled virtual object based on rotation data from the terminal device includes:
[0107] The second rotation angle of the virtual camera is determined based on the first rotation angle and rotation coefficient of the terminal device.
[0108] Control the virtual camera to rotate around the controlled virtual object at the second rotation angle.
[0109] In one implementation, the display viewing angle adjustment module 930 is further configured to:
[0110] The rotation angle of the terminal device when determining the controlled virtual object is used as the reference angle;
[0111] After identifying the controlled virtual object, the relative rotation angle of the terminal device with respect to the reference angle is obtained as the first rotation angle.
[0112] In one implementation, the display viewing angle adjustment module 930 is further configured to:
[0113] The rotation coefficient is determined based on the reference angle, and the rotation coefficient is positively correlated with the reference angle.
[0114] In one implementation, the coordinate system of the terminal device has multiple terminal reference axes, and the coordinate system of the controlled virtual object has multiple virtual object reference axes, with each terminal reference axis corresponding to one of the virtual object reference axes. Determining the second rotation angle of the virtual camera based on the first rotation angle and rotation coefficient of the terminal device includes:
[0115] Based on the first rotation angle of the terminal device around a terminal reference axis and the rotation coefficient, determine the second rotation angle of the virtual camera around the virtual object reference axis corresponding to the terminal reference axis.
[0116] In one implementation, the display viewing angle adjustment module 930 is further configured to:
[0117] The depth of field of the virtual camera is controlled based on the proportion of the controlled virtual object in the virtual scene display interface; the virtual scene display interface is the interface in the graphical user interface used to display the virtual scene.
[0118] In one implementation, controlling the depth of field of the virtual camera based on the proportion of the controlled virtual object in the virtual scene display interface includes:
[0119] If the proportion of the controlled virtual object in the virtual scene display interface reaches the preset proportion, the target depth of field is determined according to the proportion of the controlled virtual object in the virtual scene display interface, and the depth of field of the virtual camera is adjusted to the target depth of field.
[0120] In one implementation, the virtual scene is a game editing scene, one or more virtual objects are one or more scene components in the game editing scene, and the controlled virtual object is the current editing scene component.
[0121] In one implementation, controlling the controlled virtual object according to a preset operation includes:
[0122] Edit at least one of the following information of the current editing scene component according to the preset operation: size, position, orientation, color, texture, and shape.
[0123] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0124] Exemplary embodiments of this disclosure also provide a computer-readable storage medium that can be implemented as a program product including program code, which, when run on an electronic device, causes the electronic device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. In an alternative embodiment, the program product can be implemented as a portable compact disc read-only memory (CD-ROM) including program code and can run on an electronic device, such as a personal computer. However, the program product of this disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0125] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0126] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0127] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0128] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0129] Exemplary embodiments of this disclosure also provide an electronic device, such as the terminal device described above. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as program code. The processor executes the executable instructions to perform the methods of this exemplary embodiment. Furthermore, the electronic device may also include a display for displaying a graphical user interface.
[0130] The following is for reference. Figure 10 The electronic device is illustrated by way of a general-purpose computing device. It should be understood that... Figure 10 The electronic device 1000 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0131] like Figure 10 As shown, the electronic device 1000 may include: a processor 1010, a memory 1020, a bus 1030, an I / O (input / output) interface 1040, a network adapter 1050, and a display 1060.
[0132] The memory 1020 may include volatile memory, such as RAM 1021 and cache unit 1022, and may also include non-volatile memory, such as ROM 1023. The memory 1020 may also include one or more program modules 1024, such program modules 1024 including, but not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program module 1024 may include the modules described above.
[0133] Bus 1030 is used to connect different components of electronic device 1000, and may include data bus, address bus and control bus.
[0134] Electronic device 1000 can communicate with one or more external devices 1100 (such as keyboard, mouse, external controller, etc.) through I / O interface 1040.
[0135] Electronic device 1000 can communicate with one or more networks via network adapter 1050. For example, network adapter 1050 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. Network adapter 1050 can communicate with other modules of electronic device 1000 via bus 1030.
[0136] Electronic device 1000 can display a graphical user interface, such as displaying a game editing scene, through monitor 1060.
[0137] although Figure 10 As not shown in the diagram, other hardware and / or software modules may also be configured in the electronic device 1000, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0138] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0139] Those skilled in the art will understand that various aspects of this disclosure can be implemented as systems, methods, or program products. Therefore, various aspects of this disclosure can be embodied in entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuit,” “module,” or “system.” Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0140] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is defined only by the appended claims.
Claims
1. A display control method characterized by comprising: The method includes providing a graphical user interface (GUI) via a terminal device, the GUI displaying at least a portion of a virtual scene, the virtual scene including one or more virtual objects; the method includes: Determine the controlled virtual object from the one or more virtual objects; In response to a preset operation on the controlled virtual object, the controlled virtual object is controlled according to the preset operation; When the controlled virtual object is identified, in response to the rotation of the terminal device, the display perspective of the graphical user interface displaying the virtual scene is adjusted according to the rotation data of the terminal device.
2. The method of claim 1, wherein, A virtual camera is set up in the virtual scene, and the graphical user interface displays the images formed by the virtual camera capturing the virtual scene; The step of adjusting the display perspective of the virtual scene displayed by the graphical user interface based on the rotation data of the terminal device includes: The virtual camera is controlled to rotate around the controlled virtual object based on the rotation data of the terminal device, so as to adjust the display perspective of the virtual scene displayed by the graphical user interface.
3. The method of claim 2, wherein, The step of controlling the virtual camera to rotate around the controlled virtual object based on the rotation data of the terminal device includes: The second rotation angle of the virtual camera is determined based on the first rotation angle and rotation coefficient of the terminal device. Control the virtual camera to rotate around the controlled virtual object according to the second rotation angle.
4. The method of claim 3, wherein, The method further includes: The rotation angle of the terminal device when determining the controlled virtual object is used as the reference angle; After determining the controlled virtual object, the relative rotation angle of the terminal device with respect to the reference angle is obtained as the first rotation angle.
5. The method of claim 4, wherein, The method further includes: The rotation coefficient is determined based on the reference angle, and the rotation coefficient is positively correlated with the reference angle.
6. The method according to claim 3, characterized in that, The coordinate system of the terminal device has multiple terminal reference axes, and the coordinate system of the controlled virtual object has multiple virtual object reference axes, with each terminal reference axis corresponding to one of the virtual object reference axes; determining the second rotation angle of the virtual camera based on the first rotation angle and rotation coefficient of the terminal device includes: Based on the first rotation angle of the terminal device around a terminal reference axis and the rotation coefficient, the second rotation angle of the virtual camera around a virtual object reference axis corresponding to the terminal reference axis is determined.
7. The method of claim 2, wherein, The method further includes: The depth of field of the virtual camera is controlled according to the proportion of the controlled virtual object in the virtual scene display interface; the virtual scene display interface is the interface in the graphical user interface used to display the virtual scene.
8. The method of claim 7, wherein, The step of controlling the depth of field of the virtual camera based on the proportion of the controlled virtual object in the virtual scene display interface includes: If the controlled virtual object occupies a certain proportion in the virtual scene display interface, the target depth of field is determined based on the proportion of the controlled virtual object in the virtual scene display interface, and the depth of field of the virtual camera is adjusted to the target depth of field.
9. The method of claim 1, wherein, The virtual scene is a game editing scene, the one or more virtual objects are one or more scene components in the game editing scene, and the controlled virtual object is the current editing scene component.
10. The method of claim 9, wherein, The step of controlling the controlled virtual object according to the preset operation includes: According to the preset operation, at least one of the following information of the current editing scene component is edited: size, position, orientation, color, texture, and shape.
11. A display control device characterized by comprising: A graphical user interface is provided via a terminal device, the graphical user interface displaying at least a portion of a virtual scene, the virtual scene including one or more virtual objects; the device includes: A controlled virtual object determination module is configured to determine a controlled virtual object from the one or more virtual objects; The virtual object control module is configured to control the controlled virtual object in response to a preset operation on the controlled virtual object; The display perspective adjustment module is configured to, upon determining the controlled virtual object, adjust the display perspective of the graphical user interface displaying the virtual scene based on the rotation data of the terminal device when the terminal device rotates.
12. A computer readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 10.
13. An electronic device, comprising: include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 10 by executing the executable instructions.