Data processing method and apparatus, and device and readable storage medium

By detecting the visual field information and sight points of virtual objects, the visibility of virtual objects is determined, which solves the problems of virtual object interaction and visual field detection authenticity, and improves the data processing efficiency of object correlation in virtual three-dimensional scenes.

WO2024193535A1PCT designated stage expired Publication Date: 2024-09-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/082405
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-21
Filing Date
2024-03-19
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

In the field of computer technology, determining whether a virtual object in a game is a visible virtual object of an NPC is a key issue. Existing technologies are difficult to effectively solve, affecting the interaction between virtual objects and the authenticity of field of view detection.

Method used

Provide a data processing method that detects whether there is a second sight point visible from the first sight point by obtaining the visual field information and sight point of a virtual object, and if so, determines that the second virtual object is a visible virtual object of the first virtual object. , improve the authenticity of visual field detection and data processing efficiency.

Benefits of technology

It improves the authenticity of visibility detection between virtual objects, enhances the efficiency of data processing related to object correlation in virtual three-dimensional scenes, and ensures the accuracy of interaction of virtual objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024082405_26092024_PF_FP
    Figure CN2024082405_26092024_PF_FP
Patent Text Reader

Abstract

A data processing method and apparatus, and a device and a readable storage medium, which belong to the technical field of computers. The method comprises: acquiring first field-of-view information and a first line-of-sight point of a first virtual subject, wherein the first line-of-sight point is a point located at a designated part of the first virtual subject; acquiring a plurality of second line-of-sight points of a second virtual subject, wherein the first virtual subject and the second virtual subject are located in the same three-dimensional scene, and each of the second line-of-sight points is a point at a corresponding part of the second virtual subject; on the basis of the first line-of-sight point and the first field-of-view information, testing at least one second line-of-sight point so as to obtain a test result of the at least one second line-of-sight point, wherein the test result of each of the second line-of-sight points indicates whether each of the second line-of-sight points is visible from the first line-of-sight point; and if the test result of at least one second line-of-sight point indicates that the at least one second line-of-sight point is visible from the first line-of-sight point, determining the second virtual subject as a visible virtual subject for the first virtual subject.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, device, equipment and readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 21, 2023, with application number 202310310188.9 and application name “Method, device, apparatus and readable storage medium for determining visible virtual objects”. The entire contents of the application 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 data processing method, apparatus, device, and readable storage medium. Background Art

[0003] In the field of computer technology, virtual objects controlled by computer programs are often referred to as non-player characters (NPCs). Generally, it's necessary to determine whether a virtual object in a game is visible to the NPC. If so, it's determined that the virtual object and the NPC can interact. Therefore, determining visible virtual objects becomes a critical technology.

[0004] Summary of the Invention

[0005] The present application provides a data processing method, apparatus, device, and readable storage medium that can determine whether a virtual object is a visible virtual object of another virtual object, improve the authenticity of field of view detection, and help improve the efficiency of data processing related to the association between different objects in a virtual three-dimensional scene. The technical solution includes the following contents.

[0006] In one aspect, a data processing method is provided, which is executed in an electronic device, the method comprising:

[0007] Acquire first visual field information and a first sight point of a first virtual object, where the first sight point is a point located at a designated part of the first virtual object;

[0008] Acquire multiple second sight lines of a second virtual object, where the first virtual object and the second virtual object are located in the same three-dimensional scene, and each second sight line is located at a corresponding part of the second virtual object;

[0009] detecting at least one second sight point based on the first sight point and the first visual field information to obtain a detection result of the at least one second sight point, wherein the detection result of each second sight point indicates whether the second sight point is visible from the first sight point;

[0010] If the detection result of at least one second sight point indicates that the at least one second sight point is visible from the first sight point, the second virtual object is determined as a visible virtual object of the first virtual object.

[0011] In another aspect, a data processing device is provided, comprising:

[0012] an acquisition module, configured to: acquire first field of view information and a first sight point of a first virtual object, where the first sight point is a point located at a specified location of the first virtual object; and acquire multiple second sight points of a second virtual object, where the first virtual object and the second virtual object are located in the same three-dimensional scene, and each second sight point is a point located at a corresponding location of the second virtual object;

[0013] a detection module, configured to detect at least one second sight point based on the first sight point and the first visual field information to obtain a detection result of the at least one second sight point, wherein the detection result of each second sight point indicates whether the second sight point is visible from the first sight point;

[0014] A determination module is configured to determine the second virtual object as a visible virtual object of the first virtual object if a detection result of at least one second sight point indicates that the at least one second sight point is visible from the first sight point.

[0015] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the electronic device implements any of the above-mentioned data processing methods.

[0016] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned data processing methods.

[0017] On the other hand, a computer program or a computer program product is also provided, wherein the computer program or the computer program product stores at least one computer program, and the at least one computer program is loaded and executed by a processor to enable the electronic device to implement any of the above-mentioned data processing methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] FIG1 is a schematic diagram of an implementation environment of a data processing method provided in an embodiment of the present application;

[0020] FIG2 is a flow chart of a data processing method provided in an embodiment of the present application;

[0021] FIG3 is a schematic diagram of an expanded field of view provided by an embodiment of the present application;

[0022] FIG4 is a schematic diagram of first field of view information provided by an embodiment of the present application;

[0023] FIG5 is a flow chart of a line detection method provided by an embodiment of the present application;

[0024] FIG6 is a schematic diagram of detecting a virtual object provided by an embodiment of the present application;

[0025] FIG7 is a schematic diagram of a line detection provided by an embodiment of the present application;

[0026] FIG8 is a schematic diagram of another line detection provided by an embodiment of the present application;

[0027] FIG9 is a schematic diagram of a non-player character discovering a player character according to an embodiment of the present application;

[0028] FIG10 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;

[0029] FIG11 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;

[0030] FIG12 is a schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0032] FIG1 is a schematic diagram of an implementation environment of a data processing method provided in an embodiment of the present application. As shown in FIG1 , the implementation environment includes a terminal device 101 and a server 102. The data processing method in the embodiment of the present application can be executed by the terminal device 101, can also be executed by the server 102, or can be executed by the terminal device 101 and the server 102 together.

[0033] The terminal device 101 can be a smart phone, a game console, a desktop computer, a tablet computer, a laptop computer, a smart TV, a smart car device, an intelligent voice interaction device, a smart home appliance, etc. The server 102 can be a single server, or a server cluster consisting of multiple servers, or any one of a cloud computing platform and a virtualization center, which is not limited in the embodiments of the present application. The server 102 can be connected to the terminal device 101 via a wired network or a wireless network. The server 102 can have functions such as data processing, data storage, and data transmission and reception, which are not limited in the embodiments of the present application. The number of terminal devices 101 and servers 102 is not limited and can be one or more.

[0034] Each optional implementation of the present application can be implemented based on artificial intelligence (AI) technology. Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0035] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and smart transportation.

[0036] The embodiment of the present application provides a data processing method that can be applied in the above-mentioned implementation environment. It can determine whether a virtual object is a visible virtual object of another virtual object, thereby improving the authenticity of field of view detection. Taking the flowchart of a data processing method provided by the embodiment of the present application shown in Figure 2 as an example, for ease of description, the terminal device 101 or server 102 that executes the data processing method in the embodiment of the present application is referred to as an electronic device, and the method can be executed by an electronic device. As shown in Figure 2, the method includes the following steps.

[0037] Step 201, obtain the first field of view information and the first sight point of the first virtual object, where the first sight point is a point located at a specified position of the first virtual object. For example, the first virtual object is a three-dimensional model in a three-dimensional scene, and the position of the first sight point can be represented by, for example, coordinate values ​​on a three-dimensional coordinate axis. The first field of view information is used, for example, to represent the field of view range of the first virtual object. Among them, the first field of view information uses, for example, the first sight point as the viewpoint. The first virtual object is a virtual object controlled by a computer program. Generally, a virtual object controlled by a computer program can be driven by itself based on a configured computer program, and does not require a player to control it. Therefore, this type of virtual object is also called a non-player character (NPC). That is, the first virtual object is an NPC.

[0038] A virtual object can be an object model of any object modeled using three-dimensional modeling technology. The object can be a real-world object or a fictional object. By dividing the first virtual object based on the object structure, multiple parts can be obtained. For example, if the first virtual object is a character model, the first virtual object can be divided into parts such as the head, hands, feet, and torso based on the character structure. For any part, a sight point can be bound to the part, and of course, no sight point can be bound to the part. Among them, the sight point of a specified part among the multiple parts is recorded as the first sight point. For example, the sight point of the head is recorded as the first sight point.

[0039] By setting field of view information for the first virtual object, the first virtual object has visual capabilities and can see other virtual objects in the same three-dimensional scene as the first virtual object (for example, a three-dimensional scene of the same game match). In an embodiment of the present application, any frame of the game screen in the game match may include the first virtual object or may not include the first virtual object. For the current frame of the game screen that includes the first virtual object, the updated first field of view information of the first virtual object can be determined based on the game data corresponding to the current frame of the game screen.

[0040] In a possible implementation, the step of “obtaining first field of view information of the first virtual object” in step 201 includes steps 2021 and 2022 (not shown in the figure).

[0041] Step 2021: Acquire initial first field of view information of the first virtual object.

[0042] In an embodiment of the present application, initial field of view information can be configured for the first virtual object. For the first frame of game screen in a game match, if the first virtual object meets the field of view update conditions, the initial field of view information is updated and the updated field of view information is used as the field of view information corresponding to the first frame of game screen. If the first virtual object does not meet the field of view update conditions, the initial field of view information is used as the field of view information corresponding to the first frame of game screen. For the second frame of game screen in the game match, if the second virtual object meets the field of view update conditions, the field of view information corresponding to the first frame of game screen is updated and the updated field of view information is used as the field of view information corresponding to the second frame of game screen. If the first virtual object does not meet the field of view update conditions, the field of view information corresponding to the first frame of game screen is used as the field of view information corresponding to the second frame of game screen. Similarly, the field of view information corresponding to the previous frame of game screen can be obtained. The field of view information corresponding to the previous frame of game screen is the initial first field of view information of the first virtual object. The method for updating the field of view information can be found in the description of step 2022 and is not repeated here. In step 2022, if the first virtual object meets the field of view update conditions, the first field of view information is updated to obtain the updated first field of view information.

[0043] A perception component can be configured for the first virtual object, encapsulating the first virtual object's field of view information and a method for updating that field of view information. During the first virtual object's lifecycle, whenever the first virtual object meets a field of view update condition, the perception component is accessed through an interface to read and update the field of view information, thereby implementing an artificial intelligence perception component (AI Perception Component).

[0044] For the current frame of the game screen, since the perception component encapsulates the field of view information of the first virtual object, the first field of view information can be read by accessing the perception component through the interface. Furthermore, since the perception component encapsulates the field of view information update method, accessing the perception component through the interface can update the first field of view information.

[0045] The perception component is accessed through the interface when the first virtual object meets the field of view update condition. Optionally, the first virtual object meeting the field of view update condition includes at least one of the first case, the second case, and the third case. The first case is: the height between the edge of the horizontal field of view of the first virtual object and the virtual ground meets the height condition. The second case is: the virtual weather in the virtual environment where the first virtual object is located changes. The third case is: the combat status of the first virtual object changes. The combat status indicates whether the first virtual object is in combat with other virtual objects. The first field of view information can be updated based on any one of the implementation methods A, B, and C shown below.

[0046] In implementation mode A, the field of view update condition includes the first case. In this case, before step 2022, step A1 (not shown in the figure) is further included.

[0047] Step A1: If the first virtual object is initialized or moves, the height between the edge of the horizontal field of view and the virtual ground is determined based on the first sight point and the first field of view information.

[0048] When initializing the first virtual object, that is, when the first virtual object is born, or when the first virtual object moves, a line trace can be detected based on the first sight point and the first field of view information to obtain the horizontal field of view. The horizontal field of view refers to the field of view range on the horizontal plane where the first sight point is located, corresponding to the first field of view information. For example, if the field of view range represented by the first field of view information is a sphere centered on the first sight point, then the horizontal field of view is the horizontal section of the sphere where the first sight point is located.

[0049] After determining the horizontal field of view, the altitude of the horizontal field of view is determined. The game data corresponding to the current frame game screen includes the data of the virtual ground, and the data of the virtual ground can reflect the altitude of the virtual ground below the horizontal field of view. The height between the edge of the horizontal field of view and the virtual ground below the edge of the horizontal field of view can be determined. Please refer to Figure 3. In Figure 3, the first field of view information can describe a sphere with the first sight point as the center and the first field of view distance as the radius, and the horizontal field of view is the horizontal section of the sphere where the first sight point is located. After determining the horizontal field of view, the height between the edge of the horizontal field of view and the ground can be determined.

[0050] In the embodiment of the present application, the first virtual object satisfies the field of view update condition including that its height satisfies the height condition. In this case, step 2022 may include step A2 (not shown in the figure).

[0051] Step A2: updating the first field of view information based on the height to obtain updated first field of view information. The field of view range corresponding to the first field of view information may be expanded or reduced based on the height.

[0052] In a possible implementation, the height satisfying the height condition includes the height being greater than a first height threshold. In this case, the first field of view information may be expanded based on the height.

[0053] The embodiment of the present application does not limit the first height threshold. Exemplarily, the first height threshold is set data, for example, the first height threshold is 300. Alternatively, each frame of the game screen corresponds to a first height threshold, and the reference height between the edge of the horizontal field of view and the virtual ground can be determined in accordance with step A1 based on the game data corresponding to the previous frame of the game screen, and the first height threshold corresponding to the current frame of the game screen is determined based on the reference height. For example, the first height threshold is the reference height or the first height threshold and the reference height satisfy a certain linear relationship.

[0054] In the embodiment of the present application, the first field of view information includes a first field of view distance, which is the distance between the first sight point corresponding to the previous frame of the game screen and the edge of the field of view. It should be noted that the first virtual object corresponds to a regular field of view (for example, the first virtual object corresponds to a spherical field of view) or an irregular field of view (for example, the first virtual object corresponds to at least one vertebral field of view). Based on this, the first field of view distance is at least one.

[0055] Optionally, step A2 includes steps A21 to A23 (not shown in the figure).

[0056] Step A21: Expand the first field of view distance based on the height to obtain a second field of view distance.

[0057] If the height of the current frame game screen is greater than the first height threshold, the first field of view distance is expanded based on the height and the first field of view distance. Optionally, the field of view distance is expanded according to formula (1) shown below.

[0058] Range2=Range1+Height*w formula (1)

[0059] Here, Range2 represents the second field of view distance, Range1 represents the first field of view distance, Height represents the height, and w represents the weight. The embodiment of the present application does not limit the value of the weight, and illustratively, w=1.5.

[0060] Step A22: If the second field of view distance is greater than the first field of view threshold, determine updated first field of view information based on the first field of view threshold.

[0061] The embodiments of the present application do not limit the first field of view threshold. Exemplarily, the first field of view threshold is set data, for example, the first field of view threshold is 3000. Alternatively, the first field of view threshold is determined based on the first field of view distance, for example, the difference between the first field of view threshold and the first field of view distance is no greater than the set data, for example, the difference between the first field of view threshold and the first field of view distance is no greater than 1500.

[0062] If the second field of view distance is greater than the first field of view threshold, the first field of view distance in the first field of view information is replaced with the first field of view threshold to obtain updated first field of view information.

[0063] Step A23: If the second field of view distance is not greater than the first field of view threshold, determine updated first field of view information based on the second field of view distance.

[0064] If the second field of view distance is not greater than the first field of view threshold, the first field of view distance in the first field of view information is replaced with the second field of view distance to obtain updated first field of view information.

[0065] Steps A21 through A23 are described below with reference to Figure 3. If the height between the edge of the horizontal field of view and the ground is greater than a first height threshold, the visual distance is expanded based on the first field of view distance. The higher the height, the greater the field of view distance, and the maximum field of view distance does not exceed the first field of view threshold.

[0066] In the embodiments of the present application, by replacing the first field of view distance in the first field of view information with a second field of view distance or a first field of view threshold, where both the second field of view distance and the first field of view threshold are greater than the first field of view distance, the first field of view information is expanded, achieving a higher perspective. By ensuring that the maximum field of view distance does not exceed the first field of view threshold, the simulation of real biological vision is achieved, enhancing authenticity.

[0067] In another possible implementation, the height condition meeting the height condition includes the height being less than a second height threshold. In this case, the first field of view information may be narrowed based on the height. Optionally, the second height threshold is less than or equal to the first height threshold.

[0068] The embodiment of the present application does not limit the first height threshold. Exemplarily, the first height threshold is set data, for example, the first height threshold is 300. Alternatively, each frame of the game screen corresponds to a first height threshold, and the reference height between the edge of the horizontal field of view and the virtual ground can be determined in accordance with step A1 based on the game data corresponding to the previous frame of the game screen, and the first height threshold corresponding to the current frame of the game screen is determined based on the reference height. For example, the first height threshold is the reference height or the first height threshold and the reference height satisfy a certain linear relationship.

[0069] In the embodiment of the present application, the first field of view information includes the first field of view distance. Optionally, step A2 includes steps A24 to A26 (not shown in the figure).

[0070] Step A24: reducing the first field of view distance based on the height to obtain a third field of view distance.

[0071] If the height of the current frame game screen is less than the second height threshold, the first field of view distance is reduced based on the height and the first field of view distance. Optionally, the field of view distance is reduced according to formula (2) shown below.

[0072] Range3=Range1-Height*w formula (2)

[0073] Here, Range3 represents the third field of view distance, Range1 represents the first field of view distance, Height represents the height, and w represents the weight. The embodiment of the present application does not limit the value of the weight, and for example, w=1.5.

[0074] Step A25: If the third field of view distance is less than the second field of view threshold, determine updated first field of view information based on the second field of view threshold.

[0075] Optionally, the second field of view threshold is less than the first field of view threshold. The embodiment of the present application does not limit the second field of view threshold. Exemplarily, the second field of view threshold is set data, for example, the second field of view threshold is 1000. Alternatively, the second field of view threshold is determined based on the first field of view distance, for example, the difference between the second field of view threshold and the first field of view distance is not less than the set data, for example, the difference between the second field of view threshold and the first field of view distance is not less than 400.

[0076] If the third field of view distance is less than the second field of view threshold, the first field of view distance in the first field of view information is replaced with the second field of view threshold to obtain updated first field of view information.

[0077] Step A26: If the third field of view distance is not less than the second field of view threshold, determine updated first field of view information based on the third field of view distance.

[0078] If the third field of view distance is not less than the second field of view threshold, the first field of view distance in the first field of view information is replaced with the third field of view distance to obtain updated first field of view information.

[0079] In this embodiment, by replacing the first field of view distance in the first field of view information with a third field of view distance or a second field of view threshold, where both the third field of view distance and the second field of view threshold are smaller than the first field of view distance, the first field of view information is reduced in size, enabling a closer view from a lower position. By ensuring that the minimum field of view distance does not exceed the second field of view threshold, the simulation of real biological vision is achieved, enhancing authenticity.

[0080] In implementation B, the visual field update condition includes the second case. In this case, step 2022 includes steps B1 to B2 (not shown in the figure).

[0081] Step B1: Obtain virtual weather change information.

[0082] The game data corresponding to the current frame includes virtual weather data, and the game data corresponding to the previous frame also includes virtual weather data. Virtual weather data describes the virtual weather. Generally, virtual weather can include any type of weather, such as sunny, rainy, foggy, or snowy. Visibility between any two types of weather varies. Visibility refers to the maximum distance at which an object can be distinguished from the background. For example, visibility on a sunny day is higher than visibility on rainy, foggy, or snowy days.

[0083] If the virtual weather data corresponding to the current frame of the game screen is the same as the virtual weather data corresponding to the previous frame of the game screen, it is determined that the virtual weather has not changed. If the virtual weather data corresponding to the current frame of the game screen is different from the virtual weather data corresponding to the previous frame of the game screen, it is determined that the virtual weather has changed. In this case, it can be determined that the first virtual object meets the field of view update condition.

[0084] Difference information can be determined based on the virtual weather data corresponding to the current frame of the game screen and the virtual weather data corresponding to the previous frame of the game screen. The difference information corresponds to information about changes in the virtual weather. For example, if the virtual weather data corresponding to the previous frame of the game screen describes a sunny day, while the virtual weather data corresponding to the current frame of the game screen describes a rainy day, the difference information corresponds to information about the change from sunny to rainy virtual weather.

[0085] Step B2: If the change information of the virtual weather indicates a decrease in visibility, the field of view corresponding to the first field of view information is narrowed to obtain the updated first field of view information representing the narrowed field of view; if the change information of the virtual weather indicates an increase in visibility, the field of view corresponding to the first field of view information is expanded to obtain the updated first field of view information representing the expanded field of view.

[0086] Based on the change information of the virtual weather, the change information of visibility can be determined. The change information of visibility includes reduced visibility and improved visibility.

[0087] If the visibility change information reflects reduced visibility, the first field of view distance in the first field of view information is reduced to obtain a third field of view distance. The first field of view distance in the first field of view information is replaced with the third field of view distance to obtain updated first field of view information. Alternatively, if the third field of view distance is less than the second field of view threshold, the first field of view distance in the first field of view information is replaced with the second field of view threshold to obtain updated first field of view information. If the third field of view distance is not less than the second field of view threshold, the first field of view distance in the first field of view information is replaced with the third field of view distance to obtain updated first field of view information. In this way, the first field of view information is reduced.

[0088] If the visibility change information reflects an improvement in visibility, the first field of view distance in the first field of view information is expanded to obtain the second field of view distance. The first field of view distance in the first field of view information is replaced with the second field of view distance to obtain the updated first field of view information. Alternatively, if the second field of view distance is greater than the first field of view threshold, the first field of view distance in the first field of view information is replaced with the first field of view threshold to obtain the updated first field of view information. If the second field of view distance is not greater than the first field of view threshold, the first field of view distance in the first field of view information is replaced with the second field of view distance to obtain the updated first field of view information. In this way, the first field of view information is expanded.

[0089] In this embodiment of the present application, if the visibility of the virtual environment in which the first virtual object resides increases, the field of view corresponding to the first field of view information is expanded; if the visibility of the virtual environment in which the first virtual object resides decreases, the field of view corresponding to the first field of view information is reduced. By using information about changes in the virtual weather, the field of view information of the first virtual object is updated in a timely manner, thereby simulating real biological vision and improving authenticity.

[0090] In implementation C, the field of view update condition includes the third situation: the combat state of the first virtual object changes.

[0091] The game data corresponding to the current frame game screen includes the data of the first virtual object, and the game data corresponding to the previous frame game screen also includes the data of the first virtual object. The data of the first virtual object is used to describe the first virtual object. Through the data of the first virtual object corresponding to the current frame game screen, it can be determined whether the first virtual object is in battle with other virtual objects, thereby obtaining the combat status of the first virtual object corresponding to the current frame game screen. Similarly, through the data of the first virtual object corresponding to the previous frame game screen, it can be determined whether the first virtual object is in battle with other virtual objects, thereby obtaining the combat status of the first virtual object corresponding to the previous frame game screen. Among them, the following steps C1 to C2 (not shown in the figure) can be used to determine the combat status of the first virtual object corresponding to any frame game screen.

[0092] Optionally, the first field of view information includes first-level field of view information, second-level field of view information and third-level field of view information, the first field of view range corresponding to the first-level field of view information includes the second field of view range corresponding to the second-level field of view information, and the second field of view range includes the third field of view range corresponding to the third-level field of view information.

[0093] The field of view information of any level is used to describe the field of view range corresponding to the level. The embodiment of the present application does not limit the field of view range corresponding to any level. For example, the field of view range corresponding to any level includes the range of at least one solid geometry such as a cone, a sphere, a cylinder, or a polyhedron.

[0094] Please refer to (1) in Figure 4 , which shows the horizontal field of view corresponding to a level. The horizontal field of view includes two sectors. The angle of the first sector is less than 180 degrees, and the angle of the second sector is greater than 180 degrees. The radius of the first sector is greater than the radius of the second sector, and the two sectors have the same center. It can be understood that any sector can be a horizontal cross-section of a spherical cone. Based on this, the field of view corresponding to this level includes the range of the spherical cone corresponding to these two sectors.

[0095] The i-th field of view corresponding to the field of view information of the i-th level, i takes any value from one to three. The first field of view includes the second field of view, and the second field of view includes the third field of view. As shown in (2) in Figure 4, (2) in Figure 4 shows the field of view corresponding to three levels, and the field of view corresponding to one level is shown in (1) in Figure 4. For the field of view corresponding to the three levels shown in (2) in Figure 4, from outside to inside, they correspond in sequence: the first field of view corresponding to the field of view information of the first level, the second field of view corresponding to the field of view information of the second level, and the third field of view corresponding to the field of view information of the third level. Among them, the first field of view includes the second field of view, and the second field of view includes the third field of view.

[0096] In an embodiment of the present application, the field of view information of any level includes at least one sub-field of view information. The field of view range corresponding to any level includes the range of at least one item of stereo geometry, and any item of stereo geometry is at least one, and one sub-field of view information is used to describe the range of one stereo geometry. In other words, the first field of view information includes multiple sub-field of view information. Multiple sub-perception components can be configured for the first virtual object, and a sub-field of view information is encapsulated by a sub-perception component, which is conducive to the separate configuration of sub-field of view information. The perception component can call the sub-field of view information encapsulated by each sub-perception component and summarize and process each sub-field of view information.

[0097] In the embodiment of the present application, the method further includes steps C1 to C2, wherein steps C1 to C2 are performed before step C3.

[0098] In step C1, if there is a visible virtual object within the third field of view, or if there is a visible virtual object within the second field of view except the third field of view and the visible virtual object is in the first posture, then the combat state is determined to be the first state, and the first state indicates that the first virtual object is in combat with other virtual objects.

[0099] For the current frame of the game screen or the previous frame of the game screen, the method from step 201 to step 204 can be used to determine whether there is a visible virtual object within any field of view.

[0100] In this embodiment of the present application, the third level corresponds to the combat level. If a visible virtual object is located within the combat level of the first virtual object, it indicates that there is a visible virtual object within the third field of view. The combat state of the first virtual object can be determined to be the first state, and the first state indicates that the first virtual object is in combat with another virtual object.

[0101] The second level corresponds to the stealth level. If there is no visible virtual object within the combat level of the first virtual object, but there is a visible virtual object outside the combat level of the first virtual object, and the visible virtual object is within the stealth level, then it is necessary to detect the posture of the visible virtual object. Optionally, the posture data of the visible virtual object can be obtained, and the posture data of the visible virtual object is used to describe the posture of the visible virtual object. Generally, the posture of the visible virtual object includes any posture such as lying down, squatting, and standing. If the posture data of the visible virtual object describes that the visible virtual object is in a standing posture, then the combat state of the first virtual object is determined to be the first state, and the first state is used to represent that the first virtual object is in combat with other virtual objects.

[0102] In step C2, if there is a visible virtual object in the second field of view except the third field of view and the visible virtual object is in the second posture, or if there is a visible virtual object in the first field of view except the second field of view, then the combat state is determined to be the second state, and the second state indicates that the first virtual object is not in combat with other virtual objects.

[0103] If no visible virtual object is within the combat level of the first virtual object, but a visible virtual object is outside the combat level of the first virtual object, and the visible virtual object is within the stealth level, posture data of the visible virtual object may be obtained. If the posture data of the visible virtual object describes the visible virtual object as being in a prone position, the combat state of the first virtual object is determined to be a second state, and the second state indicates that the first virtual object is not in combat with another virtual object.

[0104] It can be understood that if the posture data of the visible virtual object describes that the visible virtual object is in a squatting posture, the combat state of the first virtual object is determined to be the first state or the second state, and the first state is used to represent that the first virtual object is in combat with other virtual objects, and the second state is used to represent that the first virtual object is not in combat with other virtual objects.

[0105] The first level corresponds to the alert level. If no visible virtual objects are within the combat level of the first virtual object, and no visible virtual objects are within the stealth level of the first virtual object, but a visible virtual object is outside the stealth level and within the alert level, indicating that a visible virtual object exists within the first field of view, the combat state of the first virtual object can be determined to be the second state, indicating that the first virtual object is not in combat with other virtual objects.

[0106] According to steps C1 to C2, the combat status of the first virtual object corresponding to the previous frame of the game screen and the combat status of the first virtual object corresponding to the current frame of the game screen can be determined. If the combat status of the first virtual object corresponding to the current frame of the game screen is the same as the combat status of the first virtual object corresponding to the previous frame of the game screen, it is determined that the combat status of the first virtual object has not changed. If the combat status of the first virtual object corresponding to the current frame of the game screen is different from the combat status of the first virtual object corresponding to the previous frame of the game screen, it is determined that the combat status of the first virtual object has changed. In this case, it can be determined that the first virtual object meets the field of view update condition. Optionally, step 2022 includes step C3 (not shown in the figure).

[0107] Step C3: If the changed combat state indicates that the first virtual object is in combat with other virtual objects, the first field of view information is reduced to obtain updated first field of view information; if the changed combat state indicates that the first virtual object is not in combat with other virtual objects, the first field of view information is expanded to obtain updated first field of view information.

[0108] When the combat status of the first virtual object changes, if the combat status of the first virtual object corresponding to the previous frame of the game screen is: the first virtual object is in combat with other virtual objects, then the combat status of the first virtual object corresponding to the current frame of the game screen is: the first virtual object is not in combat with other virtual objects. If the combat status of the first virtual object corresponding to the previous frame of the game screen is: the first virtual object is not in combat with other virtual objects, then the combat status of the first virtual object corresponding to the current frame of the game screen is: the first virtual object is in combat with other virtual objects. The first field of view information may be updated based on the combat status of the first virtual object corresponding to the current frame of the game screen.

[0109] If the combat status of the first virtual object corresponding to the current frame game screen (that is, the combat status after the change) is: the first virtual object does not engage in combat with other virtual objects, the first field of view distance in the first field of view information is expanded to obtain the second field of view distance. The first field of view distance in the first field of view information is replaced with the second field of view distance to obtain the updated first field of view information. Alternatively, if the second field of view distance is greater than the first field of view threshold, the first field of view distance in the first field of view information is replaced with the first field of view threshold to obtain the updated first field of view information. If the second field of view distance is not greater than the first field of view threshold, the first field of view distance in the first field of view information is replaced with the second field of view distance to obtain the updated first field of view information. In this way, the first field of view information is expanded.

[0110] If the combat status of the first virtual object corresponding to the current frame game screen (that is, the combat status after the change) is: the first virtual object is in combat with other virtual objects, the first field of view distance in the first field of view information is reduced to obtain the third field of view distance. The first field of view distance in the first field of view information is replaced with the third field of view distance to obtain the updated first field of view information. Alternatively, if the third field of view distance is less than the second field of view threshold, the first field of view distance in the first field of view information is replaced with the second field of view threshold to obtain the updated first field of view information. If the third field of view distance is not less than the second field of view threshold, the first field of view distance in the first field of view information is replaced with the third field of view distance to obtain the updated first field of view information. In this way, the first field of view information is reduced.

[0111] The embodiment of the present application can flexibly change the field of view information of the first virtual object based on its combat status. When the first virtual object is engaged in combat with other virtual objects, the field of view distance is smaller, allowing the first virtual object's field of view to be more focused on the combat scene. When the first virtual object is not engaged in combat with other virtual objects, the field of view distance is larger, allowing the first virtual object's field of view to focus more on observation, thereby improving the intelligence of the first virtual object.

[0112] It is understandable that if the first virtual object does not meet the field of view update condition, the first field of view information corresponding to the previous frame of the game screen can be used as the updated first field of view information corresponding to the current frame of the game screen.

[0113] Step 202 : Acquire multiple second sight points of the second virtual object. The first virtual object and the second virtual object are located in the same three-dimensional scene. Each second sight point is a point located at a corresponding part of the second virtual object.

[0114] Initializing a virtual object is equivalent to the birth of the virtual object. Each time a virtual object is initialized, it will be registered as a member of the Sight Query Queue in the Perception system. During the entire life cycle of the virtual object, from birth to destruction, the virtual object will be a member of the Sight Query Queue.

[0115] Any other virtual object other than the first virtual object in the same game match as the first virtual object can be used as a second virtual object. Alternatively, the position of any other virtual object can be obtained. If, based on the position of the other virtual object, it is determined that the other virtual object is within the field of view corresponding to the updated first field of view information of the first virtual object, the other virtual object is used as the second virtual object. The number of second virtual objects is at least one. Any second virtual object can be an NPC or a player character (PC). Among them, the PC is a virtual object controlled by the player.

[0116] The second virtual object can be an object model obtained by modeling an object using three-dimensional modeling technology. The object can be a real object or a fictional object. For example, the second virtual object can be a human model, a bird or animal model, a monster model, etc. A second virtual object has multiple parts, and a part can correspond to a second sight point or not. Any two second sight points are located on different parts of the second virtual object. For example, the second virtual object includes parts such as the head, shoulders, hands, knees, and feet. There is a second sight point on each of the head, hands, and feet. Then, the second virtual object has a total of five second sight points.

[0117] Step 203: Based on the first sight point and the first field of view information, at least one second sight point is detected to obtain a detection result for the at least one second sight point. The detection result for each second sight point indicates whether the second sight point is visible from the first sight point. The second sight point being visible from the first sight point can be understood as the first virtual object being able to see the second sight point, and the second sight point being invisible from the first sight point can be understood as the first virtual object being unable to see the second sight point.

[0118] Step 204: If the detection result of the at least one second sight point indicates that the at least one second sight point is visible from the first sight point, the second virtual object is determined as a visible virtual object of the first virtual object.

[0119] In some embodiments, the embodiment of the present application may further perform, before performing step 204: determining whether each of the plurality of second sight points needs to be detected, wherein the detection is used to determine whether each of the second sight points is visible from the first sight point;

[0120] If at least one second sight point requires detection, step 204 is executed. If it is determined that detection is not required, the step of determining whether each of the plurality of second sight points requires detection is continued until at least one second sight point requires detection. In some embodiments, determining whether each of the plurality of second sight points requires detection can be determined by determining whether each second sight point meets target detection conditions. If any second sight point meets the target detection conditions, if the line connecting any second sight point and the first sight point is within the field of view corresponding to the updated first field of view information, the second sight point is within the field of view. If the line does not pass through an opaque object, it indicates that light from the first sight point can reach the second sight point. In this case, the second sight point is visible from the first sight point, equivalent to the first virtual object being able to see the portion of the second virtual object where the second sight point is located. It should be understood that the line not passing through an opaque object includes the line passing through a translucent object (for example, a translucent object such as glass) and the line not passing through any object.

[0121] If the line connecting any second sight point to the first sight point is outside the field of view corresponding to the updated first field of view information, it means that the second sight point is outside the field of view. In this case, the second sight point is not visible from the first sight point. If the line connecting any second sight point to the first sight point passes through an opaque object, it means that the light from the first sight point cannot reach the second sight point. In this case, the second sight point is also not visible from the first sight point. Of course, if the line connecting a second sight point to the first sight point is outside the field of view corresponding to the updated first field of view information, and the line passes through an opaque object, the second sight point is not visible from the first sight point. The second sight point is not visible from the first sight point, which is equivalent to the first virtual object being unable to see the part of the second virtual object where the second sight point is located.

[0122] In the embodiment of the present application, there is at least one second virtual object. In one possible implementation, the step of determining whether each second sight point satisfies the target detection condition includes steps 2031 to 2033 (not shown in the figure).

[0123] Step 2031: Acquire the detection priority of each second virtual object and the detection priority of each second sight point.

[0124] Because there is at least one second virtual object in a game match, it is necessary to determine the detection priority of each second virtual object. The detection priority of any second virtual object can reflect the order in which the second virtual object performs line detection. The higher the detection priority of a second virtual object, the higher the priority given to the line detection of the second virtual object. In other words, the detection priority of a second virtual object is positively correlated with the order in which the second virtual object performs line detection.

[0125] Optionally, the updated first field of view information includes multiple sub-field of view information. In the embodiment of the present application, the updated first field of view information is the first field of view information or is obtained by updating the first field of view information. Therefore, the updated first field of view information also includes the first-level field of view information, the second-level field of view information, and the third-level field of view information, and the first field of view range includes the second field of view range, and the second field of view range includes the third field of view range.

[0126] Among them, the field of view corresponding to any level includes the range of at least one solid geometry among a cone, a sphere, a cylinder, a polyhedron, etc., and any solid geometry can be at least one. In the embodiment of the present application, a sub-field of view information is used to describe the range of a solid geometry. As shown in Figure 4 (1), it corresponds to two sub-field of view information, one sub-field of view information describes the range of the spherical cone corresponding to the fan with an angle less than 180 degrees, and the other sub-field of view information describes the range of the spherical cone corresponding to the fan with an angle greater than 180 degrees. Similarly, there are six sectors in (2) in Figure 4, corresponding to a total of six sub-field of view information, and one sub-field of view information describes the range of the spherical cone corresponding to a sector.

[0127] In an exemplary embodiment, "obtaining the detection priority of each second virtual object" in step 2031 includes: for any second virtual object, determining the sub-field of view information of any second virtual object based on the position of any second virtual object; and determining the detection priority of any second virtual object based on the distance between the first virtual object and any second virtual object and the sub-field of view information of any second virtual object.

[0128] Based on the position of any second virtual object and the position of the first virtual object, the direction of the second virtual object relative to the first virtual object and the distance between the second virtual object and the first virtual object can be determined. For any sub-field of view information, determine whether the direction is within the sub-field of view angle corresponding to the sub-field of view information, and determine whether the distance is not greater than the sub-field of view distance corresponding to the sub-field of view information. If the direction is within the sub-field of view angle corresponding to the sub-field of view information, and the distance is not greater than the sub-field of view distance corresponding to the sub-field of view information, then determine that the second virtual object corresponds to the sub-field of view information. If the direction is not within the sub-field of view angle corresponding to the sub-field of view information, and / or the distance is greater than the sub-field of view distance corresponding to the sub-field of view information, then determine that the second virtual object does not correspond to the sub-field of view information.

[0129] Generally, one second virtual object corresponds to one sub-FOV information. If a second virtual object corresponds to multiple sub-FOV information, then any one sub-FOV information is determined from these sub-FOV information (for example, the sub-FOV information with the largest or smallest sub-FOV distance) and used as the sub-FOV information corresponding to the second virtual object.

[0130] For any second virtual object, a distance between the first virtual object and the second virtual object may be determined based on the position of the second virtual object and the position of the first virtual object. A detection priority of the second virtual object may be determined based on the distance and the sub-FOV distance included in the sub-FOV information of the second virtual object.

[0131] Optionally, the distance between the first virtual object and any second virtual object (which can be recorded as L1) is divided by the sub-field of view distance (which can be recorded as L2) included in the sub-field of view information of the second virtual object, that is, L1 / L2 is calculated to obtain the score of the second virtual object, and the score of the second virtual object reflects the importance of the second virtual object relative to the first virtual object. The scores of each second virtual object are sorted, and the detection priority of each second virtual object is determined based on the sorting result. For example, the second virtual objects are sorted in descending order according to their scores, and the sorting number of the second virtual object is the detection priority of the second virtual object. That is to say, if the sorting number of the second virtual object is the first (i.e., the highest score), the detection priority of the second virtual object is higher. If the sorting number of the second virtual object is the second (i.e., the second highest score), the detection priority of the second virtual object is second, and so on. In other words, the score of the second virtual object is positively correlated with the detection priority of the second virtual object.

[0132] For any second virtual object, since it includes multiple second sightline points, it is necessary to determine the detection priority of each second sightline point. The detection priority of each second sightline point can reflect the order in which the second sightline point is detected for the route trajectory. The higher the detection priority of the second sightline point, the higher the priority for route detection for that second sightline point. In other words, the detection priority of the second sightline point is positively correlated with the order in which the second sightline points are detected for the route trajectory.

[0133] Optionally, for a second virtual object, a detection priority can be set for each second sight point included in the second virtual object. For example, if a second virtual object includes five second sight points located on the head, hands, and feet, the following can be set: the detection priority of the second sight point located on the head is higher than the detection priority of the second sight point located on the left hand, the detection priority of the second sight point located on the left hand is higher than the detection priority of the second sight point located on the right hand, the detection priority of the second sight point located on the right hand is higher than the detection priority of the second sight point located on the left foot, and the detection priority of the second sight point located on the left foot is higher than the detection priority of the second sight point located on the right foot.

[0134] Step 2032: For any second sight point, obtain the current number of detections, which is the sum of the number of first detections and the number of second detections. The first detection is performed on the second sight point of the second virtual object whose detection priority is before the second virtual object where any second sight point is located. The second detection is performed on the second sight point on the second virtual object where any second sight point is located whose detection priority is before any second sight point.

[0135] Before performing a line check on any second sight point included in any second virtual object, the number of first checks can be obtained. The first check refers to the check performed on the second sight point of the second virtual object whose detection priority is higher than that of the second virtual object. For example, the detection priority of second virtual object A is higher than the detection priority of second virtual object B, and the detection priority of second virtual object B is higher than the detection priority of second virtual object C, and second virtual objects A to C all include second sight points 1 to 5. Before performing a line check on second sight point 4 included in second virtual object C, it is necessary to obtain the number of line checks performed on second sight points 1 to 5 included in second virtual object A (maximum number of times is 5) and the number of line checks performed on second sight points 1 to 5 included in second virtual object B (maximum number of times is 5), thereby obtaining the number of first checks, which is less than or equal to 10.

[0136] In addition, the number of second detections needs to be obtained. Second detection refers to the detection of a second sight point on the second virtual object whose detection priority is higher than that of the second sight point. For example, if the second virtual object C includes second sight points 1 to 5, and the detection priority of second sight point 1 is higher than that of second sight point 2, the detection priority of second sight point 2 is higher than that of second sight point 3, the detection priority of second sight point 3 is higher than that of second sight point 4, and the detection priority of second sight point 4 is higher than that of second sight point 5, then before performing line detection on second sight point 4 included in the second virtual object C, the number of line detections performed on second sight points 1 to 3 included in the second virtual object C needs to be obtained (i.e., 3 times), resulting in a second detection number of 3.

[0137] The number of first detections and the number of second detections are added together to obtain the current number of detections.

[0138] Step 2033: If the current number of detections is less than the detection number threshold, determine whether any second sight point meets the target detection condition.

[0139] A detection count threshold can be set. Before performing route detection on any second sight point included in any second virtual object, it is necessary to determine the relationship between the current detection count and the detection count threshold. If the current detection count is less than the detection count threshold, it is determined that the second sight point meets the target detection condition, and route detection can be performed on the second sight point. If the current detection count is not less than the detection count threshold, it is determined that the second sight point does not meet the target detection condition, and route detection is not performed on the second sight point.

[0140] Please refer to Figure 5, which is a flowchart of a line detection method provided by an embodiment of the present application. First, a mesh of a first virtual object and a mesh of a second virtual object are obtained, where the mesh of a virtual object refers to a model of the virtual object. The first virtual object includes a first sight point located at a specified portion of the mesh, and the position of the first sight point can be obtained. The second virtual object includes second sight points located at multiple portions of the mesh, and the position of each second sight point can be obtained.

[0141] Then, a line check is performed on the first sight point and the first second sight point. If a hit is successful, the first second sight point is determined to be the target sight point, and the location of the target sight point and the number of detections are output. In this case, the line check process can be terminated or continued. A successful hit here means that the second sight point is visible from the first sight point. If a hit is unsuccessful, the number of detections is incremented by 1, and an unsuccessful hit here means that the second sight point is not visible from the first sight point.

[0142] Next, a line detection is performed on the first sight point and the second second sight point. If a successful hit is found, the second second sight point is determined to be the target sight point, and the location of the target sight point and the number of detections are output. In this case, the line detection process can be ended or continued. If a successful hit is found, the number of detections is increased by 1. And so on. Until a line detection is performed on the first sight point and the last second sight point. If a successful hit is found, the last second sight point is determined to be the target sight point, and the location of the target sight point and the number of detections are output. If a successful hit is found, the number of detections is increased by 1, and it is determined that the target sight point does not exist, and the number of detections is output.

[0143] It is understandable that if there is a target sight point, it means that the first virtual object can see the part of the second virtual object where the target sight point is located. If there is no target sight point, it means that the first virtual object cannot see the second virtual object.

[0144] Before performing a line check on any second sight point, it may be determined whether the current number of checks is less than a detection number threshold. If the current number of checks is less than the detection number threshold, line checking for the second sight point continues. If the current number of checks is not less than the detection number threshold, line checking for the second sight point is not performed, that is, the line checking process ends.

[0145] For example, if the current detection count is less than the detection count threshold, route detection is performed on the first sight point and the first second sight point. Next, the detection count is incremented by 1. If the current detection count equals the detection count threshold, route detection is not performed on the first sight point and the second second sight point. Similarly, route detection is not performed on the first sight point and the last second sight point.

[0146] Setting a detection threshold is equivalent to setting the maximum number of line checks for the current game frame. Since line checks take time, setting a detection threshold can limit this time and reduce game lag.

[0147] As mentioned above, the updated first field of view information includes multiple sub-field of view information. In one possible implementation, step 203 of "detecting at least one second field of view point based on the first field of view point and the first field of view information to obtain a detection result for the at least one second field of view point" includes steps 2034 to 2035 (not shown).

[0148] In step 2034, if the first detection condition and the second detection condition are met, the detection result of at least one second sight point is determined to be a first result, where the first result indicates that at least one second sight point is visible to the first virtual object. The first detection condition is that the line connecting the first sight point and the at least one second sight point is within the field of view corresponding to at least one sub-field of view information, and the second detection condition is that the line does not pass through an opaque object.

[0149] Based on the position of at least one second sight point and the position of the first sight point, a line connecting the first sight point and the second sight point can be determined, and the line corresponds to a direction. For any sub-field of view information, determine whether the direction is within the sub-field of view angle corresponding to the sub-field of view information. If the direction is within the sub-field of view angle corresponding to the sub-field of view information, determine whether the line is within the field of view corresponding to the sub-field of view information. If the line is within the field of view corresponding to the sub-field of view information, it means that the line is within the field of view corresponding to the updated first field of view information, that is, the second sight point is within the field of view of the first virtual object. In this case, it is determined that the first detection condition is met.

[0150] That is, as long as sub-FOV information exists, such that the direction of the line connecting the first sight point and at least one second sight point is within the sub-FOV angle corresponding to the sub-FOV information, and the line is within the field of view corresponding to the sub-FOV information, then the first detection condition is determined to be met. Otherwise, the first detection condition is determined to be not met.

[0151] If the connecting line does not pass through the opaque object, it means that the light can reach the second sight point from the first sight point. In this case, it is determined that the second detection condition is met.

[0152] If the first detection condition is met, the second sight point is within the field of view corresponding to the updated first field of view information of the first virtual object. Furthermore, if the second detection condition is met, light rays from the first sight point can reach the second sight point. In other words, the first virtual object can see the portion of the second virtual object where the second sight point is located. In this case, the detection result for the second sight point can be determined as the first result, indicating that the first virtual object can see the second sight point.

[0153] Step 2035: If at least one of the first detection condition and the second detection condition is not satisfied, determining that the detection result of the at least one second sight point is a second result, the second result indicating that the at least one second sight point is not visible to the first virtual object.

[0154] If the first detection condition is not met, it means that the second sight point is outside the field of view corresponding to the updated first field of view information of the first virtual object, and the first virtual object cannot see the portion of the second virtual object where the second sight point is located. If the second detection condition is not met, it means that light cannot reach the second sight point from the first sight point, that is, the first virtual object cannot see the portion of the second virtual object where the second sight point is located. Of course, if the first detection condition and the second detection condition are not met, it means that the second sight point is outside the field of view corresponding to the updated first field of view information of the first virtual object, and light cannot reach the second sight point from the first sight point, and the first virtual object cannot see the portion of the second virtual object where the second sight point is located. In the case where the first virtual object cannot see the portion of the second virtual object where any second sight point is located, the detection result of the second sight point can be determined as the second result, and the second result indicates that the first virtual object can see the second sight point.

[0155] It can be understood that the data processing method provided in the embodiment of the present application can be encapsulated into a component, which corresponds to an interface. The external system can call this component through the interface to determine whether a virtual object in the game is a visible virtual object of another virtual object through this component.

[0156] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant region. For example, the field of view information involved in this application is obtained with full authorization.

[0157] In the above method, the first virtual object corresponds to the first sight point, and the second virtual object corresponds to multiple second sight points. Based on the first sight point and the updated first field of view information of the first virtual object, any second sight point is detected to obtain whether the second sight point is visible at the first sight point. As long as there is a second sight point that is visible from the first sight point among the multiple second sight points, the second virtual object is determined to be a visible virtual object of the first virtual object. By detecting whether multiple second sight points are visible, multi-directional detection is achieved, and the authenticity of the detection is improved. In the case where special terrain easily obscures virtual objects, the multi-directional detection allows the first virtual object to relatively easily find visible virtual objects, thereby improving authenticity. In addition, the embodiment of the present application determines whether virtual objects are visible to each other by detecting whether the sight points are visible to each other, which helps to improve the efficiency of data processing related to the correlation between different virtual objects in the virtual three-dimensional scene (such as visibility).

[0158] In some embodiments, if a second sight point detection result indicates that the first virtual object can see the second sight point, the second sight point can be recorded as a target sight point. If all second sight point detection results indicate that the first virtual object cannot see the second sight point, it indicates that the target sight point does not exist on the second virtual object.

[0159] The presence of the target sight point on the second virtual object indicates that the first virtual object can see the target sight point. In other words, the first virtual object can see the second virtual object, and the second virtual object can be determined to be a visible virtual object of the first virtual object.

[0160] The above describes the data processing method provided by the embodiment of the present application from the perspective of method steps. The following is a systematic introduction and explanation. Please refer to Figure 6, which is a schematic diagram of detecting a virtual object provided by the embodiment of the present application.

[0161] In an embodiment of the present application, one game match corresponds to one visual query queue. After the game match is started, each time a virtual object is initialized, the virtual object is registered as a member of the visual query queue. For an NPC with visual capabilities (corresponding to the first virtual object), in any frame of the game screen of the game match, the visual query queue can be traversed, a virtual object can be selected from the visual query queue, and a visual cone detection can be performed on the virtual object based on the NPC's visual cone. Among them, the NPC's visual cone refers to the NPC's field of view, and performing a visual cone detection on a virtual object is to determine whether the virtual object is within the NPC's field of view.

[0162] If the virtual object is outside the NPC's visual frustum, it means that the virtual object is not within the NPC's field of view. In this case, the visual query information of the virtual object can be removed. The visual query information here refers to information that can reflect the virtual object, for example, the visual query information includes at least one of the virtual object's identifier, the virtual object's location, and the player controlling the virtual object.

[0163] If the virtual object is within the NPC's visual cone, it indicates that the virtual object is within the NPC's field of view. In this case, a line detection can be performed on the virtual object (corresponding to the second virtual object). The NPC includes a first sight point, and the virtual object includes multiple second sight points. If the line connecting the first sight point and any second sight point is within the NPC's visual cone and does not pass through an opaque object, the second sight point is determined to be the target sight point.

[0164] If there is no target sight point on the virtual object, it means that the virtual object is completely blocked by an opaque object, or that part of the virtual object is blocked by the opaque object, while the remaining part is outside the NPC's field of view, making it impossible for the NPC to see the virtual object. In this case, the visual query information for the virtual object can be removed.

[0165] If a target sight point exists on the virtual object, it indicates that all or part of the virtual object is not obscured by the opaque object and is within the NPC's field of view, allowing the NPC to see the virtual object. In this case, the visual query information for the virtual object can be updated. For example, at least one of the virtual object's identifier, the virtual object's location, and the player controlling the virtual object can be added.

[0166] Next, a determination is made as to whether the number of line tests has reached the detection threshold. If the number of line tests has reached the detection threshold, i.e., the number of line tests is greater than or equal to the detection threshold, the process ends. If the number of line tests has not reached the detection threshold, i.e., the number of line tests is less than the detection threshold, the step of selecting a virtual object in the visual query queue is executed, and tests are performed in the same manner as described above until the number of line tests reaches the detection threshold, at which point the process ends.

[0167] In an embodiment of the present application, an NPC with vision includes a first sight point, and a virtual object includes multiple second sight points. Route detection can be performed based on the first sight point and any one of the second sight points. As shown in Figure 7, a non-player character (i.e., an NPC with vision) has a first sight point, and a player character (i.e., a virtual object) has a second sight point on its head and body. Route detection can be performed based on the first sight point and the second sight point on the player character's head, and based on the first sight point and the second sight point on the player character's body.

[0168] When performing route detection based on a first sight point and any second sight point, as long as the line connecting the first and second sight points is within the NPC's visual cone and does not pass through an opaque object, the second sight point is determined to be the target sight point. In this case, the NPC can see the portion of the virtual object where the target sight point is located, allowing the NPC to discover the virtual object. As shown in Figure 8, when performing route detection based on a non-player character's first sight point and a second sight point located at the player character's head, the non-player character cannot see the player character's head because the line connecting the first and second sight points passes through the opaque object. However, when performing route detection based on the non-player character's first sight point and a second sight point located at the player character's lower limbs, the non-player character can see the player character's lower limbs because the line connecting the first and second sight points does not pass through the opaque object and is within the NPC's visual cone. Although the non-player character cannot see the player character's head, since the non-player character can see the player character's lower limbs, the non-player character can still discover the player character. As shown in FIG. 9 , although the non-player character cannot see the player character's body, the non-player character can still detect the player character because the non-player character can see the player character's head.

[0169] FIG10 is a schematic diagram showing the structure of a data processing device provided in an embodiment of the present application. As shown in FIG10 , the device includes:

[0170] Acquisition module 1001 is configured to acquire first field of view information and a first sight point of a first virtual object, where the first sight point is located at a specified location of the first virtual object; and to acquire multiple second sight points of a second virtual object, where the first and second virtual objects are located in the same three-dimensional scene, and each second sight point is located at a corresponding location of the second virtual object. Detection module 1002 is configured to detect at least one second sight point based on the first sight point and the first field of view information to obtain a detection result for the at least one second sight point, where the detection result for each second sight point indicates whether the second sight point is visible from the first sight point.

[0171] The determining module 1003 is configured to determine the second virtual object as a visible virtual object of the first virtual object if the detection result of the at least one second sight point indicates that the at least one second sight point is visible from the first sight point.

[0172] It should be understood that the device provided in FIG. 10 is merely an example of the division of the functional modules described above when implementing its functions. In actual applications, the functions described above 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 device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0173] FIG11 shows a block diagram of a terminal device 1100 provided by an exemplary embodiment of the present application. The terminal device 1100 includes a processor 1101 and a memory 1102 .

[0174] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 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 1101 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 1101 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 1101 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0175] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 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 1102 is used to store at least one computer program, which is executed by the processor 1101 to implement the data processing method provided in the method embodiment of the present application.

[0176] In some embodiments, terminal device 1100 may optionally include a peripheral device interface 1103 and at least one peripheral device. Processor 1101, memory 1102, and peripheral device interface 1103 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1103 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 1104, a display screen 1105, a camera assembly 1106, an audio circuit 1107, and a power supply 1108.

[0177] The peripheral device interface 1103 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, the memory 1102, and the peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102, and the peripheral device interface 1103 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0178] The RF circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 1104 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The RF circuit 1104 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1104 may also include circuitry related to Near Field Communication (NFC), although this application does not limit this.

[0179] The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1105 is a touch screen display, the display screen 1105 also has the ability to collect touch signals on the surface or above the surface of the display screen 1105. The touch signal can be input as a control signal to the processor 1101 for processing. At this time, the display screen 1105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1105, which is set on the front panel of the terminal device 1100; in other embodiments, there can be at least two display screens 1105, which are respectively set on different surfaces of the terminal device 1100 or in a folding design; in other embodiments, the display screen 1105 can be a flexible display screen, which is set on the curved surface or folding surface of the terminal device 1100. Even more, the display screen 1105 can be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0180] The camera assembly 1106 is used to capture images or videos. Optionally, the camera assembly 1106 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0181] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 1101 for processing, or input into the radio frequency circuit 1104 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each disposed at different locations of the terminal device 1100. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 1107 may also include a headphone jack.

[0182] Power supply 1108 is used to power various components in terminal device 1100. Power supply 1108 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1108 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired line, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also support fast charging technology.

[0183] In some embodiments, the terminal device 1100 further includes one or more sensors 1109 , including but not limited to: an acceleration sensor 1111 , a gyroscope sensor 1112 , a pressure sensor 1113 , an optical sensor 1114 , and a proximity sensor 1115 .

[0184] The accelerometer 1111 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the terminal device 1100. For example, the accelerometer 1111 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 1101 can control the display screen 1105 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 1111. The accelerometer 1111 can also be used to collect game or user motion data.

[0185] The gyroscope sensor 1112 can detect the body orientation and rotation angle of the terminal device 1100. The gyroscope sensor 1112 can work with the acceleration sensor 1111 to collect the user's 3D movements of the terminal device 1100. Based on the data collected by the gyroscope sensor 1112, the processor 1101 can implement the following functions: motion sensing (such as changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0186] The pressure sensor 1113 can be set on the side frame of the terminal device 1100 and / or the lower layer of the display screen 1105. When the pressure sensor 1113 is set on the side frame of the terminal device 1100, it can detect the user's grip signal of the terminal device 1100, and the processor 1101 performs left and right hand recognition or shortcut operations based on the grip signal collected by the pressure sensor 1113. When the pressure sensor 1113 is set on the lower layer of the display screen 1105, the processor 1101 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 1105. The operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0187] Optical sensor 1114 is used to collect ambient light intensity. In one embodiment, processor 1101 can control the display brightness of display screen 1105 based on the ambient light intensity collected by optical sensor 1114. Specifically, when the ambient light intensity is high, the display brightness of display screen 1105 is increased; when the ambient light intensity is low, the display brightness of display screen 1105 is decreased. In another embodiment, processor 1101 can also dynamically adjust the shooting parameters of camera assembly 1106 based on the ambient light intensity collected by optical sensor 1114.

[0188] Proximity sensor 1115, also known as a distance sensor, is typically located on the front panel of terminal device 1100. Proximity sensor 1115 is used to detect the distance between the user and the front of terminal device 1100. In one embodiment, when proximity sensor 1115 detects that the distance between the user and the front of terminal device 1100 is gradually decreasing, processor 1101 controls display screen 1105 to switch from the screen-on state to the screen-off state. When proximity sensor 1115 detects that the distance between the user and the front of terminal device 1100 is gradually increasing, processor 1101 controls display screen 1105 to switch from the screen-off state to the screen-on state.

[0189] Those skilled in the art will understand that the structure shown in FIG11 does not constitute a limitation on the terminal device 1100 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0190] Figure 12 is a schematic diagram of the structure of the server provided in an embodiment of the present application. The server 1200 may have relatively large differences due to different configurations or performances, and may include one or more processors 1201 and one or more memories 1202, wherein the one or more memories 1202 store at least one computer program, and the at least one computer program is loaded and executed by the one or more processors 1201 to implement the data processing methods provided in the above-mentioned various method embodiments. Exemplarily, the processor 1201 is a CPU. Of course, the server 1200 may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The server 1200 may also include other components for implementing device functions, which will not be described in detail here.

[0191] In an exemplary embodiment, a computer-readable storage medium is further provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned data processing methods.

[0192] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.

[0193] In an exemplary embodiment, a computer program or a computer program product is further provided. The computer program or the computer program product stores at least one computer program, which is loaded and executed by a processor to enable an electronic device to implement any of the above data processing methods.

[0194] It should be understood that the term "plurality" used herein refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0195] 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.

[0196] The above description is merely an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.

[0197] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

Claims

1. A data processing method, executed in an electronic device, comprising: Acquire first visual field information and a first sight point of a first virtual object, where the first sight point is a point located at a designated part of the first virtual object; Acquire a plurality of second sight points of a second virtual object, wherein the first virtual object and the second virtual object are located in the same three-dimensional scene, and each second sight point is a point located at a corresponding part of the second virtual object; Based on the first sight point and the first field of view information, detecting at least one second sight point to obtain a detection result of the at least one second sight point, wherein the detection result of each second sight point indicates whether the second sight point is visible from the first sight point; If the detection result of at least one second sight point indicates that the at least one second sight point is visible from the first sight point, the second virtual object is determined as a visible virtual object of the first virtual object.

2. The method according to claim 1, further comprising: Determining whether each of the plurality of second sight lines needs to be detected; When at least one second sight point needs to be detected, the detection of the at least one second sight point based on the first sight point and the first field of view information is performed to obtain a detection result of the at least one second sight point.

3. The method according to claim 1, wherein obtaining the first field of view information of the first virtual object comprises: Acquire initial first field of view information of the first virtual object; If the first virtual object meets the field of view update condition, updating the first field of view information to obtain updated first field of view information; Among them, the field of view update condition includes at least one of a first situation, a second situation and a third situation. The first situation is that the height between the edge of the horizontal field of view of the first virtual object and the virtual ground meets the height condition. The second situation is that the virtual weather in the virtual environment where the first virtual object is located changes. The third situation is that the combat status of the first virtual object changes, and the combat status represents whether the first virtual object is in combat with other virtual objects.

4. The method according to claim 3, wherein the field of view update condition includes that the height satisfies the height condition, and before updating the first field of view information to obtain the updated first field of view information, the method further includes: If the first virtual object is initialized or the first virtual object moves, the height is determined based on the first sight point and the first field of view information.

5. The method according to claim 4, wherein the height satisfies the height condition including that the height is greater than the first height threshold, and the first field of view information includes a first field of view distance; and the updating of the first field of view information to obtain the updated first field of view information includes: Expanding the first field of view distance based on the height to obtain a second field of view distance; If the second field of view distance is greater than the first field of view threshold, determining the updated first field of view information based on the first field of view threshold; If the second field of view distance is not greater than the first field of view threshold, the updated first field of view information is determined based on the second field of view distance.

6. The method according to claim 4, wherein the height satisfies the height condition including that the height is less than the second height threshold, and the first field of view information includes a first field of view distance; and the updating of the first field of view information to obtain the updated first field of view information includes: Reduce the first field of view distance based on the height to obtain a third field of view distance; If the third field of view distance is less than the second field of view threshold, determining the updated first field of view information based on the second field of view threshold; If the third field of view distance is not less than the second field of view threshold, the updated first field of view information is determined based on the third field of view distance.

7. The method according to claim 3, wherein the vision update condition includes a change in the virtual weather; and the updating of the first vision information to obtain the updated first vision information includes: Obtaining change information of the virtual weather; If the change information of the virtual weather indicates that visibility is reduced, the visual field corresponding to the first visual field information is reduced to obtain a visual field representing acquiring the updated first field of view information of the narrowed field of view; If the change information of the virtual weather indicates that visibility is improved, the visual field corresponding to the first visual field information is expanded to obtain the updated first visual field information indicating the expanded visual field.

8. The method according to claim 3, wherein the field of view update condition includes a change in the combat state; and the updating of the first field of view information to obtain the updated first field of view information includes: If the changed combat state indicates that the first virtual object is in combat with other virtual objects, narrowing the field of view corresponding to the first field of view information to obtain the updated first field of view information indicating the narrowed field of view; If the changed combat state indicates that the first virtual object does not engage in combat with other virtual objects, the field of view corresponding to the first field of view information is expanded to obtain the updated first field of view information indicating the expanded field of view.

9. The method according to claim 8, wherein the first field of view information includes field of view information of a first level, field of view information of a second level, and field of view information of a third level, a first field of view range corresponding to the field of view information of the first level includes a second field of view range corresponding to the field of view information of the second level, and the second field of view range includes a third field of view range corresponding to the field of view information of the third level, and the method further comprises: If the visible virtual object exists within the third field of view, or if the visible virtual object exists within a field of view other than the third field of view in the second field of view and the visible virtual object is in a first posture, determining that the combat state is a first state, the first state representing that the first virtual object is in combat with another virtual object; If the visible virtual object exists in the second field of view except the third field of view and the visible virtual object is in the second posture, or if the visible virtual object exists in the first field of view except the second field of view, then the combat state is determined to be the second state, and the second state indicates that the first virtual object does not engage in combat with other virtual objects.

10. The method according to any one of claims 1 to 9, wherein the updated first field of view information includes a plurality of sub-field of view information, and the detecting at least one second field of view point based on the first field of view point and the first field of view information to obtain a detection result of the at least one second field of view point comprises: If the first detection condition and the second detection condition are met, determining the detection result of the at least one second sight point as a first result, the first result indicating that any of the second sight points is visible from the first sight point, the first detection condition being that a line connecting the first sight point and the at least one second sight point is within a field of view corresponding to at least one sub-field of view information, and the second detection condition being that the line does not pass through an opaque object; If at least one of the first detection condition and the second detection condition is not satisfied, the detection result of the at least one second sight line point is determined to be a second result, where the second result indicates that the at least one second sight line point is not visible to the first virtual object.

11. The method according to claim 2, wherein the second virtual object is at least one; the method further comprising: Acquire the detection priority of each second virtual object and the detection priority of each second sight point; For any second sight line point, obtaining a current detection number, the current detection number being the sum of a first detection number and a second detection number, the first detection being a detection of a second sight line point of a second virtual object whose detection priority is before a second virtual object where any second sight line point is located, and the second detection being a detection of a second sight line point on the second virtual object where any second sight line point is located whose detection priority is before any second sight line point; If the current detection number is less than the detection number threshold, it is determined that any second sight point needs to be detected.

12. The method according to claim 11, wherein the first field of view information includes a plurality of sub-field of view information, and the step of obtaining the detection priority of each second virtual object includes: For any second virtual object, based on the position of the any second virtual object, determine the sub-field of view information of the any second virtual object; Based on the distance between the first virtual object and any one of the second virtual objects and the sub-field of view information of any one of the second virtual objects, a detection priority of any one of the second virtual objects is determined.

13. A data processing device, comprising: An acquisition module, configured to: acquire first visual field information and a first sight point of a first virtual object, wherein the first sight point is a point located at a designated part of the first virtual object; Acquire a plurality of second sight points of a second virtual object, wherein the first virtual object and the second virtual object are located in the same three-dimensional scene, and each second sight point is a point located at a corresponding part of the second virtual object; a detection module, configured to detect at least one second sight point based on the first sight point and the first visual field information to obtain a detection result of the at least one second sight point, wherein the detection result of each second sight point indicates whether the second sight point is visible from the first sight point; A determination module is configured to determine the second virtual object as a visible virtual object of the first virtual object if a detection result of at least one second sight point indicates that the at least one second sight point is visible from the first sight point.

14. An electronic device, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor, so that the electronic device implements the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to enable an electronic device to implement the method according to any one of claims 1 to 12.

16. A computer program product, wherein at least one computer program is stored in the computer program product, and the at least one computer program is loaded and executed by a processor to enable an electronic device to implement the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Visual field control method and device for virtual objects, storage medium and computer equipment

    CN111589115A

  • Virtual object control method and device, electronic equipment and storage medium

    CN111921200A

  • Game display control method and device, storage medium and electronic equipment

    CN114642881A

  • Visible virtual object determination method, apparatus and device, and readable storage medium

    CN116943215A

  • User interface discovery and interaction for three-dimensional virtual environments

    US20190114835A1