Virtual scene display method and apparatus, and device, storage medium and program product
Through the line-of-sight blocking effect of virtual lighting props, the tedious operation problem of virtual object attack interference in the game is solved, and the utilization of computing resources and the efficiency of human-computer interaction are improved.
Patent Information
- Application Number
- PCT/CN2024/072318
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-07
- Filing Date
- 2024-01-15
- Publication Date
- 2024-09-12
AI Technical Summary
In games, when players use virtual lighting props, they need to frequently switch props to suppress the attacks of other virtual objects, resulting in cumbersome operations and a waste of computing resources.
Through the lighting direction matching relationship of virtual lighting props, the line of sight occlusion effect is achieved, the attack probability of virtual objects is reduced, and the attacks of other virtual objects are interfered without additional operations.
It improves the efficiency of player operations, reduces the waste of computing resources, enhances the functional diversity of virtual lighting props, and improves the efficiency of human-computer interaction.
Smart Images

Figure CN2024072318_12092024_PF_FP_ABST
Abstract
Description
Virtual scene display method, device, equipment, storage medium and program product
[0001] This application claims priority to Chinese patent application number 202310245717.1, filed on March 7, 2023, entitled “Virtual scene display method, device, equipment, storage medium and program product”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of computer technology, and in particular to a virtual scene display method, apparatus, device, storage medium, and program product. Background Art
[0003] As cultural and entertainment standards improve, people's demands for virtual scenes are also getting higher and higher. As a way to express virtual scenes, games have become a channel for many people to relieve stress. Current game applications provide players with a variety of virtual props, which can enrich the player's gaming experience.
[0004] In related technologies, players use the prop functions of virtual props to achieve different operations during the game. When in a dark virtual environment, players can use virtual lighting props (such as a virtual flashlight) to achieve lighting functions, illuminating the virtual environment and improving the exploration effect of the dark virtual environment.
[0005] However, when players use virtual lighting props, if they want to use other props to suppress the attacks of other virtual objects, they need to select other props from the prop backpack and perform prop switching operations. This operation process is relatively cumbersome and will require rendering of multiple game interfaces and props, resulting in a waste of computing resources.
[0006] Summary of the Invention
[0007] Embodiments of the present application provide a virtual scene display method, apparatus, device, storage medium, and program product that utilize virtual lighting props to block the line of sight of a first virtual object that matches a lighting direction, thereby interfering with the first virtual object's attack pattern and reducing the first virtual object's effective attack probability. This allows players to use virtual lighting props for illumination while simultaneously resisting attacks from other virtual players, thereby reducing the waste of computing resources. The technical solution is as follows.
[0008] In one aspect, a virtual scene display method is provided, which is performed by a first device, and the method includes:
[0009] Displaying a virtual scene from the perspective of the first virtual object, wherein the virtual scene includes a second virtual object, wherein the second virtual object is equipped with a virtual lighting prop, and the virtual lighting prop is a virtual prop with a lighting function;
[0010] receiving a control operation on the first virtual object, wherein the control operation is used to control the first virtual object to move in the virtual scene;
[0011] When the second virtual object is within the viewing angle of the first virtual object and the virtual lighting prop equipped by the second virtual object is in an illuminated state, in response to the position of the first virtual object in the virtual scene matching the lighting direction of the virtual lighting prop, an illumination effect is displayed, and the illumination effect is used to block the line of sight under the viewing angle of the first virtual object of the virtual scene.
[0012] In another aspect, a virtual scene display method is provided, which is performed by a second device, and the method includes:
[0013] displaying a virtual scene including a first virtual object, wherein the virtual scene is displayed from the perspective of a second virtual object, wherein the second virtual object is equipped with a virtual lighting prop, and the virtual lighting prop is a virtual prop with a lighting function;
[0014] receiving a prop control operation on the virtual lighting prop, wherein the prop control operation is used to adjust a prop state of the virtual lighting prop to a lighting state;
[0015] When the first virtual object is within the viewing angle of the second virtual object and the position of the first virtual object in the virtual scene matches the lighting direction of the virtual lighting prop, an illumination light column is displayed. The illumination light column is used to display an illumination effect to block the line of sight under the viewing angle of the first virtual object on the virtual scene.
[0016] In another aspect, a virtual scene display device is provided, the device comprising:
[0017] A scene display module, configured to display a virtual scene from the perspective of a first virtual object, wherein the virtual scene includes a second virtual object, wherein the second virtual object is equipped with a virtual lighting prop, and wherein the virtual lighting prop is a virtual prop having a lighting function;
[0018] an operation receiving module, configured to receive a control operation on the first virtual object, wherein the control operation is used to control the first virtual object to move in the virtual scene;
[0019] A special effects display module is used to display an illumination special effect in response to the first virtual object's position in the virtual scene matching the lighting direction of the virtual lighting prop when the second virtual object is within the viewing angle of the first virtual object and the virtual lighting prop equipped by the second virtual object is in an illuminated state. The illumination special effect is used to block the line of sight under the first virtual object's observation angle of the virtual scene.
[0020] In another aspect, a virtual scene display device is provided, the device comprising:
[0021] a scene display module, configured to display a virtual scene including a first virtual object, the virtual scene being displayed from the perspective of a second virtual object, the second virtual object being equipped with a virtual lighting prop, the virtual lighting prop being a virtual prop having a lighting function;
[0022] an operation receiving module, configured to receive a prop control operation on the virtual lighting prop, wherein the prop control operation is used to adjust the prop state of the virtual lighting prop to a lighting state;
[0023] A special effects display module is used to display an illumination light column when the first virtual object is within the viewing angle of the second virtual object and the position of the first virtual object in the virtual scene matches the lighting direction of the virtual lighting prop. The illumination light column is used to display an illumination special effect to block the line of sight under the viewing angle of the first virtual object on the virtual scene.
[0024] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and 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 scene display method as described in any of the above-mentioned embodiments of the present application.
[0025] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. 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 a virtual scene display method as described in any of the above-mentioned embodiments of the present application.
[0026] In another aspect, a computer program product or computer program is provided, comprising 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 scene display method described in any of the above embodiments.
[0027] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0028] A virtual scene is displayed from the perspective of a first virtual object. The first virtual object is controlled to move in the virtual scene based on the control operation of the first virtual object. When a second virtual object is within the viewing range of the first virtual object and the virtual lighting prop equipped by the second virtual object is in an illuminated state, if the first virtual object's position in the virtual scene matches the lighting direction of the virtual lighting prop, an illumination effect is displayed that blocks the first virtual object's line of sight from the perspective of the virtual scene. In addition to the lighting effect of the virtual lighting prop, the virtual lighting prop is given a line of sight blocking effect, so that the line of sight of the first virtual object that meets the matching relationship is blocked by the virtual lighting prop, interfering with the attack form of the first virtual object and reducing the probability of the first virtual object's effective attack. When using the lighting virtual prop, the player can interfere with other virtual objects without performing additional operations, reducing the waste of computing resources. In addition, the virtual lighting prop provided by the present application has both lighting and attack interference functions, avoiding the inefficiency of requiring additional operations to interfere with other virtual objects, thereby improving the efficiency of human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] FIG1 is a structural block diagram of an electronic device provided by an exemplary embodiment of the present application;
[0030] FIG2 is a structural block diagram of a computer system provided by an exemplary embodiment of the present application;
[0031] FIG3 is a flow chart of a virtual scene display method provided by an exemplary embodiment of the present application;
[0032] FIG4 is a schematic diagram of an interface showing a virtual light column in a virtual scene provided by an exemplary embodiment of the present application;
[0033] FIG5 is a flowchart of a virtual scene display method provided by another exemplary embodiment of the present application;
[0034] FIG6 is a schematic diagram of an interface for displaying illumination effects provided by an exemplary embodiment of the present application;
[0035] FIG7 is a schematic diagram of an interface for displaying illumination effects provided by another exemplary embodiment of the present application;
[0036] FIG8 is a schematic diagram of an interface for displaying illumination effects provided by yet another exemplary embodiment of the present application;
[0037] FIG9 is a schematic diagram of an interference range provided by an exemplary embodiment of the present application;
[0038] FIG10 is a flowchart of a virtual scene display method provided by another exemplary embodiment of the present application;
[0039] FIG11 is a flowchart of a virtual scene display method provided by another exemplary embodiment of the present application;
[0040] FIG12 is a schematic diagram of the positional relationship between an irradiator and an irradiated person provided by an exemplary embodiment of the present application;
[0041] FIG13 is a schematic diagram of a brightness curve of an angle-halo effect provided by an exemplary embodiment of the present application;
[0042] FIG14 is a schematic diagram of a brightness curve of a distance-halo effect provided by an exemplary embodiment of the present application;
[0043] FIG15 is a schematic diagram of an interface of a halo effect provided by an exemplary embodiment of the present application;
[0044] FIG16 is a schematic diagram of an interface of a halo effect provided by another exemplary embodiment of the present application;
[0045] FIG17 is a schematic diagram of an interface showing the disappearance of illumination effects provided by an exemplary embodiment of the present application;
[0046] FIG18 is a flowchart of a method for displaying a virtual scene corresponding to a second virtual object provided by an exemplary embodiment of the present application;
[0047] FIG19 is a structural block diagram of a virtual scene display device provided by an exemplary embodiment of the present application;
[0048] FIG20 is a structural block diagram of a virtual scene display device provided by another exemplary embodiment of the present application;
[0049] FIG21 is a structural block diagram of a virtual scene display device provided by another exemplary embodiment of the present application;
[0050] FIG22 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0051] First, a brief introduction is given to the terms involved in the embodiments of this application.
[0052] A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal. This virtual scene can be a simulation of a real scene, a semi-simulation and semi-fictional scene, or a purely fictional scene. This application does not limit this. The following embodiments illustrate a 3D virtual scene as an example.
[0053] Virtual model: A model used in a virtual scene to simulate a real scene. Exemplarily, a virtual model occupies a certain volume in a virtual scene. Exemplarily, virtual models include: terrain models, building models, animal and plant models, virtual prop models, virtual vehicle models, and virtual object models. For example, terrain models include: ground, mountains, water, stones, steps, etc.; building models include: houses, walls, containers, and fixed facilities inside buildings: tables, chairs, cabinets, beds, etc.; animal and plant models include: trees, flowers, birds, etc.; virtual prop models include: virtual attack props, medicine boxes, airdrops, etc.; virtual vehicle models include: cars, ships, helicopters, etc.; virtual object models include: people, animals, cartoon characters, etc.
[0054] Virtual characters / virtual objects: These are movable objects within a virtual scene. These movable objects can be virtual objects, virtual animals, animated characters, and so on. For example, people, animals, plants, oil drums, walls, rocks, and so on displayed within a 3D virtual scene. Alternatively, virtual objects can be 3D models created using animation skeletal technology. Each virtual object has its own unique shape and volume within the 3D virtual scene and occupies a portion of the space within the 3D virtual scene.
[0055] The virtual scene display method provided in this application may be applied to at least one of a variety of virtual scenes, such as a virtual shooting scene and a virtual battle scene. It is worth noting that the above application scenarios are merely illustrative examples, and the virtual scene display method provided in this embodiment may also be applied to other scenarios, which are not limited in this embodiment.
[0056] It should be noted that before collecting the user's relevant data and during the process of collecting the user's relevant data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0057] In the present application, the first device can be implemented as a first terminal, and the second device can be implemented as a second terminal. Among them, the terminal can be a desktop computer, a laptop, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) player, etc. An application that supports a virtual environment is installed and run in the terminal, such as an application that supports a three-dimensional virtual environment. The application can be any one of a virtual reality application, a three-dimensional map program, a third-person shooter game (TPS), a first-person shooter game (FPS), a multiplayer online tactical competitive game (MOBA), a multiplayer gun battle survival game, a party game, etc. Optionally, the application can be a stand-alone application, such as a stand-alone three-dimensional game program, or a network-connected application.
[0058] FIG1 shows a block diagram of an electronic device according to an exemplary embodiment of the present application. The electronic device 100 includes an operating system 120 and an application 122. The electronic device 100 may refer to a first device or a second device, and the first device and the second device may be the same device or different devices.
[0059] The operating system 120 is the foundational software that provides application programs 122 with secure access to the computer's hardware.
[0060] The application 122 is an application supporting a virtual environment. Optionally, the application 122 can be implemented as an application supporting a virtual environment installed and running in the terminal mentioned above.
[0061] 2 shows a block diagram of a computer system according to an exemplary embodiment of the present application. The computer system 200 includes a first device 220 , a server 240 , and a second device 260 .
[0062] The first device 220 has an application installed and running that supports the virtual environment. The application can be implemented as an application installed and running on the aforementioned terminal that supports the virtual environment. The first device 220 is a device used by a first user. The first user uses the first device 220 to control a first virtual object in the virtual environment to perform activities, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, and throwing. Illustratively, the first virtual object is a first virtual character, such as a simulated human character or an animated character.
[0063] The first device 220 is connected to the server 240 via a wireless network or a wired network.
[0064] Server 240 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 240 provides backend services for applications supporting a three-dimensional virtual environment. Optionally, server 240 performs primary computing tasks, while first device 220 and second device 260 perform secondary computing tasks. Alternatively, server 240 performs secondary computing tasks, while first device 220 and second device 260 perform primary computing tasks. Alternatively, server 240, first device 220, and second device 260 utilize a distributed computing architecture for collaborative computing.
[0065] The second device 260 has an application installed and running that supports the virtual environment. The application can be implemented as an application installed and running in the terminal mentioned above that supports the virtual environment. The second device 260 is a device used by the second user, and the second user uses the second device 260 to control the second virtual object in the virtual environment to perform activities, which activities include but are not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, and throwing. Schematically, the second virtual object is a second virtual character, such as a simulated human character or an animated character. Optionally, the first virtual character and the second virtual character are in the same virtual environment. Optionally, the first virtual character and the second virtual character may 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 may also belong to different teams, different organizations, or two hostile groups.
[0066] Optionally, the applications installed on the first device 220 and the second device 260 are the same, or the applications installed on the two devices are the same type of applications on different control system platforms. The first device 220 can generally refer to one of multiple devices, and the second device 260 can generally refer to one of multiple devices. This embodiment only uses the first device 220 and the second device 260 as examples. The first device 220 and the second device 260 can be of the same or different device types.
[0067] It is worth noting that the above-mentioned server 240 can be implemented as a physical server or as a cloud server in the cloud, wherein cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing, and sharing of data. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. applied in a cloud computing business model, which can form a resource pool that is used on demand and is flexible and convenient. In some embodiments, the method provided in the embodiments of the present application can be applied to a cloud gaming scenario, so that the calculation of data logic during the game is completed by the cloud server, and the terminal is responsible for the display of the game interface.
[0068] In some embodiments, the server 240 may also be implemented as a node in a blockchain system.
[0069] In combination with the above-mentioned noun introduction and application scenarios, the virtual scene display method provided in this application is explained. Taking the application of this method to the first device as an example, as shown in Figure 3, the method includes the following steps 310 to 330.
[0070] Step 310: Display the virtual scene from the perspective of the first virtual object.
[0071] Illustratively, the first virtual object is a player-controlled virtual object. The player uses a first device (e.g., a first terminal) to manipulate the first virtual object to perform activities in a virtual scene corresponding to the game. The virtual scene displayed on the terminal is from the perspective of the first virtual object, i.e., the virtual scene corresponds to the first virtual object. The perspectives of the first virtual object include first-person and third-person perspectives.
[0072] The first-person perspective is used to instruct the player to observe from the perspective of the game of the first virtual object. When the perspective of the first virtual object is the first-person perspective, the displayed virtual scene is the scene that can be observed by the first virtual object, and the virtual scene at this time does not include the first virtual object; or, the virtual scene includes parts of the first virtual object other than the head, such as: palms, arms, etc. The third-person perspective is used to instruct the player to observe from a game perspective independent of the virtual object in the game. When the perspective of the first virtual object is the third-person perspective, the displayed virtual scene is usually implemented as the entire scene, a selected part of the scene, etc. in the game, and the virtual scene at this time includes the first virtual object. Optionally, the virtual scene displayed under the third-person perspective can also be divided into close-up, mid-shot and long-shot.
[0073] The virtual scene is presented through a camera in the game. In the first-person perspective, the camera is located near the virtual object's head (e.g., next to the head, on top of the head, etc.); in the third-person perspective, the camera is located in the virtual scene and can capture the first virtual object. In the third-person perspective, a close shot is used to indicate that the shooting distance between the camera and the captured object is close, and the captured content is a partial content of the captured object (e.g., above the neck, above the waist, etc.); a medium shot is used to indicate that the shooting distance between the camera and the captured object is far, and the captured content is most of the captured object (e.g., above the knees, etc.); a long shot is used to indicate that the shooting distance between the camera and the captured object is far, and the captured content is the entire content of the captured object (i.e., the entire captured object appears in the long shot).
[0074] In some embodiments, the perspective of the first virtual object is determined based on a default operation of the game; or, the perspective of the first virtual object is determined based on a custom selection operation of the player, etc.
[0075] The virtual scene includes a second virtual object, and the second virtual object is equipped with a virtual lighting prop.
[0076] Illustratively, the second virtual object is another virtual object in the game except the first virtual object. For example, the second virtual object is a virtual object controlled by another player; or the second virtual object is a virtual object assigned by the system by default.
[0077] In some embodiments, the second virtual object and the first virtual object are virtual objects belonging to the same camp, that is, the first virtual object and the second virtual object are teammates during the game; or, the second virtual object and the first virtual object are virtual objects belonging to different camps, that is, the first virtual object and the second virtual object are hostile to each other during the game.
[0078] Virtual lighting props are virtual props with lighting functions, used to provide lighting effects. Optionally, the virtual lighting props are virtual props collected by the second virtual object during the game; or, the virtual lighting props are virtual props that the second virtual object chooses to equip before the game begins; or, the virtual lighting props are virtual props that the system configures as default for the second virtual object, etc. Illustratively, the virtual lighting props are implemented as at least one of virtual props with lighting functions, such as a virtual flashlight, a virtual torch, a virtual light bulb, a virtual headlamp, a virtual firework, a virtual glow stick, etc.
[0079] Step 320: Receive a control operation on the first virtual object.
[0080] Among them, the control operation is used to control the activity of the first virtual object in the virtual scene. Optionally, the activity includes movement and at least one of various actions. Movement refers to the movement of the first virtual object from a first position to a second position in the virtual scene, that is, there is a change in position; various actions refer to the jumping action, crawling action, flipping action, etc. performed by the first virtual object in the virtual scene. Schematically, the player controls the first virtual object to perform corresponding operations in the virtual scene through different functional controls. For example: the player controls the first virtual object to move in the virtual scene through the mobile control; or, the player controls the first virtual object to jump in the virtual scene through the jump control, etc.
[0081] In some embodiments, the control operation is implemented by controlling a virtual joystick. For example, the virtual joystick is circular, and the movement direction of the first virtual object is adjusted based on a sliding operation on the virtual joystick.
[0082] Optionally, a control operation on the first virtual object is received, and the first virtual object moves from a first position to a second position along a movement direction in the virtual scene. For example, based on a rightward sliding operation on a virtual joystick by a player, the first virtual object moves from a first position to a second position along a rightward direction in the virtual scene.
[0083] In step 330, when the second virtual object is within the viewing angle of the first virtual object and the virtual lighting props equipped on the second virtual object are in an illuminated state, in response to the position of the first virtual object in the virtual scene matching the lighting direction of the virtual lighting props, an illumination effect is displayed.
[0084] The viewing angle range of the first virtual object is used to indicate the range that can be observed by the first virtual object.
[0085] Illustratively, the virtual scene is displayed from the perspective of a first virtual object. When the perspective of the first virtual object is implemented as a first-person perspective, the viewing angle range of the first virtual object can be implemented as the virtual scene displayed from the first-person perspective. When the perspective of the first virtual object is implemented as a third-person perspective, the viewing angle range of the first virtual object is a range determined based on the position of the first virtual object in the virtual scene. In other words, the virtual scene displayed from the third-person perspective differs from the viewing angle range of the first virtual object.
[0086] In some embodiments, the viewing angle range of the first virtual object is a viewing angle range preset by the system. Optionally, the viewing angle range of the first virtual object includes at least one of a distance range and an angle range.
[0087] For example, the viewing angle range of the first virtual object set by the system is determined by the distance range and the angle range, where the distance range is 0-100m and the angle range is 120°. That is, the viewing angle range of the first virtual object is a fan-shaped area formed with the first virtual object as the vertex, an angle of 120°, and a radius of 100m.
[0088] The lighting status is used to indicate whether the virtual lighting prop is turned on and performs the lighting function.
[0089] Illustratively, if the second virtual object is equipped with a virtual lighting prop, upon receiving a triggering operation on the virtual lighting prop, the virtual lighting prop is placed in an illuminated state. For example, if the second virtual object is equipped with a virtual lighting prop, a switch control corresponding to the virtual lighting prop is displayed on a second device that controls the second virtual object, and in response to receiving a triggering operation on the switch control, the virtual lighting prop is placed in an illuminated state.
[0090] In some embodiments, based on the second virtual object being within the viewing angle of the first virtual object and the virtual lighting props equipped by the second virtual object being in an illuminated state, the second virtual object and a prop operation animation of the second virtual object using the virtual lighting props are displayed in the virtual scene displayed from the viewing angle of the first virtual object.
[0091] During the prop operation animation, a virtual light column is displayed based on the lighting state of the virtual lighting prop. As shown in FIG4 , a schematic diagram of an interface displaying a virtual light column in a virtual scene is shown. This interface diagram shows a first-person perspective of the first virtual object, including a second virtual object 410 equipped with a virtual lighting prop 420. At this time, the virtual lighting prop 420 is in an illuminated state, and a virtual light column 430 is displayed based on the lighting state of the virtual lighting prop 420. It should be noted that FIG4 only illustrates the range of the virtual lighting 430 and does not show the actual lighting effect. The virtual light column 430 shown in FIG4 does not represent the actual display effect of the virtual light column 430. Optionally, the virtual light column 430 can be implemented as a white light effect, a yellow light effect, a red light effect, etc., which is not limited in this embodiment of the present application. The virtual light column 430 is presented in a "semi-transparent" state and does not block other virtual elements such as the virtual vehicle 440.
[0092] In some embodiments, when the second virtual object is within the viewing angle of the first virtual object and the virtual lighting prop equipped by the second virtual object is in an illuminated state, the lighting direction of the virtual lighting prop is determined.
[0093] Schematically, the lighting direction is the prop orientation of the virtual lighting prop, which is used to indicate the direction in which the virtual lighting prop illuminates. As shown in FIG4 , the lighting direction of the virtual lighting prop 420 is the left front of the first virtual object, which is the current orientation of the second virtual object 410 .
[0094] Optionally, when the virtual lighting prop is implemented as a virtual flashlight, the lighting direction of the virtual lighting prop is usually implemented as the prop orientation (the direction in which the virtual lighting prop emits light); when the virtual lighting prop is implemented as a virtual light bulb, the lighting direction of the virtual lighting prop is usually implemented as a circular area centered on the virtual lighting prop, etc.
[0095] In some embodiments, after determining the lighting direction, a matching relationship between the position of the first virtual object in the virtual scene and the lighting direction is determined.
[0096] The position includes at least one of an object's position and a position orientation. The object's position indicates the coordinates of the first virtual object in the virtual scene; the position orientation refers to the orientation of the virtual object at its current location, typically implemented as the orientation of the virtual object's face. As shown in Figure 4, the position orientation of the second virtual object 410 is to the left. The position orientation of the first virtual object indicates the orientation of the first virtual object at its current location.
[0097] After determining the lighting direction of the virtual lighting prop, the facial orientation of the first virtual object at the location is determined, and the facial orientation is used as the position orientation of the first virtual object, thereby determining the matching relationship between the position orientation and the lighting direction.
[0098] Optionally, the matching relationship includes at least a direction matching relationship between the position orientation and the lighting direction. For example, if the angle between the position orientation and the lighting direction meets a preset angle matching relationship, then the position orientation and the lighting direction are considered to meet the direction matching relationship.
[0099] Optionally, the matching relationship further includes a position matching relationship between the object position of the first virtual object and the prop position of the virtual lighting prop. For example, if the distance between the object position and the prop position meets a preset distance matching relationship, then the object position and the prop position are considered to meet the distance matching relationship.
[0100] In some embodiments, the matching relationship is used to indicate the relative positional relationship between the position of the first virtual object and the interference range indicated by the lighting direction, and the matching relationship includes: matching between the first virtual object and the lighting direction, and mismatching between the first virtual object and the lighting direction.
[0101] Schematically, the interference range indicated by the lighting direction is determined according to the lighting direction. After determining the object position of the first virtual object, it is determined whether the object position is within the interference range; if the object position of the first virtual object is within the interference range, it is considered that the first virtual object and the lighting direction match; if the object position of the first virtual object is not within the interference range, it is considered that the first virtual object and the lighting direction do not match.
[0102] Optionally, when the position of the first virtual object in the virtual scene matches the lighting direction of the virtual lighting prop, a lighting effect is displayed, wherein the lighting effect is used to block the view of the first virtual object from the perspective of the virtual scene.
[0103] Illustratively, line of sight occlusion indicates that a first virtual object is unable to fully observe the virtual scene within its field of view. For example, a lighting effect can block a second virtual object, preventing the first virtual object from observing the second virtual object, thereby facilitating the second virtual object's self-protection through virtual lighting props. Alternatively, a lighting effect can block a specified object in a specified area, preventing the first virtual object from effectively observing the specified object, thereby preventing the first and second virtual objects from competing for the specified object.
[0104] In summary, the virtual scene display method provided in the embodiments of the present application displays a virtual scene from the perspective of a first virtual object. The first virtual object's movements within the virtual scene are controlled based on control operations of the first virtual object. When a second virtual object is within the first virtual object's viewing angle and a virtual lighting prop equipped by the second virtual object is illuminated, and if the first virtual object's position in the virtual scene matches the lighting direction of the virtual lighting prop, a lighting effect is displayed that obstructs the first virtual object's view of the virtual scene. In addition to utilizing the lighting function of the virtual lighting prop, the virtual lighting prop also adds a line-of-sight obstruction function. This virtual lighting prop, with the help of which, blocks the line of sight of the first virtual object that matches the virtual object, disrupts the first virtual object's attack pattern and reduces the first virtual object's effective attack probability. When using the virtual lighting prop, players can interfere with other virtual objects without performing additional operations, reducing the waste of computing resources. Furthermore, the virtual lighting prop provided in the present application combines both lighting and attack interference functions, avoiding the inefficiency of requiring additional operations to interfere with other virtual objects, thereby improving the efficiency of human-computer interaction.
[0105] In an optional embodiment, whether the first virtual object is within a range capable of producing a visually disruptive effect is determined based on the distance between the first virtual object and the second virtual object, as well as the matching relationship between the first virtual object and the lighting direction of the virtual lighting prop. As shown in FIG. 5 , the embodiment shown in FIG. 3 can also be implemented as follows: Steps 510 to 530.
[0106] Step 510: Display the virtual scene from the perspective of the first virtual object.
[0107] The virtual scene includes a second virtual object, and the second virtual object is equipped with a virtual lighting prop.
[0108] Virtual lighting props are virtual props with lighting functions. In some embodiments, virtual lighting props are implemented as independent virtual props. For example, virtual lighting props are implemented as virtual flashlights, virtual torches, etc., which players can equip and operate independently. Alternatively, virtual lighting props are implemented as auxiliary virtual props. For example, virtual lighting props are implemented as virtual flashlight accessories that can be attached to other virtual props to achieve lighting functions.
[0109] Step 520: Receive a control operation on the first virtual object.
[0110] The control operation is used to control the activity of the first virtual object in the virtual scene.
[0111] In step 530, when the second virtual object is within the viewing angle of the first virtual object and the virtual lighting props equipped by the second virtual object are in an illuminated state, in response to the position of the first virtual object in the virtual scene being within the interference range corresponding to the lighting direction of the virtual lighting props, an illumination effect is displayed.
[0112] In some embodiments, under the condition that the second virtual object is within the viewing angle of the first virtual object and the virtual lighting props equipped by the second virtual object are in an illuminated state, the relative position relationship between the position of the first virtual object and the interference range indicated by the lighting direction is determined.
[0113] The relative position relationship indicates whether the first virtual object is within the interference range corresponding to the lighting direction. When the relative position relationship indicates that the first virtual object is within the interference range corresponding to the lighting direction of the virtual lighting prop, the lighting effect is displayed. The interference range indicates the range within which the visual interference effect on the first virtual object occurs.
[0114] Schematically, as shown in FIG6 , there is a schematic diagram of an interface for displaying an illumination effect, which is a schematic diagram when the perspective of the first virtual object is implemented as a first-person perspective. The first virtual object (not shown in the figure) uses a virtual attack prop 610 to engage in a virtual battle with a second virtual object 620 (obstructed), wherein the second virtual object 620 is within the perspective range of the first virtual object, and the second virtual object 620 is equipped with a virtual lighting prop (obstructed), and the virtual lighting prop is in an illuminated state. Since the first virtual object is within the interference range corresponding to the lighting direction of the virtual lighting prop, an illumination effect 630 is displayed. It should be noted that the illumination effect 630 shown in FIG6 only illustrates the range of the illumination effect, and does not illustrate the lighting effect of the illumination effect. For example, the illumination effect can be implemented as a high-intensity white light effect, which can obstruct elements in the virtual scene within the range corresponding to the illumination effect 630 shown in FIG6 .
[0115] Among them, the illumination effect 630 blocks the line of sight of the first virtual object from observing the virtual scene, blocking virtual elements including the second virtual object 620, making it impossible for the first virtual object to fully observe the virtual scene within the field of view, including making it impossible for the first virtual object to observe the second virtual object 620 within the field of view.
[0116] Illustratively, the illumination effect is implemented as a highlight flash effect. Under the highlight flash effect, the first virtual object cannot effectively observe the area blocked by the highlight flash effect, which helps to reduce the probability of the first virtual object effectively attacking the blocked area.
[0117] As shown in Figure 6, the area blocked by the lighting special effect 630 cannot be effectively observed. Therefore, when the first virtual object attacks the second virtual object 620 through the virtual attack prop 610, since the second virtual object 620 is located in the blocked area of the lighting special effect 630, it is difficult for the first virtual object to effectively attack the second virtual object 620, so that the second virtual object 620 improves its own defense capability with the help of the virtual lighting prop.
[0118] In an optional embodiment, a lighting effect centered around a virtual lighting prop is displayed.
[0119] Optionally, a virtual lighting prop is used as the center of the lighting effect to display a lighting effect with a divergent effect. The divergent effect refers to an effect that gradually weakens outward from the virtual lighting prop as the highest brightness point. Schematically, the virtual lighting prop is used as the center of the lighting effect, and the center is the highest brightness point of the lighting effect, and the brightness effect of the lighting effect gradually decreases outward. As shown in Figure 6, the special effect center 631 of the lighting effect 630 is the highest brightness point, and the brightness effect of the lighting effect gradually decreases outward from the highest brightness point as the center. In this embodiment, the lighting effect can be realized as a light effect with a divergent effect centered on the lighting prop, which improves the display realism of the lighting effect and enhances the realism and immersion of the game.
[0120] In an optional embodiment, in response to the angle between the first virtual object's object orientation and the lighting direction being less than a preset angle threshold, a lighting effect is displayed. Illustratively, when determining the relative positional relationship between the first virtual object's location and the interference range indicated by the lighting direction, the angle between the first virtual object's object orientation and the lighting direction is determined.
[0121] The object orientation indicates the direction facing the first virtual object. The facial orientation of the first virtual object is used as the object orientation of the first virtual object. The angle between the object orientation and the lighting direction of the virtual lighting prop is determined, and the angle is compared with a preset angle threshold. The preset angle threshold is a pre-set angle threshold used to limit the interference range corresponding to the lighting direction. For example, the preset angle threshold is within a 90° range centered on the first virtual object.
[0122] When the angle between the object's orientation and the lighting direction is less than the preset angle threshold, the lighting effect is displayed; when the angle between the object's orientation and the lighting direction is greater than or equal to the preset angle threshold, the lighting effect is not displayed.
[0123] In this embodiment, it is only necessary to determine whether an illumination effect is generated by the size relationship between the angle between the object orientation of the first virtual object and the lighting direction and the preset angle threshold. The method of calculating the angle between directions is relatively simple, which can reduce the amount of calculation required to be processed, and judgment based on the direction dimension can improve the rationality of generating illumination effects.
[0124] In some embodiments, the virtual lighting props also have an illumination function. When the virtual lighting props perform their illumination function, a lighting effect is displayed. The lighting effect is used to increase the brightness of the virtual scene without obstructing vision. Optionally, when the angle between the object's orientation and the illumination direction is greater than or equal to a preset angle threshold, the illumination effect is not displayed, but the lighting effect is displayed.
[0125] In one optional embodiment, in response to the separation distance between the first virtual object and the virtual lighting prop being less than a preset distance threshold, a lighting effect is displayed based on the separation distance. Illustratively, the separation distance between the first virtual object and the virtual lighting prop is determined when determining the relative positional relationship between the first virtual object's location and the interference range indicated by the lighting direction. Since the virtual lighting prop is a virtual prop held by the second virtual object, the separation distance between the first virtual object and the virtual lighting prop can be considered the separation distance between the first virtual object and the second virtual object.
[0126] After determining the distance between the first virtual object and the virtual lighting prop, the distance is compared with a preset distance threshold, wherein the preset distance threshold is a pre-set distance threshold used to limit the interference range corresponding to the lighting direction.
[0127] In some embodiments, when the distance between the first virtual object and the virtual lighting prop is determined to be less than a preset distance threshold, a lighting effect is displayed based on the distance. Optionally, the lighting effect is displayed based on the intensity of the lighting effect corresponding to the distance, wherein the intensity of the lighting effect is negatively correlated with the distance.
[0128] Illustratively, the illumination effect intensity indicates the brightness of the illumination effect. When the distance between the two objects is less than a preset threshold, the illumination effect is displayed at varying brightness levels based on the distance between them. Specifically, the smaller the distance between the two objects, the higher the brightness of the illumination effect; and the larger the distance between the two objects, the lower the brightness of the illumination effect.
[0129] FIG7 is a schematic diagram of an interface displaying a lighting effect. When the distance between the first virtual object (first-person perspective, not shown) holding a virtual attack prop 710 and the virtual lighting prop is small, the displayed lighting effect 720 is displayed at a higher brightness (similar to FIG6 , the lighting effect 720 shown in FIG7 only illustrates the range of the lighting effect, not the lighting effect itself). Optionally, virtual scene elements occluded within the range corresponding to the lighting effect 720 are essentially invisible, and the transparency of the light effect within the lighting effect 720 can be considered to be approximately 95% to 100%. FIG8 is another schematic diagram of an interface displaying a lighting effect. When the distance between the first virtual object (first-person perspective, not shown) holding a virtual attack prop 810 and the virtual lighting prop is large, the displayed lighting effect 820 is displayed at a lower brightness (similar to FIG6 , the lighting effect 820 shown in FIG8 only illustrates the range of the lighting effect, not the lighting effect itself). Optionally, the virtual scene elements blocked within the range corresponding to the illumination special effect 820 have low visibility, but are not completely invisible, and can be regarded as having a transparency of about 85% to 90% of the light effect filled within the illumination special effect 820 .
[0130] In the above embodiment, on the one hand, it is only necessary to determine whether an illumination effect is generated by the relationship between the interval distance between the first virtual object and the virtual lighting prop and the preset distance threshold. The method of calculating the distance is relatively simple and can reduce the amount of calculation required to be processed; on the other hand, the intensity of the illumination effect to be displayed can be determined by the interval distance, thereby improving the diversity and flexibility of the illumination effect display.
[0131] In one embodiment, when the angle between the object's orientation and the lighting direction is less than a preset angle threshold, and the distance between the first virtual object and the virtual lighting prop is less than a preset distance threshold, a lighting effect is displayed based on the distance between the first virtual object and the virtual lighting prop. Illustratively, the interference range of the lighting direction indication is determined by a combination of the preset distance threshold and the preset angle threshold. In other words, the interference range is related to two influencing factors: distance and angle.
[0132] As shown in FIG9 , which is a schematic diagram of an interference range, the interference range is determined based on a line segment OA 910 (preset distance threshold) and an angle A′OA″ 920 (preset angle threshold).
[0133] Optionally, the interference range has multiple sub-interference ranges, and the multiple sub-interference ranges correspond to different illumination effect intensities.
[0134] The multiple sub-interference ranges are multiple area ranges obtained by dividing the interference range based on a preset distance threshold. Schematically, after determining the preset distance threshold, the preset distance threshold is divided to obtain multiple sub-line segments, and based on the multiple sub-line segments and the preset angle threshold, the sub-interference ranges corresponding to the multiple sub-line segments are obtained, that is, the multiple sub-interference ranges after the interference range is divided are obtained. Schematically, when dividing the preset distance threshold to obtain multiple sub-line segments, the multiple sub-line segments can be obtained by using an equal spacing division method, an increasing spacing division method, or a random division method.
[0135] As shown in Figure 9, after obtaining the interference range enclosed by the line segment OA910 and the angle A'OA" 920, the line segment OA910 is divided to obtain sub-segment OC, sub-segment CD and sub-segment DA. Based on the sub-segment OC and the angle A'OA" 920, the sub-interference range 931 corresponding to the sub-segment OC is obtained; based on the sub-segment CD and the angle A'OA" 920, the sub-interference range 932 corresponding to the sub-segment CD is obtained; based on the sub-segment DA and the angle A'OA" 920, the sub-interference range 933 corresponding to the sub-segment DA is obtained.
[0136] Optionally, in response to the first virtual object being within a first sub-interference range within the interference range, a lighting effect having a first lighting effect intensity is displayed; and in response to the first virtual object being within a second sub-interference range within the interference range, a lighting effect having a second lighting effect intensity is displayed. A first distance between the first sub-interference range and the virtual lighting prop is less than a second distance between the second sub-interference range and the virtual lighting prop, and the first lighting effect intensity is greater than the second lighting effect intensity.
[0137] In the above embodiment, the interference range corresponding to the virtual lighting props is divided into multiple sub-interference ranges. Based on the sub-interference range in which the first virtual object is located, the intensity of the illumination effect to be displayed is determined. In the distance dimension, the intensity of the illumination effect is determined according to the range rather than the location point, which reduces the number of illumination effects of different intensities that need to be set, reflects diversity, and reduces the waste of computing resources.
[0138] In some embodiments, different sub-interference ranges are pre-configured with different interference effectiveness rates, where the interference effectiveness rate is used to indicate an interference rate that generates line-of-sight interference to the first virtual object.
[0139] Optionally, in response to the first virtual object being in a first sub-interference range within the interference range, an interference effectiveness rate corresponding to the first sub-interference range is obtained. Schematically, as shown in FIG9 , when the first virtual object is in a first sub-interference range 931 within the interference range, the interference effectiveness rate corresponding to the first sub-interference range 931 is obtained.
[0140] Optionally, an interference value corresponding to the first virtual object is obtained based on the duration of the first virtual object's stay within the first sub-interference range and the interference effectiveness rate. In an exemplary embodiment, the duration of the first virtual object's stay within the first sub-interference range is calculated, and the duration is multiplied by the interference effectiveness rate corresponding to the first sub-interference range to obtain the interference value corresponding to the first sub-interference range. The interference value is used to indicate the degree of visual interference to the first virtual object.
[0141] In some embodiments, a lighting effect having a first lighting effect intensity is displayed based on the interference value.
[0142] Illustratively, based on the calculation result of the interference value, an illumination special effect with a special effect intensity corresponding to the interference value is displayed.
[0143] For example, when the interference value is 100, the degree of visual interference on the first virtual object is relatively strong. At this time, the line of sight of the first virtual object is completely blocked, that is, the first virtual object cannot see the virtual scene clearly (achieving a blinding effect); when the interference value is 30, the degree of visual interference on the first virtual object is relatively weak. At this time, the line of sight of the first virtual object is partially blocked, that is, the first virtual object cannot see part of the content in the virtual scene, etc.
[0144] In an optional embodiment, taking the second sub-interference range as an example, in response to a first virtual object being within the second sub-interference range within the interference range, an interference effectiveness rate corresponding to the second sub-interference range is obtained; based on the duration of the first virtual object's stay within the second sub-interference range and the interference effectiveness rate, an interference value corresponding to the first virtual object is obtained; and based on the interference value corresponding to the first virtual object, an illumination effect having a first illumination effect intensity is displayed.
[0145] In the above embodiment, when determining the intensity of the illumination effect, the concept of interference value is introduced. The interference value is determined based on the interference effectiveness rate and the length of time the first virtual object stays in the first sub-interference range. That is, as the length of time the first virtual object stays in the first sub-interference range increases, the intensity of the illumination effect will continue to increase, thereby enhancing the dynamic effect and variability in the display process of the illumination effect, thereby enhancing the player's gaming experience.
[0146] In an optional embodiment, different sub-interference ranges are pre-configured with different interference thresholds, and the interference threshold is used to indicate the upper limit of the interference value in the corresponding sub-interference range. Schematically, as shown in FIG9 , when the first virtual object is located within the first sub-interference range 931, based on the first interference threshold of the first sub-interference range 931, it is determined that the calculated interference value corresponding to the first virtual object should be within the first interference threshold. Optionally, if the illumination effect of the first sub-interference range 931 is the strongest, the first interference threshold is the maximum value among the multiple sub-interference ranges.
[0147] Similarly, when the first virtual object is located within the second sub-interference range 932, based on the second interference threshold of the second sub-interference range 932, it is determined that the calculated interference value corresponding to the first virtual object should be within the second interference threshold, and the second interference threshold is less than the first interference threshold, etc.
[0148] In an optional embodiment, different sub-interference ranges are pre-configured with different interference value intervals, and the interference value intervals are used to indicate the interference value range limits in the corresponding sub-interference ranges. Schematically, as shown in FIG9 , when a first virtual object is located within a first sub-interference range 931, based on the first interference value interval of the first sub-interference range 931, it is determined that the calculated interference value corresponding to the first virtual object should be within the first interference value interval.
[0149] Similarly, when the first virtual object is within the second sub-interference range 932, based on the second interference value interval of the second sub-interference range 932, it is determined that the calculated interference value corresponding to the first virtual object should be within the second interference value interval. Optionally, the minimum value of the first interference value interval is greater than or equal to the maximum value of the second interference value interval. For example: the first interference value interval is (90, 100), and the second interference value interval is (40, 90); or, the first interference value interval is (90, 100), and the second interference value interval is (40, 60), etc.
[0150] In other embodiments, the virtual lighting prop corresponds to a virtual lighting range, and the virtual lighting range is used to indicate the lighting range of the virtual lighting prop's lighting function. Optionally, in response to the first virtual object being outside the interference range but within the virtual lighting range, a virtual halo effect is displayed, where the virtual halo effect is formed centered on the virtual lighting prop.
[0151] Schematically, after the second virtual object starts the virtual lighting prop, the virtual lighting prop has two key ranges, the interference range and the lighting range, where the interference range can be implemented as a fan-shaped range as shown in Figure 9, where point O can be implemented as the light-emitting point of the virtual lighting prop (that is, the location of the virtual lighting prop); as shown in Figure 9, assuming that there is a point E on the extension line OA in Figure 9 (not shown in Figure 9), then based on the line segment OE and the angle A'OA" 920, the fan-shaped range corresponding to the line segment OE is the virtual lighting range; or, the circular range with point O as the center and OE as the radius is the virtual lighting range, which is not limited in the embodiment of the present application. In the above embodiment, when the first virtual object is outside the interference range and within the virtual lighting range, a virtual halo effect is also displayed to reflect the lighting function of the virtual lighting prop, thereby improving the realism of the virtual lighting prop and enhancing the player's gaming experience.
[0152] To sum up, in the embodiment of the present application, the interference range that produces a visual interference effect on the first virtual object is determined based on the lighting direction, and illumination effects of different degrees are displayed differently according to the position of the first virtual object within the interference range. When the first virtual object and the second virtual object are closer and the angle between them is smaller, an illumination effect with a stronger degree of effect is displayed. When the first virtual object and the second virtual object are farther and the angle between them is larger, an illumination effect with a weaker degree of effect is displayed, thereby fully improving the simulation of the game, enhancing the fun of the game, and improving the player's sense of participation in the game.
[0153] In an optional embodiment, the lighting effect is used to reduce the probability of the first virtual object's attack being effective, allowing the second virtual object to use virtual lighting props to resist the attack during the game. As shown in FIG10 , the embodiment shown in FIG3 can also be implemented as follows: Steps 1010 to 1040.
[0154] Step 1010: Display a virtual scene from the perspective of a first virtual object.
[0155] The virtual scene includes a second virtual object, and the second virtual object is equipped with a virtual lighting prop.
[0156] Step 1010 has been described in the above steps 310 and 510 and will not be repeated here.
[0157] Step 1020: Receive a control operation on the first virtual object.
[0158] The control operation is used to control the activity of the first virtual object in the virtual scene.
[0159] Step 1020 has been described in the above steps 320 and 520 and will not be repeated here.
[0160] Step 1030: When the second virtual object is within the viewing angle of the first virtual object and the virtual lighting props equipped by the second virtual object are in an illuminated state, in response to the position of the first virtual object in the virtual environment being within the interference range corresponding to the lighting direction of the virtual lighting props, a lighting effect is displayed.
[0161] Optionally, when the second virtual object is within the viewing angle of the first virtual object and the virtual lighting prop equipped with the second virtual object is in an illuminated state, a relative positional relationship between the first virtual object's position in the virtual environment and the interference range indicated by the lighting direction is determined. The relative positional relationship indicates whether the first virtual object's position is within the interference range corresponding to the lighting direction. When the relative positional relationship indicates that the first virtual object is within the interference range corresponding to the lighting direction of the virtual lighting prop, an illumination effect is displayed.
[0162] The interference range is used to indicate the range that produces a visual interference effect on the first virtual object.
[0163] In an optional embodiment, in response to the lighting direction of the virtual lighting prop pointing toward the virtual reflective prop, a refraction direction corresponding to the lighting direction is determined; and the interference range is determined based on the refraction direction. Illustratively, the virtual reflective prop is a prop used to refract light emitted by the virtual lighting prop. For example, the virtual reflective prop is implemented as a virtual mirror, virtual water flow, virtual screen, or other reflective item / prop. When the lighting direction of the virtual lighting prop points toward the virtual reflective prop, a refraction direction that is normally symmetrical to the lighting direction is determined, and the interference range is determined based on the refraction direction.
[0164] Optionally, the interference range is determined by combining the refraction direction and the illumination direction. For example, a first interference range is determined based on the illumination direction, a second interference range is determined based on the refraction direction, and the union of the first and second interference ranges is used as the interference range; alternatively, the intersection of the first and second interference ranges is used as the interference range.
[0165] In some embodiments, the content of determining the interference range according to the refraction direction refers to the content of determining the interference range according to the illumination direction, for example, a preset distance threshold and a preset angle threshold corresponding to the refraction direction are pre-determined to determine the interference range corresponding to the refraction direction. No further details are given here.
[0166] In an optional embodiment, the lighting effect is implemented as a flashing effect with gradually changing brightness; or, the lighting effect is implemented as a virtual smoke effect; or, the lighting effect is implemented as a flashing effect; or, the lighting effect is implemented as a virtual obstacle effect, etc. Among them, the flashing effect is used to indicate a lighting effect with strong brightness, and the strong brightness is used to indicate a brightness that is sufficient to block the second virtual object and cause visual interference to the first virtual object; the flashing effect is used to indicate a lighting effect that flashes at a certain frequency, etc.
[0167] Optionally, the lighting effect can display in different styles based on the player's settings. For example, the player can choose to implement the lighting effect as a flashing effect with gradually changing brightness, and can also select the color, shape, and other content of the lighting effect; or the player can choose to implement the lighting effect as virtual smoke and flashing effect, and when the level of the second virtual object is higher than the first virtual object, the virtual smoke is displayed, and when the level of the second virtual object is lower than the first virtual object, the flashing effect is displayed, etc.
[0168] In an optional embodiment, in response to the display duration of the illumination effect reaching a preset display duration, the illumination effect is canceled. Illustratively, the preset display duration indicates a preset display duration. For example, if the preset display duration is 5 seconds, the illumination effect is canceled after the display duration reaches the preset display duration of 5 seconds. In other words, the illumination effect that obstructs the view of the first virtual object is canceled.
[0169] In an optional embodiment, a lighting effect is displayed based on the first object level of the first virtual object. Illustratively, in response to the first object level of the first virtual object being within a first level range, a lighting effect of a second lighting effect intensity is displayed; and in response to the first object level of the first virtual object being within a second level range, a lighting effect of the first lighting effect intensity is displayed.
[0170] Optionally, the first level range and the second level range are pre-set level ranges. For example: when the second virtual object is illuminated by a virtual lighting prop, the first object level of the first virtual object is determined. Among them, the object level is used to measure the game level of the virtual object in a numerical form. Object level includes multiple forms such as game level and object interaction level. The game level is implemented as a level determined based on historical game matches, or as a level determined based on the current game, etc.; the object interaction level is implemented as a level determined based on the interaction between virtual objects (such as: if the interaction frequency between the first virtual object and the second virtual object is higher, then the object interaction level of the first virtual object and the second virtual object is higher, etc.).
[0171] For example, after determining the first object level of the first virtual object, the level range of the first object level is determined. If the preset first level range is (50, 100), the preset second level range is (0, 49), and the first object level of the first virtual object is 46, then the first object level of the first virtual object is determined to be within the second level range, and an illumination effect of a first illumination effect intensity corresponding to the second level range is displayed. For example, the illumination effect of the first illumination effect intensity is a stronger illumination effect, and the illumination effect of the second illumination effect intensity is a weaker illumination effect, etc.
[0172] That is, when the second virtual object uses virtual lighting props to assist in causing visual interference to the first virtual object, based on the first object level of the first virtual object, the visual obstruction function of the illumination effect produced by the virtual lighting props can be resisted to a corresponding degree. For example, the higher the first object level of the first virtual object, the smaller the intensity of the illumination effect caused by the second virtual object using the virtual lighting props. This helps the player controlling the first virtual object to increase the first object level as soon as possible to resist the visual obstruction function of the illumination effect.
[0173] In an optional embodiment, a lighting effect is displayed based on the second object level of the second virtual object. Illustratively, in response to the second object level of the second virtual object being within a first level range, a lighting effect of a first lighting effect intensity is displayed; and in response to the second object level of the second virtual object being within a second level range, a lighting effect of a second lighting effect intensity is displayed.
[0174] Optionally, the first level range and the second level range are pre-set level ranges. For example, when the second virtual object is illuminated by a virtual lighting prop, the second object level of the second virtual object is determined.
[0175] For example, after determining the second object level of the second virtual object, the level range of the second object level is determined. If the preset first level range is (50, 100), the preset second level range is (0, 49), and the second object level of the second virtual object is 46, then the second object level of the second virtual object is determined to be within the second level range, and an illumination effect of a second illumination effect intensity corresponding to the second level range is displayed. For example, the illumination effect of the second illumination effect intensity is a weaker illumination effect intensity, and the illumination effect of the first illumination effect intensity is a stronger illumination effect intensity, etc.
[0176] That is, when the second virtual object uses virtual lighting props to assist in causing visual interference to the first virtual object, based on the second object level of the second virtual object, the visual blocking function of the virtual lighting props to produce illumination effects can be more fully utilized.
[0177] In an optional embodiment, a lighting effect is displayed based on a level difference between a first object level of a first virtual object and a second object level of a second virtual object. Optionally, the lighting effect is displayed in response to the first object level of the first virtual object being no greater than the second object level of the second virtual object; and the lighting effect is not displayed in response to the first object level of the first virtual object being greater than the second object level of the second virtual object.
[0178] Illustratively, when a second virtual object is illuminated using a virtual lighting prop, the first object level of the first virtual object and the second object level of the second virtual object are determined and compared. For example, if the first object level of the first virtual object is 46 and the second object level of the second virtual object is 88, then the first object level of the first virtual object is less than the second object level of the second virtual object, and a lighting effect is displayed. Similarly, if the first object level of the first virtual object is 67 and the second object level of the second virtual object is 57, then the first object level of the first virtual object is greater than the second object level of the second virtual object, and no lighting effect is displayed.
[0179] Optionally, in response to the first object level of the first virtual object being not greater than the second object level of the second virtual object, an illumination effect of a first illumination effect intensity is displayed; in response to the first object level of the first virtual object being greater than the second object level of the second virtual object, an illumination effect of a second illumination effect intensity is displayed. Schematically, when the second virtual object is illuminated using a virtual lighting prop, the first object level of the first virtual object and the second object level of the second virtual object are determined, and the first object level and the second object level are compared. For example: if the first object level of the first virtual object is 46 and the second object level of the second virtual object is 88, then the first object level of the first virtual object is less than the second object level of the second virtual object, and an illumination effect of the first illumination effect intensity is displayed; similarly, if the first object level of the first virtual object is 67 and the second object level of the second virtual object is 57, then the first object level of the first virtual object is greater than the second object level of the second virtual object, and an illumination effect of the second illumination effect intensity is displayed, and so on.
[0180] That is: when the second virtual object uses virtual lighting props to assist in causing visual interference to the first virtual object, the first object level of the first virtual object and the second object level of the second virtual object can be combined to display the illumination effects produced by the virtual lighting props differently, thereby helping to promote the first player controlling the first virtual object to increase the first object level as quickly as possible to fully resist the visual obstruction function of the illumination effect; and also helping to promote the second player controlling the second virtual object to increase the second object level as quickly as possible to fully utilize the visual obstruction function of the illumination effect.
[0181] Step 1040 , in response to the triggering target condition, weakening the special effect of the display illumination special effect.
[0182] Illustratively, the target condition is a pre-set condition, and when the target condition is triggered, the special effect of the illumination special effect is weakened. Optionally, the target condition includes at least one of the following forms.
[0183] (1) In response to the second virtual object being outside the viewing range of the first virtual object, triggering a target condition.
[0184] Illustratively, when the second virtual object is not within the viewing angle of the first virtual object, the operation of the second virtual object using the virtual lighting prop cannot be known to the first virtual object, and is therefore regarded as a triggering target condition, thereby weakening the special effect of the illumination effect; optionally, the second virtual object is outside the viewing angle of the first virtual object, that is, the first virtual object moves or the second virtual object moves, so that the first virtual object gradually moves away from the interference range corresponding to the virtual lighting prop, the special effect of the illumination effect is weakened, and the obscured virtual scene elements can gradually appear, that is, the player can gradually see the virtual scene elements that were previously obscured by the illumination effect.
[0185] (2) In response to the virtual lighting prop equipped by the second virtual object being in an off state, triggering a target condition.
[0186] Illustratively, when the player controlling the second virtual object turns off the virtual lighting props, the virtual lighting props will not produce any lighting effects, and therefore will not block the line of sight of the first virtual object. This is considered as triggering the target condition, weakening the special effects of the illumination effect, and displaying the virtual scene. Optionally, when the virtual lighting props are turned off, the special effects of the illumination effect will gradually weaken until the display is cancelled, so that the player can clearly see the virtual scene from the current perspective of the first virtual object.
[0187] (3) In response to a mismatch between the lighting direction of the first virtual object and the virtual lighting prop, triggering a target condition.
[0188] Illustratively, the lighting direction mismatch is used to indicate that the first virtual object is not within the interference range determined based on the lighting direction, that is, although the second virtual object uses virtual lighting props to illuminate the lighting direction, the first virtual object does not exist within the interference range determined by the lighting direction, which is regarded as triggering the target condition, weakening the special effects of the illumination effect, and the obscured virtual scene elements can gradually appear, that is, the player can gradually see the virtual scene elements that were previously obscured by the illumination effect.
[0189] (4) In response to the second virtual object being eliminated, triggering a target condition.
[0190] In an illustrative manner, when the second virtual object is eliminated by the first virtual object or other virtual objects and exits the virtual game, the virtual lighting props will immediately become invalid, and the special effects of the illumination effects will gradually weaken until they are no longer displayed, so that the player can clearly see the virtual scene from the current perspective of the first virtual object.
[0191] (5) In response to the loss rate of the virtual lighting prop equipped by the second virtual object reaching a preset loss rate, triggering a target condition.
[0192] In principle, the loss rate is used to indicate the degree of loss of the virtual lighting props. Optionally, when the virtual lighting props are hit or the number of uses increases, the loss rate of the virtual lighting props will increase. When the loss rate of the virtual lighting props reaches 100%, the virtual lighting props will immediately become invalid, and the special effects of the illumination effects will gradually weaken until they are cancelled, so that the player can clearly see the virtual scene from the current perspective of the first virtual object.
[0193] In an optional embodiment, when the special effect of the illumination effect is weakened, the display is weakened at a uniform speed. For example, after the target condition is triggered, the special effect of the illumination effect is uniformly weakened, and after 3 seconds, the illumination effect disappears, and the virtual scene without line of sight is redisplayed. For example, the illumination effect is implemented as a light ball, and when the special effect of the illumination effect is weakened, a disappearing animation of the light ball gradually disappearing is displayed until the virtual scene without line of sight is redisplayed.
[0194] Optionally, the special effect is related to the interference value of the illumination special effect. When weakening the special effect of the illumination special effect, the interference value is changed at a uniform speed to achieve the purpose of uniformly weakening the special effect of the illumination special effect. For example, if the interference value is 60 and the target condition is triggered and the special effect of the illumination special effect is weakened, the interference value is uniformly weakened and the special effect corresponding to the weakened interference value is displayed. For example, if the interference value is uniformly reduced to 30 after 1 second, the special effect corresponding to the interference value of 30 is displayed, and a slow weakening process also occurs within 1 second.
[0195] Alternatively, when weakening the special effect of the illumination effect, the display is weakened in a variable speed manner; or, the illumination effect suddenly disappears in the virtual scene, etc. It should be noted that the above is only an illustrative example and the embodiments of the present application are not limited thereto.
[0196] In an optional embodiment, a skill cooling effect is displayed after the illumination effect is displayed. The skill cooling effect is used to reduce the frequency of virtual attacks launched by the first virtual object against the second virtual object. Optionally, after the illumination effect is displayed, a failure screen of the attack function control is displayed, and the failure screen is regarded as a skill cooling effect. The attack function control is used to indicate the control associated with the virtual attack operation, and the failure screen is used to indicate that the first virtual object cannot launch a virtual attack on the second virtual object through the attack function control within the skill cooling time, thereby further reducing the frequency of virtual attacks launched by the first virtual object against the second virtual object, to a certain extent increasing the effective time of the virtual lighting props and expanding the effective mode of the virtual lighting props, thereby improving the utilization rate of the virtual lighting props.
[0197] In an optional embodiment, whether to display an illumination effect is determined based on the virtual camps to which the first virtual object and the second virtual object belong. Optionally, in response to the first virtual object and the second virtual object belonging to different virtual camps, an illumination effect is displayed. Illustratively, when the first virtual object and the second virtual object are in a hostile relationship and the first virtual object is within an interference range, the second virtual object uses a line of sight obstruction effect generated by a virtual lighting prop to act on the first virtual object, i.e., an illumination effect is displayed, thereby effectively protecting the second virtual object through the line of sight obstruction effect.
[0198] In an optional embodiment, when a second virtual object is within the viewing angle of a first virtual object and a virtual lighting prop equipped by the second virtual object is in an illuminated state, in response to the first virtual object and the second virtual object belonging to the same virtual camp, a brightness enhancement animation is displayed. The brightness enhancement animation includes the second virtual object providing illumination to the first virtual object using the virtual lighting prop.
[0199] Schematically, when the first virtual object and the second virtual object are teammates, even if the first virtual object is within the interference range corresponding to the lighting direction, the line of sight obstruction effect produced by the second virtual object using virtual lighting props will not affect the first virtual object, that is, the lighting effects will not be displayed on the terminal interface corresponding to the first virtual object, thereby effectively avoiding the line of sight obstruction effect on the first virtual object in the same camp and affecting virtual combat.
[0200] Therefore, displaying lighting effects differently according to the formation to which the virtual object belongs is not only helpful in avoiding damage to teammates during the use of virtual lighting props, but also conducive to targeted attacks on the enemy in team battles.
[0201] To sum up, in an embodiment of the present application, a method for canceling the display of illumination special effects is introduced. In response to the triggering target condition, the special effect of the illumination special effects is weakened, and a virtual scene is displayed. The illumination special effects are displayed in a weakened manner, thereby enhancing the simulation sense of the game.
[0202] In an optional embodiment, in addition to producing illumination effects, the virtual lighting device also generates lighting effects, which are used to enhance the display brightness of the virtual environment. The range that triggers the display of the lighting effects is the virtual lighting range corresponding to the virtual lighting prop. The virtual lighting range indicates the range within which the virtual lighting prop's lighting function is exerted. For example, if the virtual lighting prop is implemented as a virtual flashlight, the virtual scene is displayed by combining the virtual lighting range and the interference range. As shown schematically in Figure 11, the embodiment shown in Figure 3 can also be implemented as follows: Steps 1110 to 1140.
[0203] In step 1110 , the person using the virtual flashlight uses the virtual flashlight.
[0204] The illuminator is used to indicate the second virtual object using the virtual lighting prop, and the virtual flashlight is the virtual lighting prop. In some embodiments, based on the illuminator's use of the virtual flashlight, two determination paths are performed simultaneously, namely, steps 1120 and 1130 are performed simultaneously to display the virtual scene based on the virtual lighting range and interference range.
[0205] Step 1120: Determine whether the irradiated person is within the interference range.
[0206] Among them, the illuminated person is used to indicate the first virtual object controlled by the player. Optionally, based on the operation of the irradiator using the virtual flashlight to illuminate, the lighting direction of the virtual flashlight is determined, and the interference range corresponding to the virtual flashlight is determined based on the lighting direction. Schematically, as shown in Figure 9, the interference range is implemented as a fan-shaped area with the irradiator as the vertex, a preset distance threshold as the radius, and a preset angle threshold as the angle. When judging whether the illuminated person is within the interference range, it is determined whether the illuminated person is within the fan-shaped area where the screen blinding effect takes effect. Among them, the blinding effect is used to indicate the above-mentioned illumination effect that blocks the line of sight of the first virtual object.
[0207] In some embodiments, when the irradiated person is outside the interference range (No), the determination process ends; when the irradiated person is within the interference range (Yes), step 1121 is executed.
[0208] Step 1121: Determine the sub-interference range of the irradiated person within the interference range.
[0209] Illustratively, the interference range includes multiple pre-divided interference sub-ranges. After determining that the exposed person is within the interference range, the sub-interference range within which the exposed person is located is determined. As shown in FIG9 , it is determined whether the exposed person is within sub-interference range 931, sub-interference range 932, or sub-interference range 933 within the interference range.
[0210] Step 1122: Calculate the interference value of the irradiated person within the sub-interference range in real time.
[0211] Illustratively, after determining the sub-interference range in which the illuminated person is located, the interference value of the illuminated person in the sub-interference range is determined, and the interference value is used to indicate the degree of sight interference to the illuminated person.
[0212] In some embodiments, different sub-interference ranges correspond to different interference activation rates, which indicate the rate at which interference interferes with the line of sight of the irradiated person. In an exemplary embodiment, the closer the pre-set sub-interference range is to the irradiator, the greater the interference activation rate; and the farther the pre-set sub-interference range is from the irradiator, the smaller the interference activation rate. For example, as shown in FIG9 , the interference activation rate of sub-interference range 931 is the highest, and the interference activation rate of sub-interference range 933 is the lowest.
[0213] Optionally, after determining the sub-interference range in which the irradiated person is located, the interference effectiveness rate corresponding to the sub-interference range in which the irradiated person is located is determined, and based on the interference effectiveness rate and the duration of the irradiated person's stay in the sub-interference range, the interference value of the irradiated person within the sub-interference range is determined. In an illustrative embodiment, the interference effectiveness rate corresponding to the sub-interference range is multiplied by the duration of the irradiated person's stay in the sub-interference range to obtain the interference value of the irradiated person within the sub-interference range.
[0214] As shown in Figure 9, when the irradiated person is in the sub-interference range 931, the interference effectiveness rate corresponding to the sub-interference range 931 is determined. If the irradiated person continues to move within the sub-interference range 931, the length of time the irradiated person stays in the sub-interference range 931 is counted, and the interference effectiveness rate is multiplied by the length of time spent to obtain the interference value of the irradiated person in the sub-interference range 931.
[0215] Optionally, multiple sub-interference ranges respectively correspond to an interference value interval. When the irradiated person moves between the multiple sub-interference ranges, the interference value of the irradiated person within the sub-interference range is updated based on the interference value interval corresponding to the sub-interference range. As shown in Figure 9, the irradiated person is initially located in the sub-interference range 931, the first stay time of the irradiated person in the sub-interference range 931 is counted, and the first interference value of the irradiated person in the sub-interference range 931 is obtained. The first interference value is located in the first interference value interval corresponding to the sub-interference range 931, such as: the first interference value interval corresponding to the sub-interference range 931 is (0, 100), and the first interference value is calculated to be 80; when the irradiated person moves from the sub-interference range 931 to the sub-interference range 932, the second interference value interval corresponding to the sub-interference range 932 is determined, for example: the second interference value interval is (0, 60), if the first interference value is not in the second interference value interval, the first interference value is reduced to the second interference value interval, for example: after reducing the first interference value 80 to 60, the interference value 60 is used as the updated interference value, etc.
[0216] Step 1123: output a blinding effect on the screen of the irradiated person according to the interference value.
[0217] Illustratively, after determining the interference value, a blinding effect is determined on the screen of the illuminated person based on the interference value. The blinding effect is used to display an effect that blocks the illuminated person's vision. Optionally, different interference values correspond to different degrees of blinding effect. For example, when the interference value is 50, the blinding effect is the greatest, and when the interference value is 30, the blinding effect is less severe.
[0218] Step 1130 , determining whether the illuminated person is within the virtual lighting range.
[0219] Schematically, while determining whether the illuminated person is within the interference range, it is also determined whether the illuminated person is within the virtual lighting range, and the virtual lighting range is used to indicate the range within which the lighting function of the virtual lighting device (virtual flashlight) is exerted. In some embodiments, the virtual lighting range is related to the lighting direction of the virtual flashlight, and the virtual lighting range is determined based on the lighting direction of the virtual flashlight. Schematically, the virtual lighting range is a fan-shaped area of a certain area predetermined based on the lighting direction; or, the virtual lighting is a rectangular area of a certain area predetermined based on the lighting direction, etc. Optionally, when the illuminated person is not within the virtual lighting range, the process of determining whether the illuminated person is within the virtual lighting range is terminated; when the illuminated person is within the virtual lighting range, the following step 1131 is executed.
[0220] Step 1131, determine the angle between the irradiated person and the irradiator.
[0221] Illustratively, when it is determined that the illuminated person is located within the virtual lighting range, a first orientation of the illuminated person and a second orientation of the illuminator are determined, and an angle between the illuminated person and the illuminator is determined based on the first orientation and the second orientation.
[0222] Figure 12 shows the positional relationship between the irradiator and the irradiated person. The irradiator 1210 holds a virtual flashlight 1220 and illuminates the person with it. The illumination direction is the same as the irradiator's first direction 1221. Furthermore, the second direction 1231 of the irradiated person 1230 is determined based on the position of the irradiated person 1230. The angle between the first direction 1221 and the second direction 1231 is determined to obtain the angle between the irradiator and the irradiated person.
[0223] Step 11311, calculate and obtain the first brightness parameter of the halo special effect at this time.
[0224] Among them, the halo special effect is used to indicate the special effects displayed on the corresponding screen of the illuminated person. The halo special effect is the special effect produced by the virtual flashlight's lighting function.
[0225] Optionally, the display effect of the halo special effect is related to the angle between the illuminated person and the illuminator. Schematically, when the illuminated person is within the virtual lighting range of the illuminator, a halo special effect can be generated at the model tip of the illuminator's virtual flashlight. In some embodiments, a first brightness parameter of the halo special effect is determined based on the angle between the illuminated person and the illuminator. The brightness parameter is related to a brightness influence parameter indicating the display of the halo special effect. Schematically, based on the angle between the illuminated person and the illuminator, a first brightness parameter related to the angle factor is determined. Optionally, based on a pre-configured angle-brightness curve of the halo special effect, the first brightness parameter related to the angle factor is determined.
[0226] As shown in Figure 13, the horizontal axis 1310 is the angle between the irradiator and the illuminated person, and the vertical axis 1320 is the brightness of the halo effect. As can be seen from Figure 13, the smaller the angle between the irradiator and the illuminated person, the brighter the halo effect; the larger the angle between the irradiator and the illuminated person, the darker the halo effect, until the angle between the irradiator and the illuminated person reaches a larger angle, at which point the brightness of the halo effect returns to 0. Indicatively, when the angle between the irradiator and the illuminated person is 0, the halo effect is 1, and "1" is used to indicate that the halo effect is the brightest; when the angle between the irradiator and the illuminated person is 45°, the halo effect is 0, and "0" is used to indicate that the halo effect is not displayed.
[0227] Step 1132, determine the straight-line distance between the irradiated person and the irradiator.
[0228] Illustratively, when it is determined that the illuminated person is located within the virtual lighting range, a first position of the illuminated person and a second position of the illuminator are determined, and a straight-line distance between the illuminated person and the illuminator is determined based on the first position and the second position.
[0229] FIG12 is a schematic diagram showing the positional relationship between the irradiator and the irradiated person, wherein a first position of the irradiator 1210 and a second position of the irradiated person 1230 are determined, and a straight-line distance between the irradiated person 1230 and the irradiator 1210 is determined based on the first and second positions.
[0230] Step 11321, calculate and obtain the second brightness parameter of the halo special effect at this time.
[0231] Optionally, the display effect of the halo effect is related not only to the angle between the illuminated person and the illuminating person, but also to the distance between them. In some embodiments, a second brightness parameter of the halo effect is determined based on the straight-line distance between the illuminated person and the illuminating person. The brightness parameter is related to a parameter indicating the brightness of the halo effect. Illustratively, the second brightness parameter related to the distance factor is determined based on the straight-line distance between the illuminated person and the illuminating person. Optionally, the second brightness parameter related to the distance factor is determined based on a preconfigured distance-brightness curve for the halo effect.
[0232] Figure 14 shows a schematic diagram of how distance affects the halo effect. The horizontal axis 1410 indicates the distance between the irradiator and the irradiated, and the vertical axis 1420 represents the brightness of the halo effect. As shown in Figure 14, the smaller the distance between the irradiator and the irradiated, the brighter the halo effect becomes. As the distance between the irradiator and the irradiated increases, different linear relationships are used to represent the relationship between distance and the halo effect. This generally translates to "the greater the distance between the irradiator and the irradiated, the darker the halo effect becomes," and the brightness of the halo effect returns to zero when the distance between the irradiator and the irradiated reaches a maximum.
[0233] Indicatively, when the distance between the irradiator and the irradiated is 0m-10m, the halo effect is 1, and "1" is used to indicate that the halo effect is brightest; when the distance between the irradiator and the irradiated is between 10m-20m, the change in distance and the halo effect conforms to a first linear change relationship, and the range of change of the halo effect is 1 to 0.6; when the distance between the irradiator and the irradiated is between 20m-35m, the change in distance and the halo effect conforms to a second linear change relationship, and the range of change of the halo effect is 0.6 to 0; when the distance between the irradiator and the irradiated is above 35m, the halo effect is 0, and "0" is used to indicate that the halo effect is not displayed.
[0234] In other embodiments, the second brightness parameter is also used to indicate the display size of the halo effect. In FIG14 , the horizontal axis 1410 is used to indicate the distance between the irradiator and the irradiated person, and the vertical axis is the size of the halo effect. As can be seen from FIG14 , the smaller the distance between the irradiator and the irradiated person, the larger the halo effect. As the distance between the irradiator and the irradiated person increases, different linear relationships are used to represent the changing relationship between distance and halo effect. Generally, it is shown as "the larger the distance between the irradiator and the irradiated person, the smaller the halo", and the halo effect disappears when the distance between the irradiator and the irradiated person reaches a larger distance.
[0235] In schematic form, when the distance between the irradiator and the irradiated is 0m-10m, the size of the halo effect is 1, and "1" is used to indicate that the halo effect is maximum; when the distance between the irradiator and the irradiated is between 10m-20m, the change in distance and the halo effect conforms to a first linear change relationship, and the range of change in the size of the halo effect is 1 to 0.6; when the distance between the irradiator and the irradiated is between 20m-35m, the change in distance and the halo effect conforms to a second linear change relationship, and the range of change in the size of the halo effect is 0 to 0; when the distance between the irradiator and the irradiated is above 35m, the halo effect is 0, and "0" is used to indicate that the halo effect is not displayed.
[0236] It should be noted that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0237] Step 1133: The first brightness parameter and the second brightness parameter act together to output a halo effect of a virtual flashlight.
[0238] Illustratively, after obtaining a first brightness parameter related to the angle factor and a second brightness parameter related to the distance, the halo effect of the virtual flashlight is obtained by combining the first brightness parameter and the second brightness parameter.
[0239] Optionally, a first weight value corresponding to the first brightness parameter and a second weight value corresponding to the second brightness parameter are pre-set, and a total brightness parameter is determined based on the first weight value, the second weight value, the first brightness parameter and the second brightness parameter; and a halo effect of the virtual flashlight is obtained based on the total brightness parameter.
[0240] Schematically, the first brightness parameter is 1, and the first weight value of the first brightness parameter is 0.5; the second brightness parameter is 0.9, and the second weight value of the second brightness parameter is 0.5. After obtaining the first brightness parameter and the second brightness parameter, the first weight value, the first brightness parameter, the second weight value and the second brightness parameter are combined to obtain the halo effect of the virtual flashlight, such as: determining the total brightness parameter to be 0.75 (1*0.5+0.5*0.5), and displaying the halo effect of the virtual flashlight based on the total measurement parameter.
[0241] Optionally, a virtual flashlight halo effect is generated based on the halo brightness indicated by the first brightness parameter and the halo size indicated by the second brightness parameter. For example, if the first brightness parameter is 0.9 and the second brightness parameter is 0.2, a halo effect with a brightness of 0.9 and a special effect size of 0.2 is displayed. FIG15 is a schematic diagram of a halo effect interface. In this example, the illuminated person holds a virtual attacking item 1510, the angle between the illuminated person and the illuminating person 1520 is small (almost facing each other), the first brightness parameter is large (e.g., 1), but the illuminated person and the illuminating person 1520 are far apart, and the second brightness parameter is small (e.g., 0.1). Therefore, the first and second brightness parameters work together to produce a virtual flashlight halo effect 1530. It should be noted that the halo effect 1530 shown in FIG15 only illustrates the range of the halo effect and does not illustrate the illumination effect of the halo effect. For example, the halo effect can achieve a white light effect.
[0242] Similarly, as shown in Figure 16, there is another interface diagram of the halo effect. In this diagram, the illuminated person holds a virtual attack prop 1610, and the distance between the illuminated person and the illuminating person 1620 is relatively close. The second brightness parameter is relatively large (e.g., 0.8), but the angle between the illuminated person and the illuminating person 1620 is relatively large, and the first brightness parameter is relatively small (e.g., 0.2). Therefore, the first brightness parameter and the second brightness parameter work together to output a virtual flashlight halo effect 1630. It should be noted that the halo effect 1630 shown in Figure 16 only illustrates the range of the halo effect, and does not illustrate the lighting effect of the halo effect.
[0243] It should be noted that FIG16 and FIG17 schematically illustrate the expression form of the halo special effect, and the embodiments of the present application do not limit this.
[0244] Step 1140 , combining the halo effect and the blinding effect to simulate the effect of being flashed by a virtual flashlight.
[0245] Schematically, during the illumination process of the virtual flashlight, when the illuminated person is located in both the virtual illumination range and the interference range, the terminal screen corresponding to the illuminated person not only displays the halo effect corresponding to the virtual illumination range, but also displays the blinding effect corresponding to the interference range.
[0246] Optionally, the pre-set interference range is smaller than the virtual lighting range; or the pre-set virtual lighting range is equal to the interference range; or the pre-set interference range is larger than the virtual lighting range; or there is a partial overlap between the pre-set interference range and the virtual lighting range. Taking the example of the pre-set interference range being smaller than the virtual lighting range, when the illuminated person is within the interference range, the illuminated person is also within the virtual lighting range, and a combination of a halo effect and a blinding effect is displayed on the illuminated person's terminal screen; when the illuminated person is not within the interference range but within the virtual lighting range, a halo effect is displayed on the illuminated person's terminal screen, but no blinding effect is displayed.
[0247] In an optional embodiment, as the position of the illuminated person or the illuminator changes, or the relative position between the illuminated person or the illuminator changes, the performance of the virtual flashlight flashing may also change. Optionally, the terminal determines the relative position between the illuminated person or the illuminator in real time and updates the performance of the virtual flashlight flashing in real time.
[0248] Optionally, in response to the illuminated person moving outside the interference range, an illumination effect fading animation is displayed. Schematically, as shown in FIG17 , when the illuminated person (not shown) moves outside the interference range, illumination effect 1710 slowly fades until the virtual scene is redisplayed. It should be noted that illumination effect 1710 shown in FIG17 only illustrates the range of the illumination effect and does not illustrate the lighting effect itself.
[0249] The above content describes the display of a virtual scene from the perspective of a first virtual object (the illuminated person). In an optional embodiment, the display of the virtual scene from the perspective of a second virtual object (the illuminated person) is described below. The first virtual object is a virtual object controlled by one player, and the second virtual object is another virtual object controlled by another player. As an example, as shown in FIG18 , the display of the virtual scene from the perspective of the second virtual object can be implemented as follows: Steps 1810 to 1830. Optionally, these steps are performed by the second device.
[0250] Step 1810: Display a virtual scene including a first virtual object.
[0251] The virtual scene is displayed from the perspective of a second virtual object, and the second virtual object is equipped with virtual lighting props.
[0252] Illustratively, the first virtual object and the second virtual object are virtual objects controlled by different players. When the virtual scene is implemented as a scene displayed from the perspective of the second virtual object, the virtual scene is the scene image displayed on the second device (e.g., a second terminal) that controls the second virtual object. A virtual lighting prop is a virtual prop with lighting functionality.
[0253] Step 1820: Receive a prop control operation for the virtual lighting prop.
[0254] The prop control operation is used to adjust the prop state of the virtual lighting prop to the lighting state.
[0255] Schematically, the prop state is used to describe the situation in which the virtual lighting prop is operated by the second virtual object. The prop state includes at least one of the following states: illumination state, direction state, appearance state, duration state, etc.
[0256] The lighting state is used to describe the lighting conditions of a virtual lighting prop. For example, if the second virtual object turns off the virtual lighting prop, the virtual lighting prop is not in the lighting state; or, if the second virtual object turns on the virtual lighting prop, the virtual lighting prop is not in the lighting state; or, the default state after equipping the virtual lighting prop is the lighting state; or, the default state after equipping the virtual lighting prop is the non-lighting state, etc.
[0257] Optionally, the lighting state can also be used to indicate the lighting level state of the virtual lighting prop. For example, if the virtual lighting prop has multiple lighting levels, when the second virtual object causes the virtual lighting prop to be at a first lighting level, the lighting state of the virtual lighting prop is relatively weak; when the second virtual object causes the virtual lighting prop to be at a second lighting level, the lighting state of the virtual lighting prop is relatively strong, etc.
[0258] The directional state is used to describe the prop's orientation. For example, if the second virtual object controls the virtual lighting prop to illuminate straight ahead, the virtual lighting prop's directional state is straight ahead. Alternatively, if the second virtual object controls the virtual lighting prop to illuminate diagonally ahead, the virtual lighting prop's directional state is diagonally ahead, and so on.
[0259] Optionally, the direction state is the same as the object orientation of the second virtual object, for example: the prop orientation of the virtual lighting prop changes with the object orientation of the second virtual object. When the object orientation of the second virtual object is directly forward, the prop orientation of the virtual lighting prop is directly forward; or, the direction state is different from the object orientation of the second virtual object, that is, the second virtual object can control the virtual lighting prop to illuminate in a direction other than the object orientation, for example: the object orientation of the second virtual object is directly forward, but the second virtual object controls the prop orientation of the virtual lighting prop to be diagonally forward, etc.
[0260] The appearance state is used to describe the appearance of the virtual lighting props. For example, the appearance state includes the color and shape of the virtual lighting props.
[0261] The duration state describes how long a virtual lighting item's lighting state lasts. For example, if a virtual lighting item requires the player controlling a second virtual object to continuously press a lighting control to illuminate, the duration state is determined based on how long the control is pressed. Alternatively, if a virtual lighting item has a preset duration, when the player controlling the second virtual object turns on the virtual lighting item, the terminal automatically triggers a duration countdown and uses the countdown as the duration state of the virtual lighting item.
[0262] In an optional embodiment, a movement control operation for the virtual lighting prop is received.
[0263] The movement control operation is used to adjust the lighting direction of the virtual lighting prop.
[0264] Schematically, when the object orientation is the same as the lighting direction, the player controlling the second virtual object changes the lighting direction of the virtual lighting prop by adjusting the object orientation of the second virtual object, and uses the adjustment operation of adjusting the object orientation of the second virtual object as the above-mentioned movement control operation.
[0265] Alternatively, when the object orientation is different from the lighting direction, the player controlling the second virtual object changes the lighting direction of the virtual lighting prop by adjusting the prop orientation of the virtual lighting prop, and uses the adjustment operation of adjusting the prop orientation of the virtual lighting prop as the above-mentioned movement control operation, etc.
[0266] In an optional embodiment, a switch control operation of a virtual lighting prop is received.
[0267] The switch control operation is used to adjust the lighting state of the virtual lighting props.
[0268] Schematically, the virtual lighting prop has two lighting states: on and off. The lighting state is realized by the prop on control. When the virtual lighting prop is not in the lighting state (the prop on control is in the off state), the virtual lighting prop enters the lighting state by triggering the prop on control; when the virtual lighting prop is in the lighting state (the prop on control is in the on state), the virtual lighting prop is turned off by triggering the prop on control. In other words, the lighting state is switched by the prop on control.
[0269] Schematically, the virtual lighting prop can also have multiple lighting states with different lighting intensities, which are achieved through a lighting adjustment control. The lighting adjustment control includes on, first gear, second gear, and off. When the virtual lighting prop is not in the lighting state (the lighting adjustment control is in the off state), triggering the lighting adjustment control causes the virtual lighting prop to enter the first gear lighting state. When the lighting adjustment control is triggered again, the virtual lighting prop enters the second gear lighting state. When the lighting adjustment control is triggered again, the virtual lighting prop is no longer in the lighting state. In other words, the lighting state is adjusted through the lighting adjustment control.
[0270] It should be noted that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0271] Step 1830: Display an illuminating light beam when the first virtual object is within the viewing angle of the second virtual object and the position of the first virtual object in the virtual scene matches the lighting direction of the virtual lighting prop.
[0272] The illuminating light column is used to display an illuminating effect to block the view of the virtual scene from the perspective of the first virtual object. Optionally, the illuminating light column displayed from the perspective of the second virtual object corresponds to the illuminating effect displayed from the perspective of the first virtual object, and the illuminating effect is used to block the view of the virtual scene from the perspective of the first virtual object.
[0273] Schematically, in a virtual scene displayed from the perspective of a second virtual object, when the lighting direction of the virtual lighting props operated by the second virtual object matches the position of the first virtual object in the virtual scene, an illumination light column is displayed, thereby distinctively presenting the difference in special effects display between the illumination light column corresponding to the first virtual object and the illumination special effect corresponding to the second virtual object.
[0274] In some embodiments, when the lighting direction of the virtual lighting prop matches the position of the first virtual object in the virtual scene, a light beam of a first special effect is displayed; when the lighting direction of the virtual lighting prop does not match the position of the first virtual object in the virtual scene, a light beam of a second special effect is displayed.
[0275] The special effect condition is used to indicate the display condition of the illumination light column. Optionally, the special effect condition includes at least one of a plurality of conditions such as brightness intensity condition, color condition, and style condition.
[0276] Taking the special effects situation as an example of brightness intensity, when the lighting direction of the virtual lighting prop matches the position of the first virtual object in the virtual scene, a light column with higher brightness intensity is displayed; when the lighting direction of the virtual lighting prop does not match the position of the first virtual object in the virtual scene, a light column with lower brightness intensity is displayed.
[0277] Alternatively, taking the special effects situation as an example of color implementation, when the lighting direction of the virtual lighting prop matches the position of the first virtual object in the virtual scene, a red light beam is displayed; when the lighting direction of the virtual lighting prop does not match the position of the first virtual object in the virtual scene, a yellow light beam is displayed.
[0278] Alternatively, taking the special effects situation as a style situation as an example, when the lighting direction of the virtual lighting prop matches the position of the first virtual object in the virtual scene, a light column with a star special effect is displayed; when the lighting direction of the virtual lighting prop does not match the position of the first virtual object in the virtual scene, a light column without a star special effect is displayed, and so on.
[0279] It should be noted that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0280] In an optional embodiment, in response to the first virtual object being within the interference range corresponding to the lighting direction of the virtual lighting prop, an illumination light beam is displayed.
[0281] Illustratively, the lighting direction of the virtual lighting prop determines the interference range, which is used to indicate the effective range of blocking the line of sight of the first virtual object. Optionally, whether the first virtual object is within the interference range is determined in real time; or, whether the first virtual object is within the interference range is determined periodically, etc.
[0282] In some embodiments, when the first virtual object is within the interference range, an illuminating light beam is displayed.
[0283] In summary, the embodiments of the present application describe displaying the content of a virtual scene from the perspective of a second virtual object. When a first virtual object's position in the virtual scene matches the lighting direction of a virtual lighting device, the second virtual object can use the virtual lighting device to block the first virtual object's line of sight. Furthermore, a beam of light can be displayed on the screen of the terminal controlling the second virtual object to indicate to the player controlling the second virtual object that the first virtual object is being blocked by the virtual lighting device. This helps to fully improve the operating efficiency of the player controlling the second virtual object, enhancing the player's user experience and the efficiency of human-computer interaction.
[0284] FIG19 is a block diagram of a virtual scene display device provided by an exemplary embodiment of the present application. As shown in FIG19 , the device includes the following parts:
[0285] A scene display module 1910 is configured to display a virtual scene from the perspective of a first virtual object, wherein the virtual scene includes a second virtual object, and the second virtual object is equipped with a virtual lighting prop, wherein the virtual lighting prop is a virtual prop with lighting function;
[0286] An operation receiving module 1920 is configured to receive a control operation on the first virtual object, wherein the control operation is used to control the first virtual object to move in the virtual scene;
[0287] The special effects display module 1930 is used to display a lighting effect in response to the first virtual object's position in the virtual scene matching the lighting direction of the virtual lighting prop when the second virtual object is within the viewing angle of the first virtual object and the virtual lighting prop equipped by the second virtual object is in an illuminated state. The lighting effect is used to block the line of sight under the first virtual object's observation angle of the virtual scene.
[0288] In an optional embodiment, the special effect display module 1930 is further configured to display the lighting special effect in response to the first virtual object being within an interference range corresponding to the lighting direction of the virtual lighting prop.
[0289] In an optional embodiment, the special effect display module 1930 is further configured to display the lighting special effect based on the interval distance between the first virtual object and the virtual lighting prop in response to the interval distance between the first virtual object and the virtual lighting prop being less than a preset distance threshold.
[0290] In an optional embodiment, the special effect display module 1930 is further configured to display the illumination special effect in response to an angle between the object orientation of the first virtual object and the lighting direction being less than a preset angle threshold.
[0291] In an optional embodiment, the special effect display module 1930 is further configured to display the illumination special effect based on a display brightness corresponding to the interval distance, wherein the display brightness is negatively correlated with the interval distance.
[0292] In an optional embodiment, the interference range has multiple sub-interference ranges, and the multiple sub-interference ranges correspond to different illumination effect intensities;
[0293] The special effect display module 1930 is also used to display an illumination special effect with a first illumination special effect intensity in response to the first virtual object being within a first sub-interference range of the interference range; and to display an illumination special effect with a second illumination special effect intensity in response to the first virtual object being within a second sub-interference range of the interference range; wherein the first distance between the first sub-interference range and the virtual lighting prop is less than the second distance between the second sub-interference range and the virtual lighting prop, and the first illumination special effect intensity is greater than the second illumination special effect intensity.
[0294] In an optional embodiment, the multiple sub-interference ranges respectively correspond to interference effectiveness rates, and the interference effectiveness rates are used to indicate the interference rate that generates line-of-sight interference on the first virtual object;
[0295] The special effect display module 1930 is also used to obtain the interference effectiveness rate corresponding to the first sub-interference range in response to the first virtual object being within the first sub-interference range within the interference range; obtain the interference value corresponding to the first virtual object based on the length of time the first virtual object stays in the first sub-interference range and the interference effectiveness rate; and display an illumination special effect with a first illumination special effect intensity based on the interference value.
[0296] In an optional embodiment, the special effects display module 1930 is also used to display the lighting special effects with a divergent effect with the virtual lighting prop as the center of the lighting special effects. The divergent effect refers to an effect that gradually weakens and radiates outward with the virtual lighting prop as the highest brightness point.
[0297] As shown in FIG20 , in an optional embodiment, the device further includes:
[0298] The scene reproduction module 1940 is used to reduce the special effect of displaying the illumination special effect in response to triggering a target condition; wherein the target condition includes at least one of the following: the second virtual object is outside the viewing angle of the first virtual object, the virtual lighting prop equipped with the second virtual object is in a turned-off state, and the lighting direction of the first virtual object does not match that of the virtual lighting prop.
[0299] In an optional embodiment, the virtual lighting prop corresponds to a virtual lighting range, and the virtual lighting range is used to indicate a range within which the lighting function of the virtual lighting prop is exerted;
[0300] The device further comprises:
[0301] The halo display module 1950 is configured to display a virtual halo effect in response to the first virtual object being outside the interference range and within the virtual lighting range, wherein the virtual halo effect is formed with the virtual lighting prop as the center.
[0302] In an optional embodiment, the special effect display module 1930 is further used to display a skill cooling special effect, and the skill cooling special effect is used to reduce the attack frequency of the first virtual object launching a virtual attack on the second virtual object.
[0303] In an optional embodiment, the special effects display module 1930 is further used to display the lighting special effect in response to the first virtual object and the second virtual object belonging to different virtual camps; or, when the second virtual object is within the viewing angle of the first virtual object and the virtual lighting props equipped by the second virtual object are in an illuminated state, in response to the first virtual object and the second virtual object belonging to the same virtual camp, display a brightness enhancement animation, wherein the brightness enhancement animation includes the action of the second virtual object providing lighting for the first virtual object through the virtual lighting props.
[0304] In an optional embodiment, the special effect display module 1930 is further used to display the illumination special effect in response to the first object level of the first virtual object being not greater than the second object level of the second virtual object; and not display the illumination special effect in response to the first object level of the first virtual object being greater than the second object level of the second virtual object.
[0305] FIG21 is a structural block diagram of a virtual scene display device provided by another exemplary embodiment of the present application. As shown in FIG21 , the device includes the following parts:
[0306] A scene display module 2110 is configured to display a virtual scene including a first virtual object, the virtual scene being displayed from the perspective of a second virtual object, the second virtual object being equipped with a virtual lighting prop, the virtual lighting prop being a virtual prop having a lighting function;
[0307] An operation receiving module 2120 is configured to receive a prop control operation on the virtual lighting prop, wherein the prop control operation is used to adjust the prop state of the virtual lighting prop;
[0308] The special effects display module 2130 is used to display an illumination special effect when the first virtual object is within the viewing angle of the second virtual object, the prop state of the virtual lighting prop is presented as an illumination state, and the position of the first virtual object in the virtual scene matches the lighting direction of the virtual lighting prop. The illumination special effect is used to block the line of sight of the first virtual object under the viewing angle of the virtual scene.
[0309] In an optional embodiment, the special effect display module 2130 is configured to display the lighting special effect in response to the first virtual object being within an interference range corresponding to the lighting direction of the virtual lighting prop.
[0310] In an optional embodiment, the operation receiving module 2120 is used to receive a movement control operation on the virtual lighting prop, and the movement control operation is used to adjust the lighting direction of the virtual lighting prop; or, to receive a switch control operation on the virtual lighting prop, and the switch control operation is used to adjust the lighting state of the virtual lighting prop.
[0311] To sum up, the virtual scene display device provided in the embodiment of the present application, in addition to exerting the lighting effect of the virtual lighting props, adds a line of sight blocking effect to the virtual lighting props based on the matching relationship between the lighting direction of the first virtual object and the virtual lighting props, thereby using the virtual lighting props to block the line of sight of the first virtual object that meets the matching relationship, interfere with the attack form of the first virtual object, reduce the effective attack probability of the first virtual object, improve the fun of the game, and avoid the inefficiency problem that players need to perform additional operations to interfere with the first virtual object when using lighting virtual props, thereby fully improving the efficiency of human-computer interaction.
[0312] It should be noted that the virtual scene display device provided in the above embodiment is merely 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 scene display device provided in the above embodiment and the virtual scene display method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0313] FIG22 shows a block diagram of an electronic device 2200 according to an exemplary embodiment of the present application. The electronic device 2200 may be a portable mobile terminal, such as a smartphone, an in-vehicle terminal, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. The electronic device 2200 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, or other similar names.
[0314] Typically, the electronic device 2200 includes a processor 2201 and a memory 2202 .
[0315] The processor 2201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 2201 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 2201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 2201 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2201 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0316] The memory 2202 may include one or more computer-readable storage media, which may be non-transitory. The memory 2202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2202 is used to store at least one instruction, which is used to be executed by the processor 2201 to implement the virtual scene display method provided in the method embodiment of the present application.
[0317] In some embodiments, the electronic device 2200 further includes one or more sensors, including but not limited to: a proximity sensor, a gyroscope sensor, and a pressure sensor.
[0318] A proximity sensor, also known as a distance sensor, is typically provided on the front panel of the electronic device 2200. The proximity sensor is used to detect the distance between the user and the front of the electronic device 2200.
[0319] The gyroscope sensor can detect the orientation and rotation angle of the electronic device 2200. It can also work with the accelerometer to collect 3D motions of the user on the electronic device 2200. Based on the data collected by the gyroscope sensor, the processor 2201 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0320] The pressure sensor can be set on the side frame of the electronic device 2200 and / or the lower layer of the display screen. When the pressure sensor is set on the side frame of the electronic device 2200, it can detect the user's grip signal of the electronic device 2200, and the processor 2201 performs left and right hand recognition or quick operation based on the grip signal collected by the pressure sensor. When the pressure sensor is set on the lower layer of the display screen, the processor 2201 controls the operability controls on the UI interface based on the user's pressure operation on the display screen. The operability controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0321] In some embodiments, the electronic device 2200 also includes other components. Those skilled in the art will understand that the structure shown in Figure 22 does not constitute a limitation on the electronic device 2200, and it may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0322] The embodiment of the present application also provides a computer device, which can be implemented as a terminal or server as shown in Figure 2. The computer device includes a processor and a memory, and the memory stores at least one instruction, at least one program, code set or instruction set. The at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the virtual scene display method provided by the above-mentioned various method embodiments. The embodiment of the present application also provides a computer-readable storage medium, on which at least one instruction, at least one program, code set or instruction set is stored. The at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the virtual scene display method provided by the above-mentioned various method embodiments. The embodiment of the present application also provides a computer program product or computer program, which includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction so that the computer device performs the virtual scene display method described in any of the above embodiments.
[0323] Optionally, the computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid-state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0324] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0325] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A virtual scene display method, performed by a first device, the method comprising: Displaying a virtual scene from the perspective of a first virtual object, wherein the virtual scene includes a second virtual object, wherein the second virtual object is equipped with a virtual lighting prop, and the virtual lighting prop is a virtual prop with a lighting function; receiving a control operation on the first virtual object, wherein the control operation is used to control the first virtual object to move in the virtual scene; When the second virtual object is within the viewing angle of the first virtual object and the virtual lighting prop equipped by the second virtual object is in an illuminated state, in response to the position of the first virtual object in the virtual scene matching the lighting direction of the virtual lighting prop, a lighting effect is displayed, and the lighting effect is used to block the line of sight under the viewing angle of the first virtual object on the virtual scene.
2. The method according to claim 1, wherein: In response to the position of the first virtual object in the virtual scene matching the lighting direction of the virtual lighting prop, displaying the lighting effect includes: In response to the position of the first virtual object in the virtual scene being within an interference range corresponding to the lighting direction of the virtual lighting prop, the lighting effect is displayed.
3. The method according to claim 2, wherein: In response to the position of the first virtual object in the virtual scene being within an interference range corresponding to the lighting direction of the virtual lighting prop, displaying the lighting special effect includes: In response to the interval distance between the first virtual object and the virtual lighting prop being less than a preset distance threshold, the illumination effect is displayed based on the interval distance.
4. The method according to claim 3, wherein: The displaying of the illumination effect based on the interval distance includes: The illumination effect is displayed based on the illumination effect intensity corresponding to the interval distance, and the illumination effect intensity is used to indicate the display brightness corresponding to the illumination effect, wherein there is a negative correlation between the illumination effect intensity and the interval distance.
5. The method according to claim 4, wherein: The interference range has a plurality of sub-interference ranges, and the plurality of sub-interference ranges correspond to different illumination special effect intensities; The displaying of the illumination effect based on the display brightness corresponding to the interval distance includes: In response to the first virtual object being within a first sub-interference range within the interference range, displaying an illumination effect having a first illumination effect intensity; In response to the first virtual object being within a second sub-interference range within the interference range, displaying an illumination effect having a second illumination effect intensity; Among them, a first distance between the first sub-interference range and the virtual lighting prop is smaller than a second distance between the second sub-interference range and the virtual lighting prop, and the first lighting special effect intensity is greater than the second lighting special effect intensity.
6. The method according to claim 5, wherein: The multiple sub-interference ranges respectively correspond to interference effectiveness rates, and the interference effectiveness rates are used to indicate interference rates that cause line of sight interference to the first virtual object; In response to the first virtual object being within a first sub-interference range within the interference range, displaying an illumination effect having a first illumination effect intensity includes: In response to the first virtual object being within the first sub-interference range within the interference range, acquiring an interference effectiveness rate corresponding to the first sub-interference range; acquiring an interference value corresponding to the first virtual object based on a stay time of the first virtual object in the first sub-interference range and an interference effectiveness rate corresponding to the first sub-interference range; A lighting effect having the first lighting effect intensity is displayed based on the interference value.
7. The method according to any one of claims 2 to 6, wherein: In response to the position of the first virtual object in the virtual scene being within an interference range corresponding to the lighting direction of the virtual lighting prop, displaying the lighting special effect includes: In response to an angle between the object orientation of the first virtual object and the lighting direction being less than a preset angle threshold, the illumination effect is displayed.
8. The method according to any one of claims 1 to 7, wherein: The display illumination special effects include: The virtual lighting prop is used as the center of the lighting effect, and the lighting effect is displayed with a divergent effect. The divergent effect refers to an effect that gradually weakens by radiating outward from the virtual lighting prop as the highest brightness point.
9. The method according to any one of claims 1 to 8, wherein: After displaying the illumination special effect, the method further includes: In response to a trigger target condition, weakening a special effect of displaying the illumination special effect; Among them, the target condition includes at least one of the following: the second virtual object is outside the viewing angle of the first virtual object, the virtual lighting prop equipped by the second virtual object is in a turned off state, and the lighting direction of the first virtual object does not match that of the virtual lighting prop.
10. The method according to any one of claims 2 to 7, wherein: The virtual lighting prop corresponds to a virtual lighting range, and the virtual lighting range is used to indicate the lighting range of the lighting function of the virtual lighting prop; The method further comprises: In response to the first virtual object being located outside the interference range and within the virtual lighting range, a virtual halo special effect is displayed, where the virtual halo special effect is a special effect formed with the virtual lighting prop as the center.
11. The method according to any one of claims 1 to 10, wherein: After displaying the illumination special effect, the method further includes: A skill cooling effect is displayed, where the skill cooling effect is used to reduce the attack frequency of the first virtual object launching a virtual attack on the second virtual object.
12. The method according to any one of claims 1 to 11, wherein: The method further comprises: In response to the first virtual object and the second virtual object belonging to different virtual camps, displaying the illumination effect; or, When the second virtual object is within the field of view of the first virtual object and the virtual lighting props equipped by the second virtual object are in an illuminated state, in response to the first virtual object and the second virtual object belonging to the same virtual camp, a brightness enhancement animation is displayed, wherein the brightness enhancement animation includes an action in which the second virtual object provides lighting for the first virtual object through the virtual lighting props.
13. The method according to any one of claims 1 to 12, wherein: The method further comprises: In response to a first object level of the first virtual object being not greater than a second object level of the second virtual object, displaying the illumination effect; In response to the first object level of the first virtual object being greater than the second object level of the second virtual object, the illumination effect is not displayed.
14. A virtual scene display method, performed by a second device, the method comprising: displaying a virtual scene including a first virtual object, wherein the virtual scene is displayed from the perspective of a second virtual object, wherein the second virtual object is equipped with a virtual lighting prop, and the virtual lighting prop is a virtual prop with a lighting function; receiving a prop control operation on the virtual lighting prop, wherein the prop control operation is used to adjust a prop state of the virtual lighting prop to a lighting state; When the first virtual object is within the viewing angle of the second virtual object and the position of the first virtual object in the virtual scene matches the lighting direction of the virtual lighting prop, an illumination light column is displayed, and the illumination light column is used to display the illumination effect to block the line of sight under the viewing angle of the first virtual object on the virtual scene.
15. The method according to claim 14, wherein: When the position of the first virtual object in the virtual scene matches the lighting direction of the virtual lighting prop, displaying a light column includes: In response to the position of the first virtual object in the virtual scene being within an interference range corresponding to the lighting direction of the virtual lighting prop, the illumination light column is displayed.
16. The method according to claim 14, wherein: The receiving a prop control operation on the virtual lighting prop includes: receiving a movement control operation on the virtual lighting prop, wherein the movement control operation is used to adjust a lighting direction of the virtual lighting prop; or, A switch control operation on the virtual lighting prop is received, where the switch control operation is used to adjust the lighting state of the virtual lighting prop.
17. A virtual scene display device, comprising: A scene display module, configured to display a virtual scene from the perspective of a first virtual object, wherein the virtual scene includes a second virtual object, wherein the second virtual object is equipped with a virtual lighting prop, and the virtual lighting prop is a virtual prop with a lighting function; An operation receiving module, used for receiving a control operation on the first virtual object, wherein the control operation is used for controlling the first virtual object to move in the virtual scene; A special effects display module is used to display an illumination special effect in response to the position of the first virtual object in the virtual scene matching the illumination direction of the virtual lighting prop, when the second virtual object is within the viewing angle of the first virtual object and the virtual lighting prop equipped by the second virtual object is in an illuminated state. The illumination special effect is used to block the line of sight under the viewing angle of the first virtual object on the virtual scene.
18. A computer device, comprising a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the virtual scene display method according to any one of claims 1 to 16.
19. A computer-readable storage medium, wherein at least one program is stored in the storage medium, and the at least one program is loaded and executed by a processor to implement the virtual scene display method according to any one of claims 1 to 16.
20. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the virtual scene display method according to any one of claims 1 to 16 is implemented.
Citation Information
Patent Citations
Virtual item control method and device, equipment, medium and computer program product
CN113713385A
Prop control method and device in virtual scene, equipment and storage medium
CN113769394A
Interaction method and device between virtual objects, equipment, medium and program product
CN114210063A
