Virtual scene screen display method, device, equipment, medium and program product

By using the first-person perspective and optical imaging technology in the virtual scene and adjusting the pupil effect of the sight interface, the problem of the virtual scene not being realistic enough in the existing technology is solved, and the sense of presence and immersion in the game is improved.

CN114100134BActive Publication Date: 2024-09-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111672379.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-10-21
Filing Date
2021-12-31
Publication Date
2024-09-20
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing virtual scenes lack technical means to achieve a sense of presence. Especially in shooting games, the game scenes observed by players through the scope of shooting props are not realistic enough.

Method used

A first-person perspective is used to present the scope interface of virtual objects using shooting props. The pupil formed by optical imaging is displayed between the frame of the scope and the field of view, and the display of the pupil is adjusted synchronously when the status of the scope or the status of the virtual object changes. effects to simulate real-life optical phenomena.

Benefits of technology

It improves the sense of presence in the virtual scene, and by introducing real optical phenomena, the game screen is more vivid and the player's sense of immersion is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114100134B
    Figure CN114100134B
Patent Text Reader

Abstract

The present application provides a method, device, equipment, computer-readable storage medium and computer program product for displaying a virtual scene; the method includes: using a first-person perspective to present an interface for a virtual object to aim using a scope included in a shooting prop; presenting a frame of an eyepiece in the scope in the interface, and displaying a field of view of a virtual scene seen by the virtual object through the scope in an internal area of ​​the frame; displaying a pupil formed by optical imaging of the outer frame of the scope between the frame and the field of view; when the state of the scope or the state of the virtual object changes, controlling the display effect of the pupil to change synchronously to adapt to the changed state. Through the present application, a real and vivid scene picture can be displayed to improve the sense of presence in the virtual scene.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Priority statement

[0002] This application claims priority to the patent application number 202111226478.2, the filing date of October 21, 2021, and the title of method, device, equipment, medium and program product for displaying a virtual scene. Technical Field

[0003] The present application relates to image processing technology, and in particular to a method, device, equipment, computer-readable storage medium and computer program product for displaying a virtual scene. Background Art

[0004] In the application of virtual scenes such as games, the sense of presence is the key factor that determines whether the player can be brought into the virtual scene. For example, for shooting games, the key factor that enables the player to immerse in the shooting scene is whether the game scene observed by the player through the shooting prop's scope is realistic. The relevant technology still lacks the technical means to achieve the sense of presence. Summary of the invention

[0005] The embodiments of the present application provide a method, device, equipment, computer-readable storage medium and computer program product for displaying a virtual scene, which can display realistic and vivid scene images to enhance the sense of presence in the virtual scene.

[0006] The technical solution of the embodiment of the present application is implemented as follows:

[0007] The present application provides a method for displaying a virtual scene, including:

[0008] A first-person perspective is used to present an interface in which a virtual object aims using a scope included in a shooting prop;

[0009] Presenting a frame of an eyepiece in the sight in the interface, wherein an inner area of ​​the frame displays a visual field of a virtual scene viewed by the virtual object through the sight;

[0010] Between the frame and the field of view, a pupil formed by optically imaging the outer frame of the sight is displayed;

[0011] When the state of the sight or the state of the virtual object changes, the display effect of the pupil is controlled to change synchronously to adapt to the changed state.

[0012] The embodiment of the present application provides a virtual scene display device, comprising:

[0013] A first presentation module, used to present an interface in which a virtual object aims using a sight included in a shooting prop, using a first-person perspective;

[0014] A second presentation module is used to present a frame of the eyepiece in the sight in the interface, wherein an inner area of ​​the frame displays a visual field of a virtual scene seen by the virtual object through the sight;

[0015] A third presentation module is used to display a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view;

[0016] The presentation control module is used to control the display effect of the pupil to change synchronously when the state of the sight or the state of the virtual object changes, so as to adapt to the changed state.

[0017] In the above solution, the first presentation module is further used to respond to the aiming instruction for the shooting prop and execute an aiming operation for the aiming scope;

[0018] During the execution of the aiming operation, a first-person perspective is used to display the process in which the aiming interface corresponding to the aiming scope gradually opens;

[0019] The third presentation module is also used to display the change process of the pupil formed by optical imaging of the outer frame of the sight from partial to full between the frame and the field of view during the execution of the opening operation of the sight.

[0020] In the above scheme, the sight further includes an objective lens and a lens barrel, and the objective lens and the eyepiece are respectively located at two ends of the lens barrel;

[0021] The first presentation module is also used to display a pupil formed by optical imaging of the lens barrel of the sight between the frame and the field of view, and the color of the pupil is consistent with the color of the lens barrel.

[0022] In the above solution, the device further comprises:

[0023] The color switching module is used to switch the current color of the frame of the eyepiece in the interface to a target color and switch the color of the pupil to the target color in response to a color switching instruction for the lens barrel.

[0024] In the above solution, the third presentation module is further used to obtain the material of the objective lens and the material of the eyepiece included in the sight;

[0025] Determining the appropriate transparency based on the material of the objective lens and the material of the eyepiece;

[0026] Between the frame and the field of view, a pupil is formed by optically imaging the outer frame of the sight based on the transparency display.

[0027] In the above scheme, the third presentation module is further used to display a pupil in the first state formed by optically imaging the outer frame of the sight between the frame and the field of view when the sight is in a stationary state or the virtual object is in a stationary state;

[0028] Among them, the first state is static. When the pupil is in the first state, it includes two concentric rings, wherein the color of the pupil in the outer ring is the same, and the color of the pupil in the inner ring gradually fades along the radial direction from the edge of the inner ring to the center of the eyepiece.

[0029] In the above solution, the third presentation module is further used to display the pupil in the second state formed by optically imaging the outer frame of the sight while the virtual object is in the moving state;

[0030] The second state is dynamic. When the pupil is in the second state, the pupil partially covers the visual field, and the size of the covered visual field changes.

[0031] In the above solution, the device further comprises:

[0032] The fourth presentation module is used to dynamically display the masking ratio of the pupil to the field of view during the process of displaying the pupil in the second state.

[0033] In the above solution, the device further comprises:

[0034] A state maintaining module, for controlling the shooting prop to continuously shoot at the object aimed at by the sight in response to a continuous shooting instruction for the shooting prop;

[0035] During the process of continuously shooting at the object, the pupil is kept in a default state so that the display effect of the pupil remains unchanged during the process of continuously shooting at the object.

[0036] In the above solution, the device further comprises:

[0037] a state control module, for controlling the shooting prop to shoot at the object aimed at by the sight in response to a shooting instruction for the shooting prop triggered at the first moment, and

[0038] The pupil is controlled to be in a default state within a target time period starting from the first moment, so that a display effect of the pupil within the target time period remains unchanged.

[0039] In the above solution, the device further comprises:

[0040] a display update module, configured to release the default state of the pupil when a second moment after the first moment arrives and the time interval between the second moment and the first moment is the same as the target time period, and

[0041] Acquire the state of the sight and the state of the virtual object;

[0042] The display effect of the pupil is updated according to the state of the sight and the state of the virtual object.

[0043] In the above scheme, the shooting prop is also equipped with a side sight, and the device also includes:

[0044] A sight switching module, for responding to a sight switching instruction for the shooting prop, switching the sight to the side sight, wherein the magnification of the side sight is different from that of the sight;

[0045] An aiming interface corresponding to the side sight is presented, and in the aiming interface, a first pupil formed by optically imaging an outer frame of the side sight is displayed, wherein a width of the first pupil corresponds to a magnification of the side sight.

[0046] In the above solution, the device further comprises:

[0047] A magnification selection module, used to present at least two magnification options in the interface;

[0048] Based on the at least two magnification options, in response to a switching instruction for the sight, canceling display of the interface to display the interface of the virtual scene, and controlling the shooting prop to equip the target sight indicated by the switching instruction;

[0049] In response to an aiming instruction triggered by an interface based on the virtual scene, presenting an aiming interface corresponding to the target aiming scope;

[0050] In the aiming interface, a second pupil formed by optically imaging the outer frame of the target sight is displayed, and the width of the second pupil corresponds to the magnification of the target sight.

[0051] In the above solution, the device further comprises:

[0052] A clarity adjustment module, used to obtain the light environment in the virtual scene where the virtual object is located, where the light intensity is different in different light environments;

[0053] When the light environment in which the virtual object is located changes, the clarity of the pupil is changed synchronously to adapt to the changed light environment.

[0054] In the above solution, before displaying the visual field of the virtual scene seen by the virtual object through the sight, the device further includes:

[0055] A patch determination module, used to create a patch consistent with the eyepiece of the sight, and draw a texture corresponding to the patch, wherein the texture includes a first part corresponding to the field of view and a second part corresponding to the pupil, and the first part is transparent;

[0056] Combining the texture with the patch to obtain a target patch;

[0057] The third rendering module is further used to obtain a scene facet corresponding to the virtual scene and a frame facet corresponding to the outer frame of the sight;

[0058] The scene facets, the frame facets and the target facets are rendered in a preset rendering order to display a pupil formed by optical imaging of the outer frame of the sight between the frame and the field of view.

[0059] In the above solution, the patch determination module is further used to obtain an initial map corresponding to the patch, wherein the initial map includes the first part and an initial part corresponding to the pupil, and the color value of each pixel in the initial part corresponds to the default state of the pupil;

[0060] Determine the state of the sight and the state of the virtual object, and determine the center point of pixel sampling according to the state of the sight and the state of the virtual object;

[0061] Based on the center point, pixel sampling is performed in the initial map to obtain a map corresponding to the patch.

[0062] The present application provides a terminal device, including:

[0063] A memory for storing executable instructions;

[0064] The processor is used to implement the screen display method of the virtual scene provided in the embodiment of the present application when executing the executable instructions stored in the memory.

[0065] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute instructions to implement the method for displaying a virtual scene provided by the embodiment of the present application.

[0066] The embodiments of the present application have the following beneficial effects:

[0067] During aiming through the scope included in the shooting prop, in addition to presenting the field of view of the virtual scene in the aiming interface, a pupil formed by optical imaging of the outer frame of the scope is displayed between the frame of the scope and the field of view, and when the state of the scope or the state of the virtual object changes, the display effect of the pupil is controlled to change synchronously. In this way, real optical phenomena in real life are introduced into the aiming application of the virtual scene, which can display real and vivid prop images and enhance the sense of presence in the virtual scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1A It is a schematic diagram of an application mode of a method for displaying a virtual scene provided in an embodiment of the present application;

[0069] Figure 1B It is a schematic diagram of an application mode of a method for displaying a virtual scene provided in an embodiment of the present application;

[0070] Figure 2 is a schematic diagram of the structure of a terminal device 400 provided in an embodiment of the present application;

[0071] Figure 3 It is a flowchart of a method for displaying a virtual scene provided in an embodiment of the present application;

[0072] Figure 4 It is a schematic diagram of the structure of the sight provided in the embodiment of the present application;

[0073] Figure 5 is a schematic diagram of the aiming interface provided in an embodiment of the present application;

[0074] Figure 6 is a schematic diagram of the aiming interface during the aiming process provided in an embodiment of the present application;

[0075] Figure 7 is a schematic diagram of an aiming interface of an embodiment of the present application;

[0076] Figure 8 is a display schematic diagram of a sight provided in an embodiment of the present application;

[0077] Fig. 9 is a schematic diagram of a mapping provided in an embodiment of the present application;

[0078] Fig.10 is a schematic diagram of a sticker display provided in an embodiment of the present application;

[0079] Fig.11 is a flowchart of a method for generating a map provided in an embodiment of the present application;

[0080] Fig.12 is a schematic diagram of a map update provided in an embodiment of the present application;

[0081] Fig.13 It is a flowchart of the method for updating a map provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0083] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0084] In the following description, the terms "first\second..." are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second..." can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0085] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0086] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0087] 1) Client: an application running in the terminal to provide various services, such as a video player client, a game client, etc.

[0088] 2) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.

[0089] 3) A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal. The virtual scene can be a simulation of the real world, a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, the virtual scene may include the sky, land, ocean, etc. The land may include environmental elements such as deserts and cities, and users can control virtual objects to move in the virtual scene.

[0090] 4) Virtual objects, images of various people and objects that can interact in a virtual scene, or movable objects in a virtual scene. The movable objects can be virtual characters, virtual animals, cartoon characters, etc., such as characters and animals displayed in a virtual scene. The virtual object can be a virtual image in the virtual scene that represents the user. A virtual scene can include multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene.

[0091] 5) Scene data, which represents feature data in a virtual scene. For example, it may include the position of a virtual object in the virtual scene, the waiting time required for configuring various functions in the virtual scene (depending on the number of times the same function can be used within a specific time), and the attribute values ​​of various states of virtual objects in the game, such as health points and magic points.

[0092] 6) Aperture refers to an entity that limits the light beam in an optical system, for example, a light hole that limits the speed of imaging light, or a light hole or frame that limits the imaging range. It can be the edge of a lens, a frame, or a specially set screen with holes. The aperture diaphragm or its corresponding image must be outside the optical system so that the pupil of the eye coincides with it to achieve a good observation effect.

[0093] 7) Pupil is the image formed by the aperture stop, which is divided into the entrance pupil and the exit pupil. The entrance pupil is the image formed by the optical system in front of it, referred to as the entrance pupil; the exit pupil is the image formed by the optical system behind it, referred to as the exit pupil.

[0094] The embodiments of the present application provide a method, device, terminal device, computer-readable storage medium and computer program product for displaying a virtual scene, which can display a real and vivid scene image to improve the sense of presence in the virtual scene. In order to facilitate easier understanding of the method for displaying a virtual scene provided by the embodiments of the present application, an exemplary implementation scenario of the method for displaying a virtual scene provided by the embodiments of the present application is first described. The virtual scene in the method for displaying a virtual scene provided by the embodiments of the present application can be completely based on the output of the terminal device, or based on the coordinated output of the terminal device and the server.

[0095] In some embodiments, the virtual scene can also be an environment for game characters to interact. For example, it can be an environment for game characters to fight in the virtual scene. By controlling the actions of the game characters, both parties can interact in the virtual scene, allowing users to relieve life stress during the game.

[0096] In one implementation scenario, see Figure 1A , Figure 1A It is a schematic diagram of the application mode of the method for displaying a virtual scene provided in an embodiment of the present application, which is applicable to some application modes that completely rely on the computing power of the graphics processing hardware of the terminal device 400 to complete the relevant data calculation of the virtual scene 100, such as stand-alone / offline mode games, and output of the virtual scene is completed through various types of terminal devices 400 such as smart phones, tablet computers, and virtual reality / augmented reality devices. As an example, the types of graphics processing hardware include central processing units (CPU) and graphics processing units (GPU).

[0097] When forming a visual perception of the virtual scene 100, the terminal device 400 calculates the data required for display through the graphics computing hardware, and completes the loading, parsing and rendering of the display data, and outputs video frames that can form a visual perception of the virtual scene through the graphics output hardware, for example, presenting two-dimensional video frames on the display screen of a smartphone, or projecting video frames to achieve a three-dimensional display effect on the lenses of augmented reality / virtual reality glasses; in addition, in order to enrich the perception effect, the terminal device 400 can also use different hardware to form one or more of auditory perception, tactile perception, motion perception and taste perception.

[0098] As an example, a client 410 (e.g., a stand-alone game application) is running on the terminal device 400, and during the operation of the client 410, a virtual scene including role-playing is output, and the virtual scene may be an environment for game characters to interact, such as a plain, street, valley, etc. for game characters to fight against each other; taking the first-person perspective display of the virtual scene 100 as an example, an interface 101 is presented in the virtual scene 100 for a virtual object to aim using a scope included in a shooting prop; wherein the virtual object may be a game character controlled by a user, that is, the virtual object is controlled by a real user, and will move in the virtual scene 100 in response to the real user's operation on a controller (e.g., a touch screen, voice-controlled switch, keyboard, mouse, joystick, etc.); for example, when the real user moves the joystick to the right, the virtual object will move to the right in the virtual scene 100, and can also remain still, jump, and control the virtual object to perform shooting operations, etc.

[0099] For example, an interface 101 for a virtual object to aim using a sight included in a shooting prop is presented in a virtual scene 100, a frame 102 of an eyepiece in the sight is presented in the aiming interface 101, a field of view 103 of a virtual scene seen by the virtual object through the sight is displayed in the inner area of ​​the frame, and a pupil 104 formed by optical imaging of the outer frame of the sight is displayed between the frame 102 and the field of view 103; when the state of the sight or the state of the virtual object changes, the display effect of the pupil is controlled to change synchronously, so as to The state after adaptation is changed. For example, when the color of the lens barrel in the sight is black, a black pupil is displayed between the frame 102 and the field of view 103. When the color of the lens barrel in the sight is switched from black to red, the color of the pupil displayed between the frame 102 and the field of view 103 is switched from black to red. In this way, compared with the related art that presents the field of view in its entirety within the frame 102, a pupil corresponding to the sight is also presented between the frame 102 and the field of view 103, thereby creating a real three-dimensional sense and enhancing the user's sense of presence in the virtual scene.

[0100] In another implementation scenario, see Figure 1B , Figure 1B It is a schematic diagram of an application mode of the screen display method of the virtual scene provided in an embodiment of the present application, which is applied to a terminal device 400 and a server 200, and is suitable for an application mode that relies on the computing power of the server 200 to complete the virtual scene calculation and output the virtual scene on the terminal device 400.

[0101] Taking the visual perception of the virtual scene 100 as an example, the server 200 calculates the virtual scene related display data (such as scene data) and sends it to the terminal device 400 through the network 300. The terminal device 400 relies on the graphics computing hardware to complete the loading, parsing and rendering of the display data, and relies on the graphics output hardware to output the virtual scene to form a visual perception. For example, a two-dimensional video frame can be presented on the display screen of a smartphone, or a video frame with a three-dimensional display effect can be projected on the lenses of augmented reality / virtual reality glasses. As for the perception of the form of the virtual scene, it can be understood that the corresponding hardware output of the terminal device 400 can be used, such as using a microphone to form auditory perception, using a vibrator to form tactile perception, and so on.

[0102] As an example, a client 410 (e.g., an online version of a game application) is running on the terminal device 400, which interacts with other users in a game by connecting to a server 200 (e.g., a game server). The terminal device 400 outputs a virtual scene 100 of the client 410. Taking the first-person perspective display of the virtual scene 100 as an example, an interface 101 is presented in the virtual scene 100 in which a virtual object uses a scope included in a shooting prop to aim. Among them, the virtual object can be a game character controlled by a user, that is, the virtual object is controlled by a real user, and will move in the virtual scene 100 in response to the real user's operation of a controller (e.g., a touch screen, voice-controlled switch, keyboard, mouse, and joystick, etc.). For example, when the real user moves the joystick to the right, the virtual object will move to the right in the virtual scene 100. It can also remain still, jump, and control the virtual object to perform shooting operations, etc.

[0103] For example, an interface 101 for a virtual object to aim using a sight included in a shooting prop is presented in a virtual scene 100, a frame 102 of an eyepiece in the sight is presented in the aiming interface 101, a field of view 103 of a virtual scene seen by the virtual object through the sight is displayed in the inner area of ​​the frame, and a pupil 104 formed by optical imaging of the outer frame of the sight is displayed between the frame 102 and the field of view 103; when the state of the sight or the state of the virtual object changes, the display effect of the pupil is controlled to change synchronously, so as to The state after adaptation is changed. For example, when the color of the lens barrel in the sight is black, a black pupil is displayed between the frame 102 and the field of view 103. When the color of the lens barrel in the sight is switched from black to red, the color of the pupil displayed between the frame 102 and the field of view 103 is switched from black to red. In this way, compared with the related art that presents the field of view in its entirety within the frame 102, a pupil corresponding to the sight is also presented between the frame 102 and the field of view 103, thereby creating a real three-dimensional sense and enhancing the user's sense of presence in the virtual scene.

[0104] In some embodiments, the terminal device 400 can implement the screen display method of the virtual scene provided in the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, APPlication), that is, a program that needs to be installed in the operating system to run, such as a shooting game APP (i.e., the above-mentioned client 410); it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a game small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.

[0105] Taking a computer program as an application program as an example, in actual implementation, the terminal device 400 installs and runs an application program that supports virtual scenes. The application program can be any one of a first-person shooter game (FPS), a third-person shooter game, a virtual reality application program, a three-dimensional map program, or a multiplayer gunfight survival game. The user uses the terminal device 400 to operate a virtual object in the virtual scene to perform an activity, which includes but is not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and building virtual buildings. Indicatively, the virtual object can be a virtual character, such as a simulated character or an anime character.

[0106] In other embodiments, the embodiments of the present application can also be implemented with the aid of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing.

[0107] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources.

[0108] For example, Figure 1BThe server 200 in the example may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal device 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal device 400 and the server 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0109] Below Figure 1A The structure of the terminal device 400 shown in FIG. Figure 2 , Figure 2 is a schematic diagram of the structure of a terminal device 400 provided in an embodiment of the present application, Figure 2 The terminal device 400 shown includes: at least one processor 420, a memory 460, at least one network interface 430 and a user interface 440. The various components in the terminal device 400 are coupled together via a bus system 450. It is understood that the bus system 450 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 450 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 450 is not shown in FIG. Figure 2 Various buses are labeled as bus system 450 .

[0110] The processor 420 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0111] The user interface 440 includes one or more output devices 441 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 440 also includes one or more input devices 442, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0112] The memory 460 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 460 may optionally include one or more storage devices that are physically remote from the processor 420.

[0113] The memory 460 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 460 described in the embodiments of the present application is intended to include any suitable type of memory.

[0114] In some embodiments, memory 460 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0115] Operating system 461, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0116] A network communication module 462, for reaching other computing devices via one or more (wired or wireless) network interfaces 430, exemplary network interfaces 430 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB);

[0117] a presentation module 463 for enabling presentation of information via one or more output devices 441 (e.g., display screen, speaker, etc.) associated with the user interface 440 (e.g., a user interface for operating peripherals and displaying content and information);

[0118] The input processing module 464 is used to detect one or more user inputs or interactions from one of the one or more input devices 442 and translate the detected inputs or interactions.

[0119] In some embodiments, the virtual scene display device provided in the embodiments of the present application can be implemented in a software manner. Figure 2 A screen display device 465 of a virtual scene stored in a memory 460 is shown, which may be software in the form of a program or plug-in, including the following software modules: a first presentation module 4651, a second presentation module 4652, a third presentation module 4653 and a presentation control module 4654. These modules are logical and therefore may be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0120] In other embodiments, the screen display device of the virtual scene provided in the embodiments of the present application can be implemented in hardware. As an example, the screen display device of the virtual scene provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the screen display method of the virtual scene provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.

[0121] The following will specifically describe the method for displaying a virtual scene provided by the embodiment of the present application in conjunction with the accompanying drawings. The method for displaying a virtual scene provided by the embodiment of the present application can be performed by Figure 1A The terminal device 400 in the embodiment can be executed separately, or it can be executed by Figure 1B The terminal device 400 and the server 200 execute collaboratively.

[0122] Below, by Figure 1A The terminal device 400 in the embodiment of the present application independently executes the method for displaying the virtual scene provided in the embodiment of the present application as an example. Figure 3 , Figure 3 is a flowchart of a method for displaying a virtual scene provided in an embodiment of the present application, which will be combined with Figure 3 The steps shown are explained.

[0123] It should be noted that Figure 3 The method shown can be executed by various forms of computer programs running on the terminal device 400, and is not limited to the above-mentioned client 410, but can also be the operating system 461, software modules and scripts mentioned above. Therefore, the client should not be regarded as a limitation on the embodiments of the present application.

[0124] Step 101: The terminal adopts a first-person perspective to present an interface in which a virtual object aims using a sight included in a shooting prop.

[0125] Among them, the sight is used to improve the accuracy of shooting targets using shooting props, and the virtual object can observe the scene of the virtual scene through the sight.

[0126] See also Figure 4 , Figure 4Schematic diagram of the structure of the sight provided in the embodiment of the present application, such as Figure 4 As shown, the sight includes components such as an objective lens, an inverted image group, an adjustment handwheel, a lens barrel, and an eyepiece. Among them, the objective lens is located at the front end of the sight and is the component of the sight that receives external light sources. The larger the diameter of the objective lens, the more light sources it can receive. At the same distance, the larger the diameter of the sight, the clearer the image that the virtual object using the sight can see. Usually, in order to obtain more light, a layer of fluoride can be coated on the surface of the objective lens to increase the amount of light transmitted and reduce the amount of reflection. If you see purple or yellow reflections on the objective lens, it is the reflection caused by the coating; the adjustment handwheel is located in the middle of the lens barrel, including the direction handwheel of the sight and the focusing handwheel of the objective lens. Among them, the direction handwheel is used to adjust the horizontal direction to correct wind deviation and the lead time of the moving target. The focusing handwheel can make the image clearer and reduce the error. The inverted image group is used to put the image straight. This is because the convex lens forms an inverted and magnified real image outside the double focal length, while the eyepiece sees a magnified and inverted virtual image because the distance to the pupil is too small. Therefore, the magnified and inverted image seen from the eyepiece is put straight through the inverted image group. The lens barrel is used to load the inverted image group and adjust the hand wheel and other components, and plays a role in protection and light transmission. The larger the diameter of the lens barrel, the greater the light brightness and the lower the refraction angle, so the image will be clearer. The eyepiece is located at the end of the sight. The function of the eyepiece is to further magnify the image magnified by the objective lens and transmit it to the human eye.

[0127] Step 102: Presenting a frame of the eyepiece in the sight in the interface, and displaying a field of view of the virtual scene seen by the virtual object through the sight in the inner area of ​​the frame.

[0128] Step 103: Displaying a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view.

[0129] See also Figure 5 , Figure 5 It is a schematic diagram of the aiming interface provided in an embodiment of the present application, which adopts a first-person perspective to present an interface 501 for aiming a virtual object using a sight, presents a frame 502 of the eyepiece in the interface 501, and displays a field of view 503 of the virtual scene seen by the virtual object through the sight in the internal area of ​​the frame 502, that is, the field of view 503 displays scene elements of the virtual scene at the corresponding position seen through the sight, such as virtual trees, stones, grass, etc.; a pupil is displayed between the frame 502 and the field of view 503, such as a black border 504 with a certain width, to create a real three-dimensional effect.

[0130] In some embodiments, the terminal may adopt a first-person perspective to present an interface for aiming a virtual object using a scope included in a shooting prop in the following manner: in response to an aiming instruction for the shooting prop, an aiming operation for the scope is performed; in the process of performing the aiming operation, a first-person perspective is used to display a process in which the aiming interface corresponding to the scope gradually opens; accordingly, the terminal may display a pupil formed by optically imaging the outer frame of the scope between the frame and the field of view in the following manner: in the process of performing the aiming operation for the scope, between the frame and the field of view, along with the execution of the aiming operation, a change process from partial to full of the pupil formed by optically imaging the outer frame of the scope is displayed.

[0131] The aiming operation refers to the process of moving the aiming scope included in the shooting prop to the line of sight position of the virtual object, also known as the aiming operation or the focusing operation. For example, see Figure 6 , Figure 6 It is a schematic diagram of the aiming interface of the aiming process provided in an embodiment of the present application. In the process of executing the aiming operation, the aiming interface of the virtual scene viewed through the aiming scope gradually opens, that is, the field of view picture in the aiming interface changes from nothing to full. Correspondingly, along with the execution of the aiming operation, the pupil changes from partial to full. When the aiming is completed, the pupil is evenly distributed between the frame and the field of view picture.

[0132] In some embodiments, during the process of performing a scope operation, if the user turns the scope operation on and off, the aiming interface is cancelled and a visual switch is performed, such as switching the first-person vision to the third-person vision, and presenting a picture of the virtual scene under the third-person vision.

[0133] In some embodiments, the sight also includes an objective lens and a lens barrel, and the objective lens and the eyepiece are respectively located at both ends of the lens barrel; the terminal can display the pupil formed by optical imaging of the outer frame of the sight between the frame and the field of view in the following manner: between the frame and the field of view, the pupil formed by optical imaging of the lens barrel of the sight is displayed, and the color of the pupil is consistent with the color of the lens barrel.

[0134] Here, usually, the lens barrel connecting the eyepiece and the objective lens affects the color of the pupil. In order to give the user a real feeling, the pupil can be displayed in a color consistent with the color of the lens barrel. For example, the color of the lens barrel is black, and a black pupil is displayed between the frame and the field of view.

[0135] In some embodiments, the terminal can achieve pupil color switching in the following manner: in response to a color switching instruction for the lens barrel, switch the current color of the eyepiece frame in the interface to the target color, and switch the pupil color to the target color.

[0136] Among them, the color switching instruction can be triggered based on the color switching control presented in the aiming interface, or by triggering the color switching button located on the launching prop. In some embodiments, the barrel of the aiming scope of the launching prop can be pre-set with multiple colors, and the multiple colors are arranged in a certain order. When the color of the pupil is switched, it can be switched in a pre-set order. For example, assuming that the color of the current barrel is black, at this time, the frame of the eyepiece in the aiming interface is black, the color of the pupil is also black, and the red is close to the black in the arrangement order. When the terminal receives the color switching instruction, the color of the eyepiece in the aiming interface is automatically switched from black to red, and the color of the pupil is switched from black to red. In other embodiments, when the terminal receives the color switching instruction, at least two color options for the user to select can also be presented. When the user selects the option corresponding to the target color, the terminal automatically switches the current color of the frame of the eyepiece in the aiming interface to the selected target color in response to the selection operation, and switches the color of the pupil from the current color to the target color.

[0137] In some embodiments, the terminal can display the pupil formed by optical imaging of the outer frame of the sight between the frame and the field of view in the following manner: obtain the material of the objective lens and the eyepiece included in the sight; determine the corresponding transparency based on the material of the objective lens and the eyepiece; and display the pupil formed by optical imaging of the outer frame of the sight between the frame and the field of view based on the transparency.

[0138] Here, the transparency effect of the pupil is related to the materials of the eyepiece and objective lens in the sight. The eyepieces and objective lenses made of different materials have different absorbance and transmittance. In order to make the pupil observed through the sight more realistic, the corresponding transparency can be determined based on the materials of the objective lens and eyepiece, and the pupil of the determined transparency can be displayed.

[0139] In some embodiments, the terminal may display a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view in the following manner: when the sight is in a stationary state or the virtual object is in a stationary state, a pupil in a first state formed by optically imaging the outer frame of the sight is displayed between the frame and the field of view; wherein the first state is a static pupil. When in the first state, it includes two concentric rings, wherein the color of the pupil in the outer ring is the same, and the color of the pupil in the inner ring gradually fades radially along the edge of the inner ring to the center of the eyepiece.

[0140] For example, Figure 5In the embodiment, when the virtual object using the sight or the sight is in a stationary state, the light in the virtual scene enters the sight along a direction parallel to the sight, the objective lens and the eyepiece are located on the same axis, the light is not blocked, and the pupil observed through the sight presents a gradual effect. For example, the pupil is divided into two concentric rings, where the pupil color in the outer ring remains unchanged, and the pupil color in the inner ring radially toward the center of the eyepiece presents a gradual effect.

[0141] In some embodiments, the terminal may display a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view in the following manner: while the virtual object is in a moving state, a pupil formed by optically imaging the outer frame of the sight is displayed in a second state; wherein the second state is dynamic, and while the pupil is in the second state, the pupil partially masks the field of view, and the size of the masked field of view changes.

[0142] Here, when the virtual object is in a moving state, it will cause the shooting prop to shake, so that the light in the virtual scene cannot enter the sight in a direction parallel to the sight, that is, the light enters the sight obliquely, and part of the light will be blocked by the barrel, resulting in imaging differences, for example, see Figure 7 , Figure 7 It is a schematic diagram of the aiming interface of an embodiment of the present application. During the movement of the virtual object, the pupil seen in the aiming interface masks the field of view, and the size of the masked field of view changes dynamically as the virtual object moves.

[0143] In some embodiments, the terminal can also dynamically display the mask ratio of the pupil to the visual field when displaying the pupil in the second state. Here, the mask ratio is used to indicate the degree of deviation of the shooting prop's direction from the line of sight of the virtual object, thereby prompting the player to adjust the direction of the shooting prop.

[0144] In some embodiments, the terminal can also respond to continuous shooting instructions for the shooting prop to control the shooting prop to continuously shoot at the object aimed at the sight; during the process of continuously shooting at the aimed object, the pupil is kept in a default state so that the display effect of the pupil remains unchanged during the process of continuously shooting at the aimed object.

[0145] Here, on the basis of displaying the pupil between the border and the field of view, under normal circumstances, when using a launching prop to shoot a virtual target, due to angle problems, the width of the pupil may become larger, or, during the operation of opening the scope, the sight may shake. In this case, the presented pupil may change, which will have a negative impact on the aiming accuracy. For this reason, when controlling the virtual object to use the launching prop to shoot the aimed target object, the embodiment of the present application controls the pupil to be in a default state. For example, when the pupil has a black border, the width of the black border is limited to a certain range and remains unchanged, so that the black border does not cover too large a field of view, thereby avoiding the presented pupil effect from having a negative impact on the aiming, thereby ensuring a balance between simulation and playability of the virtual scene.

[0146] Step 104: When the state of the sight or the state of the virtual object changes, the display effect of the pupil is controlled to change synchronously to adapt to the changed state.

[0147] Here, after the pupil is displayed, when the state of the virtual object changes, the display effect of the pupil is controlled to change synchronously to adapt to the changed state of the scope or the virtual object.

[0148] In some embodiments, the terminal may control the shooting prop to shoot at the object aimed at by the sight in response to a shooting instruction for the shooting prop triggered at the first moment, and control the pupil to be in a default state within a target time period starting at the first moment, so that the display effect of the pupil remains unchanged within the target time period.

[0149] Here, each time a shooting command is triggered and the shooting prop is controlled to fire a bullet to execute a shooting at the aimed target object, the pupil can be controlled to be in a default state during the next target time period after the shooting prop first shoots the target object. For example, when the pupil has a black border, during the target time period, the width of the black border is limited to remain unchanged within a certain range, so that the black border does not cover too large a field of view, thereby meeting the user's needs of shooting the target object multiple times in a short period of time.

[0150] In some embodiments, when a second moment after the first moment arrives and the time interval between the second moment and the first moment is the same as the target time period, the default state of the pupil is released, and the state of the sight and the state of the virtual object are obtained; based on the state of the sight and the state of the virtual object, the display effect of the pupil is updated.

[0151] Here, when the time the pupil is controlled to be in the default state reaches the target time, the default state of the pupil is released, and the display effect of the pupil is updated in real time according to the state of the sight and the state of the virtual object, so that the updated display effect is compatible with the current state of the sight and the state of the virtual object.

[0152] In some embodiments, the shooting prop is also equipped with a side sight, and the terminal can also switch the sight to the side sight in response to a sight switching instruction for the shooting prop, wherein the magnification of the side sight is different from that of the sight; present an aiming interface corresponding to the side sight, and display a first pupil formed by optical imaging of the outer frame of the side sight in the aiming interface, wherein the width of the first pupil corresponds to the magnification of the side sight.

[0153] In practical applications, the diameters and lengths of the objective lenses or eyepieces of scopes with different magnifications are different, and the widths of the pupils formed are different, such as Figure 8 As shown, Figure 8 It is a display schematic diagram of the sight provided in an embodiment of the present application. After the current sight is switched to a side sight with a different magnification, a pupil corresponding to the magnification of the switched side sight is displayed in the aiming interface corresponding to the side sight.

[0154] In some embodiments, in the aiming interface, the terminal may also present at least two magnification options; based on the at least two magnification options, in response to a switching instruction for the sight, the aiming interface is canceled to display the interface of the virtual scene, and the shooting prop is controlled to assemble the target sight indicated by the switching instruction; in response to an aiming instruction triggered by an interface based on the virtual scene, an aiming interface corresponding to the target sight is presented; in the aiming interface corresponding to the target sight, a second pupil formed by optical imaging of the outer frame of the target sight is displayed, wherein the width of the second pupil corresponds to the magnification of the target sight.

[0155] Here, in the interface of the virtual scene, the terminal can also present options for selecting a scope, wherein different options correspond to different magnifications of the scope. When the user selects a target option, the terminal receives a switching instruction for the target scope corresponding to the target option. The terminal responds to the switching instruction by canceling the current aiming interface and controlling the shooting prop to prepare the target scope. When the aiming operation is performed on the target scope, the aiming interface corresponding to the target scope is presented, and the pupil related to the target scope is presented.

[0156] In some embodiments, the terminal may also obtain the light environment in the virtual scene where the virtual object is located, wherein the light intensity in different light environments is different; when the light environment where the virtual object is located changes, the clarity of the pupil is changed synchronously to adapt to the changed light environment.

[0157] Among them, when the light environment in which the virtual object is located changes, in addition to synchronously changing the clarity of the pupil, the visibility of the pupil can also be synchronously changed.

[0158] In some embodiments, before displaying the field of view of the virtual scene seen by the virtual object through the sight, the terminal may also create a patch consistent with the eyepiece of the sight, and draw a texture corresponding to the patch, wherein the texture includes a first part corresponding to the field of view, and a second part corresponding to the pupil, and the first part is transparent; the texture and the patch are combined to obtain a target patch; accordingly, the terminal can display the pupil formed by optically imaging the outer frame of the sight between the frame and the field of view in the following manner: obtain a scene patch corresponding to the virtual scene and a frame patch corresponding to the outer frame of the sight; render the scene patch, frame patch and target patch in a preset rendering order to display the pupil formed by optically imaging the outer frame of the sight between the frame and the field of view.

[0159] For example, the rendering order of the scene facets is before the rendering order of the frame facets, and the rendering order of the frame facets is before the target facets. By rendering the scene facets, the frame facets and the target facets in sequence, the pupil formed by the optical imaging of the outer frame of the sight can be displayed between the frame and the field of view.

[0160] In some embodiments, the terminal may draw a map corresponding to the patch in the following manner: obtain an initial map corresponding to the patch, wherein the initial map includes a first part and an initial part corresponding to the pupil, and the color value of each pixel in the initial part corresponds to a default state of the pupil; determine the state of the sight and the state of the virtual object, and determine the center point of pixel sampling based on the state of the sight and the state of the virtual object; based on the center point, perform pixel sampling in the initial map to obtain a map corresponding to the patch.

[0161] Here, in practical applications, the pupil has attributes such as width, color, gradient, and transparency. In order to achieve the corresponding pupil effect, the corresponding attributes can be set. For example, the color value of each pixel in the initial map corresponding to the patch is obtained to correspond to the default state of the pupil, such as the first part of the transparent color, the pupil width (corresponding to the black edge width) and the gradient color size (corresponding to the gradient of the black edge); then, the state of the sight and the state of the virtual object are determined, and the center point of the pixel sampling is determined according to the state of the sight and the state of the virtual object. Finally, based on the center point, pixel sampling is performed in the initial map to obtain the map corresponding to the patch. For example, a circle is drawn with the center point as the center and the size of the first part as the radius to obtain a circle, wherein the inside of the circle is a pure white part, that is, the area where the field of view is located; with the center point as the center, circles are drawn with the size of the first part as the radius, and circles are drawn with the sum of the size of the first part and the gradient color size as the radius to obtain concentric rings, wherein the inside of the ring is the gradient area, and the rest is the black area.

[0162] In actual applications, when a virtual object or a sight is in motion, the coordinate values ​​of the texture can be modified when sampling. For example, sampling is not performed with the center point mentioned above as the center of the circle. This can allow the pupil to change as the virtual object changes. For example, when the virtual object moves to the left, there should be more pupils on the left. Therefore, according to the current running state of the virtual object, the sampling center is also moved leftward and sampled to obtain an updated texture corresponding to the corresponding facet. The desired pupil effect can be presented by rendering the image based on the updated texture. For example, as the aiming operation is performed, the pupil changes from partial to full in the aiming interface.

[0163] Below, an exemplary application of the embodiment of the present application in an actual application scenario will be described. Taking a virtual scene as a game as an example, when controlling a virtual object to observe the game screen through the sight of a shooting prop, in order to display a real and vivid picture to improve the sense of presence of the game, the embodiment of the present application provides a method for displaying a virtual scene, which uses a first-person perspective to present an interface for aiming a virtual object using a sight included in a shooting prop; the frame of the eyepiece in the sight is presented in the aiming interface, and the field of view of the virtual scene seen by the virtual object through the sight is displayed in the inner area of ​​the frame of the eyepiece, and the pupil formed by optical imaging of the outer frame of the sight is displayed between the frame and the field of view. When the state of the sight or the state of the virtual object changes, the display effect of the pupil is controlled to change synchronously to adapt to the changed state, so as to realize the use of optical characteristics in reality to display a realistic pupil effect. Next, the pupil is explained as an example of a black border with a certain width.

[0164] like Figure 6 As shown, in the process of controlling the virtual object to perform the aiming operation, the aiming interface of the virtual scene viewed by the virtual object through the aiming telescope gradually opens, that is, the field of view picture in the aiming interface changes from nothing to full. Correspondingly, along with the execution of the aiming operation, the pupil (black border) presented in the aiming interface changes from partial to full. When the aiming is completed, the pupil (black border) is evenly distributed between the frame and the field of view picture.

[0165] like Figure 5 As shown, when the sight is in a stationary state, the light in the virtual scene enters the sight along a direction parallel to the sight. In this case, the objective lens and the eyepiece are located on the same axis, the light is not blocked, and the pupil (black border) observed through the sight presents a gradual effect. As shown, the black border is divided into two concentric rings, wherein the color of the black border in the outer ring remains unchanged, and the color of the black border in the inner ring radially toward the center of the eyepiece presents a gradually fading effect.

[0166] like Figure 7As shown, when the virtual object is in a moving state, it will cause the shooting prop to shake, so that the light in the virtual scene cannot enter the sight in a direction parallel to the sight, that is, the light enters the sight obliquely, and part of the light will be blocked by the lens barrel, resulting in imaging differences. In this case, the pupil (black edge) seen in the aiming interface masks the field of view, and the size of the masked field of view changes dynamically with the movement of the virtual object.

[0167] In order to enrich the display style of the pupil, the embodiments of the present application also provide a variety of optional debugging options, such as the color of the pupil, the width of the pupil, the gradient of the pupil and the transparency of the pupil, etc., wherein the color of the pupil is consistent with the color of the lens barrel. For example, the color of the lens barrel is black, and a black pupil is displayed between the frame and the field of view, referred to as "black edge"; the width and gradient of the pupil are related to the incident angle of the light speed; the transparency of the pupil is related to the material of the eyepiece and the objective lens in the sight. The absorbance and transmittance of the eyepiece and the objective lens of different materials are different, and the pupil displaying the corresponding transparency can be determined based on the material of the objective lens and the eyepiece.

[0168] In actual applications, on the basis of displaying the pupil (black border) between the border and the field of view, usually, when controlling the virtual object to use the launching prop to shoot the virtual target, due to the angle problem, the width of the pupil may become larger. In this case, if the presented pupil (black border) is synchronously sent to change, the changed pupil (black border) will have a negative impact on the aiming accuracy. For this reason, when controlling the virtual object to use the launching prop to shoot the aimed target object, the embodiment of the present application controls the pupil (black border) to be in a default state, such as limiting the width of the black border to remain unchanged within a certain range, so that the black border will not cover too large a field of view, thereby avoiding the negative impact of the presented pupil on aiming, and ensuring the balance of the game between simulation and playability.

[0169] When rendering, in order to display the pupil (black border) effect, a patch consistent with the eyepiece of the sight can be created, and a texture corresponding to the patch can be drawn, wherein the texture includes a first part corresponding to the field of view, and a second part corresponding to the pupil (black border), and the first part is transparent; the texture and the patch are combined to obtain a target patch; the scene patch corresponding to the virtual scene and the frame patch corresponding to the outer frame of the sight are obtained; after rendering the scene patch, the frame patch and the target patch in a preset rendering order, the rendered interface is displayed, that is, the interface for aiming through the sight, and the target border and the field of view in the content area of ​​the frame are presented in the interface to display the pupil (black border) between the frame and the field of view.

[0170] See also Fig. 9 , Fig. 9 is a schematic diagram of a mapping provided in an embodiment of the present application, Fig. 9In the figure, the white part is the first part of transparent color, the black part is the second part that is opaque. When the scope is in normal state, the circular patch is obtained by sampling the color value on the texture with the middle of the texture as the center and the length and width of the texture (the length and width are the same) as the diameter. The gray part in the middle is the transition effect between the pupil (black edge) and the field of view seen through the scope.

[0171] In practical applications, since the planner has the requirements to modify the pupil (black border) width, the gradient of the pupil (black border), the transparency of the pupil (black border), etc., when sampling, the actual sampling effect of the texture can be dynamically modified according to the attribute values ​​configured according to the attribute requirements, the position of the current sampling coordinates and the transparency, that is, the appropriate texture can be dynamically generated, such as Fig.10 As shown, Fig.10 is a schematic diagram of a sticker display provided in an embodiment of the present application, Fig.10 The map shown is generated based on properties such as black border width, gradient, and transparency.

[0172] See also Fig.11 , Fig.11 : is a flowchart of a method for generating a map provided by an embodiment of the present application, the method comprising:

[0173] Step 201: Obtain the initial texture corresponding to the patch.

[0174] The color value of each pixel in the initial map corresponds to the default state of the pupil, such as the first part of the transparent color (i.e. Fig.10 The size of the black border (corresponding to the width of the black border) and the size of the gradient color (corresponding to the gradient of the black border);

[0175] Step 202: Determine the state of the sight and the state of the virtual object, and determine the center point of pixel sampling according to the state of the sight and the state of the virtual object.

[0176] Step 203: Based on the center point, pixel sampling is performed in the initial map to obtain a map corresponding to the patch.

[0177] Here, a circle is drawn with the center point as the center and the size of the white border as the radius to obtain a circle, wherein the inside of the circle is the pure white part, that is, the area where the field of vision is located; with the center point as the center, circles are drawn with the size of the white border as the radius, and circles are drawn with the sum of the size of the white border and the size of the gradient color as the radius to obtain concentric rings, wherein the inside of the rings is the gradient area, and the rest is the black area.

[0178] In practical applications, when a virtual object or a sight is in motion, the coordinate value of the texture sampling can be modified, such as not sampling with the above center point as the center of the circle, so that the pupil changes with the change of the virtual object. Fig.12 As shown, Fig.12 This is a schematic diagram of map update provided in an embodiment of the present application. For example, when the virtual object moves to the left, the black border of the left pupil should be more. Therefore, according to the current running state of the virtual object, the sampling center is also moved to the left and then sampled to obtain an updated map corresponding to the corresponding face patch. The picture is rendered based on the updated map to present the desired pupil effect. For example, along with the execution of the scope operation, the pupil (black border) changes from partial to full in the aiming interface.

[0179] See also Fig.13 , Fig.13 It is a flowchart of a method for updating a map provided in an embodiment of the present application, the method comprising: in step 301, obtaining a moving speed of a virtual object; in step 302, determining an offset difference of a center point based on the moving speed of the virtual object, wherein the offset difference is proportional to the moving speed of the virtual object; in step 303, determining an updated center point based on the offset difference and the center point of the original pixel sampling; in step 304, performing pixel sampling in the initial map based on the updated center point to obtain an updated map corresponding to the patch; after obtaining the updated map, rendering the picture based on the updated map can present a desired pupil effect.

[0180] In the above manner, in the process of aiming through a scope, real optical phenomena in real life are introduced into the aiming interface, which can display real and vivid prop effects and create a unique sense of game presence.

[0181] The following is a description of an exemplary structure of a virtual scene screen display device 465 provided in an embodiment of the present application implemented as a software module. In some embodiments, the image display device 465 is stored in Figure 2 The software modules in the virtual scene display device 465 in the memory 460 may include:

[0182] The first presentation module 4651 is used to present an interface in which a virtual object aims using a sight included in a shooting prop, using a first-person perspective;

[0183] A second presentation module 4652 is used to present a frame of the eyepiece in the sight in the interface, wherein an inner area of ​​the frame displays a field of view of a virtual scene seen by the virtual object through the sight;

[0184] A third presentation module 4653 is used to display a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view;

[0185] The presentation control module 4654 is used to control the display effect of the pupil to change synchronously when the state of the sight or the state of the virtual object changes, so as to adapt to the changed state.

[0186] In some embodiments, the first presentation module is further configured to execute a scope opening operation for the sight in response to a scope opening instruction for the shooting prop;

[0187] During the execution of the aiming operation, a first-person perspective is used to display the process in which the aiming interface corresponding to the aiming scope gradually opens;

[0188] The third presentation module is also used to display the change process of the pupil formed by optical imaging of the outer frame of the sight from partial to full between the frame and the field of view during the execution of the opening operation of the sight.

[0189] In some embodiments, the sight further includes an objective lens and a lens barrel, wherein the objective lens and the eyepiece are respectively located at two ends of the lens barrel;

[0190] The first presentation module is also used to display a pupil formed by optical imaging of the lens barrel of the sight between the frame and the field of view, and the color of the pupil is consistent with the color of the lens barrel.

[0191] In some embodiments, the apparatus further comprises:

[0192] The color switching module is used to switch the current color of the frame of the eyepiece in the interface to a target color and switch the color of the pupil to the target color in response to a color switching instruction for the lens barrel.

[0193] In some embodiments, the third presentation module is further used to obtain the material of the objective lens and the material of the eyepiece included in the sight;

[0194] Determining the appropriate transparency based on the material of the objective lens and the material of the eyepiece;

[0195] Between the frame and the field of view, a pupil is formed by optically imaging the outer frame of the sight based on the transparency display.

[0196] In some embodiments, the third presentation module is further used to display a pupil in a first state formed by optically imaging the outer frame of the sight between the frame and the field of view during the process in which the sight is in a stationary state or the virtual object is in a stationary state;

[0197] Among them, the first state is static. When the pupil is in the first state, it includes two concentric rings, wherein the color of the pupil in the outer ring is the same, and the color of the pupil in the inner ring gradually fades along the radial direction from the edge of the inner ring to the center of the eyepiece.

[0198] In some embodiments, the third presentation module is further used to display a pupil in the second state formed by optically imaging the outer frame of the sight during the process in which the virtual object is in the moving state;

[0199] The second state is dynamic. When the pupil is in the second state, the pupil partially covers the visual field, and the size of the covered visual field changes.

[0200] In some embodiments, the apparatus further comprises:

[0201] The fourth presentation module is used to dynamically display the masking ratio of the pupil to the field of view during the process of displaying the pupil in the second state.

[0202] In some embodiments, the apparatus further comprises:

[0203] A state maintaining module, for controlling the shooting prop to continuously shoot at the object aimed at by the sight in response to a continuous shooting instruction for the shooting prop;

[0204] During the process of continuously shooting at the object, the pupil is kept in a default state so that the display effect of the pupil remains unchanged during the process of continuously shooting at the object.

[0205] In some embodiments, the apparatus further comprises:

[0206] a state control module, for controlling the shooting prop to shoot at the object aimed at by the sight in response to a shooting instruction for the shooting prop triggered at the first moment, and

[0207] The pupil is controlled to be in a default state within a target time period starting from the first moment, so that a display effect of the pupil within the target time period remains unchanged.

[0208] In some embodiments, the apparatus further comprises:

[0209] a display update module, configured to release the default state of the pupil when a second moment after the first moment arrives and the time interval between the second moment and the first moment is the same as the target time period, and

[0210] Acquire the state of the sight and the state of the virtual object;

[0211] The display effect of the pupil is updated according to the state of the sight and the state of the virtual object.

[0212] In some embodiments, the shooting prop is also equipped with a side sight, and the device further comprises:

[0213] A sight switching module, for responding to a sight switching instruction for the shooting prop, switching the sight to the side sight, wherein the magnification of the side sight is different from that of the sight;

[0214] An aiming interface corresponding to the side sight is presented, and in the aiming interface, a first pupil formed by optically imaging an outer frame of the side sight is displayed, wherein a width of the first pupil corresponds to a magnification of the side sight.

[0215] In some embodiments, the apparatus further comprises:

[0216] A magnification selection module, used to present at least two magnification options in the interface;

[0217] Based on the at least two magnification options, in response to a switching instruction for the sight, canceling display of the interface to display the interface of the virtual scene, and controlling the shooting prop to equip the target sight indicated by the switching instruction;

[0218] In response to an aiming instruction triggered by an interface based on the virtual scene, presenting an aiming interface corresponding to the target aiming scope;

[0219] In the aiming interface, a second pupil formed by optically imaging the outer frame of the target sight is displayed, and the width of the second pupil corresponds to the magnification of the target sight.

[0220] In the above solution, the device further comprises:

[0221] A clarity adjustment module, used to obtain the light environment in the virtual scene where the virtual object is located, where the light intensity is different in different light environments;

[0222] When the light environment in which the virtual object is located changes, the clarity of the pupil is changed synchronously to adapt to the changed light environment.

[0223] In some embodiments, before displaying the field of view of the virtual scene seen by the virtual object through the sight, the device further includes:

[0224] A patch determination module, used to create a patch consistent with the eyepiece of the sight, and draw a texture corresponding to the patch, wherein the texture includes a first part corresponding to the field of view and a second part corresponding to the pupil, and the first part is transparent;

[0225] Combining the texture with the patch to obtain a target patch;

[0226] The third rendering module is further used to obtain a scene facet corresponding to the virtual scene and a frame facet corresponding to the outer frame of the sight;

[0227] The scene facets, the frame facets and the target facets are rendered in a preset rendering order to display a pupil formed by optical imaging of the outer frame of the sight between the frame and the field of view.

[0228] In some embodiments, the patch determination module is further used to obtain an initial map corresponding to the patch, wherein the initial map includes the first part and an initial part corresponding to the pupil, and the color value of each pixel in the initial part corresponds to a default state of the pupil;

[0229] Determine the state of the sight and the state of the virtual object, and determine the center point of pixel sampling according to the state of the sight and the state of the virtual object;

[0230] Based on the center point, pixel sampling is performed in the initial map to obtain a map corresponding to the patch.

[0231] The embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above-mentioned method of the embodiment of the present application.

[0232] The present application embodiment provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the screen display method of the virtual scene provided by the present application embodiment, for example, Figure 3 The method shown.

[0233] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0234] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0235] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0236] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0237] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A method for displaying a virtual scene, characterized in that: The method comprises: A first-person perspective is used to present an interface in which a virtual object aims using a scope included in a shooting prop; Presenting a frame of an eyepiece in the sight in the interface, wherein an inner area of ​​the frame displays a visual field of a virtual scene viewed by the virtual object through the sight; Between the frame and the field of view, a pupil formed by optically imaging the outer frame of the sight is displayed; When the state of the sight or the state of the virtual object changes, controlling the display effect of the pupil to change synchronously to adapt to the changed state; Wherein, the pupil formed by optically imaging the outer frame of the sight is displayed between the frame and the field of view, including: Obtaining the material of the objective lens and the eyepiece included in the sight; Determining the appropriate transparency based on the material of the objective lens and the material of the eyepiece; Between the frame and the field of view, a pupil is formed by optically imaging the outer frame of the sight based on the transparency display.

2. The method according to claim 1, characterized in that The interface of using the first-person perspective to present the virtual object aiming with the aiming scope included in the shooting prop includes: In response to a scope opening instruction for the shooting prop, executing a scope opening operation for the sight; During the execution of the aiming operation, a first-person perspective is used to display the process in which the aiming interface corresponding to the aiming scope gradually opens; The method of displaying a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view includes: During the process of executing the aiming operation for the sight, between the frame and the field of view, along with the execution of the aiming operation, the change process of the pupil formed by optical imaging of the outer frame of the sight from partial to full is displayed.

3. The method according to claim 1, characterized in that The sight also includes an objective lens and a lens barrel, wherein the objective lens and the eyepiece are respectively located at two ends of the lens barrel; Between the frame and the field of view, a pupil formed by optically imaging the outer frame of the sight is displayed, including: A pupil formed by optically imaging the lens barrel of the sight is displayed between the frame and the field of view, and the color of the pupil is consistent with the color of the lens barrel.

4. The method according to claim 3, characterized in that The method further comprises: In response to a color switching instruction for the lens barrel, a current color of the frame of the eyepiece in the interface is switched to a target color, and a color of the pupil is switched to the target color.

5. The method according to claim 1, characterized in that The method of displaying a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view includes: When the sight is in a stationary state or the virtual object is in a stationary state, a pupil in a first state formed by optically imaging the outer frame of the sight is displayed between the frame and the field of view; Among them, the first state is static. When the pupil is in the first state, it includes two concentric rings, wherein the color of the pupil in the outer ring is the same, and the color of the pupil in the inner ring gradually fades along the radial direction from the edge of the inner ring to the center of the eyepiece.

6. The method according to claim 1, characterized in that The method of displaying a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view includes: When the virtual object is in the moving state, displaying a pupil in a second state formed by optically imaging the outer frame of the sight; The second state is dynamic. When the pupil is in the second state, the pupil partially covers the visual field, and the size of the covered visual field changes.

7. The method according to claim 6, characterized in that The method further comprises: In the process of displaying the pupil in the second state, the masking ratio of the pupil to the field of view is dynamically displayed.

8. The method according to claim 1, characterized in that The method further comprises: In response to a continuous shooting instruction for the shooting prop, controlling the shooting prop to continuously shoot at the object aimed at by the sight; During the process of continuously shooting at the object, the pupil is kept in a default state so that the display effect of the pupil remains unchanged during the process of continuously shooting at the object.

9. The method according to claim 1, characterized in that The method further comprises: In response to a shooting instruction for the shooting prop triggered at the first moment, the shooting prop is controlled to shoot at the object aimed at by the sight, and The pupil is controlled to be in a default state within a target time period starting from the first moment, so that a display effect of the pupil within the target time period remains unchanged.

10. The method according to claim 9, characterized in that The method further comprises: When a second moment after the first moment arrives and the time interval between the second moment and the first moment is the same as the target time period, the default state of the pupil is released, and Acquire the state of the sight and the state of the virtual object; The display effect of the pupil is updated according to the state of the sight and the state of the virtual object.

11. The method according to claim 1, characterized in that The shooting prop is also equipped with a side sight, and the method further comprises: In response to a scope switching instruction for the shooting prop, the scope is switched to the side scope, the side scope having a different magnification than the scope; An aiming interface corresponding to the side sight is presented, and in the aiming interface, a first pupil formed by optically imaging an outer frame of the side sight is displayed, wherein a width of the first pupil corresponds to a magnification of the side sight.

12. The method according to claim 1, characterized in that The method further comprises: In the interface, at least two magnification options are presented; Based on the at least two magnification options, in response to a switching instruction for the sight, canceling display of the interface to display the interface of the virtual scene, and controlling the shooting prop to equip the target sight indicated by the switching instruction; In response to an aiming instruction triggered by an interface based on the virtual scene, presenting an aiming interface corresponding to the target aiming scope; In the aiming interface, a second pupil formed by optically imaging the outer frame of the target sight is displayed, and the width of the second pupil corresponds to the magnification of the target sight.

13. The method according to claim 1, characterized in that The method further comprises: Acquire the light environment of the virtual scene where the virtual object is located, where the light intensity is different in different light environments; When the light environment in which the virtual object is located changes, the clarity of the pupil is changed synchronously to adapt to the changed light environment.

14. The method according to claim 1, wherein: Before displaying the visual field of the virtual scene viewed by the virtual object through the sight, the method further includes: Creating a patch that is consistent with the eyepiece of the sight, and drawing a texture corresponding to the patch, wherein the texture includes a first portion corresponding to the field of view and a second portion corresponding to the pupil, wherein the first portion is transparent; Combining the texture with the patch to obtain a target patch; The method of displaying a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view includes: Acquire a scene facet corresponding to the virtual scene and a frame facet corresponding to the outer frame of the sight; The scene facets, the frame facets and the target facets are rendered in a preset rendering order to display a pupil formed by optical imaging of the outer frame of the sight between the frame and the field of view.

15. The method according to claim 14, characterized in that The step of drawing a map corresponding to the patch includes: Acquire an initial map corresponding to the patch, wherein the initial map includes the first part and an initial part corresponding to the pupil, and a color value of each pixel in the initial part corresponds to a default state of the pupil; Determine the state of the sight and the state of the virtual object, and determine the center point of pixel sampling according to the state of the sight and the state of the virtual object; Based on the center point, pixel sampling is performed in the initial map to obtain a map corresponding to the patch.

16. A virtual scene display device, characterized in that: The device comprises: A first presentation module, used to present an interface in which a virtual object aims using a sight included in a shooting prop, using a first-person perspective; A second presentation module is used to present a frame of the eyepiece in the sight in the interface, wherein an inner area of ​​the frame displays a visual field of a virtual scene seen by the virtual object through the sight; A third presentation module is used to display a pupil formed by optically imaging the outer frame of the sight between the frame and the field of view; A presentation control module, used for controlling the display effect of the pupil to change synchronously when the state of the sight or the state of the virtual object changes, so as to adapt to the changed state; Among them, the third presentation module is also used to obtain the material of the objective lens included in the sight and the material of the eyepiece; determine the corresponding transparency based on the material of the objective lens and the material of the eyepiece; between the frame and the field of view, display the pupil formed by optical imaging of the outer frame of the sight based on the transparency.

17. A terminal device, characterized in that: include: A memory for storing executable instructions; A processor is used to implement the method for displaying a virtual scene as described in any one of claims 1 to 15 when executing the executable instructions stored in the memory.

18. A computer-readable storage medium, characterized in that: Executable instructions are stored, which are used to implement the screen display method of the virtual scene described in any one of claims 1 to 15 when executed by a processor.

19. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the method for displaying a virtual scene as described in any one of claims 1 to 15 is implemented.