Methods, devices, equipment, media, and program products for displaying virtual props
By adding shadows to the inner ring of the scope accessory's outline for the eyepiece and objective lens, the problem of abrupt lens changes in the scope accessory was solved, improving the realism of the virtual scene and the player experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-09-08
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, the lens changes of scope accessories on virtual firearms are stiff, resulting in low realism and a poor immersive experience for players.
Add eyepiece and objective lens shadows to the inner ring of the scope accessory's outline, and demonstrate the lens shadow changes through a scope-opening animation.
The visual realism of the scope attachments has been enhanced, improving the player's immersive experience while shooting.
Smart Images

Figure CN117654032B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of interface interaction, and in particular to a method, apparatus, device, medium and program product for displaying virtual props. Background Technology
[0002] In virtual environments that include virtual objects, users can typically manipulate these objects and use virtual items to perform various activities or events within the virtual environment. For example, in games, players can control virtual objects to shoot with virtual weapons. These virtual weapons often include a scope attachment, allowing players to observe and shoot targets through it.
[0003] In related technologies, when players control virtual objects and open scope attachments, they can usually see a scope-opening animation. The scope-opening animation is used to show the process of the lens size and position change after the scope attachment is opened, increasing the realism of the player controlling the virtual character to shoot in the virtual scene.
[0004] However, the changes in the scope attachment lens and position shown in the aiming animation are usually rather abrupt, resulting in a low level of realism from the scope attachment lens, a poor player experience, and an inability to immerse themselves in the shooting experience. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and program product for displaying virtual items, which can make the visual effects of virtual items more realistic and improve the player's gaming experience. The technical solution is as follows:
[0006] On the one hand, a method for displaying virtual props is provided, the method comprising:
[0007] The first scene is displayed, showing the virtual scene observed from the perspective of the main virtual object. The main virtual object holds a virtual firearm, which is equipped with a scope accessory, wherein the scope accessory includes an eyepiece end and an objective lens end.
[0008] Receive a scope-opening action, the scope-opening action being used to instruct the master virtual object to observe the virtual scene through the scope accessory;
[0009] The second scene view is displayed by observing the virtual scene through the scope accessory, and the second scene view includes the outline of the accessory corresponding to the scope accessory;
[0010] The inner ring of the accessory outline displays the eyepiece end shadow and the objective lens end shadow. The eyepiece end shadow represents the shadow cast by the scope barrel at the eyepiece end of the scope accessory, and the objective lens end shadow represents the shadow cast by the scope barrel at the objective lens end of the scope accessory.
[0011] On the other hand, a display device for virtual props is provided, the device comprising:
[0012] The display module is used to display a first scene view of the virtual scene observed from the perspective of the main virtual object. The main virtual object holds a virtual firearm, and the virtual firearm is equipped with a scope accessory, wherein the scope accessory includes an eyepiece end and an objective lens end.
[0013] A receiving module is used to receive a scope-opening action, which instructs the main virtual object to observe the virtual scene through the scope accessory;
[0014] The display module is also used to display a second scene image of the virtual scene observed through the scope accessory, the second scene image including the outline of the accessory corresponding to the scope accessory;
[0015] The display module is also used to display the eyepiece end shadow and the objective lens end shadow within the inner ring of the accessory outline. The eyepiece end shadow represents the shadow cast by the scope barrel at the eyepiece end of the scope accessory, and the objective lens end shadow represents the shadow cast by the scope barrel at the objective lens end of the scope accessory.
[0016] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the virtual prop display method as described in any of the embodiments of this application above.
[0017] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the virtual prop display method as described in any of the embodiments of this application above.
[0018] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual prop display method described in any of the above embodiments.
[0019] The beneficial effects of the technical solutions provided in this application include at least the following:
[0020] By adding two shadows to the inner ring of the scope attachment on the virtual prop—the eyepiece shadow and the objective lens shadow—players can see a more realistic picture when controlling the current virtual object to activate the scope attachment and switch observation angles. This makes the virtual props in the virtual scene appear as if they were in a real scene, enriches the lens performance of the scope attachment, and enhances the immersive experience of players when controlling the current virtual object to shoot. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of a method for displaying virtual props provided in an exemplary embodiment of this application;
[0023] Figure 2 This is a schematic diagram of the outline shadow of the scope accessory provided in an exemplary embodiment of this application when the position of the scope accessory is fixed in the center of the screen;
[0024] Figure 3 This is a schematic diagram showing the changes in the eyepiece shadow, objective lens shadow, and contour shadow on the sight accessory when the position of the sight accessory provided in an exemplary embodiment of this application is not fixed;
[0025] Figure 4 This is a structural block diagram of a terminal provided in an exemplary embodiment of this application;
[0026] Figure 5 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of this application;
[0027] Figure 6 This is a flowchart illustrating a method for displaying virtual items according to an exemplary embodiment of this application;
[0028] Figure 7 Based on Figure 6 A flowchart illustrating the method for adding eyepiece and objective lens shading to a scope accessory;
[0029] Figure 8 This is an overall schematic diagram of the eyepiece end shadow provided in another exemplary embodiment of this application;
[0030] Figure 9 This is a schematic diagram of the portion of the eyepiece end shadow within the outline of the scope accessory provided in another exemplary embodiment of this application;
[0031] Figure 10 This is an overall schematic diagram of the objective lens shadow provided in another exemplary embodiment of this application;
[0032] Figure 11 This is a schematic diagram of the portion of the objective lens end shadow within the outline of the scope accessory provided in another exemplary embodiment of this application;
[0033] Figure 12 This is a schematic diagram of the candidate lens display area provided in another exemplary embodiment of this application;
[0034] Figure 13 This is a schematic diagram illustrating the addition of contour shadows based on the lens display area provided in another exemplary embodiment of this application;
[0035] Figure 14 This is a flowchart of a method for displaying virtual props under superimposed breathing vibrations, provided in another exemplary embodiment of this application;
[0036] Figure 15 This is a schematic diagram of a method for displaying virtual props provided in another exemplary embodiment of this application;
[0037] Figure 16 This is a structural block diagram of a virtual prop display device provided in an exemplary embodiment of this application;
[0038] Figure 17 This is a structural block diagram of a virtual prop display device provided in another exemplary embodiment of this application;
[0039] Figure 18 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0041] In game applications or some virtual scene-based applications, players can usually control virtual objects to perform various actions in the virtual scene; or, players can control virtual objects to interact with other virtual objects in the virtual scene; or, players can also control virtual objects to use various virtual props to perform various activities or events in the virtual scene.
[0042] In a demonstrative sense, players can control their main virtual object to dance and engage in virtual shooting interactions with other player-controlled virtual objects in the virtual scene; they can also control their main virtual object to interact with non-player characters (NPCs) in the virtual scene.
[0043] Players can also control the main virtual object to interact with other virtual objects using various virtual props in the virtual scene, such as using virtual props to attack hostile virtual objects, or using virtual healing props to heal teammate virtual objects.
[0044] Taking the use of virtual props to shoot at enemy virtual objects as an example, the master virtual object can use virtual props such as virtual firearms to shoot at enemy virtual objects. Usually, in order to make the shooting process more realistic and to accurately locate enemy virtual objects, virtual accessories such as scopes are usually equipped on the virtual firearms. These accessories are used to adjust the current master virtual object's perspective, switching from a first observation range to a second observation range, and controlling the next action of the current master virtual object based on the second observation range.
[0045] However, in related technologies, when using scope attachments on virtual firearms, the changes in the scope attachment's lens and position displayed in the aiming animation are usually rather stiff, resulting in a low level of realism in the scope attachment's visuals and a poor sense of immersion for the player.
[0046] In this embodiment, two shadows are added to the inner ring of the scope accessory's outline: a shadow at the eyepiece end and a shadow at the objective lens end. After the scope accessory is opened, as the aiming animation plays on the terminal screen or the scope accessory's position changes, the changing process of the shadows at the eyepiece end and objective lens end at different times can be seen, making the scope accessory's lens performance richer, thereby improving the realism of the image and enhancing the player's immersive experience when controlling the current virtual object to shoot.
[0047] Indicative, such as Figure 1 As shown, the virtual weapon 100 currently used by the main virtual object is equipped with a scope accessory 110. When the main virtual object opens the scope accessory 110, a scope-opening animation will automatically play on the screen. This animation includes the scope accessory 110 itself and the animation of its shadow changes. Figure 1 As shown, three types of shadows are displayed on the lens of the scope accessory 110: eyepiece shadow 120, objective lens shadow 130, and contour shadow 140.
[0048] When the scope accessory is fixed in the center of the screen, the front sight of the scope accessory coincides with the center of the screen. The shadows at the objective and eyepiece ends are not very noticeable on the scope accessory, while the outline shadow is more obvious, as shown in the illustration. Figure 2 As shown, Figure 2 The image shows the outline shadow 210 on the scope accessory 200 when the scope accessory 200 is fixed in the center of the screen.
[0049] When the position of the scope accessories is not fixed, the eyepiece shadow, objective lens shadow, and outline shadow will change with the position of the scope accessories, as illustrated below. Figure 3 As shown, Figure 3 The diagram shows how the eyepiece shadow 320, objective lens shadow 330, and contour shadow 340 change as the position of the scope accessory 310 changes after it is opened and rotated counterclockwise.
[0050] After the current master virtual object clicks the scope button, the scope accessory 310 is activated, and the current master virtual object's view switches from the first observation range to the second observation range 300. The second observation range 300 includes: scope accessory 310, eyepiece shadow 320, objective lens shadow 330, outline shadow 340, virtual weapon 350, building 360, virtual map 370, virtual weapon marker 380, etc.
[0051] Among them, Building 360 is used to represent the buildings in the virtual scene where the current master virtual object is located, forming the screen of the current virtual scene, and serving as identification information to instruct the user to control the current virtual object to perform activities in different locations in the virtual scene.
[0052] The virtual map 370 in the upper left corner indicates the location of the currently controlled virtual object within the virtual scene, and also indicates the specific part of the virtual scene within the current viewpoint's observation range. This serves as identification information to guide the user in finding the virtual object's specific location or coordinates within the virtual scene. The virtual weapon icon 380 in the lower right corner indicates that the currently controlled virtual object is using a virtual weapon 350.
[0053] As the position of the scope accessory 310 changes, i.e., it moves counterclockwise, the positions of the eyepiece shadow 320, objective lens shadow 330, and contour shadow 340 also rotate counterclockwise along the lens contour of the scope accessory 310.
[0054] Because of the change in the position of the scope accessory 310, the second observation range 300 observed through the scope accessory 310 also changes, that is, the image observed in the current virtual field scope changes.
[0055] The terminal in this application can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, etc. The terminal has an application installed and running that supports virtual scenes, such as an application supporting 3D virtual scenes. This application can be any of the following: a virtual reality application, a 3D mapping application, a third-person shooter (TPS) game, a first-person shooter (FPS) game, or a multiplayer online battle arena (MOBA) game. Optionally, the application can be a standalone application, such as a standalone 3D game application, or an online multiplayer application.
[0056] Figure 4 A structural block diagram of an electronic device provided in an exemplary embodiment of this application is shown. The electronic device 400 includes an operating system 420 and an application program 422.
[0057] Operating system 420 is the foundational software that provides application 422 with secure access to computer hardware.
[0058] Application 422 is an application that supports virtual scenes. Optionally, application 422 is an application that supports three-dimensional virtual scenes. Application 422 can be any of the following: virtual reality application, 3D map application, TPS game, FPS game, or MOBA game. Application 422 can be a standalone application, such as a standalone 3D game application, or a network-based application.
[0059] Figure 5 A structural block diagram of a computer system provided in an exemplary embodiment of this application is shown. The computer system 500 includes: a first device 520, a server 540, and a second device 560.
[0060] The first device 520 has an application installed and running that supports virtual scenes. This application can be any of the following: a virtual reality application, a 3D mapping application, a TPS game, an FPS game, or a MOBA game. The first device 520 is the device used by the first user, who uses the first device 520 to control a second virtual object located in the virtual scene to perform activities, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up items, shooting, attacking, and throwing at least one of these. Illustratively, the second virtual object is the first virtual character, such as a realistic or anime character.
[0061] The first device 520 is connected to the server 540 via a wireless network or a wired network.
[0062] Server 540 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 540 is used to provide background services for applications supporting 3D virtual scenes. Optionally, server 540 undertakes the main computing work, and the first device 520 and the second device 560 undertake secondary computing work; or, server 540 undertakes secondary computing work, and the first device 520 and the second device 560 undertake the main computing work; or, server 540, the first device 520, and the second device 560 collaborate on computing using a distributed computing architecture.
[0063] The second device 560 has an application installed and running that supports virtual scenes. This application can be any of the following: a virtual reality application, a 3D mapping application, an FPS game, or a MOBA game. The second device 560 is a device used by a second user, who uses it to control a second virtual object located in the virtual scene to perform activities, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up items, shooting, attacking, and throwing at least one of these. Illustratively, the second virtual object is a second virtual character, such as a realistic or anime character.
[0064] Optionally, the first virtual character and the second virtual character are in the same virtual scene. Optionally, the first virtual character and the second virtual character can belong to the same team, the same organization, have a friend relationship, or have temporary communication permissions. Optionally, the first virtual character and the second virtual character can also belong to different teams, different organizations, or two hostile groups.
[0065] Optionally, the applications installed on the first device 520 and the second device 560 are the same, or the applications installed on the two devices are the same type of application from different control system platforms. The first device 520 can refer to one of multiple devices, and the second device 560 can refer to one of multiple devices; this embodiment only uses the first device 520 and the second device 560 as examples. The device types of the first device 520 and the second device 560 may be the same or different, and these device types include at least one of the following: game console, desktop computer, smartphone, tablet computer, e-book reader, MP3 player, MP4 player, and laptop computer. The following embodiment uses a desktop computer as an example.
[0066] Those skilled in the art will understand that the number of the aforementioned devices can be more or less. For example, there may be only one device, or there may be dozens or hundreds of devices, or even more. This application does not limit the number or type of devices.
[0067] It's worth noting that the aforementioned server 540 can be implemented as a physical server or a cloud server. Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technology, information technology, integration technology, management platform technology, and application technology applied to the cloud computing business model. It can form resource pools, providing flexibility and convenience on demand. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to a backend system for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can be achieved through cloud computing.
[0068] Optionally, the aforementioned server 540 can also be implemented as a node in a blockchain system.
[0069] In some embodiments, the method provided in this application can be applied to cloud gaming scenarios, thereby enabling the cloud server to perform data logic calculations during the game process, while the terminal is responsible for displaying the game interface.
[0070] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the game data involved in this application was obtained with full authorization.
[0071] Based on the above description of the terminology and implementation environment, the method for displaying virtual items provided in this application embodiment will be explained. Please refer to [link / reference]. Figure 6 The document illustrates a flowchart of a method for displaying virtual items according to an exemplary embodiment of this application. The method is described using an example of its application in a terminal. Figure 6 As shown, the method includes:
[0072] Step 601: Display the first scene screen from the perspective of the master virtual object observing the virtual scene.
[0073] The first scene screen includes, but is not limited to, the currently controlled virtual object, the virtual buildings in the current virtual scene, and the virtual props used by the currently controlled virtual object.
[0074] Optionally, taking the first virtual object as the virtual object controlled by the current terminal as an example, the current controlled virtual object is located in the virtual scene, that is, the current terminal can control the first virtual object to perform various activities or execute various events in the virtual scene.
[0075] Optionally, the virtual prop held by the master virtual object is a virtual firearm, which is equipped with a scope accessory, including an eyepiece end and an objective lens end.
[0076] Optionally, the virtual scene includes a first virtual object and a hostile virtual object, that is, the virtual scene contains a currently controlled virtual object and a hostile virtual object. The currently controlled virtual object performs shooting events in the virtual scene, that is, the controlled virtual object uses a virtual weapon to shoot at the hostile virtual object. During the shooting process, the scope attachment on the virtual weapon can be used to assist in aiming at the hostile virtual object.
[0077] It is worth noting that, in addition to the first virtual object, the virtual scene may include other virtual objects. These other virtual objects may include hostile virtual objects of the first virtual object, or teammate virtual objects of the first virtual object, or both teammate and hostile virtual objects of the first virtual object. In some embodiments, the other virtual objects may also include clone virtual objects of the first virtual object; that is, the clone virtual objects and the first virtual object correspond to the same object parameters but correspond to different scene locations. This embodiment does not limit this. The types of virtual props include, but are not limited to, virtual firearms, virtual bullets, virtual energy drinks, and virtual medical equipment. This embodiment does not limit this.
[0078] Virtual firearms are a type of virtual prop. The types of virtual firearms include, but are not limited to, virtual submachine guns, virtual submachine pistols, virtual assault rifles, virtual sniper rifles, virtual light machine guns, virtual shotguns, virtual pistols, and virtual launchers.
[0079] It is worth noting that the virtual props used by the current master virtual object can be any kind of virtual prop, and the virtual firearms used by the master virtual object can be any of the above-mentioned types of virtual firearms. This embodiment does not limit this.
[0080] Optionally, scope attachments are accessories assembled onto virtual firearms. They allow players to switch viewing angles from a primary to a secondary viewpoint when controlling the currently active virtual object to perform shooting actions. Scope attachments are typically found on virtual rifles, virtual sniper rifles, and virtual submachine guns.
[0081] The types of scope accessories include, but are not limited to, holographic sights, red dot sights, and multi-magnification sights. Among them, multi-magnification sights include, but are not limited to, 2x, 3x, and 4x scopes, etc. Different types of scope accessories are suitable for shooting situations at different distances, and this embodiment does not limit them.
[0082] Optionally, the scope accessory mounted on the virtual weapon of the master virtual object is a magnified scope.
[0083] Sight accessories include, but are not limited to, components such as the objective lens, eyepiece, and scope barrel. The objective lens provides the initial magnification of the observed target, magnifying distant targets and forming a corresponding real image. The eyepiece's main function is either image transmission or further magnification of the real image obtained from the objective lens, thus forming a clear virtual image at a position suitable for normal human vision. The scope barrel is cylindrical, connecting the eyepiece to the objective lens at one end and the objective lens at the other. The barrel is used to mount the lenses for both the eyepiece and objective lenses, assisting in magnifying objects within the observation range.
[0084] It is worth noting that the shape of the scope accessory can be arbitrary, the type of scope accessory can be arbitrary, when the scope accessory is a multi-magnification scope, its magnification can be arbitrary, the scope accessory can be located on any virtual prop that can be equipped with the scope accessory, and the scope accessory can include at least one component among the eyepiece, objective lens, scope barrel, etc., which are not limited in this embodiment.
[0085] Step 602: Receive the scope opening action.
[0086] The "scope" action refers to opening the scope accessory on the virtual weapon currently being used by the main virtual object, which is used to instruct the main virtual object to observe the virtual scene through the scope accessory.
[0087] Optionally, taking a mobile phone, tablet, or similar device as an example, the scope action can be initiated by clicking the scope button on the screen. Clicking the scope button switches the view of the main virtual object to the view of observing the current virtual scene using the scope accessory; that is, the observation range of the main virtual object is adjusted from the first observation range to the second observation range.
[0088] Optionally, taking a desktop computer or laptop computer as an example, the scope-opening action can be activated via a shortcut key. Pressing the shortcut key adjusts the observation range of the main virtual object from the first observation range to the second observation range.
[0089] The activation of the aiming action will display a corresponding aiming animation on the screen, which shows the entire process of aiming. Depending on the percentage of aiming, the appearance of the scope attachments during the aiming animation will also be different. That is, the aiming animation includes changes in the degree of aiming of the scope attachments and changes in the position of the scope attachments. The aiming percentage is used to describe the degree of aiming of the scope attachments.
[0090] It is worth noting that the terminal device can be arbitrary, and the method of activating the aiming action can also be arbitrary. When the terminal device is a mobile phone, tablet, or other similar device, the method of activating the aiming action includes, but is not limited to, clicking the aiming button, pressing and holding the aiming button, clicking the aiming button multiple times, or automatically aiming when firing. When the terminal device is a desktop computer, laptop, or other similar device, the method of activating the aiming action includes, but is not limited to, pressing a shortcut key or clicking the aiming button with a mouse. When the terminal device is other types of devices, the method of activating the aiming action can also be arbitrary; this embodiment does not limit this.
[0091] Step 603 displays a second scene view of the virtual scene observed through the scope accessory.
[0092] The second scene is the view seen by the main virtual object through the scope accessory on the virtual firearm; it is a view displayed on the screen based on the virtual scene.
[0093] Optionally, the second scene screen may include, but is not limited to, a virtual map corresponding to the virtual scene, hostile virtual objects, scope accessories, the outline of accessories corresponding to the scope accessories, the part where the virtual firearm and the scope accessory are connected, virtual buildings, virtual firearm logos, the crosshair of the scope accessory, the center point of the screen, etc.
[0094] It is worth noting that the second scene may include at least one of the above-mentioned contents, or may not include the above-mentioned contents; this embodiment does not limit this.
[0095] The sight accessory is aimed at the front sight, which is used to assist in aiming at a virtual enemy target, and then to fire at the virtual enemy target based on the front sight. The front sight is generally located at the center of the eyepiece end of the sight accessory.
[0096] It is worth noting that when the master virtual object uses a virtual weapon to shoot, it can use a scope attachment to observe and assist in aiming at enemy virtual objects, or it can directly hip-fire without using a scope attachment for observation. This embodiment does not limit this. Hip-fire is a shooting technique or method, that is, shooting directly without activating a scope attachment. Because it is not scoped in, deviation or swaying usually occurs when hip-firing.
[0097] The position of the front sight can be arbitrary and is determined by the position of the eyepiece end of the scope accessory. The position of the front sight can be the center of the eyepiece end of the scope accessory, or it can deviate from the center of the eyepiece end of the scope accessory, but it must be within the range of the eyepiece end of the scope accessory, that is, it must be within the outline of the corresponding accessory of the scope accessory. This embodiment does not limit this.
[0098] Step 604: Display the eyepiece end shadow and objective end shadow within the inner circle of the accessory outline.
[0099] The area within the accessory outline typically refers to the area within the accessory outline corresponding to the lens at the eyepiece end of the scope accessory. The lenses of a scope accessory include the eyepiece lens and the objective lens. On the screen, only the eyepiece lens of the scope accessory is usually displayed, that is, the lens at the end closest to the human eye corresponding to the currently controlled virtual object.
[0100] Optionally, the outline of a scope accessory refers to the outline of the lens at the eyepiece end of the scope accessory.
[0101] The eyepiece shadow refers to the shadow cast by the scope barrel at the eyepiece end of a scope accessory. This shadow occurs when light in the virtual scene obscures part of the scope barrel as the scope accessory moves, resulting in a shadow at the eyepiece end. It is used to simulate lighting effects in a virtual scene and to display the corresponding changes in the eyepiece lens on the screen as the scope accessory moves.
[0102] The objective lens shadow refers to the shadow cast by the scope barrel at the objective lens end of a scope accessory. This shadow occurs when light in the virtual scene obscures part of the scope barrel as the scope accessory moves, resulting in a shadow at the objective lens end. It is used to simulate lighting effects in a virtual scene and to display the corresponding changes in the objective lens on the screen as the scope accessory moves.
[0103] It is worth noting that the outline of the scope can be the outline of the lens at the eyepiece end of the scope accessory; it can also be the outline of the lens at the objective end of the scope accessory mapped onto the lens at the eyepiece end of the scope accessory; or it can be the outline of the entire scope barrel of the scope accessory mapped in the direction perpendicular to the human eye corresponding to the current master virtual object, i.e., the outline of the scope barrel; this embodiment does not limit this.
[0104] It is worth noting that, in addition to the eyepiece and objective lens shadows of the scope accessories, other types of shadows can also exist on the scope accessories, such as contour shadows. Contour shadows are shadows created when the eyepiece lens of the scope accessory is blocked by light. That is, scope accessories include, but are not limited to, at least one type of shadow, such as contour shadows, eyepiece shadows, and objective lens shadows. This embodiment does not limit this.
[0105] In summary, the method provided in this application adds two additional shadows—the eyepiece shadow and the objective lens shadow—to the inner circle of the scope accessory's outline. After the scope accessory is opened, as the scope-opening animation plays on the terminal screen or the position of the scope accessory changes, the changing process of the eyepiece shadow and the objective lens shadow at different times can be seen. This makes the lens performance of the scope accessory richer, thereby improving the realism of the image and enhancing the immersive experience of the player when controlling the current virtual object to shoot.
[0106] In an optional embodiment, eyepiece and objective lens shadows are displayed within the inner ring of the scope accessory outline. For example... Figure 7 As shown. Step 604 above can also be implemented as follows:
[0107] Step 6041: Obtain the observation angle of the virtual scene observed by the main virtual object through the scope accessory.
[0108] Optionally, the observation angle at which the master virtual object observes the virtual scene through the scope accessory is the first preset observation angle, with the master virtual object's eyes facing the scope accessory.
[0109] It is worth noting that since the scope accessory is part of the virtual weapon held by the master virtual object, when the virtual weapon changes position on the screen due to factors such as gun sway, the position of the scope accessory will also change accordingly. In other words, when the master virtual object observes through the scope accessory, the observation angle of the master virtual object also changes. The observation angle of the master virtual object can be arbitrary, and this embodiment does not limit it.
[0110] Step 6042: Determine the first overall display area of the eyepiece end shadow based on the observation angle.
[0111] After clicking the scope button on the screen, the main virtual object will switch from the current view to the view of the scope attachment, that is, the main virtual object's first observation range switches to the second observation range.
[0112] Optionally, the master virtual object observes the target through a scope accessory based on a first preset viewing angle.
[0113] Optionally, the first overall display area of the eyepiece end shadow is a circular area, the area of which is slightly larger than the area of the eyepiece lens of the scope accessory.
[0114] Indicative, Figure 8 This is a schematic diagram of the overall shadow at the eyepiece end, as shown below. Figure 8As shown in the figure, there is a black rectangular area 800, and in the middle of the black rectangular area 800, there is a white circular area 810 with a preset center position as the center and a preset length as the radius.
[0115] Among them, the remaining black area 820 is the shadow part of the eyepiece end, and the white circular area 810 is the visible area of the eyepiece end, that is, the white circular area is the first overall display area of the shadow at the eyepiece end.
[0116] It is worth noting that the position of the scope accessory can be changed to any position, that is, the observation angle of the main virtual object through the scope can be arbitrary, and this embodiment does not limit this.
[0117] It is worth noting that the first overall display area of the eyepiece shadow can be of any shape, including but not limited to circles, rectangles, irregular shapes, etc., but the center of the first overall display area of the eyepiece shadow is the front sight of the scope accessory.
[0118] The shadow portion at the eyepiece end can be of any shape, including but not limited to circles, rectangles, irregular shapes, etc. The first overall display area of the eyepiece end shadow can be located at any position within the eyepiece end shadow portion. The area of the first overall display area can be arbitrary, that is, the area of the first overall display area can be slightly larger than the area of the eyepiece lens of the scope accessory, or equal to the area of the eyepiece lens of the scope accessory, or slightly smaller than the area of the eyepiece lens of the scope accessory. This embodiment does not limit this.
[0119] Step 6043: Determine the first relative positional relationship between the inner wall of the eyepiece barrel of the scope accessory and the eye of the master virtual object at the observation angle.
[0120] Among them, the shadow at the eyepiece end observed by the eye of the main virtual object at the first preset observation angle is formed by the inner wall of the eyepiece barrel of the scope accessory being blocked by light in the virtual scene. In other words, the shadow at the eyepiece end is caused by the eyepiece barrel of the scope accessory.
[0121] Optionally, the preset center position of the eyepiece shadow is located at the lower right of the center of the screen, and the distance between the preset center position of the eyepiece shadow and the center of the screen is no more than 2 mm.
[0122] Optionally, the image observed by the master virtual object's eye at the first preset viewing angle includes the eyepiece lens of the scope accessory, the first overall display area of the eyepiece end shadow, and the eyepiece end shadow portion.
[0123] Optionally, the first overall display area of the shadow at the eyepiece end overlaps with the eyepiece lens of the scope accessory. That is, a portion of the first overall display area of the shadow at the eyepiece end overlaps with the eyepiece lens of the scope accessory. In other words, the first relative position of the inner wall of the eyepiece barrel of the scope accessory and the eye of the main virtual object overlaps at the observation angle.
[0124] It is worth noting that the preset center position of the eyepiece shadow can be arbitrary. The preset center position of the eyepiece shadow can coincide with the center of the screen or it can not coincide with the center of the screen, but the preset center position of the eyepiece shadow must be within the screen range. If the preset center position of the eyepiece shadow does not coincide with the center of the screen, the distance between the preset center position of the eyepiece shadow and the center of the screen can be any legal distance, and this embodiment does not limit this.
[0125] The image observed by the eye of the master virtual object at the first preset viewing angle includes, but is not limited to, at least one of the following: the eyepiece lens of the scope accessory, the first overall display area of the eyepiece end shadow, and the eyepiece end shadow portion; the image observed by the eye of the master virtual object at the first preset viewing angle may also include other content, such as hostile virtual objects, etc., which is not limited in this embodiment.
[0126] The first overall display area of the eyepiece shadow may or may not overlap with the eyepiece lens of the scope accessory. That is, the first relative positional relationship between the inner wall of the eyepiece barrel of the scope accessory and the eye of the main virtual object at the observation angle may or may not overlap. If the first relative positional relationship overlaps, the first overall display area of the eyepiece shadow and the eyepiece lens of the scope accessory may partially overlap or completely overlap. This embodiment does not limit this.
[0127] Step 6044: Determine the first display area corresponding to the shadow at the eyepiece end in the inner circle of the accessory outline based on the first relative positional relationship.
[0128] Among them, the accessory outline ring refers to the outline ring of the eyepiece lens of the scope accessory.
[0129] Optionally, the first relative positional relationship is an overlapping relationship, that is, the first overall display area of the eyepiece end shadow partially overlaps with the eyepiece lens of the scope accessory.
[0130] Indicative, Figure 9 This is a schematic diagram of the portion of the eyepiece's shadow within the outline of the scope accessory. (Example) Figure 9As shown, the first overall display area 910 at the eyepiece end and the eyepiece lens 900 of the scope accessory overlap, that is, there is a first display area 940. When the main virtual object observes through the scope accessory, the image seen is located within the first display area 940.
[0131] The eyepiece lens 900 and the shadow portion 920 of the eyepiece end of the scope accessory have a first overlapping area 930. The first overlapping area 930 is the part of the shadow of the eyepiece end within the outline of the scope accessory, that is, the first overlapping area 930 is also a shadow.
[0132] It is worth noting that the first relative position may or may not be overlapping, where overlapping includes coincidence. If it is overlapping, the first display area is the area where the first overall display area of the eyepiece end and the eyepiece lens of the scope accessory coincide; if there is no overlap, there is no first display area; this embodiment does not limit this.
[0133] Step 6045: Determine the second overall display area of the objective lens shadow based on the observation angle.
[0134] After clicking the scope button on the screen, the main virtual object will switch from the current view to the view of the scope attachment, that is, the main virtual object's first observation range switches to the second observation range.
[0135] Optionally, the master virtual object observes the target through a scope accessory based on a first preset viewing angle.
[0136] Optionally, the second overall display area of the objective lens end shadow is a circular area, the area of which is slightly larger than the area of the eyepiece lens of the scope accessory.
[0137] Indicative, Figure 10 This is an overall schematic diagram of the shadow at the objective lens end, as shown below. Figure 10 As shown in the figure, there is a black rectangular area 1000, and in the middle of the black rectangular area 1000, there is a white circular area 1010 with the crosshair 1030 as the center and a preset length as the radius.
[0138] In this area, the center of the white circular area 1010 is the mark of the crosshair 1030, the remaining black area 1020 is the shadow part of the objective lens, and the white circular area 1010 is the visible area of the objective lens. In other words, the white circular area is the second overall display area of the shadow at the objective lens.
[0139] It is worth noting that the position of the scope accessory can be changed to any position, that is, the observation angle of the main virtual object through the scope accessory can be arbitrary, and this embodiment does not limit this.
[0140] It is worth noting that the second overall display area of the objective lens shadow can be of any shape, including but not limited to circles, rectangles, irregular shapes, etc., but the center of the second overall display area of the objective lens shadow is the front sight of the scope accessory.
[0141] The shadow portion at the objective lens end can be of any shape, including but not limited to circles, rectangles, irregular shapes, etc. The second overall display area of the objective lens end shadow can be located anywhere within the objective lens end shadow portion. The area of the second overall display area can be arbitrary; that is, the area of the second overall display area can be slightly larger than, equal to, or slightly smaller than the area of the eyepiece lens of the scope accessory. This embodiment does not limit this.
[0142] Step 6046: Determine the second relative positional relationship between the inner wall of the objective lens barrel of the scope accessory and the eye of the master virtual object at the observation angle.
[0143] Among them, the shadow at the objective lens end observed by the eye of the main virtual object at the first preset observation angle is formed by the inner wall of the objective lens barrel of the scope accessory being blocked by light in the virtual scene. In other words, the shadow at the objective lens end is caused by the objective lens barrel of the scope accessory.
[0144] Optionally, the front sight of the scope accessory is located in the lower right center of the screen, and the distance between the front sight of the scope accessory and the center of the screen is no more than 2 mm.
[0145] Optionally, the image observed by the main virtual object's eye at the first preset viewing angle includes the eyepiece lens of the scope accessory, the second overall display area of the objective lens shadow, and the objective lens shadow portion.
[0146] Optionally, the second overall display area of the shadow at the objective lens end overlaps with the eyepiece lens of the scope accessory. That is, a portion of the second overall display area of the shadow at the objective lens end overlaps with the eyepiece lens of the scope accessory. In other words, the second relative position relationship between the inner wall of the objective lens barrel of the scope accessory and the eye of the main virtual object is overlapping at the observation angle.
[0147] It is worth noting that the position of the reticle of the scope accessory can be arbitrary, and it changes as the scope accessory's position changes. The reticle of the scope accessory can coincide with the center of the screen, or it can not coincide with the center of the screen, but the reticle position must be within the screen area; if the reticle of the scope accessory does not coincide with the center of the screen, the distance between the reticle of the scope accessory and the center of the screen can be any legal distance, and this embodiment does not limit this.
[0148] The image observed by the eye of the master virtual object at the first preset viewing angle includes, but is not limited to, at least one of the following: the eyepiece lens of the scope accessory, the second overall display area of the objective lens end shadow, and the objective lens end shadow portion; the image observed by the eye of the master virtual object at the first preset viewing angle may also include other content, such as hostile virtual objects, etc., which is not limited in this embodiment.
[0149] The second overall display area of the objective lens shadow may or may not overlap with the eyepiece lens of the scope accessory. That is, the second relative positional relationship between the inner wall of the objective lens barrel of the scope accessory and the eye of the main virtual object at the observation angle may or may not overlap. If the second relative positional relationship overlaps, the second overall display area of the objective lens shadow and the eyepiece lens of the scope accessory may partially overlap or completely overlap. This embodiment does not limit this.
[0150] Step 6047: Determine the second display area corresponding to the shadow at the objective lens end in the inner circle of the accessory outline based on the second relative positional relationship.
[0151] Among them, the accessory outline ring refers to the outline ring of the eyepiece lens of the scope accessory.
[0152] Optionally, the second relative positional relationship is an overlapping relationship, that is, the second overall display area of the objective lens shadow partially overlaps with the eyepiece lens of the aiming scope accessory.
[0153] Indicative, Figure 11 This is a schematic diagram of the portion of the objective lens's shadow within the outline of the scope accessory. (Example) Figure 11 As shown, the second overall display area 1100 at the objective lens end and the eyepiece lens 1110 of the scope accessory overlap, that is, there is a second display area 1140. The image seen by the master virtual object when it observes through the scope accessory is located within the second display area 1140.
[0154] The eyepiece lens 1110 and the shadow portion 1120 of the objective lens of the scope accessory have a second overlapping area 1130. The second overlapping area 1130 is the part of the shadow of the objective lens within the outline of the scope accessory, that is, the second overlapping area 1130 is also a shadow.
[0155] It is worth noting that the second relative position may or may not be overlapping, where overlapping includes coincidence. If it is overlapping, the second display area is the area where the second overall display area at the objective lens end and the eyepiece lens of the aiming scope accessory coincide; if there is no overlap, there is no second display area; this embodiment does not limit this.
[0156] It is worth noting that the operations performed in steps 6042 to 6044 are parallel to the operations performed in steps 6045 to 6047; that is, the operations performed in steps 6042 to 6044 are performed simultaneously with the operations performed in steps 6045 to 6047; that is, after step 6041 is completed, the operations in steps 6042 to 6044 and the operations in steps 6045 to 6046 are performed simultaneously.
[0157] After all the above steps have been completed, proceed to step 6048.
[0158] It is worth noting that step 6048 can be executed before steps 6042 to 6044 and steps 6045 to 6047 are completed, or after steps 6042 to 6044 and steps 6045 to 6047 are completed. Step 6048 can also be executed simultaneously with steps 6042 to 6044 and steps 6045 to 6047. This embodiment does not limit this.
[0159] Step 6048: Obtain the candidate lens display area and add contour shadows based on the candidate lens display area.
[0160] The candidate lens display area is used to indicate the range of light transmission corresponding to the scope accessory, that is, to display the part of the image that the main virtual object can see when using the scope accessory for observation.
[0161] Among them, the outline shadow is the shadow produced by the lens of the scope accessory itself being blocked by the light in the virtual scene.
[0162] Optionally, the candidate lens display area is the area displayed by the eyepiece lens of the scope accessory.
[0163] Based on steps 6041 to 6047 above, the portion of the eyepiece shadow within the scope accessory outline and the portion of the objective lens shadow within the scope accessory outline can be obtained, namely the first overlapping area and the second overlapping area.
[0164] A preset black border shadow is superimposed on the inner circle of the candidate lens display area, and the area within the preset black border shadow is used as the lens display area.
[0165] Optionally, a preset black border shadow can be overlaid on each of the first and second overlapping regions:
[0166] 1. Overlay a first black border shadow onto the first overlapping area, where the first black border shadow is relatively blurry;
[0167] 2. Add a second black border shadow to the second overlapping area, where the second black border shadow is clearer.
[0168] Indicative, Figure 12 This is a schematic diagram of the candidate lens display area. For example... Figure 12 As shown, in the candidate lens display area 1200, the first black border shadow 1210 and the second black border shadow 1220 are superimposed, and the remaining part that is not superimposed with the preset shadow is the lens display area 1230.
[0169] Optionally, a contour shadow is added based on the lens display area, the size and shape of which are the same as the lens of the scope accessory.
[0170] The main virtual object uses a scope attachment for observation, switching the view from a first observation range to a second observation range, illustratively. Figure 13 This is a schematic diagram of adding contour shadows to the lens display area, such as... Figure 13 As shown, the eyes of the main virtual object are facing the scope accessory 1300, and the scope accessory 1300 is in a preset frontal position. At this time, the shadows at the eyepiece end and the objective lens end of the scope accessory 1300 exist, but are not obvious.
[0171] The main virtual object is observed through the scope accessory 1300, and the contents of the lens display area 1310 can be seen. Along the shape of the lens display area 1310, an outline shadow 1320 is added to the inner side of the lens display area 1310. The size of the outline shadow 1320 can be considered to be the same as that of the lens display area 1310.
[0172] It is worth noting that the eyes of the main virtual object can be directly facing the scope accessory, or they can be located in other relative positions of the scope accessory; the scope accessory can be located anywhere on the screen; the degree of frontal display of the scope accessory lens can be arbitrary, that is, the scope accessory lens can be displayed in front of the screen or displayed from the side, and this embodiment does not limit this.
[0173] The eyepiece and objective lens shadows in the scope accessory are always present. The positions of the eyepiece and objective lens shadows change according to the position of the scope accessory on the screen, and the coverage area of the eyepiece and objective lens shadows also changes with the position of the scope accessory on the screen. The size of the outline shadow can be arbitrary, but it must be along the lens of the scope accessory. Its shape depends on the shape of the lens of the scope accessory, and the shape of the lens of the scope accessory can be arbitrary. This embodiment does not limit this.
[0174] In summary, the method provided in this application adds eyepiece and objective lens shadows to the inner circle of the scope accessory's outline, and adds an outline shadow inside the outline of the scope accessory's own lens. After the main virtual object opens the scope accessory, it can observe through the scope accessory. As the scope opening animation plays on the terminal screen or the position of the scope accessory changes, the changes in the eyepiece and objective lens shadows at different times can be seen. This makes the lens performance of the scope accessory richer, thereby improving the realism of the picture and enhancing the immersive experience of the player when controlling the current main virtual object to shoot.
[0175] The method provided in this application embodiment obtains two display areas in the scope accessory based on the observation angle observed by the master virtual object through the scope accessory: a first display area corresponding to the shadow at the eyepiece end and a second display area corresponding to the shadow at the objective lens end. The part within the outline of the scope accessory that needs to be superimposed with shadow is found, making the lens performance of the scope accessory richer and closer to the real picture.
[0176] The method provided in this application, by obtaining the observation angle of the master virtual object using the scope accessory to observe the virtual scene, further obtains the first relative positional relationship between the eye of the master virtual object and the eyepiece barrel of the scope accessory, and the second relative positional relationship between the eye of the master virtual object and the objective lens barrel of the scope accessory. Based on the first and second relative positional relationships, it can further find the part within the outline of the scope accessory that needs to be superimposed with shadow, making the shadow superposition more accurate and the display effect on the screen better.
[0177] The method provided in this application determines the overlap relationship between the lens display area and the eyepiece penetration area of the scope accessory through the first relative position relationship, and further determines the first display area corresponding to the eyepiece end shadow. Based on the first display area, it can further find the part of the scope accessory outline that needs to be superimposed with the eyepiece end shadow, making the superposition effect of the eyepiece end shadow more realistic.
[0178] The method provided in this application determines the overlap relationship between the lens display area and the objective lens penetration area of the scope accessory through the second relative position relationship, and further determines the second display area corresponding to the objective lens end shadow. Based on the second display area, it can further find the part of the scope accessory outline that needs to be superimposed with the objective lens end shadow, making the superposition effect of the objective lens end shadow more realistic.
[0179] The method provided in this application embodiment, on the basis of the objective lens shadow and eyepiece shadow already added to the scope accessory, continues to superimpose outline shadow, and determines the final display image of the scope accessory on the screen based on these three shadows, and determines the field of view that the main virtual object can see when observing through the scope accessory, making the lens performance of the scope accessory richer, thereby improving the realism of the image and enhancing the immersive experience of the player when controlling the current main virtual object to shoot.
[0180] Figure 14 This is a flowchart of a method for displaying virtual props under superimposed breathing vibrations, provided by another exemplary embodiment of this application, including the following steps:
[0181] Step 1401: Obtain the breathing jitter parameters of the master virtual object.
[0182] Among them, breathing jitter is used to simulate the shaking of virtual props held by the main virtual object due to the breathing of the main virtual object. The breathing jitter parameter is a random value in a two-dimensional direction, which can be preset. The amplitude of breathing jitter is usually low, that is, the value of the breathing jitter parameter is small.
[0183] To illustrate, the virtual prop held by the main virtual object is a virtual firearm. The virtual firearm is equipped with a scope accessory. Affected by the breathing vibration, the virtual firearm will shake with the breathing of the main virtual object. The scope accessory on the virtual firearm will also shake with the shaking of the virtual firearm. Therefore, the crosshair of the scope accessory will also be affected by the breathing vibration.
[0184] Normally, the front sight of a scope accessory coincides with the center of the screen. However, due to breathing vibrations, there will be a deviation between the front sight position and the center of the screen.
[0185] Optionally, the screen is used as a two-dimensional coordinate system with the center coordinates of the screen being (0, 0) and the breathing jitter parameters being (-1, -1).
[0186] It is worth noting that the breathing jitter parameter can be obtained based on any coordinate system, and the value of the breathing jitter parameter can be arbitrary. The breathing jitter parameter can be a random value in any two-dimensional direction. The coordinate system can be established using the screen, other planes, or no coordinate system can be established. If the coordinate system is established using the screen, the coordinates of the screen center can be arbitrary. The position of the crosshair can be arbitrary, but it must be located within the inner circle of the lens of the scope accessory. This embodiment does not limit this.
[0187] Step 1402: Adjust the display position of the aiming reticle displayed on the inner ring of the accessory outline in real time based on the breathing vibration parameters.
[0188] In order to make the simulated breathing effect of the virtual control object more realistic, the breathing jitter parameter is varied.
[0189] Optionally, at the first moment, the breathing jitter parameter is (-1, -1), and the screen center coordinates are (0, 0). Based on the breathing jitter parameter and the screen center coordinates, the crosshair position coordinates of the scope accessory are calculated to be (-1, -1).
[0190] Optionally, at the second moment, the breathing jitter parameter is (1, -1), the screen center coordinates are (0, 0), and based on the breathing jitter parameter and the screen center coordinates, the crosshair position coordinates of the scope accessory are calculated to be (1, -1).
[0191] Based on the crosshair position coordinates calculated above, the position of the crosshair is displayed in a two-dimensional coordinate system based on the screen.
[0192] It is worth noting that the display position of the aiming reticle shown on the inner ring of the accessory outline is adjusted in real time based on the breathing jitter parameters. The breathing of the main virtual object is a continuous action, so the breathing jitter parameters are also continuous, resulting in continuous jitter of the virtual prop. There are countless moments in a period of time, and the position of the reticle will be different at different moments. The example above only lists two moments, namely the first moment and the second moment. When adjusting the position of the reticle in real time, it can be based on the breathing jitter parameters at any number of moments. This embodiment does not limit this.
[0193] Step 1403: Adjust the display area of the eyepiece end shadow and objective lens end shadow in the inner circle of the accessory outline in real time based on the breathing vibration parameters.
[0194] Among them, the breathing jitter parameter affects the front sight position of the scope accessory, and the front sight position is the center of the objective lens shadow. Therefore, by adjusting the display area of the objective lens shadow in the inner circle of the accessory's outline in real time based on the breathing jitter parameter, the position of the objective lens shadow is determined based on the changing front sight position, thereby determining the display area of the objective lens shadow within the scope accessory's outline. The center of the eyepiece shadow is a preset center position, which is within the scope accessory's outline and remains unchanged relative to the scope accessory. Therefore, by adjusting the display area of the eyepiece shadow in the inner circle of the accessory's outline in real time based on the breathing jitter parameter, the position of the objective lens shadow is determined based on the changing position of the scope accessory.
[0195] Optionally, the center of the shadow at the objective lens end is a circular area, and the center of the shadow at the eyepiece end is a circular area.
[0196] Optionally, a circle is created with the front sight position as the center and a first preset length as the radius. This circle represents the visible area of the objective lens, which overlaps with the eyepiece lens of the scope accessory. Within the outline of the scope accessory, the overlapping portion between the visible area of the objective lens and the eyepiece lens of the scope accessory constitutes the visible area of the scope accessory, while the remaining area is the display area for the shadow of the objective lens.
[0197] Optionally, a circle is created with a preset center position as the center and a second preset length as the radius. This circle represents the visible area of the eyepiece end, which overlaps with the eyepiece lens of the scope accessory. Within the outline of the scope accessory, the overlapping portion between the visible area of the eyepiece end and the eyepiece lens of the scope accessory constitutes the visible area of the scope accessory, while the remaining area is the display area of the shadow at the eyepiece end.
[0198] Optionally, the eyepiece lens of the scope accessory is circular, and a contour shadow is added along the outline of the scope accessory lens. The display areas of the objective lens shadow and the eyepiece shadow are superimposed within the outline of the scope accessory. On this basis, the contour shadow is further superimposed. The part within the outline of the scope accessory that is not superimposed with shadow is a part of the virtual scene that the master virtual object can observe through the scope accessory.
[0199] It is worth noting that the shape of the shadow center at the objective lens end can be arbitrary, meaning the visible area at the objective lens end can be arbitrary; the shape of the shadow center at the eyepiece end can be arbitrary, meaning the visible area at the eyepiece end can be arbitrary; if the visible area at the objective lens end is circular, its radius can be any legal preset length; if the visible area at the eyepiece end is circular, its radius can be any legal preset length; the visible area at the objective lens end and the eyepiece lens of the scope accessory can overlap or not overlap; the shape of the eyepiece lens of the scope accessory can be arbitrary, so the shape of the contour shadow added along the contour of the scope accessory lens can also be arbitrary; this embodiment does not limit this.
[0200] In summary, the method provided in this application adds eyepiece and objective lens shadows to the inner circle of the scope accessory's outline, and adds an outline shadow inside the outline of the scope accessory's own lens. After the main virtual object opens the scope accessory, it can observe through the scope accessory. As the scope opening animation plays on the terminal screen or the position of the scope accessory changes, the changes in the eyepiece and objective lens shadows at different times can be seen. Furthermore, the influence of breathing vibration on the position of the virtual prop and the scope accessory is increased, resulting in some deviation between the crosshair and the center of the screen. This makes the lens performance of the scope accessory richer, thereby improving the realism of the picture and enhancing the immersive experience of the player when controlling the current main virtual object to shoot.
[0201] The method provided in this application embodiment obtains breathing vibration parameters to simulate the effect of the breathing of the master virtual object on the virtual firearm, and adjusts the shadow in the outline of the scope accessory on the virtual firearm in real time based on the breathing vibration, thereby improving the realism of the picture and enhancing the player's experience when controlling the virtual object to shoot.
[0202] The method provided in this application obtains breathing vibration parameters and adjusts the crosshair position of the scope accessory in real time based on the breathing vibration parameters, so that the crosshair of the scope accessory deviates from the center of the screen, which improves the realism of the picture and enhances the player's experience when controlling virtual objects to shoot.
[0203] Figure 15 This is a schematic diagram of a virtual prop display method provided in another exemplary embodiment of this application, such as... Figure 15 As shown:
[0204] Optionally, the screen 1500 includes the following: screen center 1501, scope accessory eyepiece lens 1510, eyepiece center 1511, objective lens shading 1520, front sight 1521, outline shading 1530, eyepiece shading 1540, eyepiece shading center 1541, first shading 1550, second shading 1560, and third shading 1570.
[0205] The screen 1500 displays the screen center 1501, the scope accessory eyepiece lens 1510, and the eyepiece center 1511. The distance between the screen center 1501 and the eyepiece center 1511 is a preset distance a.
[0206] 1. Create a circle with the eyepiece center 1511 as the center and the first preset length as the radius. This circle is the outline shadow line 1530. The outline shadow line 1530 partially overlaps with the eyepiece lens 1510 of the scope accessory. The non-overlapping part in the eyepiece lens 1510 is the first shadow 1550. The shadow is superimposed on the first shadow 1550, which is the outline shadow of the scope accessory.
[0207] 2. After obtaining the breathing jitter parameters of the main virtual object, calculate the position of the crosshair 1521 of the scope accessory based on the breathing jitter parameters and the position of the screen center 1501. Create a circle with the crosshair 1521 as the center and the second preset length as the radius. This circle is the objective lens shadow line 1520. The objective lens shadow line 1520 coincides with the eyepiece lens 1510 of the scope accessory. The non-overlapping part in the eyepiece lens 1510 is the second shadow 1560. A shadow is superimposed on the second shadow 1560, which is the objective lens shadow of the scope accessory.
[0208] 3. Connect the screen center 1501 and the eyepiece center 1511, and establish an extension vector along the direction from the screen center 1501 to the eyepiece center 1511. The extension length is based on the distance 'a' between the screen center 1501 and the eyepiece center 1511. Multiply 'a' by a preset parameter 'b' to obtain the coordinates where the extension direction a*b stops, which is the eyepiece end shadow line center 1541. Create a circle with the eyepiece end shadow line center 1541 as the center and the third preset length as the radius. This circle is the eyepiece end shadow line 1540. The eyepiece end shadow line 1540 partially overlaps with the eyepiece lens 1510 of the scope accessory. The non-overlapping part in the eyepiece lens 1510 is the third shadow 1570. A shadow is superimposed at the third shadow 1570, which is the eyepiece end shadow of the scope accessory.
[0209] It is worth noting that the preset distance 'a' between the center of the screen 1501 and the center of the eyepiece 1511 can be any legal number, including but not limited to non-negative integers and non-negative decimals. The unit of length of the preset distance 'a' can be any legal unit of length, and the length of the preset distance 'a' does not exceed the range that the screen can display.
[0210] The preset parameter b can be any legal number, including but not limited to positive integers. The value of the preset parameter b is related to the virtual item used by the main virtual object. That is, when the virtual object uses different virtual weapons, the corresponding preset parameter b will also have different values.
[0211] Figure 16 This is a structural block diagram of a virtual prop display device provided in an exemplary embodiment of this application, such as... Figure 16 As shown, the device includes:
[0212] Display module 1610 is used to display a first scene screen of the virtual scene observed from the perspective of the main virtual object. The main virtual object holds a virtual firearm, and the virtual firearm is equipped with a scope accessory, wherein the scope accessory includes an eyepiece end and an objective lens end.
[0213] The receiving module 1620 is used to receive a scope-opening action, which is used to instruct the main virtual object to observe the virtual scene through the scope accessory;
[0214] The display module 1610 is also used to display a second scene image of the virtual scene observed through the scope accessory, the second scene image including the outline of the accessory corresponding to the scope accessory;
[0215] The display module 1610 is also used to display the eyepiece end shadow and the objective lens end shadow within the inner ring of the accessory outline. The eyepiece end shadow represents the shadow cast by the scope barrel at the eyepiece end of the scope accessory, and the objective lens end shadow represents the shadow cast by the scope barrel at the objective lens end of the scope accessory.
[0216] In an optional embodiment, the apparatus further includes:
[0217] The acquisition module 1630 is used to acquire the observation angle of the main control virtual object when observing the virtual scene through the scope accessory;
[0218] The determining module 1640 is used to determine a first display area corresponding to the shadow at the eyepiece end in the inner circle of the accessory outline based on the observation angle; and to determine a second display area corresponding to the shadow at the objective end in the inner circle of the accessory outline based on the observation angle.
[0219] The display module 1610 is also configured to display the eyepiece end shadow and the objective end shadow on the inner ring of the accessory outline based on the first display area and the second display area.
[0220] In an optional embodiment, such as Figure 17 As shown, the determining module 1640 includes:
[0221] The first determining unit 1641 is used to determine the first relative positional relationship between the inner wall of the eyepiece barrel of the aiming scope accessory and the eye of the main virtual object under the observation angle; and to determine the first display area corresponding to the shadow at the eyepiece end in the inner circle of the accessory outline based on the first relative positional relationship.
[0222] The determining module 1640 further includes:
[0223] The second determining unit 1642 is used to determine the second relative positional relationship between the inner wall of the objective lens barrel of the sight accessory and the eye of the main virtual object under the observation angle; and to determine the second display area corresponding to the shadow of the objective lens end in the inner circle of the accessory outline based on the second relative positional relationship.
[0224] In an optional embodiment, the eyepiece lens of the sight accessory is circular;
[0225] In an optional embodiment, the determining module 1640 is further configured to determine the overlap relationship between the lens display area and the eyepiece penetration area based on the first relative positional relationship, wherein the lens display area is used to indicate the range of the lens area observed through the scope accessory, and the eyepiece penetration area is used to indicate the range of the lens area observed through the eyepiece end lens; and the area on the lens display area that does not overlap with the eyepiece penetration area is taken as the first display area corresponding to the eyepiece end shadow.
[0226] In one optional embodiment, the objective lens of the sight accessory is circular;
[0227] In an optional embodiment, the determining module 1640 is further configured to determine the overlap relationship between the lens display area and the objective lens penetration area based on the second relative positional relationship, wherein the lens display area is used to indicate the range of the lens area observed through the sight accessory, and the objective lens penetration area is used to indicate the range of the lens area observed through the objective lens end; and the area on the lens display area that does not overlap with the objective lens penetration area is taken as the second display area corresponding to the objective lens end shadow.
[0228] In an optional embodiment, the apparatus further includes:
[0229] The acquisition module 1630 is used to acquire the candidate lens display area, which is used to indicate the light-transmitting area range corresponding to the scope accessory.
[0230] The overlay module 1650 is used to overlay a preset black border shadow on the inner circle of the candidate lens display area, and to use the area within the preset black border shadow as the lens display area.
[0231] In an optional embodiment, the apparatus further includes:
[0232] The acquisition module 1630 is used to acquire the breathing vibration parameters of the main control virtual object, and the breathing vibration parameters are used to represent the vibration situation when the main control virtual object holds the virtual firearm;
[0233] The adjustment module 1660 is used to adjust the display area of the eyepiece end shadow and the objective lens end shadow in the inner ring of the accessory outline in real time based on the breathing vibration parameters.
[0234] In an optional embodiment, the adjustment module 1660 is further configured to adjust the display position of the aiming reticle displayed on the inner ring of the accessory outline in real time based on the breathing vibration parameters.
[0235] In summary, the device provided in this application adds eyepiece and objective lens shadows to the inner ring of the scope accessory's outline, and adds an outline shadow inside the outline of the scope accessory's own lens. After the main virtual object opens the scope accessory, it can observe through the scope accessory. As the scope opening animation plays on the terminal screen or the position of the scope accessory changes, the changes in the eyepiece and objective lens shadows at different times can be seen. This makes the lens performance of the scope accessory richer, thereby improving the realism of the picture and enhancing the immersive experience of the player when controlling the current main virtual object to shoot.
[0236] It should be noted that the virtual prop display device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the virtual prop display device and the virtual prop display method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0237] Figure 18 This illustration shows a structural block diagram of a computer device 1800 provided in an exemplary embodiment of this application. The computer device 1800 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The computer device 1800 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0238] Typically, computer device 1800 includes a processor 1801 and a memory 1802.
[0239] Processor 1801 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1801 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1801 may also include an AI processor for handling computational operations related to machine learning.
[0240] The memory 1802 may include one or more computer-readable storage media, which may be non-transitory. The memory 1802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1802 are used to store at least one instruction, which is executed by the processor 1801 to implement the virtual prop display method provided in the method embodiments of this application.
[0241] In some embodiments, the computer device 1800 also includes other components, as those skilled in the art will understand. Figure 18 The structure shown does not constitute a limitation on terminal 1800 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0242] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0243] This application also provides a computer device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the virtual item display method as described in any of the above embodiments of this application.
[0244] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the virtual item display method as described in any of the above embodiments of this application.
[0245] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the virtual item display methods described in the above embodiments.
[0246] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0247] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for displaying virtual props, characterized in that, The method includes: The first scene is displayed, showing the virtual scene observed from the perspective of the main virtual object. The main virtual object holds a virtual firearm, which is equipped with a scope accessory, wherein the scope accessory includes an eyepiece end and an objective lens end. Receive a scope-opening action, the scope-opening action being used to instruct the master virtual object to observe the virtual scene through the scope accessory; The second scene view is displayed by observing the virtual scene through the scope accessory, and the second scene view includes the outline of the accessory corresponding to the scope accessory; The inner ring of the accessory outline displays eyepiece end shadow and objective lens end shadow. The eyepiece end shadow represents the shadow cast by the scope barrel at the eyepiece end of the scope accessory, and the objective lens end shadow represents the shadow cast by the scope barrel at the objective lens end of the scope accessory. The eyepiece end shadow is displayed in a first overlapping area between the eyepiece lens and the shadow portion of the eyepiece end of the scope accessory, and the objective lens end shadow is displayed in a second overlapping area between the eyepiece lens and the shadow portion of the objective lens end of the scope accessory. The clarity of the first black edge shadow superimposed in the first overlapping area is lower than that of the second black edge shadow superimposed in the second overlapping area.
2. The method according to claim 1, characterized in that, The display of eyepiece end shadow and objective end shadow within the inner ring of the accessory outline includes: Obtain the observation angle of the virtual scene observed by the main virtual object through the scope accessory; Based on the observation angle, a first display area corresponding to the shadow at the eyepiece end in the inner circle of the accessory outline is determined; and a second display area corresponding to the shadow at the objective end in the inner circle of the accessory outline is determined based on the observation angle. The eyepiece shadow and the objective shadow are displayed within the inner circle of the accessory outline based on the first display area and the second display area.
3. The method according to claim 2, characterized in that, The step of determining the first display area corresponding to the eyepiece end shadow in the inner circle of the accessory outline based on the observation angle includes: Determine the first relative positional relationship between the inner wall of the eyepiece barrel of the scope accessory and the eye of the main virtual object at the observation angle; based on the first relative positional relationship, determine the first display area corresponding to the shadow at the eyepiece end in the inner circle of the accessory outline; The second display area corresponding to the objective lens end shadow in the inner circle of the accessory outline is determined based on the observation angle; Determine the second relative positional relationship between the inner wall of the objective lens barrel of the scope accessory and the eye of the master virtual object at the observation angle; based on the second relative positional relationship, determine the second display area corresponding to the shadow at the objective lens end in the inner circle of the accessory outline.
4. The method according to claim 3, characterized in that, The eyepiece lens of the sight accessory is circular; The step of determining the first display area corresponding to the eyepiece end shadow in the inner ring of the accessory outline based on the first relative positional relationship includes: The overlap between the lens display area and the eyepiece penetration area is determined based on the first relative positional relationship. The lens display area is used to indicate the range of the lens area observed through the scope accessory, and the eyepiece penetration area is used to indicate the range of the lens area observed through the eyepiece end lens. The area on the lens display area that does not overlap with the eyepiece penetration area is taken as the first display area corresponding to the eyepiece end shadow.
5. The method according to claim 3, characterized in that, The objective lens of the sight accessory is circular; The step of determining the second display area corresponding to the objective lens end shadow in the inner circle of the accessory outline based on the second relative positional relationship includes: The overlap between the lens display area and the objective lens penetration area is determined based on the second relative positional relationship. The lens display area is used to indicate the range of the lens area observed through the sight accessory, and the objective lens penetration area is used to indicate the range of the lens area observed through the objective lens. The area on the lens display area that does not overlap with the objective lens penetration area is taken as the second display area corresponding to the objective lens end shadow.
6. The method according to claim 4 or 5, characterized in that, The method further includes: Obtain the candidate lens display area, which is used to indicate the light-transmitting area range corresponding to the scope accessory; A preset black border shadow is superimposed on the inner circle of the candidate lens display area, and the area within the preset black border shadow is taken as the lens display area.
7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Obtain the breathing vibration parameters of the master virtual object, which are used to represent the vibration of the master virtual object when it holds the virtual weapon; Based on the breathing vibration parameters, the display areas of the eyepiece end shadow and the objective lens end shadow in the inner ring of the accessory contour are adjusted in real time.
8. The method according to claim 7, characterized in that, The method further includes: The display position of the aiming reticle shown on the inner ring of the accessory outline is adjusted in real time based on the breathing vibration parameters.
9. A display device for virtual props, characterized in that, The device includes: The display module is used to display a first scene view of the virtual scene observed from the perspective of the main virtual object. The main virtual object holds a virtual firearm, and the virtual firearm is equipped with a scope accessory, wherein the scope accessory includes an eyepiece end and an objective lens end. A receiving module is used to receive a scope-opening action, which instructs the main virtual object to observe the virtual scene through the scope accessory; The display module is also used to display a second scene image of the virtual scene observed through the scope accessory, the second scene image including the outline of the accessory corresponding to the scope accessory; The display module is further configured to display the eyepiece end shadow and the objective lens end shadow within the inner ring of the accessory outline. The eyepiece end shadow represents the shadow cast by the scope barrel at the eyepiece end of the scope accessory, and the objective lens end shadow represents the shadow cast by the scope barrel at the objective lens end of the scope accessory. The eyepiece end shadow is displayed in a first overlapping area between the eyepiece lens and the shadow portion of the eyepiece end of the scope accessory, and the objective lens end shadow is displayed in a second overlapping area between the eyepiece lens and the shadow portion of the objective lens end of the scope accessory. The clarity of the first black edge shadow superimposed in the first overlapping area is lower than that of the second black edge shadow superimposed in the second overlapping area.
10. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the method for displaying virtual props as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the virtual prop display method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method for displaying virtual props as described in any one of claims 1 to 8.