Display method, device, storage medium and electronic device of virtual object
By providing a first and second view in the graphical user interface, and using an invisible directional axis to determine the projection of virtual objects onto the second view plane, the problem of users frequently adjusting their viewing angle is solved, achieving convenient information acquisition and energy-efficient use of computing resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-07-10
- Publication Date
- 2026-07-31
AI Technical Summary
When users observe, control, or edit virtual objects, they need to frequently adjust their perspective to obtain information from different directions, which leads to inconvenience in operation and increases the overhead of device computing resources and energy consumption.
By providing a first screen and a second screen in the graphical user interface, the first screen displays the projection of the virtual object in the first field of view plane, and the second screen displays the projection in the second field of view plane. The second field of view plane is not parallel to the first field of view plane. The second field of view plane is determined by an invisible directional axis and the projection of the virtual object is displayed to supplement the missing information in the first field of view plane.
Users can obtain complete information about virtual objects without frequently adjusting their viewpoint, improving operational convenience and reducing device computing resource consumption and energy consumption.
Smart Images

Figure CN116870474B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method for displaying virtual objects, a device for displaying virtual objects, a computer-readable storage medium, and an electronic device. Background Technology
[0002] Virtual objects generally refer to virtual scenes or people or things within virtual scenes. When displaying virtual objects on a terminal device, they are shown from a specific perspective. This means that users typically need to adjust the perspective multiple times to see information about the virtual object from different angles when observing, controlling, or editing it. This makes user operation very inconvenient, and frequent adjustments also increase the device's computing resource consumption and energy consumption. Summary of the Invention
[0003] This disclosure provides a method for displaying virtual objects, a device for displaying virtual objects, a computer-readable storage medium, and an electronic device, to at least partially solve the problem of inconvenience for users when observing, controlling, or editing virtual objects.
[0004] According to a first aspect of this disclosure, a method for displaying a virtual object is provided, comprising providing a graphical user interface via a terminal device, the graphical user interface including a first screen displaying a projection of the virtual object in a first view plane; the virtual object having at least one reference axis; the method comprising: determining an invisible direction axis relative to the first view plane in the reference axis; determining a second view plane based on the invisible direction axis, the angle between the invisible direction axis and the second view plane being less than or equal to a first preset angle; and providing a second screen in the graphical user interface, displaying a projection of the virtual object in the second view plane in the second screen.
[0005] According to a second aspect of this disclosure, a display device for a virtual object is provided, which provides a graphical user interface via a terminal device. The graphical user interface includes a first screen displaying a projection of the virtual object in a first viewing plane. The virtual object has at least one reference axis. The device includes: an invisible direction axis determination module configured to determine an invisible direction axis relative to the first viewing plane in the reference axis; a second viewing plane determination module configured to determine a second viewing plane based on the invisible direction axis, wherein the angle between the invisible direction axis and the second viewing plane is less than or equal to a first preset angle; and a display processing module configured to provide a second screen in the graphical user interface, displaying the projection of the virtual object in the second viewing plane in the second screen.
[0006] According to a third aspect of this disclosure, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the method for displaying the virtual object of the first aspect described above, and possible implementations thereof.
[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 execute the method for displaying a virtual object of the first aspect and possible implementations thereof by executing the executable instructions.
[0008] In addition to displaying the projection of the virtual object onto the first viewing plane in the first screen, an invisible direction axis relative to the first viewing plane is determined in the reference axis, and a second viewing plane is defined. A second screen is provided in the graphical user interface, displaying the projection of the virtual object onto the second viewing plane. The second viewing plane can highlight the information of the virtual object on the invisible direction axis, thus effectively supplementing the information missing in the first viewing plane. In this way, users can obtain more complete information about the virtual object by viewing both screens, without needing to adjust the viewing angle multiple times during viewing, control, or editing, improving the convenience of user operation, while reducing the computational resource consumption of the device and saving energy. Attached Figure Description
[0009] Figure 1 A schematic diagram showing the first and second screens in an exemplary embodiment of this disclosure;
[0010] Figure 2 A schematic diagram showing the game editing scene and scene component selection control in an exemplary embodiment of this disclosure is provided;
[0011] Figure 3 A schematic diagram illustrating the perspective of setting up a game editing scene in an exemplary embodiment of this disclosure;
[0012] Figure 4A A schematic diagram illustrating a God's-eye view in an exemplary embodiment of this disclosure is shown;
[0013] Figure 4B A schematic diagram illustrating the game perspective in an exemplary embodiment of this disclosure;
[0014] Figure 5 A flowchart illustrating a method for displaying a virtual object according to an exemplary embodiment of this disclosure is shown.
[0015] Figure 6 This diagram illustrates a flowchart of determining an invisible direction axis according to an exemplary embodiment of the present disclosure;
[0016] Figure 7This diagram illustrates a virtual object scaling operation in an exemplary embodiment of the present disclosure.
[0017] Figure 8 This diagram illustrates a virtual object movement operation in an exemplary embodiment of the present disclosure.
[0018] Figure 9 This diagram illustrates the structure of a virtual object display device according to an exemplary embodiment of the present disclosure;
[0019] Figure 10 A schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure is shown. Detailed Implementation
[0020] Exemplary embodiments of this disclosure will be described more fully below with reference to the accompanying drawings.
[0021] 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.
[0022] The virtual objects that users see on the display screen are projections of these objects onto the display plane. This projection cannot fully represent the information of the virtual object. For example, if the virtual object is three-dimensional or even higher-dimensional, the user can only see the projection information of one face on the display plane, not the information of the other faces. Therefore, when observing, controlling, or editing virtual objects, users usually need to adjust their viewing angle multiple times to see information about the virtual object in different directions, such as the position and size of a three-dimensional virtual object in different directions, in order to accurately control or edit it. Obviously, this causes great inconvenience to the user. Furthermore, frequent adjustments to the viewing angle also increase the device's computing resource consumption and energy consumption.
[0023] In view of the above problems, the exemplary embodiments of this disclosure provide a method for displaying virtual objects to improve the ease of operation for users when observing, controlling or editing virtual objects, and to reduce the overhead of device computing resources and energy consumption.
[0024] In one embodiment of this disclosure, the virtual object control method can run on a local terminal device or a server. When the in-game interaction method runs on a server, the method can be implemented and executed based on a cloud interaction system, which includes a server and client devices.
[0025] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of in-game interaction methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0026] In this exemplary embodiment, a graphical user interface (GUI) can be displayed on 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. The GUI may include the screen of the terminal device running its operating system, such as the desktop, system settings interface, application interface, etc.
[0027] refer to Figure 1 As shown, the graphical user interface (GUI) may include a first screen 110, which displays the projection of the virtual object 130 onto a first viewing plane, i.e., the image seen when observing the virtual object 130 along the normal direction of the first viewing plane. The GUI may also include a second screen 120, which may be fixedly displayed in the GUI or displayed when specific conditions are met. The second screen 120 displays the projection of the virtual object 130 onto a second viewing plane, i.e., the image seen when observing the virtual object 130 along the normal direction of the second viewing plane. The first and second viewing planes are not parallel, so the viewing angles of the first screen 110 and the second screen 120 are not exactly the same, allowing the user to obtain more comprehensive information about the virtual object 130 by combining the projections from both screens.
[0028] Figure 1The diagram shows a first screen 110 as the main interface and a second screen 120 as the window interface. Alternatively, the graphical user interface can be divided into two parts horizontally or vertically, with one part being the first screen 110 and the other the second screen 120, and so on. This disclosure does not limit the arrangement or positional relationship of the first screen 110 and the second screen 120.
[0029] Virtual objects can be virtual scenes, or people or objects within those scenes. In one implementation, a virtual object can be a three-dimensional virtual object. The virtual object has at least one reference axis, which provides reference information in a specific direction. Information about the virtual object can be measured and characterized through the reference axis; for example, by obtaining the position and size of the three-dimensional virtual object on each reference axis, the position and dimensions of the three-dimensional virtual object in three-dimensional space can be determined. Any two reference axes intersecting can form an angle of a specific size. In one implementation, the reference axis can be the coordinate axis of the virtual object's own reference coordinate system, as described above. Figure 1 As shown, reference axes can include the X-axis, Y-axis, and Z-axis. Any two reference axes are perpendicular to each other. If the virtual object is a virtual scene, its own reference coordinate system can be the world coordinate system of the virtual scene. In one implementation, the reference axis can be the normal axis of the virtual object's surface. For example, if the virtual object is a tetrahedron (such as a pyramid), the normal axis of each of its faces can be used as a reference axis, resulting in four reference axes.
[0030] In one implementation, the virtual object can be the currently edited object within a game editing scene. The game editing scene is an editable game scene where users can edit components, backgrounds, and other elements to create a usable game scene. When the terminal device runs the game program, the graphical user interface can display the game editing scene provided by the running game program. This game program can be the main game program, which provides game scene editing functionality (e.g., a built-in game editor). When the user uses this functionality, they can enter the game editing scene. Alternatively, the game program can 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] 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.
[0032] In one implementation, reference Figure 2As 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 2 The system displays scene component selection controls such as "block component", "cylinder component", and "semi-cylinder component". When users use these controls to operate, corresponding block components, cylinder components, semi-cylinder components, etc. can be generated in the game editing scene.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] In one implementation, the game editing scene can be displayed simultaneously in the first screen and the second screen, and the scene component selection control can be displayed in the first screen.
[0037] In the game editing scene, the user can select a scene component to edit. This scene component is the current editing object, which is also the virtual object mentioned above.
[0038] In one implementation, a first virtual camera and a second virtual camera can be set up in the game editing scene. A virtual camera is a tool in the game program that simulates a real camera to capture images of the game scene. The first and second virtual cameras can capture virtual objects and the local scene where the virtual objects are located from different perspectives. A first field of view is the imaging plane of the first virtual camera, and a first screen displays the image of the game editing scene captured by the first virtual camera. A second field of view is the imaging plane of the second virtual camera, and a second screen displays the image of the game editing scene captured by the second virtual camera.
[0039] The poses of both the first and second virtual cameras can be dynamically changed. For example, the user can control and adjust the pose of the first virtual camera, causing the first field of view to change dynamically, displaying the effect of observing virtual objects from different angles. When the user controls and adjusts the pose of the first virtual camera, the pose of the second virtual camera can be automatically adjusted according to the virtual object display method in this exemplary embodiment.
[0040] refer to Figure 3 As shown, the game editing scene can present two different perspectives: the God's-eye view and the game's perspective. The God's-eye view refers to observing the game editing scene from a third-person perspective, as shown in the reference... Figure 4A As shown, in a God's-eye view, users in the game editing scene can directly control a virtual camera (such as the first virtual camera) to move the viewpoint instead of controlling the game character. Game perspective refers to observing the game editing scene from a first-person viewpoint. Figure 4B As 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, thus changing the viewpoint. From a top-down 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. The virtual object display method in this exemplary embodiment is applicable to both top-down and game perspectives in a game editing scene.
[0041] Figure 5 An exemplary flow illustrating a method for displaying a virtual object is shown, which may include the following steps S510 to S530:
[0042] Step S510: Determine the invisible direction axis relative to the first field of view plane in the reference axis;
[0043] Step S520: Determine the second field of view plane based on the invisible direction axis, wherein the angle between the invisible direction axis and the second field of view plane is less than or equal to the first preset angle;
[0044] Step S530: Provide a second screen in the graphics and user interface, and display the projection of the virtual object onto the second view plane in the second screen.
[0045] based on Figure 5 The method involves, in addition to displaying the projection of a virtual object onto a first viewing plane in a first screen, determining an invisible direction axis relative to the first viewing plane within a reference axis, and defining a second viewing plane. A second screen is then provided in the graphical user interface, displaying the projection of the virtual object onto the second viewing plane. The second viewing plane effectively supplements the information missing in the first viewing plane by highlighting the virtual object's information along the invisible direction axis. This allows users to obtain more complete information about the virtual object by viewing both screens, eliminating the need for multiple viewing angle adjustments during viewing, control, or editing. This improves user convenience and reduces the computational resource overhead of devices (such as terminal devices or backend servers), saving energy.
[0046] The following is about Figure 5 Each step in the process will be explained in detail.
[0047] refer to Figure 5 In step S510, an invisible direction axis relative to the first field of view plane is determined in the reference axis.
[0048] The first field of view can only display information about virtual objects in some directions, losing information in other directions. For example, displaying the two-dimensional projection information of a virtual object in the first field of view will result in the loss of information in one or more three-dimensional dimensions in the first field of view. In this exemplary embodiment, the direction corresponding to the lost information is called the invisible direction, and the corresponding axis is called the invisible direction axis. It should be noted that the invisible direction can refer to a direction that is completely invisible. For example, when the first field of view is parallel to the XY plane, the information in the Z-axis direction cannot be seen at all in the first field of view, that is, the Z-axis direction is completely invisible, and the Z-axis can be determined as the invisible direction axis. The invisible direction can also refer to a direction with poor visibility, such as the one described above. Figure 1 As shown, when the angle between the first field of view plane and the XY plane is very small, the first field of view plane is nearly parallel to the XY plane. In the first field of view plane, only a small amount of information in the Z-axis direction can be seen, that is, the visibility in the Z-axis direction is poor, and the Z-axis can be determined as an invisible direction axis.
[0049] In one implementation, an invisible directional axis can be determined within the reference axis based on its positional relationship with the first field of view plane. This positional relationship can be represented by the angle between the reference axis and the first field of view plane, the projection parameters of the reference axis in the first field of view plane, etc. Based on this relationship, the visibility of the reference axis in the first field of view plane can be quantified, thereby identifying reference axes with poor visibility as invisible directional axes.
[0050] The following provides an exemplary method for determining invisible direction axes:
[0051] Optionally, in some implementations, refer to Figure 6 As shown, determining the invisible direction axis relative to the first field of view plane in the reference axis may include the following steps S610 and S620:
[0052] Step S610: Obtain the projection of the reference axis in the first field of view plane to obtain the first projection axis corresponding to the reference axis;
[0053] Step S620: Determine the invisible direction axis from the reference axis based on the included angle between different first projection axes.
[0054] Wherein, the first projection axis refers to the projection of the reference axis onto the first field of view plane, such as Figure 1 The X-axis, Y-axis, and Z-axis shown are the projections of the X-axis, Y-axis, and Z-axis of the virtual objects in the virtual scene onto the first view plane, i.e., the first projection axes.
[0055] It is possible to obtain the angle between every two first projection axes, such as Figure 1 In the equations ∠XOY, ∠XOZ, and ∠YOZ, the invisible direction axis is determined based on the size of the included angle. For example, if any two reference axes are perpendicular to each other, the angle closest to 90 degrees can be determined, and the invisible direction axis is determined among the reference axes other than the reference axis corresponding to the first projection axis forming this angle. Figure 1 Of the three included angles, ∠XOY is closest to 90 degrees. This included angle is formed by the first projection axis of the X-axis and the first projection axis of the Y-axis. With only the Z-axis remaining as the other reference axis, the Z-axis is determined to be an invisible direction axis. This allows for the quick and convenient determination of invisible direction axes.
[0056] In one embodiment, determining the invisible direction axis from the reference axis based on the included angle between different first projection axes may include the following steps:
[0057] If the angle between the two first projection axes is less than the second preset angle, then an invisible direction axis is determined from the two reference axes corresponding to the two first projection axes.
[0058] The second preset angle is a reference angle used to measure the size of the included angle of the first projection axes, and can be determined based on experience or specific circumstances. If the included angle between the two first projection axes is less than the second preset angle, it indicates that the projections of the two reference axes corresponding to the two first projection axes in the first field of view plane have a relatively serious perspective transformation. There is an invisible direction axis among these two reference axes. One of them can be determined as the invisible direction axis, or both reference axes can be determined as invisible direction axes.
[0059] In one implementation, a second preset angle can be determined based on the size of the virtual object on a reference axis. This second preset angle can be positively correlated with the size of the virtual object on the reference axis, and the two can exhibit a linear or non-linear mapping relationship. This mapping relationship can be preset based on experience or specific needs. Since the virtual object may be irregularly shaped, its size on the reference axis can be its maximum size on the reference axis, or it can be the size of the bounding box of the virtual object (such as a cuboid) on the reference axis. Because the size of the virtual object may differ on different reference axes, the second preset angle can be determined separately for each reference axis. For example, the second preset angle corresponding to the X-axis, Y-axis, and Z-axis can be determined based on the size of the virtual object on the X-axis, Y-axis, and Z-axis, respectively. If ∠YOZ is less than the second preset angle corresponding to the Z-axis but not less than the second preset angle corresponding to the Y-axis, then the Z-axis is determined to be an invisible direction axis, and the Y-axis is not an invisible direction axis. This method of determining invisible direction axes is more accurate.
[0060] In one embodiment, if the difference between the angle between the two first projection axes and the angle between the two reference axes corresponding to the two first projection axes is greater than a third preset angle, then an invisible direction axis is determined from the two reference axes corresponding to the two first projection axes. The difference between the angle between the two first projection axes and the angle between the two reference axes corresponding to the two first projection axes represents the change in the angle between the two reference axes before and after projection onto the first field of view plane, thus characterizing the degree of perspective transformation that occurs when the two reference axes are projected onto the first field of view plane. The third preset angle is a reference angle used to measure the magnitude of the angle change and can be determined based on experience or specific circumstances. For example, such as... Figure 1 As shown, the included angle between any two of the three reference axes is 90 degrees. If the difference between the included angle between the two first projection axes and 90 degrees (the absolute value of the difference can be taken) is greater than the third preset angle, then an invisible direction axis is determined in the two reference axes corresponding to the two first projection axes.
[0061] In one implementation, invisible directional axes can be determined by taking the intersection of their angles. For example, if the angle between the first projection axes of the X-axis and the Z-axis is less than a second preset angle, it is determined that there is an invisible directional axis between the X and Z axes. Similarly, if the angle between the first projection axes of the Y-axis and the Z-axis is also less than the second preset angle, it is determined that there is an invisible directional axis between the Y and Z axes. Therefore, the Z-axis is considered an invisible directional axis. As another example, if the difference between the angle between the first projection axes of the X-axis and the Z-axis and 90 degrees is greater than a third preset angle, it is determined that there is an invisible directional axis between the X and Z axes. Similarly, if the difference between the angle between the first projection axes of the Y-axis and the Z-axis and 90 degrees is greater than the third preset angle, it is determined that there is an invisible directional axis between the Y and Z axes. Therefore, the Z-axis is considered an invisible directional axis.
[0062] In some implementations, determining the invisible direction axis relative to the first field-of-view plane in the reference axis may include the following steps:
[0063] Obtain the angle between the reference axis and the first field of view plane, and determine the reference axis with an angle greater than a fourth preset angle as an invisible direction axis.
[0064] The angle between the reference axis and the first view plane refers to the angle between the positive direction of the reference axis in 3D space and the first view plane, not the angle projected onto the first view plane. Regarding the distinction between the positive and negative directions of the reference axis, it can generally be considered that if the angle between the positive direction and the first view plane is no greater than 90 degrees, then correspondingly, the angle between the negative direction and the first view plane is no less than 90 degrees. The smaller the angle between the reference axis and the first view plane, the better the visibility of the reference axis direction in the first view plane, and vice versa. Therefore, a fourth preset angle can be set for the angle between the reference axis and the first view plane as an angle threshold to measure whether the angle is too large. The fourth preset angle can be determined based on experience or the size of the virtual object. For example, the fourth preset angle can be greater than 45 degrees, such as 60 degrees. When the fourth preset angle is greater than 45 degrees, the number of invisible directional axes can be limited to no more than one.
[0065] If the angle between a reference axis and the first field of view plane is greater than the fourth preset angle, it means that the visibility of the reference axis direction in the first field of view plane is very poor, and the reference axis can be determined as an invisible direction axis.
[0066] In some alternative embodiments, determining the invisible direction axis relative to the first field-of-view plane in the reference axis may include the following steps:
[0067] Obtain the projected length of the reference axis in the first field of view plane, and determine the reference axis whose projected length is less than the preset length as the invisible direction axis.
[0068] Generally, a reference axis represents direction and does not have length. In this exemplary embodiment, to facilitate the quantification of the projected length of the reference axis, a default length can be set for the reference axis, and different reference axes can have the same default length. The longer the projected length of the reference axis in the first field of view plane, the better the visibility of the reference axis direction in the first field of view plane, and vice versa. Therefore, a preset length can be set for the projected length of the reference axis in the first field of view plane as a length threshold to measure whether the projected length is too small. The preset length can be determined based on the default length of the reference axis and combined with experience, such as half the default length.
[0069] If the projection length of a reference axis in the first field of view is less than the preset length, it means that the visibility of the reference axis direction in the first field of view is very poor, and the reference axis can be determined as an invisible direction axis.
[0070] The above examples illustrate how to determine the invisible direction axis. Parameters such as the included angle of the first projection axis, the included angle between the reference axis and the first field of view plane, and the projection length of the reference axis in the first field of view plane are easy to obtain. Combined with threshold conditions such as the second preset angle, the third preset angle, the fourth preset angle, and the preset length, the invisible direction axis can be determined relatively simply and quickly.
[0071] It should be understood that the above-mentioned threshold conditions, such as the second preset angle, the third preset angle, the fourth preset angle, and the preset length, are equivalent to setting absolute conditions for invisible directional axes. That is to say, there may be cases where there are no invisible directional axes, such as when the angle between any two first projection axes is not less than the second preset angle, or the difference between the angle between any two first projection axes and the angle between the corresponding two reference axes is not greater than the third preset angle, or the angle between any reference axis and the first field of view plane is less than the fourth preset angle, or the projection length of any reference axis in the first field of view plane is not less than the preset length, etc., in which case it is determined that there are no invisible directional axes among the reference axes.
[0072] In one implementation, the direction axis with the worst visibility in the first field of view plane can be determined as the invisible direction axis to ensure that an invisible direction axis always exists. For example, the angle between every two first projection axes can be obtained, and the invisible direction axis can be determined from the two reference axes corresponding to the two first projection axes with the smallest angle. Alternatively, the difference between the angle between every two first projection axes and the angle between the corresponding two reference axes can be obtained, and the invisible direction axis can be determined from the two reference axes corresponding to the two first projection axes with the largest angle difference. Alternatively, the reference axis with the largest angle to the first field of view plane can be determined as the invisible direction axis. Alternatively, the reference axis with the smallest projected length in the first field of view plane can be determined as the invisible direction axis.
[0073] If the invisible direction axis is determined, continue to refer to Figure 5 In step S520, a second field of view plane is determined based on the invisible direction axis, and the angle between the invisible direction axis and the second field of view plane is less than or equal to a first preset angle.
[0074] The angle between the invisible direction axis and the second field of view plane can be the angle between the positive direction of the invisible direction axis and the second field of view plane. Regarding the distinction between the positive and negative directions of the invisible direction axis, it can generally be considered that if the angle between the positive direction and the second field of view plane is no greater than 90 degrees, then correspondingly, the angle between the negative direction and the second field of view plane is no less than 90 degrees. Setting the angle between the invisible direction axis and the second field of view plane to be less than or equal to a first preset angle ensures that the invisible direction axis has good visibility in the second field of view plane. The first preset angle can be determined based on experience or specific needs. For example, the first preset angle can be 0 degrees. Alternatively, the first preset angle can be equal to the difference between 90 degrees and a fourth preset angle; for example, if the fourth preset angle is 60 degrees, then the first preset angle is 30 degrees.
[0075] In one embodiment, any plane whose angle with the invisible directional axis is less than or equal to a first preset angle can be used as the second field of view plane.
[0076] In one embodiment, determining the second field of view plane based on an invisible direction axis may include the following steps:
[0077] An invisible direction axis is used to form a reference plane with any other reference axis, and a plane parallel to the reference plane is used as the second field of view plane.
[0078] Specifically, for the plane formed by the invisible direction axis and any other reference axis, the angle between the invisible direction axis and this plane is 0 degrees, indicating that the invisible direction axis has optimal visibility within this plane. For example, if the Z-axis is determined to be the invisible direction axis, the XZ plane or YZ plane can be used as the aforementioned reference plane, and a second field of view plane can be determined in a plane parallel to the reference plane. Information about the Z-axis can be fully observed within this second field of view plane. Figure 1 As shown, the plane parallel to the YZ plane is used as the second field of view plane.
[0079] Based on the condition that the angle between the invisible directional axis and the second field of view plane is less than or equal to the first preset angle, the angle of the second field of view plane can be determined. However, this usually does not uniquely determine a single second field of view plane, but rather a set of parallel planes. Therefore, the distance between the second field of view plane and the virtual object can also be determined, thereby determining the position of the second field of view plane, thus uniquely identifying a single second field of view plane. By determining an appropriate distance, the virtual object can be made to appear at a suitable size within the second field of view plane.
[0080] In one implementation, when determining the second field of view plane based on the invisible direction axis, it can also be determined that the distance between the second field of view plane and the virtual object is the same as the distance between the first field of view plane and the virtual object. For example, in Figure 1 In this process, the distance d between the virtual object 130 and the first view plane can be obtained. After determining the YZ plane as the reference plane, the YZ plane is moved by a length d along its normal direction (i.e., the X-axis direction) to obtain the second view plane. In this way, based on perspective, the proportion of the virtual object in the first view is the same as or similar to its proportion in the second view, so that the user's visual experience when viewing the first and second views simultaneously is more harmonious.
[0081] In one implementation, when determining the second field of view plane based on the invisible direction axis, the distance between the second field of view plane and the virtual object can also be determined as a preset distance. This preset distance can be determined based on parameters such as the field of view size and focal length of the second virtual camera, so that when observing the virtual object at a default distance, the proportion of the virtual object in the second frame is more appropriate.
[0082] In one embodiment, after determining the second field-of-view plane based on the invisible direction axis, the method further includes:
[0083] Based on the second field of view plane and the position of the virtual object, determine the target pose of the second virtual camera and adjust the second virtual camera to the target pose.
[0084] Determining the second field of view plane based on the invisible direction axis refers to determining the angle of the second field of view plane, which in turn determines the angle (or pose) of the second virtual camera. The position of the second virtual camera can be determined based on the position of the virtual object. For example, the virtual object can be placed at a preset distance directly in front of the second virtual camera's field of view (i.e., the virtual object is located on the optical axis of the second virtual camera, and the distance between the virtual object and the second virtual camera is equal to the preset distance) or at a distance equal to the distance between the first field of view plane and the virtual object. The position of the second virtual camera is then calculated. Combining the position and angle, the target pose of the second virtual camera can be obtained. The target pose refers to the pose that can display the invisible direction information of the virtual object. The second virtual camera is adjusted to the target pose, and the virtual object and its surrounding local scene are photographed under this target pose. With a suitable viewing angle and distance, the captured image can be displayed in the second frame.
[0085] Continue to refer to Figure 5 In step S530, a second screen is provided in the graphical user interface, and the projection of the virtual object in the second view plane is displayed in the second screen.
[0086] In one implementation, a second screen can be displayed in the graphical user interface, such as in the form of a window, if it is determined that an invisible directional axis exists. If it is determined that no invisible directional axis exists, the second screen can be hidden. In another implementation, the axis with the worst visibility in the first field of view among the reference axes can always be determined as the invisible directional axis, that is, if an invisible directional axis always exists, then the second screen can always be displayed.
[0087] In one implementation, the second screen can be displayed permanently in the graphical user interface, or it can be displayed permanently when a virtual object to be displayed is determined (e.g., the user selects a virtual object as the virtual object to be displayed). That is, the second screen can be displayed regardless of whether an invisible directional axis exists. Specifically, if an invisible directional axis is determined to exist, the projection of the virtual object onto the second view plane can be displayed on the second screen. If an invisible directional axis is determined not to exist, other information, such as the virtual object's attribute information or the map information of the virtual scene, can be displayed on the second screen.
[0088] like Figure 1 As shown, the Z-axis is determined as an invisible direction axis, and the parallel plane of the YZ plane is determined as the second viewing plane. The projection of the virtual object 130 in the second viewing plane is obtained and displayed in the second screen 120. From the second screen 120, the information of the virtual object 130 in the Z-axis direction can be fully seen. In contrast, in the first screen 110, it is difficult for the user to clearly see the size or position of the virtual object 130 in the Z-axis direction, while in the second screen 120, the user can clearly see this information. The second screen 120 effectively supplements the display information of the first screen 110. Through the combination of the first screen 110 and the second screen 120, the user can obtain more complete information about the virtual object 130.
[0089] In one implementation, the virtual object is a three-dimensional virtual object. The first screen displays a two-dimensional projection of the three-dimensional virtual object in a first viewing plane, and the second screen displays a two-dimensional projection of the three-dimensional virtual object in a second viewing plane. By complementing the two-dimensional projections in the two viewing planes, the three-dimensional information of the three-dimensional virtual object can be displayed more fully.
[0090] In one implementation, the virtual object is the currently edited object in the game editing scene. The method for displaying the virtual object may further include the following steps:
[0091] In response to editing operations on the current object in the first or second screen, the editing process of the editing operation is displayed synchronously in the first and second screens.
[0092] Editing operations can include, but are not limited to, scaling, moving, rotating, shape adjustment, color or texture editing, etc. Users can perform editing operations on the current object within either the first or second screen. For example, the first screen is the main interface, and it can be set to only allow editing operations within the first screen, not the second screen. During editing operations, the editing process, such as scaling, moving, and rotating, is displayed simultaneously on both the first and second screens, allowing users to obtain information about the editing process from both interfaces and see the real-time 3D information of the current object, thus facilitating accurate editing operations.
[0093] Figure 7 The diagram illustrates a user performing a zoom operation. When the user controls the virtual object 130 to zoom along the Z-axis, the zoom process can be displayed in the first screen 110, but it is difficult to clearly see the zoom effect through the first screen 110. The zoom process is displayed synchronously in the second screen 120, where the user can clearly see the size of the zoom along the Z-axis, thus facilitating accurate zoom operations to precisely zoom to the desired size.
[0094] Figure 8 The diagram illustrates a user's movement operation. When the user controls the virtual object 130 to move along a certain direction in the XZ plane, the movement process can be displayed in the first screen 110. However, it is difficult to clearly see the position on the Z-axis after the movement through the first screen 110. The scaling process is displayed synchronously in the second screen 120, so the user can clearly see the position on the Z-axis after the movement. This facilitates accurate movement operations, allowing the user to precisely move to the desired position.
[0095] In practical applications, the graphical user interface includes a first interactive control. After a second interactive control is triggered by a terminal device, game scene information corresponding to the first screen can be generated. This game scene information includes component information of virtual objects in the first screen, such as the size, color, and position of the virtual objects within the game scene. This game scene information can be saved in a preset storage location, which can be a map file. This map file can save not only the game scene information but also other map information (including but not limited to screenshots, map names, logs, etc.). After the map file saves the game scene information, it is uploaded to a server. Once approved by the server, the game scene generated from the game scene information can be published to a preset map pool. Terminal devices connected to the server can then download the corresponding game scene information from the server and generate the corresponding game scene based on the game scene information through the game program, allowing them to experience the game within that scene. This method allows game scene information from the game editor to be published and experienced by other players, thus achieving rapid UGC (User Generation Content) functionality.
[0096] Exemplary embodiments of this disclosure also provide a display device for a virtual object, which can provide a graphical user interface through a terminal device. The graphical user interface includes a first screen that displays a projection of the virtual object in a first viewing plane; the virtual object has at least one reference axis. (Reference) Figure 9 As shown, the virtual object display device 900 may include the following program modules:
[0097] The invisible direction axis determination module 910 is configured to determine an invisible direction axis relative to a first field of view plane in a reference axis;
[0098] The second field of view plane determination module 920 is configured to determine the second field of view plane based on the invisible direction axis, wherein the angle between the invisible direction axis and the second field of view plane is less than or equal to a first preset angle.
[0099] Display processing module 930 is configured to provide a second screen in a graphical user interface, in which the projection of a virtual object onto a second view plane is displayed.
[0100] In one embodiment, determining the invisible direction axis relative to the first field-of-view plane in the reference axis includes:
[0101] Obtain the projection of the reference axis onto the first field of view plane to obtain the first projection axis corresponding to the reference axis;
[0102] The invisible direction axis is determined from the reference axis based on the included angle between different first projection axes.
[0103] In one embodiment, determining the invisible direction axis from the reference axis based on the included angle between different first projection axes includes:
[0104] If the angle between the two first projection axes is less than the second preset angle, then the invisible direction axis is determined from the two reference axes corresponding to the two first projection axes.
[0105] In one implementation, the invisible direction axis determination module 910 is further configured to:
[0106] The second preset angle is determined based on the size of the virtual object on the reference axis.
[0107] In one embodiment, determining the invisible direction axis relative to the first field-of-view plane in the reference axis includes:
[0108] Obtain the angle between the reference axis and the first field of view plane, and determine the reference axis with an angle greater than a fourth preset angle as an invisible direction axis.
[0109] In one embodiment, determining the invisible direction axis relative to the first field-of-view plane in the reference axis includes:
[0110] Obtain the projected length of the reference axis in the first field of view plane, and determine the reference axis whose projected length is less than the preset length as the invisible direction axis.
[0111] In one embodiment, determining the second field of view plane based on an invisible direction axis includes:
[0112] An invisible direction axis is used to form a reference plane with any other reference axis, and a plane parallel to the reference plane is used as the second field of view plane.
[0113] In one embodiment, the second field of view plane determination module 920 is further configured to: when determining the second field of view plane according to the invisible direction axis, determine that the distance between the second field of view plane and the virtual object is the same as the distance between the first field of view plane and the virtual object.
[0114] In one implementation, the virtual object is the currently edited object in the game editing scene; the display processing module 930 is further configured to:
[0115] In response to editing operations on the current object in the first or second screen, the editing process of the editing operation is displayed synchronously in the first and second screens.
[0116] In one embodiment, a first virtual camera and a second virtual camera are set in the game editing scene; a first field of view is the imaging plane of the first virtual camera, and a first screen displays the image formed by the first virtual camera capturing the game editing scene; a second field of view is the imaging plane of the second virtual camera, and a second screen displays the image formed by the second virtual camera capturing the game editing scene.
[0117] In one implementation, the second field-of-view plane determination module 920 is further configured to:
[0118] After determining the second field of view plane based on the invisible direction axis, the target pose of the second virtual camera is determined based on the second field of view plane and the position of the virtual object, and the second virtual camera is adjusted to the target pose.
[0119] In one embodiment, the graphical user interface includes a first interactive control; the virtual object display device 900 further includes an interactive control module configured to:
[0120] In response to a trigger operation on the first interactive control, control the generation of game scene information corresponding to the first screen; wherein, the game scene information includes component information of virtual objects in the first screen;
[0121] The control transmits game scene information to the server; the server is configured to communicate with the terminal device, the terminal device is configured with a game program, the terminal device is configured to obtain game scene information from the server, and generate a corresponding game scene based on the game scene information through the game program.
[0122] 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.
[0123] 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.
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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).
[0128] Exemplary embodiments of this disclosure also provide an electronic device. 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.
[0129] 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.
[0130] 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.
[0131] 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.
[0132] Bus 1030 is used to connect different components of electronic device 1000, and may include data bus, address bus and control bus.
[0133] Electronic device 1000 can communicate with one or more external devices 1100 (such as keyboard, mouse, external controller, etc.) through I / O interface 1040.
[0134] 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.
[0135] Electronic device 1000 can display a graphical user interface, such as displaying a game editing scene, through monitor 1060.
[0136] 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.
[0137] 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.
[0138] 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.
[0139] 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 method of a virtual object, characterized by, A graphical user interface is provided via a terminal device, the graphical user interface including a first screen displaying a projection of the virtual object in a first view plane; the virtual object has at least one reference axis; the method includes: An invisible direction axis relative to the first field of view plane is determined in the reference axis; The second field of view plane is determined based on the invisible direction axis, and the angle between the invisible direction axis and the second field of view plane is less than or equal to a first preset angle. A second screen is provided in the graphical user interface, in which the projection of the virtual object onto the second view plane is displayed.
2. The method of claim 1, wherein, Determining the invisible direction axis relative to the first field-of-view plane in the reference axis includes: Obtain the projection of the reference axis onto the first field of view plane to obtain the first projection axis corresponding to the reference axis; The invisible direction axis is determined from the reference axis based on the included angle between different first projection axes.
3. The method of claim 2, wherein, Determining the invisible direction axis from the reference axis based on the included angles between different first projection axes includes: If the angle between the two first projection axes is less than the second preset angle, then the invisible direction axis is determined from the two reference axes corresponding to the two first projection axes.
4. The method of claim 3, wherein, The method further includes: The second preset angle is determined based on the size of the virtual object on the reference axis.
5. The method according to claim 1, characterized in that, Determining the invisible direction axis relative to the first field-of-view plane in the reference axis includes: Obtain the angle between the reference axis and the first field of view plane, and determine the reference axis whose angle with the first field of view plane is greater than a fourth preset angle as the invisible direction axis.
6. The method according to claim 1, characterized in that, Determining the invisible direction axis relative to the first field-of-view plane in the reference axis includes: Obtain the projection length of the reference axis in the first field of view plane, and determine the reference axis whose projection length is less than a preset length as the invisible direction axis.
7. The method according to claim 1, characterized in that, Determining the second field of view plane based on the invisible direction axis includes: The invisible direction axis is used to form a reference plane with any other reference axis, and a plane parallel to the reference plane is used as the second field of view plane.
8. The method according to claim 1, characterized in that, When determining the second field-of-view plane based on the invisible direction axis, the method further includes: The distance between the second view plane and the virtual object is determined to be the same as the distance between the first view plane and the virtual object.
9. The method according to claim 1, characterized in that, The virtual object is the currently edited object in the game editing scene; the method further includes: In response to an editing operation on the current editing object in the first screen or the second screen, the editing process of the editing operation is displayed synchronously in the first screen and the second screen.
10. The method according to claim 9, characterized in that, The game editing scene is equipped with a first virtual camera and a second virtual camera; the first field of view is the imaging plane of the first virtual camera, and the first screen displays the image formed by the first virtual camera capturing the game editing scene; The second field of view is the imaging plane of the second virtual camera, and the second screen displays the image formed by the second virtual camera capturing the game editing scene.
11. The method according to claim 10, characterized in that, After determining the second field-of-view plane based on the invisible direction axis, the method further includes: Based on the second field of view plane and the position of the virtual object, the target pose of the second virtual camera is determined, and the second virtual camera is adjusted to the target pose.
12. The method according to claim 1, characterized in that, The graphical user interface includes a first interactive control; the method further includes: In response to a trigger operation on the first interactive control, control the generation of game scene information corresponding to the first screen; wherein, the game scene information includes component information of virtual objects in the first screen; The control transmits the game scene information to the server; wherein the server is configured to communicate with the terminal device, the terminal device is configured with a game program, and the terminal device is configured to obtain the game scene information from the server and generate a corresponding game scene based on the game scene information through the game program.
13. A display device for virtual objects, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface including a first screen displaying a projection of the virtual object in a first view plane; the virtual object has at least one reference axis; the device includes: An invisible direction axis determination module is configured to determine an invisible direction axis relative to the first field of view plane in the reference axis; The second field of view plane determination module is configured to determine the second field of view plane based on the invisible direction axis, wherein the angle between the invisible direction axis and the second field of view plane is less than or equal to a first preset angle. The display processing module is configured to provide a second screen in the graphical user interface, displaying the projection of the virtual object onto the second view plane.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 12.
15. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; A monitor is used to display a graphical user interface; The processor is configured to execute the method of any one of claims 1 to 12 by executing the executable instructions.