CN116943216A - Laminating relation detection method, laminating relation detection device, laminating relation detection equipment and storage medium - Google Patents

Laminating relation detection method, laminating relation detection device, laminating relation detection equipment and storage medium Download PDF

Info

Publication number
CN116943216A
CN116943216A CN202211456693.6A CN202211456693A CN116943216A CN 116943216 A CN116943216 A CN 116943216A CN 202211456693 A CN202211456693 A CN 202211456693A CN 116943216 A CN116943216 A CN 116943216A
Authority
CN
China
Prior art keywords
target
target object
collision body
collision
search result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211456693.6A
Other languages
Chinese (zh)
Inventor
王凯
刘子强
校莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211456693.6A priority Critical patent/CN116943216A/en
Publication of CN116943216A publication Critical patent/CN116943216A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • A63F13/577Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using determination of contact between game characters or objects, e.g. to avoid collision between virtual racing cars
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides a fitting relation detection method, a fitting relation detection device, fitting relation detection equipment and a storage medium; in the application, target data corresponding to a target object in a game scene is acquired in response to a fitting relation detection instruction; wherein the target data includes: modeling grid information of the target object; based on modeling grid information, constructing a model surface patch of the target object at any view angle, and determining the normal line of the model surface patch; carrying out collision body searching based on the direction of the normal line, and obtaining a first searching result, wherein the first searching result is characterized in that: whether the target object collides with the corresponding target collision body; based on the first search result, obtaining a fitting relation between the target object and the target collision body; the laminating relation is as follows: the target object coats the target collision body, the target collision body coats the target object, or no target collision body is provided for the target object. And the detection of the fitting relation between the target object and the target collision body is realized, and the efficiency and the accuracy are improved.

Description

Laminating relation detection method, laminating relation detection device, laminating relation detection equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting a bonding relationship.
Background
With the development of technology, the hand-tour end game has become a major part of life and entertainment. In the process of controlled movement of an object in a game scene, in order to improve visual effect of a picture, game experience and game authenticity, the object can be in physical contact with or collide with other objects. As such, collision volumes capable of achieving physical manifestations are set for objects in a game scene so as to simulate physical collisions.
However, the fit relationship between the object and the corresponding collision body is not good, and there are cases where the collision body is larger than the object, and cases where the collision body is smaller than the object. When the collision body is larger than the object, a floating problem can occur in the game scene, and when the collision body is smaller than the object, a mold penetrating problem occurs in the game scene. Therefore, whether the collision body is larger than the object or the object is larger than the collision body, abnormal display of the game picture and unrealistic visual perception are caused, and the game experience is reduced. Therefore, it is necessary to perform object-collision-body fit relation detection before the hand-tour end is formally put on line.
In the related art, the method mainly relies on the behaviors of a tester for controlling the movement, jump and the like of objects in a three-dimensional scene to realize the collision and interaction between the objects, and judges whether the problem of mold penetration and the problem of floating exist or not through observation. The whole test process is time-consuming and labor-consuming, and the judgment conclusion of the same problem can be different due to the difference of experience and subjective feeling of different testers, so that the test result is unstable, and the problems of omission, judgment error and the like can also occur.
Therefore, how to automatically detect the fit relation between the target object and the target collision body, and improving the detection efficiency and accuracy are the technical problems to be solved at present.
Disclosure of Invention
The application provides a fitting relation detection method, a fitting relation detection device, fitting relation detection equipment and a storage medium, which are used for automatically detecting the fitting relation of a target object and a target collision body, and improving detection efficiency and accuracy.
In a first aspect, an embodiment of the present application provides a method for detecting a fit relationship, where the method includes:
responding to the fitting relation detection instruction, and acquiring target data corresponding to a target object in the game scene; wherein the target data includes: modeling grid information of the target object;
based on modeling grid information, constructing a model surface patch of the target object at any view angle, and determining the normal line of the model surface patch;
searching a collision body based on the direction of the normal line to acquire a first searching result; wherein, the first search result characterizes: whether the target object collides with the corresponding target collision body;
based on the first search result, obtaining a fitting relation between the target object and the target collision body; wherein, the laminating relation is: the target object is covered with the target collision body, and the target collision body is covered with the target object, or the target collision body is not arranged for the target object.
In a second aspect, an embodiment of the present application provides a fitting relation detecting apparatus, including:
the acquisition unit is used for responding to the fitting relation detection instruction and acquiring target data corresponding to a target object in the game scene; wherein the target data includes: modeling grid information of the target object;
the construction unit is used for constructing a model surface patch of the target object at any view angle based on modeling grid information and determining the normal line of the model surface patch;
the searching unit is used for searching the collision body based on the normal direction and acquiring a first searching result; wherein, the first search result characterizes: whether the target object collides with the corresponding target collision body;
the obtaining unit is used for obtaining the fitting relation between the target object and the target collision body based on the first searching result; wherein, the laminating relation is: the target object is covered with the target collision body, and the target collision body is covered with the target object, or the target collision body is not arranged for the target object.
In one possible implementation, modeling grid information includes: a vertex position coordinate set of the target object and at least one vertex index array; wherein each vertex index array comprises index values of a plurality of vertices;
The construction unit is specifically used for:
selecting vertex position coordinates corresponding to the index values of the plurality of vertexes in the vertex position coordinate set based on the index values of the plurality of vertexes in each vertex index data aiming at each vertex index array in at least one vertex index array;
and constructing a model surface piece of the target object at any view angle based on the selected vertex position coordinates.
In one possible implementation, the construction unit is specifically configured to:
when the vertex position coordinates are detected to be values under the model coordinate system, converting the vertex position coordinates into target position coordinates under the world coordinate system;
and constructing a model surface piece of the target object at any view angle based on the converted target position coordinates.
In one possible implementation, the search unit is specifically configured to:
taking the central position of the molded panel as a starting point, and searching a collision body along the normal direction; wherein the center position is determined based on an average of vertex position coordinates of all vertices in the molded panel.
In one possible implementation, the obtaining unit is specifically configured to:
determining a first search result for characterizing: the method comprises the steps that when a target object collides with a target collision body, a first distance between the central position of a molded panel and the position of a first collision point is obtained;
And when the first distance is larger than a set first threshold value, acquiring a fitting relation that the target collision body coats the target object, and marking the positions of all the vertexes of the molded surface piece in frame data corresponding to the game scene.
In one possible implementation, the obtaining unit is specifically configured to:
determining a first search result for characterizing: if the target object does not collide with the target collision body, searching a second collision body based on the opposite direction of the normal line, and acquiring a second searching result; wherein the second search result is used to characterize: whether the target object collides with the target collision body;
and obtaining the fitting relation between the target object and the target collision body based on the second searching result.
In a possible implementation, the obtaining unit is further configured to:
determining a second search result for characterizing: the target object collides with the target collision body, and then a second distance between the central position of the die surface piece and the second collision point position is obtained;
and when the second distance is larger than a set second threshold value, acquiring a fitting relation as a target object covering target collision body, and marking the positions of all the vertexes of the molded surface piece in frame data corresponding to the game scene.
In a possible implementation, the obtaining unit is further configured to:
Determining a second search result for characterizing: the target object does not collide with the target collision body, the attaching relation is that the target collision body is not set for the target object, and the bounding box of the target object is marked in frame data corresponding to the game scene.
In a possible implementation, the obtaining unit is further configured to:
and based on the first search result, after the bonding relation between the target object and the target collision body is obtained, storing a detection record of bonding relation detection into a database.
In a possible implementation, the obtaining unit is further configured to:
based on the first search result, after the attaching relation between the target object and the target collision body is obtained, the detection record is presented in a list form; wherein, in the list, include: at least one of a location of the target object, a name of the target object, and a number of vertices.
In one possible implementation, the obtaining unit is specifically configured to:
calling an iterator to obtain a static grid model of a target object in a game scene;
target data of the target object is extracted from the static grid members of the static grid model.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor, wherein the memory is for storing computer instructions; and the processor is used for executing the computer instructions to realize the steps of the fitting relation detection method provided by the embodiment of the application.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, where computer instructions are stored, where the computer instructions, when executed by a processor, implement the steps of the bonding relationship detection method provided by the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product comprising computer instructions stored in a computer readable storage medium; when the processor of the electronic device reads the computer instructions from the computer readable storage medium, the processor executes the computer instructions, so that the electronic device executes the steps of the fitting relation detection method provided by the embodiment of the application.
The application has the following beneficial effects:
the embodiment of the application provides a fitting relation detection method, a fitting relation detection device, fitting relation detection equipment and a storage medium, and relates to the technical field of computers; in the application, when determining that the joint relation detection is required, firstly, acquiring target data corresponding to a target object in a game scene, wherein the target data comprises: modeling grid information of the target object; then, constructing a model surface patch of the target object at any view angle based on modeling grid information, and determining the normal line of the model surface patch; then, searching for a collision body based on the normal direction, and acquiring a first searching result used for representing whether collision occurs with a corresponding target collision body; and finally, obtaining the fitting relation between the target object and the target collision body based on the first searching result. The realization mode for automatically detecting the bonding relation between the target object and the target collision body effectively avoids the problems of inefficiency and error caused by manual identification, and improves the detection efficiency and accuracy. Further, when the fit relation is that the target object covers the target collision body, or the target collision body is not set for the target object, the problem of mold penetration is determined to exist, or when the fit relation is that the target collision body covers the target object, the problem of floating caused by overlarge collision body setting is determined to exist; the rationality of collision body setting is effectively detected.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained based on these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of a game piece falling upon placement of a simple collision body;
FIG. 2 is a schematic view showing a game piece falling when a complex collision body is provided;
FIG. 3 is a schematic illustration of a game piece floating;
FIG. 4 is a schematic illustration of a game piece being molded;
FIG. 5 is a schematic illustration of the normal appearance of a game piece when an object is engaged with a collision volume;
fig. 6 is a schematic diagram of an application scenario provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of a fitting relation detection based on a game editor according to an embodiment of the present application;
FIG. 8 is a flowchart of a method for detecting a fit relationship according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a model patch for constructing a target object according to an embodiment of the present application;
FIG. 10 is a schematic illustration of determining normals for collision volume lookup according to an embodiment of the present application;
FIG. 11 is a schematic diagram of performing radiation detection according to an embodiment of the present application;
FIG. 12 is a schematic diagram of detecting an oversized collision body according to an embodiment of the present application;
FIG. 13 is a schematic diagram of an oversized marker collision body arrangement according to an embodiment of the present application;
FIG. 14 is a schematic view of detecting a collision body that is too small according to an embodiment of the present application;
FIG. 15 is a schematic diagram of a mold-through mark according to an embodiment of the present application;
FIG. 16 is a schematic diagram of a display mode of a detection record according to an embodiment of the present application;
FIG. 17 is a flowchart of a specific implementation method for detecting a fitting relationship according to an embodiment of the present application;
FIG. 18 is a block diagram of a fitting relation detecting device according to an embodiment of the present application;
FIG. 19 is a block diagram of an electronic device according to an embodiment of the present application;
Fig. 20 is a block diagram of another electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantageous effects of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In order to facilitate a better understanding of the technical solutions of the present application, the following description will describe some of the concepts related to the present application.
Collision body: is the basis of a touch, collision between objects. A contact collision between any two objects is actually a contact of the collision body. If one of the two objects has no collision body, the two objects will produce penetration effect when touching or collision. And the effect of the collision is determined by the shape and size of the collision body.
The object is: any object appearing in the game scene, such as a house, car, tree, stone, game character, etc., has a three-dimensional model, which may also be referred to as an object model. The target object in the embodiment of the application is any object in the game scene, and the target object and the target collision body are relatively speaking, for example, if the target object is a house, the target collision body is a collision body set for the house.
Fitting relation: is the degree of fit between the target object and the target collision body; comprising the following steps: the target object is larger than the target collision body (i.e. the target object covers the target collision body), the target object is smaller than the target collision body (i.e. the target collision body covers the target object), and the target object and the target collision body are just fit (i.e. the size and the volume of the target object and the target collision body are consistent).
The word "exemplary" is used hereinafter to mean "serving as an example, embodiment, or illustration. Any embodiment described as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The terms "first," "second," and the like herein are used for descriptive purposes only and are not to be construed as either explicit or implicit relative importance or to indicate the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more features, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
The following briefly describes the design concept of the embodiment of the present application:
with the development of technology, the hand-tour end game has become a major part of life and entertainment. In order to enhance the visual effect of the pictures in the game scene, enhance the game experience and the game reality, collision bodies capable of realizing physical expression are set for various objects appearing in the game scene so as to simulate physical collision or physical contact generated between the objects.
In the related art, the collider is largely divided into a simple collider and a complex collider; wherein, the simple collision body mainly uses a capsule body, a box body and the like; the complex collision volume is arranged in the form of a triangular mesh.
The simple collision body setting mode is simple, the calculated amount is low, the precision is low, and the expressive ability in a game scene is poor. Referring specifically to fig. 1, fig. 1 is a schematic view showing a game piece falling down when a simple collision body is provided, and it is known from fig. 1 that both the game piece and the game seat are provided with a simple collision body, and when the game piece falls down, it does not fall onto the game seat but falls beside the game seat.
The complex collision body is complex in setting mode, large in calculation amount, high in precision and strong in expressive ability in a game scene. Referring specifically to fig. 2, fig. 2 is a schematic view showing a game piece falling when a complex collision body is provided, and it is known from fig. 2 that a game piece is provided with a simple collision body and a game seat is provided with a complex collision body, and when the game piece falls, the game piece can just fall onto the game seat.
However, there is a problem that the adhesion relationship between the object and the target collision body is not good regardless of whether the complex collision body or the simple collision body is provided; for example: there are cases where the collision volume is not fully covered, i.e. the collision volume is smaller than the object, or where the collision volume is set too large, i.e. the collision volume is larger than the object.
When the collision body is larger than the object, a floating problem can occur in the game scene; referring to fig. 3, fig. 3 is a schematic diagram showing a game character floating according to an embodiment of the present application, and it can be seen from fig. 3 that a collision body (a solid square shown in fig. 3) of a base (a solid square shown in fig. 3) is larger than the base itself, and when the game character touches the collision body, the game character is considered to have fallen on the base, but in actual display, the game character does not fall on the base, but the floating problem is presented.
When the collision body is smaller than the object, the problem of mold penetration occurs in the game scene; referring to fig. 4, fig. 4 is a schematic diagram of a game piece mold according to an embodiment of the present application, and it can be seen from fig. 4 that a collision body (a solid square shown in fig. 4) of a base (a dotted square shown in fig. 4) is smaller than the base itself, and when the game piece contacts the collision body, a part of the game piece is located inside the base, so that the problem of mold penetration of the game piece is presented.
Therefore, only when the object and the collision body are completely attached, the game character can be normally represented in the game scene, and referring to fig. 5, fig. 5 is a schematic diagram showing the normal representation of the game character when the object and the collision body are attached in the embodiment of the present application. Therefore, whether the collision body is larger than the object or the object is larger than the collision body, abnormal display of the game picture and unrealistic visual perception are caused, and the game experience is reduced. Therefore, it is necessary to detect the fitting relationship between the object and the collision body before the hand-free end trip is formally put on line.
In the related art, the method mainly relies on the behaviors of a tester for controlling the movement, jump and the like of objects in a three-dimensional scene to realize the collision and interaction between the objects, and judges whether the problem of mold penetration and the problem of floating exist or not through observation. The whole test process is time-consuming and labor-consuming, and the judgment conclusion of the same problem can be different due to the difference of experience and subjective feeling of different testers, so that the test result is unstable, and the problems of omission, judgment error and the like can also occur.
Therefore, how to automatically detect the fit relation between the target object and the target collision body, and improving the detection efficiency and accuracy are the technical problems to be solved at present.
In view of the above, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for detecting a bonding relationship between a target object and a target collision body, so as to improve detection efficiency and accuracy.
In the embodiment of the application, in response to a fitting relation detection instruction, determining that fitting relation detection between a target object and a target collision body is required, and when determining that fitting relation detection is required, firstly acquiring target data corresponding to the target object in a game scene, wherein the target data comprises: modeling grid information of the target object; then, constructing a model surface patch of the target object at any view angle based on modeling grid information, and determining the normal line of the model surface patch; then, searching a collision body based on the normal direction, and acquiring a first searching result used for representing whether collision occurs with a target collision body; and finally, obtaining the fitting relation between the target object and the target collision body based on the first searching result.
The realization mode for automatically detecting the bonding relation between the target object and the target collision body effectively avoids the problems of inefficiency and error caused by manual identification, and improves the detection efficiency and accuracy. In the detection process, according to modeling grid information of the target object, a model surface patch is determined, and collision detection is carried out along the normal direction of the model surface patch, whether a complex collision body or a simple collision body is arranged for the target object, the application can realize the detection of the degree of fit between the target object and the collision, and the application does not need to be respectively adapted to the simple collision body and the complex collision body, thereby having universality. Further, when the bonding relationship is obtained as the target object coating target collision body, or the bonding relationship is that the target collision body is not set for the target object, the mold penetrating problem is determined to exist, or when the bonding relationship is obtained as the target collision body coating target object, the floating problem caused by overlarge collision body setting is determined to exist; the rationality of collision body setting is effectively detected.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present application, and embodiments of the present application and features of the embodiments may be combined with each other without conflict.
Referring to fig. 6, fig. 6 is a schematic diagram of an application scenario according to an embodiment of the present application. The application scenario includes a terminal device 610 and a server 620, where the terminal device 610 and the server 620 may communicate through a communication network.
In an alternative embodiment, the communication network may be a wired network or a wireless network. Accordingly, the terminal device 610 and the server 620 may be directly or indirectly connected through wired or wireless communication. For example, the terminal device 610 may be indirectly connected to the server 620 through a wireless access point, or the terminal device 610 may be directly connected to the server 620 through the internet, which is not limited herein.
In the embodiment of the present application, the terminal device 610 includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a desktop computer, an electronic book reader, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, and the like; the terminal device can be provided with various clients, and the clients can be application programs (such as a browser, game software and the like) supporting the laminating relation detection function, web pages, plug-ins, applets and the like;
the server 620 is a backend server corresponding to a client installed in the terminal apparatus 610. The server 620 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), basic cloud computing services such as big data and artificial intelligence platforms, and the like.
It should be noted that, the method for detecting the attachment relationship in the embodiment of the present application may be performed by an electronic device, which may be the server 620 or the terminal device 610, that is, the method may be performed by the server 620 or the terminal device 610 separately, or may be performed by the server 620 and the terminal device 610 together.
When the terminal device 610 executes alone, for example, the terminal device 610 may respond to the laminating relation detection instruction to obtain modeling grid information corresponding to the target object in the game scene; based on modeling grid information, constructing a model surface patch of the target object at any view angle, and determining the normal line of the model surface patch; searching a collision body based on the direction of the normal line, and acquiring a first searching result used for representing whether collision occurs with a target collision body; and obtaining the fitting relation between the target object and the target collision body based on the first searching result.
When the server 620 executes alone, for example, the server 620 may respond to the fitting relation detection instruction to obtain modeling grid information corresponding to the target object in the game scene and attribute information of the target collision body having a coating relation with the target object; based on modeling grid information, constructing a model surface patch of the target object at any view angle, and determining the normal line of the model surface patch; searching a collision body based on the direction of the normal line, and acquiring a first searching result used for representing whether collision occurs with a target collision body; and obtaining the fitting relation between the target object and the target collision body based on the first searching result.
When the server 620 and the terminal device 610 jointly execute, for example, the terminal device 610 may respond to the instruction for detecting the fit relationship, obtain the target data corresponding to the target object in the game scene, and then transmit the target data to the server. Constructing a model surface patch of the target object at any view angle based on modeling grid information in the target data by a server, and determining a normal line of the model surface patch; searching a collision body based on the direction of the normal line, and acquiring a first searching result used for representing whether collision occurs with a target collision body; and obtaining the fitting relation between the target object and the target collision body based on the first searching result.
In the following, the server alone is mainly used as an example, and the present application is not limited thereto.
In a specific implementation, a bonding relationship detection instruction may be input in the terminal device 610, where the terminal device 610 sends the bonding relationship detection instruction to the server 620, and after receiving the bonding relationship detection instruction, the server 620 may determine the bonding relationship between the target object and the target collision body by using the bonding relationship detection method according to the embodiment of the present application.
It should be noted that, the number of the terminal devices 610 and the servers 620 shown in fig. 6 is merely illustrative, and the number of the terminal devices and the servers 620 are not limited in practice, and are not particularly limited in the embodiment of the present application.
In the embodiment of the present application, when the number of servers 620 is plural, plural servers 620 may be formed into a blockchain, and the servers 620 are nodes on the blockchain; and the target data and the like related to the laminating relation detection method disclosed by the embodiment of the application can be stored on the blockchain.
Next, an application program supporting the laminating relation detection function is embedded in the game editor in the form of a plug-in, and a scene of quickly performing laminating relation detection in the game editor is taken as an example to simply describe laminating relation detection in the embodiment of the application.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating detection of a laminating relationship based on a game editor according to an embodiment of the present application; wherein, this game editor includes: a game running instance and a fitting relation detection tool embedded in a plug-in form; and the laminating relation detection tool comprises: and the laminating relation detection module and the result display module are used for detecting the laminating relation.
Illustratively, after the game is initiated in the editor, a fit relationship between the target object and the target collision volume in the game scene is detected using a fit relationship detection tool. At this time, the fit relation detection module may read target data of all target objects in the running game instance, detect the fit relation between the corresponding target object and the target collision body based on the target data, and identify problematic vertices in the game scene. After the detection is completed, the result display module displays the detection result in a window in a list form in the edit, and meanwhile, the detection result is stored in a database.
In the application, the detection of the attaching relation is realized in the form of the plug-in, the transplanting can be carried out on different projects, and the applicability is strong. And the collision fit relation of the model in the game scene can be efficiently detected, and the detection time of all objects in the large-scale game scene within 10 square kilometers is not more than 10 minutes, so that the testing manpower and the testing time can be greatly saved. Meanwhile, the objects with collision bodies arranged in the game scene are detected in a full quantity, so that the objects in the mountain holes in the game scene, the positions which are easily ignored in manual tests such as the tops of buildings and the like can be covered, and the test precision can be effectively improved.
The item is not limited to a game, and may be any item having a three-dimensional model, and a collision body is provided for the three-dimensional model.
The following describes the fitting relation detection method provided in the exemplary embodiment of the present application based on the drawings in conjunction with the application scenario described above, and it should be noted that the application scenario is only shown for the convenience of understanding the spirit and principle of the present application, and the embodiment of the present application is not limited in any way in this respect.
Referring to fig. 8, fig. 8 is a flowchart of a method for detecting a bonding relationship according to an embodiment of the present application, including the following steps:
Step S800, responding to the fitting relation detection instruction, and acquiring target data corresponding to a target object in the game scene; wherein the target data includes: modeling mesh information of the target object.
In one possible implementation, the determination is made that the fit relationship detection between the target object and the target collision volume is required in response to the fit relationship detection instruction. When determining that the fitting relation detection is needed, calling an iterator to acquire a static grid model of a target object in a game scene; and extracting target data of the target object from the static grid parts of the static grid model.
Taking the phantom Engine (un real Engine) as an example:
the Unreal Engine comprises a static mesh model (StaticMeshActor) corresponding to all objects in the game scene; each statismessator includes one or more static grid elements (statismessary) in which modeling grid information of a corresponding target object and attribute information of a target collision body having a cladding relation with the target object are stored.
Therefore, in another possible implementation manner, the obtaining the target data corresponding to the target object in the game scene further includes: attribute information of a target collision body having a coating relationship with the target object.
Illustratively, when determining that the fit relation detection is required, firstly, calling an iterator TAactorItator < ASTATICMeshuactor >, and traversing all the StaticMeshacators in the game scene through the iterator; then, target data is acquired from the staticaleshocomponent of the staticaleshoactor, so that subsequent fitting relation detection can be performed through the acquired target data.
Optionally, the target data is obtained from staticmeshcomplement- > getstaticmesmesh () - > Renderdata. Modeling grid information and attribute information of a target collision body with a coating relation with a target object are stored in the Renderdata; wherein modeling mesh information includes: a vertex position array (locationvertexBuffer) of the target object, and at least one vertex index array (IndexBuffer); the vertex position arrays are vertex position coordinate sets, each index array comprises at least three data, each data is used for representing the index value corresponding to the vertex in the position vertex buffer array, namely, each data is used for representing the index value of one vertex.
Step S801, based on modeling grid information, a model surface patch of the target object at any view angle is constructed, and a normal line of the model surface patch is determined.
Due to modeling mesh information, including: a vertex position coordinate set of the target object and at least one vertex index array; and each vertex index array comprises index values of a plurality of vertices. Therefore, based on at least one vertex index array and a vertex position coordinate set, a model surface patch of all view angles of the target object can be constructed.
Taking as an example a die-side sheet that builds a view angle:
when a model surface patch is constructed, firstly, determining a vertex index array in modeling grid information, and determining all index values contained in the vertex index array; then, based on the index values, obtaining vertex position coordinates corresponding to all the index values in a vertex position coordinate set; and finally, constructing a model surface patch of the target object based on all the acquired vertex position coordinates.
In one possible implementation, since the vertex position coordinates stored in the positional vertexbuffer are values under the model coordinate system, when constructing a model patch of the target object based on the vertex position coordinates, it is necessary to convert the vertex position coordinates under the model coordinate system into target position coordinates under the world coordinate system; and constructing a model surface patch of the target object based on the converted target position coordinates.
Illustratively, the vertex position coordinates in the model coordinate system are converted to target position coordinates in the world coordinate system by ComponentLocation and ComponentTransform of statismeshcomponent. And constructing a plane where the modeling panel is located by using the FPLane structure and the vertex position coordinates provided in the Unreal Engine.
Taking three data included in a vertex index array as an example:
referring to fig. 9, fig. 9 is a schematic diagram of a model patch according to an embodiment of the present application. The model surface piece is set to be a triangular surface piece, and three vertexes of the triangular surface piece correspond to one vertex index array. If the index values corresponding to the three vertexes in the vertex index array are 2,1 and 0 respectively; the position coordinates of the three vertices respectively correspond to the coordinate information of pos2 at the 2 nd position, the coordinate information of pos1 at the first position and the coordinate information of pos0 at the 0 th position in the vertex position coordinate set. After the position coordinates of the three vertexes are obtained, a model surface patch can be constructed according to the three vertex position coordinates.
It should be noted that, three points may form a plane, so the vertex index array includes at least three index values, but in the embodiment of the present application, the index values included in the vertex index array are not limited to three, but may be four, five, etc.
Step S802, searching a collision body based on the normal direction to acquire a first searching result; wherein, the first search result characterizes: whether the target object collides with the target collision body.
In the embodiment of the application, in order to improve the accuracy of a detection result, a method for detecting whether a collision body exists in front of or behind a molded surface piece along the normal direction of the molded surface piece by using a ray detection method is provided, and the distance between the molded surface piece and the collision body in front of or behind the molded surface piece is determined so as to determine the fitting relation between a target object and the target collision body based on the detection result.
In one possible implementation, using a ray detection method to search for a collision volume along the normal direction with the center position of the model patch as a starting point; wherein the center position is determined based on an average of vertex position coordinates of all vertices in the molded panel.
Referring to fig. 10, fig. 10 is a schematic diagram of determining a normal line for collision volume search according to an embodiment of the present application. Setting the model surface piece as a triangular surface piece, and adopting the position (pos 0+ pos1+ pos 2)/3 as the center position of the model surface piece after three vertexes of the triangular surface piece are pos0, pos1 and pos2 respectively; then, a normal line passing through the center position of the mold surface sheet is obtained by using the GetNormal method of FPlane, and the bonding relationship is detected by using a radiation detection method in the direction of the normal line with the center position as a starting point.
The first search result at least comprises: whether there is a collision body in the direction of the normal line, attribute information of the first collision body in the direction, and first distance information with the first collision body.
Exemplary, ray detection is performed in the direction of the normal line by using the LineTraceByObjectType method in the ureal Engine, and referring to fig. 11, fig. 11 is a schematic diagram for performing ray detection according to an embodiment of the present application.
When the ray is blocked by the first object, and it is determined that a collision occurs in the process of ray detection, the linewrapper byobjecttype returns true to indicate that a collision body exists, and returns an FHitResult structure, where detailed information such as position information of the collision body, distance between the collision body and the collision body, attribute information of the collision body, and the like are stored. When no collision occurs in the process of ray detection, the LinetraceByObjectType returns to false directly.
Therefore, when a collision occurs, the first search result includes an indication of the occurrence of the collision and attribute information of the collision body, so as to determine whether the collision body is a target collision body according to the attribute information of the collision body; when no collision occurs, the first search result includes an indication that no collision has occurred, so there must be no collision with the target collision volume.
It should be noted that, the ObjectType of the statismeshaactor is generally set to world static, so the first object to block rays is a world static object.
Step S803, based on the first search result, a fitting relationship between the target object and the target collision body is obtained.
Wherein, the laminating relation is: the target object is covered with the target collision body, and the target collision body is covered with the target object, or the target collision body is not arranged for the target object.
Since the first search result is used to characterize whether a collision with a target collision volume occurs, there are two situations, collision with a target collision volume and no collision with a target collision volume, respectively. These two cases will be described in detail below.
Case one: the first search result characterizes a collision with a target collision volume.
In one possible implementation manner, when the first search result is determined to be used for representing that the first search result collides with the target collision body, the molded surface piece is stated to be positioned in the target collision body, and at the moment, the target collision body covers the target object, so that the problem of floating caused by oversized target collision body is solved.
Therefore, in order to ensure detection accuracy, when determining that the first search result is used for representing collision with the target collision body, acquiring a first distance between the central position of the molded surface piece and the first collision point position; and when the first distance is determined to be larger than the set first threshold value, obtaining the fit relationship to enable the target collision body to cover the target object, namely, the target collision body is excessively arranged.
Referring to fig. 12, fig. 12 is a schematic diagram illustrating an oversized collision body detection device according to an embodiment of the present application. When the ray detection generates collision and the collision body is a target collision body corresponding to the detected target object, the die surface sheet is described as being positioned in the target collision body, and at the moment, a first distance between the die surface sheet and the collision surface in the normal direction needs to be further determined so as to determine whether the collision body is excessively large or not based on the first distance. At this time, a starting point is selected from the center of the model surface patch along the normal direction outside the collision body, a ray is emitted from the starting point to the center of the model surface patch, the ray generates an intersection point with the collision body, namely a first collision point, a first distance between the position of the first collision point and the center position of the model surface patch is determined, and if the first distance is larger than a set first threshold value, the collision body is set to be too large.
In another possible implementation manner, when the first distance is determined to be less than or equal to the set first threshold, the fitting relationship is obtained to ensure that the target collision body and the target object are normally fitted, and at this time, in the game scene, collision between the objects is normal.
In the embodiment of the application, in order to facilitate subsequent modification and viewing, when determining that the fitting relation is that the target collision body covers the target object, marking each vertex position of the molded surface piece in frame data corresponding to a game scene; referring to fig. 13, a schematic diagram of an oversized marker collision body is provided in an embodiment of the present application. As can be seen from fig. 13, the vertex positions of the mold pieces are specially marked, as is the mesh filling portion shown in fig. 13, which corresponds to the vertex positions of the mold pieces.
And a second case: the first search result characterizes a non-collision with the target collision volume.
In one possible implementation, the determining of the first search result is used to characterize that the die surface piece is outside the target collision body when the first search result is not used to characterize that the die surface piece is not collided with the target collision body, and then a die penetration problem exists. But the cases that lead to the problem of mold penetration are divided into: the target object coats the target collision body, namely the problem of mold penetration caused by too small setting of the target collision body; there is also a problem of mold penetration caused by the absence of a collision body.
In an embodiment of the present application, no collision with a target collision body occurs, including: there is no collision body, there is at least one of the other collision bodies that is not the target collision body.
Therefore, in order to ensure the detection accuracy and determine the main cause of the mold penetration problem, when the first search result is determined to be used for representing that no collision occurs with the target collision body, searching the second collision body based on the opposite direction of the normal line, and acquiring the second search result; wherein the second search result is used to characterize: whether the target object collides with the target collision body.
Since the second search result is used to characterize whether a collision with a target collision volume occurs, there are two situations, collision with a target collision volume and no collision with a target collision volume, respectively. These two cases will be described in detail below.
Case a: the second search result is used to characterize collisions with the target collision volume.
In one possible implementation, determining a second search result for characterizing a second distance between a center position of the die surface piece and a second collision point position when the die surface piece collides with the target collision body; when the second distance is determined to be larger than a set second threshold value, a fitting relation is obtained to cover the target collision body by the target object; i.e. the target collision volume is set too small.
Referring to fig. 14, fig. 14 is a schematic diagram illustrating an embodiment of the present application for detecting a collision body setup that is too small. When the ray detection is performed in the opposite direction, when the collision is determined and the collision body is a target collision body corresponding to the detected target object, the die surface sheet is indicated to be positioned outside the target collision body, and at the moment, a second distance of the collision surface in the opposite direction of the die surface sheet and the normal line needs to be further determined so as to determine whether the collision body is too small or not based on the second distance.
At this time, a second distance between the center position of the model patch and the second collision point is determined, and if the second distance is greater than a set second threshold value, it is indicated that the collision body is set too small.
In another possible implementation manner, when the second distance is determined to be less than or equal to the set second threshold, the fitting relationship is obtained to ensure that the target collision body and the target object are normally fitted, and at this time, in the game scene, collision between the objects is normal.
In the embodiment of the application, in order to facilitate subsequent modification and viewing, when determining that the fitting relation is that the target object covers the target collision body, marking each vertex position of the molded surface piece in frame data corresponding to a game scene; referring to fig. 15, a schematic diagram of a marker collision body with too small a size is provided in an embodiment of the present application. As can be seen from fig. 15, the vertex positions of the mold panels are specially marked, as is the diagonal line filling portion shown in fig. 15, which corresponds to the vertex positions of the mold panels.
Case B: the second search result is used to characterize that no collision with the target collision volume has occurred.
In one possible implementation manner, the second search result is determined to be used for representing that no collision occurs with the target collision body, the fitting relation is that the target collision body is not set for the target object, and the bounding box of the target object is marked in frame data corresponding to the game scene.
For example, rays are sent in the opposite direction along the normal line with the center of the triangle as a starting point, if collision occurs and the collision body is a target collision body, a second distance between the center position of the model surface patch and a second collision point position is determined, the second distance is a mold penetration distance of the model surface patch, and if the mold penetration distance is greater than a set second threshold value, the vertex of the model surface patch is marked on the model surface by a marking point; if no collision is generated or the collision body generating the collision is not the target collision body, determining that the target object is not provided with the collision body, wherein the collision body can be a leak which is not provided for the collision, and marking the bounding box of the target object.
In order to facilitate the subsequent problem backtracking of the manufacturer and quickly locate and repair the problem that the model collision body is not attached, according to the embodiment of the application, after the attaching relation between the target object and the target collision body is obtained based on the first searching result, the detection record of the attaching relation detection and the corresponding frame data are stored in a database; presenting detection records in an interface in a list form; wherein, in the list, include: at least one of a location of the target object, a name of the target object, and a number of vertices. Referring to fig. 16, fig. 16 is an exemplary diagram of a list storage result in an embodiment of the present application.
Referring to fig. 17, a schematic diagram of a specific implementation of bonding relationship detection according to an embodiment of the present application includes the following steps:
step 1700, in response to the fitting relation detection instruction, invoking an iterator to obtain a static grid model of a target object in the game scene;
step S1701, extracting target data of a target object from static grid parts of a static grid model;
step S1702, constructing a modeling surface patch of a target object at any view angle based on modeling grid information in target data;
Step S1703, determining the center position of the model surface piece based on the vertex position coordinates of the model surface piece;
step S1704, performing ray detection along the normal direction of the model surface patch at the center position of the model surface patch to perform collision body searching, and acquiring a first searching result used for representing whether collision occurs with a target collision body or not;
step S1705, based on the first search result, judging whether collision occurs with the target collision body, if yes, executing step S1706, otherwise executing step S1708;
step S1706, obtaining a first distance between the central position of the molded panel and the first collision point position;
step S1707, when the first distance is larger than a set first threshold value, obtaining a fitting relation that a target collision body covers a target object, and marking the positions of all vertexes of the molded surface piece in frame data corresponding to a game scene;
step S1708, performing ray detection along the opposite direction of the normal line of the model surface patch at the center position of the model surface patch to perform collision body searching, and acquiring a second searching result for representing whether collision occurs with the target collision body or not;
step S1709, based on the second search result, judging whether the collision with the target collision body occurs, if yes, executing step S1710, otherwise executing step S1712;
Step S1710, obtaining a second distance between the center position of the molded panel and the second collision point position;
step S1711, when the second distance is determined to be greater than the set second threshold, obtaining a fitting relation that the target object covers the target collision body, and marking the positions of all the vertexes of the molded surface piece in frame data corresponding to the game scene;
step S1712, obtaining a bounding box of the target object in the frame data corresponding to the game scene, wherein the bounding box of the target object is marked in the frame data corresponding to the game scene, wherein the bounding box is not set for the target object according to the attaching relation;
step S1713, storing the detection result generated in the lamination relation detection process into a database, and presenting the detection result into a result list of the editor.
In the application, the complex collision body or the simple collision body arranged for the target object can automatically detect the fitting relation between the target object and the target collision body, thereby effectively avoiding the problems of inefficiency and error caused by manual identification, improving the detection efficiency and accuracy, and having universality. Further, when the fit relation is obtained as the target object coating target collision body, determining that a mold penetration problem exists between the target object and the target collision body, or when the fit relation is obtained as the target collision body coating target object, determining that the problem of overlarge collision body setting exists; the problem of wearing the mould and the oversized problem of collision body setting can be detected, and the rationality of collision body setting is effectively detected.
The principle of solving the problem by the device is similar to that of the embodiment, so that the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
Referring to fig. 18, fig. 18 is a schematic diagram of a bonding relation detecting device 1800 according to an embodiment of the present application, where the bonding relation detecting device 1800 includes:
an obtaining unit 1801, configured to obtain target data corresponding to a target object in a game scene in response to a fitting relation detection instruction; wherein the target data includes: modeling grid information of the target object;
a construction unit 1802, configured to construct a model patch of the target object at any view angle based on the modeling grid information, and determine a normal line of the model patch;
a search unit 1803, configured to perform collision volume search based on a direction of a normal line, and obtain a first search result; wherein, the first search result characterizes: whether the target object collides with the corresponding target collision body;
an obtaining unit 1804, configured to obtain a fitting relationship between the target object and the target collision body based on the first search result; wherein, the laminating relation is: the target object is covered with the target collision body, and the target collision body is covered with the target object, or the target collision body is not arranged for the target object.
In one possible implementation, modeling grid information includes: a vertex position coordinate set of the target object and at least one vertex index array; wherein each vertex index array comprises index values of a plurality of vertices;
the construction unit 1802 is specifically configured to:
selecting vertex position coordinates corresponding to the index values of the plurality of vertexes in the vertex position coordinate set based on the index values of the plurality of vertexes in each vertex index data aiming at each vertex index array in at least one vertex index array;
and constructing a model surface piece of the target object at any view angle based on the selected vertex position coordinates.
In one possible implementation, the construction unit 1802 is specifically configured to:
when the vertex position coordinates are detected to be values under the model coordinate system, converting the vertex position coordinates into target position coordinates under the world coordinate system;
and constructing a model surface piece of the target object at any view angle based on the converted target position coordinates.
In one possible implementation, the search unit 1803 is specifically configured to:
taking the central position of the molded panel as a starting point, and searching a collision body along the normal direction; wherein the center position is determined based on an average of vertex position coordinates of all vertices in the molded panel.
In one possible implementation, the obtaining unit 1804 is specifically configured to:
determining a first search result for characterizing: the method comprises the steps that when a target object collides with a target collision body, a first distance between the central position of a molded panel and the position of a first collision point is obtained;
and when the first distance is larger than a set first threshold value, acquiring a fitting relation that the target collision body coats the target object, and marking the positions of all the vertexes of the molded surface piece in frame data corresponding to the game scene.
In one possible implementation, the obtaining unit 1804 is specifically configured to:
determining a first search result for characterizing: if the target object does not collide with the target collision body, searching a second collision body based on the opposite direction of the normal line, and acquiring a second searching result; wherein the opposite direction is the opposite direction of the direction, and the second search result is used for representing: whether the target object collides with the target collision body;
and obtaining the fitting relation between the target object and the target collision body based on the second searching result.
In one possible implementation, the obtaining unit 1804 is further configured to:
determining a second search result for characterizing: the target object collides with the target collision body, and then a second distance between the central position of the die surface piece and the second collision point position is obtained;
And when the second distance is larger than a set second threshold value, acquiring a fitting relation as a target object covering target collision body, and marking the positions of all the vertexes of the molded surface piece in frame data corresponding to the game scene.
In one possible implementation, the obtaining unit 1804 is further configured to:
determining a second search result for characterizing: the target object does not collide with the target collision body, the attaching relation is that the target collision body is not set for the target object, and the bounding box of the target object is marked in frame data corresponding to the game scene.
In one possible implementation, the obtaining unit 1804 is further configured to:
and based on the first search result, after the bonding relation between the target object and the target collision body is obtained, storing a detection record of bonding relation detection into a database.
In one possible implementation, the obtaining unit 1804 is further configured to:
based on the first search result, after the attaching relation between the target object and the target collision body is obtained, the detection record is presented in a list form; wherein, in the list, include: at least one of a location of the target object, a name of the target object, and a number of vertices.
In one possible implementation, the obtaining unit 1804 is specifically configured to:
Calling an iterator to obtain a static grid model of a target object in a game scene;
target data of the target object is extracted from the static grid members of the static grid model.
For convenience of description, the above parts are respectively described as functionally divided into units (or modules). Of course, the functions of each unit (or module) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Having described the scene graph generation method and apparatus of an exemplary embodiment of the present application, next, an electronic device for joint relation detection according to another exemplary embodiment of the present application is described.
The embodiment of the application also provides an electronic device, which can be a server, based on the same inventive concept as the embodiment of the method. In this embodiment, the electronic device may be configured as shown in fig. 19, including a memory 1901, a communication module 1903, and one or more processors 1902.
A memory 1901 for storing computer programs for execution by the processor 1902. The memory 1901 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, programs required for running an instant communication function, and the like; the storage data area can store various instant messaging information, operation instruction sets and the like.
The memory 1901 may be a volatile memory (RAM) such as a random-access memory (RAM); the memory 1901 may also be a nonvolatile memory (non-volatile memory), such as a read-only memory, a flash memory (flash memory), a hard disk (HDD) or a Solid State Drive (SSD); or memory 1901, is any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1901 may be a combination of the above memories.
The processor 1902 may include one or more central processing units (central processing unit, CPU) or digital processing units, or the like. The processor 1902 is configured to implement the above-described attachment relation detection method when calling the computer program stored in the memory 1901.
The communication module 1903 is used for communicating with a terminal device and other servers.
The specific connection medium between the memory 1901, the communication module 1903, and the processor 1902 is not limited in the embodiment of the present application. The embodiment of the present application is shown in fig. 19, where the memory 1901 and the processor 1902 are connected by a bus 1904, where the bus 1904 is depicted in bold in fig. 19, and the connection between other components is merely illustrative and not limiting. The bus 1904 may be divided into an address bus, a data bus, a control bus, and the like. For ease of description, only one thick line is depicted in fig. 19, but only one bus or one type of bus is not depicted.
Memory 1901 has stored therein a computer storage medium having stored therein computer executable instructions for implementing a scene graph generation method of an embodiment of the application. The processor 1902 is configured to perform the scene graph generation method described above.
In another embodiment, the electronic device may also be other electronic devices, such as a terminal device. In this embodiment, the structure of the electronic device may include, as shown in fig. 20: communication assembly 2010, memory 2020, display unit 2030, camera 2040, sensor 2050, audio circuit 2060, bluetooth module 2070, processor 2080 and the like.
The communication component 2010 is for communicating with a server. In some embodiments, a circuit wireless fidelity (Wireless Fidelity, wiFi) module may be included, where the WiFi module belongs to a short-range wireless transmission technology, and the electronic device may help the user to send and receive information through the WiFi module.
Memory 2020 may be used for storing software programs and data. The processor 2080 executes various functions of the terminal device and data processing by executing software programs or data stored in the memory 2020. The memory 2020 may include high-speed random access memory and may also include non-volatile memory, such as at least one type of magnetic disk storage device, flash memory device, or other volatile solid-state storage device. The memory 2020 stores an operating system that enables the terminal device to operate. The memory 2020 may store an operating system and various applications, and may also store code for performing the attachment relationship detection method according to the embodiment of the present application.
The display unit 2030 may also be used to display information input by a user or information provided to the user and a graphical user interface (graphical user interface, GUI) of various menus of the terminal device. Specifically, the display unit 2030 may include a display screen 2032 provided on the front surface of the terminal apparatus. The display 2032 may be provided in the form of a liquid crystal display, a light emitting diode, or the like. The display unit 2030 may be used for displaying a game scene diagram, frame data with error marks, and the like in the embodiment of the application.
The display unit 2030 may also be used for receiving input numeric or character information, generating signal inputs related to user settings and function control of the terminal apparatus, and in particular, the display unit 2030 may include a touch screen 2031 provided on the front surface of the terminal apparatus, on or near which touch operations by the user, such as clicking buttons, dragging scroll boxes, and the like, may be collected.
The touch screen 2031 may be covered on the display screen 2032, or the touch screen 2031 and the display screen 2032 may be integrated to implement input and output functions of the terminal device, and after integration, the touch screen may be simply referred to as a touch screen. The display unit 2030 may display an application program and corresponding operation steps in the present application.
Camera 2040 may be used to capture still images. The camera 2040 may be one or a plurality of cameras. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the processor 2080 for conversion into a digital image signal.
The terminal device may also include at least one sensor 2050, such as an acceleration sensor 2051, a distance sensor 2052, a fingerprint sensor 2053, a temperature sensor 2054. The terminal device may also be provided with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, light sensors, motion sensors, etc.
The audio circuitry 2060, speaker 2061, microphone 2062 may provide an audio interface between a user and a terminal device. The audio circuit 2060 may transmit the received electrical signal converted from audio data to the speaker 2061, and be converted into a sound signal by the speaker 2061 to be output. The terminal device may further be provided with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 2062 converts the collected sound signal into an electrical signal, receives it by the audio circuit 2060 and converts it into audio data, which is then output to the communication component 2010 for transmission to, for example, another terminal device, or to the memory 2020 for further processing.
The bluetooth module 2070 is used for exchanging information with other bluetooth devices having a bluetooth module through a bluetooth protocol. For example, the terminal device may establish a bluetooth connection with a wearable electronic device (e.g., a smart watch) that also has a bluetooth module through the bluetooth module 2070, so as to perform data interaction.
The processor 2080 is a control center of the terminal device, and connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs stored in the memory 2020, and calling data stored in the memory 2020. In some embodiments, the processor 2080 may include one or more processing units; the processor 2080 may also integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., and a baseband processor that primarily handles wireless communications. It will be appreciated that the baseband processor described above may not be integrated into the processor 2080. The processor 2080 can run an operating system, an application program, a user interface display, a touch response, and a fitting relation detection method according to the embodiment of the application. In addition, the processor 2080 is coupled to the display unit 2030.
In some possible embodiments, aspects of the present application may also be implemented in the form of a program product comprising a computer program for causing an electronic device to perform the steps of the method for detecting a fit relationship according to the various exemplary embodiments of the application as described herein above when the program product is run on an electronic device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and comprise a computer program and may run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave in which a readable computer program is embodied. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
A computer program embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to either imply that the operations must be performed in that particular order or that all of the illustrated operations be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having a computer-usable computer program embodied therein.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (15)

1. A method for detecting a fit relationship, the method comprising:
responding to the fitting relation detection instruction, and acquiring target data corresponding to a target object in the game scene; wherein the target data includes: modeling grid information of the target object;
constructing a model surface patch of the target object at any view angle based on the modeling grid information, and determining the normal line of the model surface patch;
searching for a collision body based on the direction of the normal line, and acquiring a first searching result; wherein the first search result characterizes: whether the target object collides with a corresponding target collision body;
based on the first search result, obtaining a fitting relation between the target object and the target collision body; wherein, the laminating relation is: the target object is coated with the target collision body, and the target collision body is coated with the target object, or the target collision body is not arranged for the target object.
2. The method of claim 1, wherein the modeling grid information comprises: the vertex position coordinate set of the target object and at least one vertex index array; wherein each vertex index array comprises index values of a plurality of vertices;
the constructing a model surface patch of the target object at any view angle based on the modeling grid information comprises the following steps:
selecting vertex position coordinates corresponding to the index values of the plurality of vertexes in the vertex position coordinate set based on the index values of the plurality of vertexes in the vertex index data aiming at each vertex index array in the at least one vertex index array;
and constructing a model surface piece of the target object at any view angle based on the selected vertex position coordinates.
3. The method of claim 2, wherein constructing a model patch of the target object at any one view angle based on the selected vertex position coordinates comprises:
when the vertex position coordinates are detected to be values under a model coordinate system, converting the vertex position coordinates into target position coordinates under a world coordinate system;
And constructing a model panel of the target object at any view angle based on the converted target position coordinates.
4. The method of claim 1, wherein said performing a collision volume search based on the direction of the normal line comprises:
searching collision bodies along the normal direction by taking the central position of the model surface piece as a starting point; wherein the center position is determined based on an average of vertex position coordinates of all vertices in the model face.
5. The method of any of claims 1-4, wherein the obtaining a fit relationship between the target object and the target collision volume based on the first search result comprises:
determining that the first search result is used for characterization: the target object collides with the target collision body, and then a first distance between the central position of the model surface patch and the first collision point position is obtained;
and when the first distance is larger than a set first threshold value, acquiring the fit relation that the target collision body coats the target object, and marking the positions of all the vertexes of the molded surface piece in frame data corresponding to the game scene.
6. The method of any of claims 1-4, wherein the obtaining a fit relationship between the target object and the target collision volume based on the search result comprises:
determining that the first search result is used for characterization: if the target object does not collide with the target collision body, searching a second collision body based on the opposite direction of the normal line, and obtaining a second searching result; wherein the second search result is used to characterize: whether the target object collides with the target collision body;
and obtaining the fitting relation between the target object and the target collision body based on the second searching result.
7. The method of claim 6, wherein the obtaining the fit relationship between the target object and the target collision volume based on the second search result comprises:
determining that the second search result is used to characterize: the target object collides with the target collision body, and then a second distance between the central position of the model surface patch and the position of a second collision point is obtained;
and when the second distance is larger than a set second threshold value, obtaining a fitting relation that the target object coats the target collision body, and marking the positions of all the vertexes of the molded surface piece in frame data corresponding to the game scene.
8. The method of claim 6, wherein the obtaining the fit relationship between the target object and the target collision volume based on the second search result comprises:
determining that the second search result is used to characterize: and the target object does not collide with the target collision body, the fitting relation is that the target collision body is not set for the target object, and the bounding box of the target object is marked in frame data corresponding to the game scene.
9. The method according to any one of claims 1 to 4, wherein after obtaining the fit relationship between the target object and the target collision body based on the first search result, further comprising:
and storing the detection record of the lamination relation detection into a database.
10. The method according to any one of claims 1 to 4, wherein after obtaining the fit relationship between the target object and the target collision body based on the first search result, further comprising:
presenting the detection record in a list form; wherein, in the list, it includes: at least one of a location of the target object, a name of the target object, and a number of vertices.
11. The method as claimed in any one of claims 1 to 4, wherein the obtaining the target data corresponding to each target object in the game scene includes:
calling an iterator to obtain a static grid model of a target object in the game scene;
extracting target data of the target object from the static grid parts of the static grid model.
12. A fit relation detection device, the device comprising:
the acquisition unit is used for responding to the fitting relation detection instruction and acquiring target data corresponding to a target object in the game scene; wherein the target data includes: modeling grid information of the target object;
the construction unit is used for constructing a model surface patch of the target object at any view angle based on the modeling grid information and determining the normal line of the model surface patch;
the searching unit is used for searching the collision body based on the direction of the normal line and acquiring a first searching result; wherein the first search result characterizes: whether the target object collides with a corresponding target collision body;
an obtaining unit, configured to obtain a fitting relationship between the target object and the target collision body based on the first search result; wherein, the laminating relation is: the target object is coated with the target collision body, and the target collision body is coated with the target object, or the target collision body is not arranged for the target object.
13. An electronic device, comprising: a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor being adapted to execute the computer program for implementing the steps of the method of any one of claims 1 to 11.
14. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1-11.
15. A computer program product comprising computer instructions which, when executed by a processor, implement the steps of the method of any of claims 1 to 11.
CN202211456693.6A 2022-11-21 2022-11-21 Laminating relation detection method, laminating relation detection device, laminating relation detection equipment and storage medium Pending CN116943216A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211456693.6A CN116943216A (en) 2022-11-21 2022-11-21 Laminating relation detection method, laminating relation detection device, laminating relation detection equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211456693.6A CN116943216A (en) 2022-11-21 2022-11-21 Laminating relation detection method, laminating relation detection device, laminating relation detection equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116943216A true CN116943216A (en) 2023-10-27

Family

ID=88457019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211456693.6A Pending CN116943216A (en) 2022-11-21 2022-11-21 Laminating relation detection method, laminating relation detection device, laminating relation detection equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116943216A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117710368A (en) * 2024-02-05 2024-03-15 腾讯科技(深圳)有限公司 Image processing method, device, apparatus, medium, and program product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117710368A (en) * 2024-02-05 2024-03-15 腾讯科技(深圳)有限公司 Image processing method, device, apparatus, medium, and program product
CN117710368B (en) * 2024-02-05 2024-04-30 腾讯科技(深圳)有限公司 Image processing method, device, apparatus, medium, and program product

Similar Documents

Publication Publication Date Title
US8660362B2 (en) Combined depth filtering and super resolution
US9182812B2 (en) Virtual sensor systems and methods
CN109947886B (en) Image processing method, image processing device, electronic equipment and storage medium
JP2022504704A (en) Target detection methods, model training methods, equipment, equipment and computer programs
CN110473293B (en) Virtual object processing method and device, storage medium and electronic equipment
CN111295234A (en) Method and system for generating detailed data sets of an environment via game play
CN103105926A (en) Multi-sensor posture recognition
KR20140117369A (en) Augmented reality with sound and geometric analysis
JP2014106681A5 (en)
KR101181967B1 (en) 3D street view system using identification information.
CN111968247B (en) Method and device for constructing three-dimensional house space, electronic equipment and storage medium
CN111311757B (en) Scene synthesis method and device, storage medium and mobile terminal
CN104081307A (en) Image processing apparatus, image processing method, and program
US20190340317A1 (en) Computer vision through simulated hardware optimization
KR102566300B1 (en) Method for indoor localization and electronic device
JP7043601B2 (en) Methods and devices for generating environmental models and storage media
KR102337209B1 (en) Method for notifying environmental context information, electronic apparatus and storage medium
CN116943216A (en) Laminating relation detection method, laminating relation detection device, laminating relation detection equipment and storage medium
US10295403B2 (en) Display a virtual object within an augmented reality influenced by a real-world environmental parameter
CN111338933A (en) Buried point verification method, device, equipment and storage medium
WO2019196871A1 (en) Modeling method and related device
CN112818733B (en) Information processing method, device, storage medium and terminal
CN115713616B (en) House source space model generation method and device, terminal equipment and storage medium
CN115134523B (en) Remote control method, remote control device, operation terminal, control device and storage medium
CN109859265B (en) Measurement method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication