Display method and device of UI, electronic equipment and storage medium
By adjusting the UI height in VR based on the distance between the virtual character and the target object, the problem of UI elements at a distance being easily ignored or obscured is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202210863926.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-07-20
AI Technical Summary
In a VR environment, UI elements at a distance are easily overlooked and can be obscured by models at close range, affecting the user experience.
The distance between the virtual character and the target object is obtained through the VR display terminal. The target height of the UI is determined based on the distance, and the UI is displayed in the virtual scene at the target height to ensure that the UI is not obscured and is more eye-catching.
It improves the visibility of the UI at a distance, avoids being obscured by the model, and enhances the user's interactive experience in VR.
Smart Images

Figure CN115167684B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of VR, and particularly relates to a display method and device of UI, an electronic device and a storage medium. BACKGROUND
[0002] This section is intended to provide background information to the embodiments of the present disclosure recited in the claims. The description herein does not constitute admission that the information provided herein is prior art to the present disclosure.
[0003] Since VR has a depth visual effect, in VR, the UI at a long distance is often less noticeable and is more easily ignored by a user; in addition, the UI at a long distance is also more easily blocked by a model at a short distance. SUMMARY
[0004] Therefore, the present disclosure aims to provide a display method and device of UI, an electronic device and a storage medium.
[0005] To achieve the above purpose, the display method of UI provided by an example embodiment of the present disclosure comprises the following steps.
[0006] Obtaining a UI corresponding to a target object in the virtual scene;
[0007] Determining a distance between a current position of the virtual character and the target object;
[0008] Determining a target height of the UI to be displayed according to the distance, wherein the greater the distance, the higher the target height;
[0009] Displaying the UI at the target height in an associated region of the target object in the virtual scene.
[0010] In some example embodiments, the size of the UI is the same when the UI is displayed at different positions in the virtual scene.
[0011] In some example embodiments, the determining of the target height of the UI to be displayed according to the distance comprises:
[0012] Determining an initial height of the UI to be displayed according to the distance;
[0013] Obtaining a field of view range of the virtual character when the virtual character faces the target object;
[0014] Determining whether the initial height is within the field of view range;
[0015] If the initial height is within the field of view range, the initial height is taken as a target height to be displayed by the UI.
[0016] In some example embodiments, the method further comprises:
[0017] If the initial height is not within the field of view range, a maximum height of the field of view range is taken as the target height to be displayed by the UI.
[0018] In some example embodiments, the determining the target height to be displayed by the UI according to the distance, wherein the greater the distance, the higher the target height, comprises:
[0019] In response to the distance being greater than a preset distance threshold, determining the target height to be a first height;
[0020] In response to the distance being less than the distance threshold, determining the target height to be a second height; wherein the first height is higher than the second height.
[0021] In some example embodiments, the method further comprises:
[0022] Generating a bounding box of the UI according to a position of the UI and the distance threshold;
[0023] In response to the virtual character being outside the bounding box, determining that the distance is greater than the distance threshold;
[0024] In response to the virtual character being inside the bounding box, determining that the distance is less than the distance threshold.
[0025] In some example embodiments, the bounding box comprises:
[0026] A circular bounding box.
[0027] In some example embodiments, the method further comprises:
[0028] For the same UI, constructing at least two UI models, different display heights of different UI models;
[0029] The determining the target height to be displayed by the UI according to the distance, wherein the greater the distance, the higher the target height, comprises:
[0030] Displaying the UI model corresponding to the display height according to the distance, and hiding other UI models; wherein different distances correspond to different display heights of the UI model.
[0031] In some example embodiments, the method further comprises:
[0032] controlling the UI to face a virtual lens of the virtual character.
[0033] In some example embodiments, the controlling the UI to face a virtual lens of the virtual character comprises:
[0034] For any of the UIs, if the UI is a shooting object of the virtual lens, when a video frame of content displayed by the graphical user interface is refreshed, the orientation of the UI is controlled according to the position of the virtual lens.
[0035] In some example embodiments, the method further comprises:
[0036] controlling the UI to be displayed in front of other models in the virtual scene.
[0037] In some example embodiments, the controlling the UI to be displayed in front of other models in the virtual scene comprises:
[0038] controlling the rendering order of the UI to be rendered after the rendering of other models and before the rendering of post-processing effects.
[0039] Based on the same inventive concept, the example embodiments of the present disclosure further provide a display device of a UI, which provides a graphical user interface through a VR display terminal, and the content displayed by the graphical user interface includes at least part of a virtual scene, and the virtual scene includes a virtual character. The device comprises:
[0040] a UI obtaining module configured to obtain a UI corresponding to a target object in the virtual scene;
[0041] a distance determining module configured to determine the distance between the current position of the virtual character and the target object;
[0042] a display height determining module configured to determine a target height at which the UI is to be displayed according to the distance, wherein the greater the distance, the higher the target height;
[0043] a display module configured to display the UI at the target height in the associated region of the target object in the virtual scene.
[0044] Based on the same inventive concept, the example embodiments of the present disclosure further provide an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to any of the above example embodiments when executing the program.
[0045] Based on the same inventive concept, the present disclosure exemplary embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform any of the above methods.
[0046] As can be seen from the above, the display method of UI, apparatus, electronic device and storage medium provided by the embodiments of the present disclosure provide a graphical user interface through a VR display terminal, the content displayed by the graphical user interface includes at least part of a virtual scene, the virtual scene includes a virtual character, and the method includes: obtaining a UI corresponding to a target object in the virtual scene; determining a distance between a current position of the virtual character and the target object; determining a target height at which the UI is to be displayed according to the distance, wherein the greater the distance, the higher the target height; and displaying the UI at the target height in an associated region of the target object in the virtual scene. According to the present disclosure, the UI at a long distance is not easily blocked by other models and is more likely to be seen by a user. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the present disclosure or the related art, the following will briefly introduce the drawings needed to be used in the embodiments or the related art description. Obviously, the drawings in the following description are only embodiments of the present disclosure, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0048] Figure 1 A scene schematic diagram of the UI display method in the related art according to the embodiments of the present disclosure is provided.
[0049] Figure 2 A flow schematic diagram of the display method of UI according to the embodiments of the present disclosure is provided.
[0050] Figure 3 A scene schematic diagram of the UI display method according to the embodiments of the present disclosure is provided.
[0051] Figure 4 A structure schematic diagram of the display apparatus of UI according to the embodiments of the present disclosure is provided.
[0052] Figure 5 A structure schematic diagram of the electronic device according to the embodiments of the present disclosure is provided. DETAILED DESCRIPTION
[0053] To make the objectives, technical solutions and advantages of the present disclosure clearer, the principles and spirits of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that the embodiments are only given to enable those skilled in the art to better understand and implement the present disclosure, and do not limit the scope of the present disclosure in any way. On the contrary, the embodiments are provided to make the present disclosure more thorough and complete, and to enable the scope of the present disclosure to be fully conveyed to those skilled in the art.
[0054] According to embodiments of the present disclosure, a display method and apparatus of a UI, an electronic device and a storage medium are provided.
[0055] In this document, it should be understood that the number of any elements in the accompanying drawings is used only for example and not limitation, and any naming is only used for distinction and does not have any limiting meaning.
[0056] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood as the usual meaning understood by those skilled in the art to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not represent any order, number or importance, but are only used to distinguish different components. "Include" or "contain" and similar words mean that the elements or objects before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connected" or "connected" and similar words are not limited to physical or mechanical connection, but can include electrical connection, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationship, when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0057] The principles and spirits of the present disclosure will be described in detail below with reference to several representative embodiments of the present disclosure.
[0058] In the related art, with reference to Figure 1 Since the VR (Virtual Reality, virtual reality technology) has a depth visual effect, in the VR, the UI (User Interface, user interface) at a long distance is often not eye-catching and is more likely to be ignored by the user. In addition, the UI at a long distance is also more likely to be blocked by a model at a closer distance.
[0059] The VR referred to in the present disclosure can be a display device implemented by VR technology, and the UI referred to in the present disclosure can be an identification interface or an interactive interface corresponding to a virtual object in a virtual scene.
[0060] To solve the above problems, the present disclosure provides a display scheme of a UI, which provides a graphical user interface through a VR display terminal, the content displayed by the graphical user interface includes at least part of a virtual scene, the virtual scene includes a virtual character, and the method includes the following steps: obtaining a UI corresponding to a target object in the virtual scene; determining a distance between a current position of the virtual character and the target object; determining a target height at which the UI is to be displayed according to the distance, wherein the greater the distance, the higher the target height; and displaying the UI at the target height in an associated region of the target object in the virtual scene. Through the present disclosure, a UI at a long distance is not easily blocked by other models and is more likely to be seen by a user.
[0061] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure will be specifically introduced below.
[0062] Reference Figure 2 which is a flowchart of a display method of a UI provided by an embodiment of the present disclosure.
[0063] The display method of the UI provides a graphical user interface through a VR display terminal, the content displayed by the graphical user interface includes at least part of a virtual scene, the virtual scene includes a virtual character, and the method includes the following steps:
[0064] Step S210, obtaining a UI corresponding to a target object in the virtual scene;
[0065] Step S220, determining a distance between a current position of the virtual character and the target object;
[0066] Step S230, determining a target height at which the UI is to be displayed according to the distance, wherein the greater the distance, the higher the target height;
[0067] In the present disclosure, the height refers to a distance between a model and the ground in a virtual scene.
[0068] Step S240, displaying the UI at the target height in an associated region of the target object in the virtual scene.
[0069] In some example embodiments, the size of the UI is the same when the UI is displayed at different positions in the virtual scene.
[0070] In some example embodiments, the determining of the target height at which the UI is to be displayed according to the distance includes:
[0071] determining an initial height at which the UI is to be displayed according to the distance;
[0072] obtaining a field of view range of the virtual character when the virtual character is facing the target object;
[0073] determining whether the initial height is within the field of view range;
[0074] if the initial height is within the field of view range, taking the initial height as a target height to be displayed by the UI.
[0075] In some example embodiments, the method further comprises:
[0076] if the initial height is not within the field of view range, taking a maximum height of the field of view range as the target height to be displayed by the UI.
[0077] Reference Figure 3 which is a scenario schematic diagram of a UI display method according to an embodiment of the present disclosure.
[0078] In order to make the UI at a long distance not easy to be blocked and more eye-catching, in the present disclosure, for the UI at a long distance, a higher display height is configured than the UI at a short distance, so that the user can more easily notice the UI at a long distance.
[0079] In some example embodiments, the method for determining the target height to be displayed by the UI comprises:
[0080] in response to the distance being greater than a preset distance threshold, determining the target height to be a first height;
[0081] in response to the distance being less than the distance threshold, determining the target height to be a second height; wherein the first height is higher than the second height.
[0082] wherein the distance between the virtual character and the UI is determined by a preset distance threshold.
[0083] In some example embodiments, the method further comprises:
[0084] generating a bounding box of the UI according to the UI and the distance threshold;
[0085] in response to the virtual character being outside the bounding box, determining that the distance is greater than the distance threshold;
[0086] in response to the virtual character being inside the bounding box, determining that the distance is less than the distance threshold.
[0087] wherein by constructing a bounding box, the distance between the virtual character and the UI can be determined more conveniently without complex calculation.
[0088] In some example embodiments, the bounding box comprises:
[0089] a circular bounding box.
[0090] Among them, the circular bounding box is to use a circle as a bounding box to surround the object, and only needs to detect whether two circles collide when detecting. The method of detecting the collision of the circle: assuming that the coordinates of circle A are (x1, y1), the radius is r1, the coordinates of circle B are (x2, y2), and the radius is r2, if the inequality (y2-y1)2+(x2-x1)2≤(r1+r2)2 is met, it means that the two circles have collided, that is, the distance between the centers is less than the sum of the radii of the two circles. Since the calculation of the distance needs to use the square root operation, the efficiency is low, so the square of the distance is directly compared.
[0091] In the implementation, since the virtual role occupies a small area, in the present disclosure, it can be regarded as a point, and it is only necessary to detect whether the point is in the bounding box of the UI.
[0092] In some example embodiments, the method further includes:
[0093] For the same UI, at least two UI models are constructed, and the display heights of different UI models are different;
[0094] Then, according to the distance, the UI model corresponding to the display height is displayed, and other UI models are hidden; wherein different distances correspond to different display heights of the UI model.
[0095] Among them, the UI model of different display heights is constructed, that is, the UI model does not need to be dragged up and down according to the distance, in this case, complex calculation is not needed, and higher stability is achieved.
[0096] In some example embodiments, the method further includes:
[0097] The UI is controlled to face the virtual lens of the virtual role.
[0098] Among them, in the related art, due to the particularity of the VR environment, the UI in the scene is not rendered in the UI level, but is rendered like a normal object. All the UIs produced are ordinary scene objects, and when observing it from different angles, different states and shapes are displayed. In this way, when the UI is displayed from the side, the user cannot clearly see the UI. In the present disclosure, the UI can face the user in the front direction, which is convenient for the user to read.
[0099] In some example embodiments, the control of the UI to face the virtual lens of the virtual role includes:
[0100] For any of the UIs, if the UI is a shooting object of the virtual lens, when a video frame of content displayed by the graphical user interface is refreshed, the orientation of the UI is controlled according to the position of the virtual lens.
[0101] In some example embodiments, the method further includes:
[0102] controlling the UI to be displayed in front of other models in the virtual scene.
[0103] In the related art, a UI in a scene can be blocked by other objects, while in the present disclosure, the UI can be normally displayed in front of other objects, so that the user can see the UI.
[0104] In some example embodiments, the controlling the UI to be displayed in front of other models in the virtual scene includes:
[0105] controlling the rendering order of the UI to be rendered after the rendering of other models and before the rendering of post-processing effects.
[0106] In a specific implementation, a stencil test function in a rendering pipeline is used to write the UI information under a stencil buffer, for example, a value of 128 (which can be set according to the project) is set, and all pixel information smaller than the value is discarded from all currently written and overwritten pixel points in the buffer, and only the UI pixels in the UI are left, and the effect is that the UI can be displayed in front of objects.
[0107] As can be seen from the above, the display method and device of the UI, the electronic device, and the storage medium provided by the embodiments of the present disclosure provide a graphical user interface through a VR display terminal, the content displayed by the graphical user interface includes at least part of a virtual scene, the virtual scene contains the UI, and the method includes: obtaining the distance between the virtual character and the UI; if the distance is farther, the display height of the UI is higher; and the same UI at different display heights has the same size. Through the present disclosure, the user can see the UI while judging the distance of the UI.
[0108] Further, the UI can be displayed in front of objects, which solves the scene situation of how to prompt important targets to the user in a VR environment; the UI faces the user, which improves the game experience of the user and facilitates the game to express the content in the game to the user.
[0109] It should be noted that the method of the embodiments of the present disclosure can be executed by a single device, such as a computer or a server, etc. The method of the embodiments can also be applied to a distributed scenario, and be completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiments of the present disclosure, and the multiple devices can interact with each other to complete the method.
[0110] It should be noted that some embodiments of the present disclosure have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0111] Based on the same inventive concept, the present disclosure also provides a UI display device corresponding to any of the above-mentioned embodiment methods.
[0112] Reference Figure 4 The UI display device provides a graphical user interface through a VR display terminal, the content displayed by the graphical user interface includes at least part of a virtual scene, the virtual scene includes a virtual character, and the device includes:
[0113] The UI acquisition module 410 is configured to acquire a UI corresponding to a target object in the virtual scene.
[0114] The distance determination module 420 is configured to determine a distance between the current position of the virtual character and the target object.
[0115] The display height determination module 430 is configured to determine a target height at which the UI is to be displayed according to the distance, wherein the greater the distance, the higher the target height.
[0116] The display module 440 is configured to display the UI at the target height in an associated region of the target object in the virtual scene.
[0117] In some example embodiments, the size of the UI is the same when the UI is displayed at different positions in the virtual scene.
[0118] In some example embodiments, the display height determination module 430 is specifically configured to:
[0119] determine an initial height at which the UI is to be displayed according to the distance;
[0120] acquire a field of view of the virtual character when the virtual character faces the target object;
[0121] determine whether the initial height is within the field of view;
[0122] if the initial height is within the field of view, take the initial height as a target height at which the UI is to be displayed.
[0123] In some example embodiments, the display height determination module 430 is further configured to:
[0124] if the initial height is not within the field of view, take a maximum height of the field of view as the target height at which the UI is to be displayed.
[0125] In some example embodiments, the display height determination module 430 is specifically configured to:
[0126] in response to the distance being greater than a preset distance threshold, determine the target height to be a first height;
[0127] in response to the distance being less than the distance threshold, determine the target height to be a second height; wherein the first height is higher than the second height.
[0128] In some example embodiments, the distance determination module 420 is specifically configured to:
[0129] generate a bounding box of the UI according to a position of the UI and the distance threshold;
[0130] in response to the virtual character being outside the bounding box, determine that the distance is greater than the distance threshold;
[0131] in response to the virtual character being inside the bounding box, determine that the distance is less than the distance threshold.
[0132] In some example embodiments, the bounding box comprises:
[0133] a circular bounding box.
[0134] In some example embodiments, the display module 440 is specifically configured to:
[0135] for the same UI, construct at least two UI models, and different display heights of different UI models are different;
[0136] then: according to the distance, display the UI model corresponding to the display height, and hide other UI models; wherein different distances correspond to different display heights of the UI models.
[0137] In some example embodiments, the display module 440 is specifically configured to:
[0138] control the orientation of the UI towards the virtual camera of the virtual character.
[0139] In some example embodiments, the display module 440 is specifically configured to:
[0140] For any of the UIs, if the UI is the shooting object of the virtual camera, when the video frame refreshing of the content displayed in the graphical user interface, control the orientation of the UI according to the position of the virtual camera.
[0141] In some example embodiments, the display module 440 is specifically configured to:
[0142] control the UI to be displayed before other models in the virtual scene.
[0143] In some example embodiments, the display module 440 is specifically configured to:
[0144] control the rendering order of the UI to be rendered after other models and before post-processing effects.
[0145] For the convenience of description, the above apparatus is described in various modules according to functions. Of course, in the implementation of the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0146] The apparatus of the above embodiments is used to implement the display method of the corresponding UI in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which are not repeated here.
[0147] Based on the same inventive concept, the present disclosure also provides an electronic device corresponding to the method of any of the above embodiments, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the display method of the UI according to any of the above embodiments.
[0148] Figure 5 A more specific hardware structure of an electronic device according to the present embodiment is shown in the schematic diagram, which can include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040 and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030 and the communication interface 1040 are connected to each other through the bus 1050 for communication within the device.
[0149] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing relevant programs to implement the technical solutions provided by the embodiments of the present specification.
[0150] The memory 1020 can be implemented by a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called and executed by the processor 1010.
[0151] The input / output interface 1030 is configured to connect input / output modules to implement information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input devices can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices can include a display, a speaker, a vibrator, an indicator light, etc.
[0152] The communication interface 1040 is configured to connect a communication module (not shown in the figure) to implement the communication interaction between the device and other devices. The communication module can realize communication through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0153] The bus 1050 includes a channel for transmitting information between various components (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040) of the device.
[0154] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only include the components necessary to implement the solutions of the embodiments of the present specification, and does not have to include all the components shown in the figure.
[0155] The electronic device of the above embodiments is used to implement the display method of the corresponding UI in any of the preceding embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0156] Based on the same inventive concept, the disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the display method of the UI according to any of the above embodiments.
[0157] The non-transitory computer-readable storage medium described above can be any available medium or data storage device that can be accessed by a computer, including but not limited to a magnetic storage (such as a floppy disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc.), an optical storage (such as a CD, a DVD, a BD, a HVD, etc.), and a semiconductor memory (such as a ROM, an EPROM, an EEPROM, a non-volatile memory (NAND FLASH), a solid-state disk (SSD)), etc.
[0158] The storage medium of the above embodiments stores computer instructions for causing a computer to perform the display method of the UI according to any of the above exemplary method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0159] Those skilled in the art know that the embodiments of the disclosure can be implemented as a system, a method or a computer program product. Therefore, the disclosure can be embodied in the form of a complete hardware, a complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, which is generally referred to as "circuitry", "module" or "system" herein. In addition, in some embodiments, the disclosure can also be embodied in the form of a computer program product in one or more computer-readable media, which contains computer-readable program code.
[0160] Any combination of one or more computer readable medium can be utilized. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
[0161] A computer readable signal medium can include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
[0162] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0163] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In an embodiment, multiple data storage devices can be used to store data. The data storage devices can be located on the same computer or on different computers.
[0164] It should be understood that each of the flow diagrams, and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flow diagrams and / or block diagrams.
[0165] These computer program instructions can also be stored in a computer- readable medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the functions / acts specified in the flow diagrams and / or block diagrams.
[0166] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flow diagrams and / or block diagrams.
[0167] Further, although the operations of the method(s) of the present disclosure are described in a particular, sequential order, this order is not meant to be a limitation and is not intended to imply that there is an absolute requirement to perform the operations in the particular order described. On the contrary, some of the operations can be performed in a different order, or performed in parallel, or omitted, or combined with other operations, without changing the intended result.
[0168] The use of the verbs "comprise", "comprising", "include", "including", "contain", "containing", "involving", and variations thereof, in the specification are not intended to imply that a claimed process, method, article, or apparatus is limited to the elements or steps described, but rather that the elements or steps are examples of elements or steps that can be included in the claimed process, method, article, or apparatus.
[0169] While the spirit and principles of the present disclosure have been described with reference to several specific implementations, it is to be understood that the present disclosure is not limited to the specific implementations disclosed and that the division into various aspects is not meant to imply that features from one aspect cannot be combined with features from another aspect to benefit from this disclosure. The present disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims covers all such modifications and arrangements.
Claims
1. A display method of a UI, characterized by, The method comprises: acquiring a UI corresponding to a target object in the virtual scene; determining a distance between a current position of the virtual character and the target object; constructing at least two UI models for the same UI, different display heights of different UI models; according to the distance, displaying the UI model corresponding to the display height, and hiding other UI models; wherein different distances correspond to different display heights of the UI model; displaying the UI at the target height in the associated region of the target object in the virtual scene, wherein the rendering order of the UI is controlled to be rendered after other models are rendered and before post-processing effects are rendered, so as to control the UI to be displayed before other models in the virtual scene.
2. The method of claim 1, wherein, The size of the UI is the same when the UI is displayed at different positions in the virtual scene.
3. The method of claim 1, wherein, The target height to be displayed by the UI is determined according to the distance, which comprises: determining an initial height to be displayed by the UI according to the distance; acquiring a field of view when the virtual character faces the target object; determining whether the initial height is within the field of view; if the initial height is within the field of view, the initial height is taken as the target height to be displayed by the UI.
4. The method of claim 3, wherein, The method further comprises: if the initial height is not within the field of view, the maximum height of the field of view is taken as the target height to be displayed by the UI.
5. The method of claim 1, wherein, The target height to be displayed by the UI is determined according to the distance, wherein the greater the distance, the higher the target height, which comprises: in response to the distance being greater than a preset distance threshold, determining that the target height is a first height; in response to the distance being less than the distance threshold, determining that the target height is a second height; wherein the first height is higher than the second height.
6. The method of claim 5, wherein, The method further comprises: generating a bounding box of the UI according to the position of the UI and the distance threshold; in response to the virtual character being outside the bounding box, determining that the distance is greater than the distance threshold; in response to the virtual character being within the bounding box, determining that the distance is less than the distance threshold.
7. The method of claim 6, wherein, The bounding box comprises: a circular bounding box.
8. The method of claim 1, wherein, The method further comprises: controlling a virtual lens of the UI to face the virtual character.
9. The method of claim 8, wherein, The control of the virtual lens of the UI to face the virtual character comprises: for any UI, if the UI is a shooting object of the virtual lens, when a video frame of the content displayed by the graphical user interface is refreshed, the orientation of the UI is controlled according to the position of the virtual lens.
10. A display device of a UI, characterized by, The device comprises: a UI acquisition module configured to acquire a UI corresponding to a target object in the virtual scene; A distance determining module configured to determine a distance between a current position of the virtual character and the target object; A display height determining module configured to, for the same UI, construct at least two UI models, different display heights of different UI models, and according to the distance, display the UI model corresponding to the display height and hide other UI models, wherein different distances correspond to different display heights of the UI model; A display module configured to display the UI at the target height in the associated region of the target object in the virtual scene, wherein the rendering order of the UI is controlled to be rendered after other models are rendered and before post-processing effects are rendered, so as to control the UI to be displayed before other models in the virtual scene.
11. An electronic device, comprising: A computer program product comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 9 when executing the program.
12. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions for causing a computer to execute the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Control display method and device of game and display terminal
CN108854071A
Traversing photo-augmented information through depth using gesture and UI controlled occlusion planes
CN111813226A