CN111569424B - Physical settlement method and device in game scene - Google Patents

Physical settlement method and device in game scene Download PDF

Info

Publication number
CN111569424B
CN111569424B CN202010408562.5A CN202010408562A CN111569424B CN 111569424 B CN111569424 B CN 111569424B CN 202010408562 A CN202010408562 A CN 202010408562A CN 111569424 B CN111569424 B CN 111569424B
Authority
CN
China
Prior art keywords
target
virtual
dimensional
dimensional model
dimensional models
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.)
Active
Application number
CN202010408562.5A
Other languages
Chinese (zh)
Other versions
CN111569424A (en
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.)
Beijing Code Qiankun Technology Co ltd
Original Assignee
Beijing Code Qiankun Technology 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 Beijing Code Qiankun Technology Co ltd filed Critical Beijing Code Qiankun Technology Co ltd
Priority to CN202010408562.5A priority Critical patent/CN111569424B/en
Publication of CN111569424A publication Critical patent/CN111569424A/en
Application granted granted Critical
Publication of CN111569424B publication Critical patent/CN111569424B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Landscapes

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

Abstract

The invention discloses a physical settlement method and device in a game scene. Wherein the method comprises the following steps: performing collision detection on a plurality of virtual three-dimensional models in the three-dimensional game scene, and determining a plurality of target three-dimensional models which collide; obtaining parameter sets to be used of a plurality of target three-dimensional models, wherein the parameter sets to be used comprise: the method comprises the steps of (1) position parameters of each target three-dimensional model in a plurality of target three-dimensional models and the normal direction of a collision surface of each target three-dimensional model; and carrying out physical settlement according to the parameter set to be used to obtain a settlement result. The invention solves the technical problem of influencing the game effect caused by inaccurate game collision detection in the related art.

Description

Physical settlement method and device in game scene
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for physical settlement in a game scene.
Background
In the algorithm tool for simulating reality, the PGS and TGS (sample Gauss-Seidel Solver) function is a tool for calculating simulation results, such as calculating the position, rotation angle, splicing mode, etc. of an object in the process of simulating object change (including appearance, action behavior, etc.) in a real scene (game).
TGS settlement has more steps, more calculation resources are called, and therefore, the performance is poor, but the calculation process is strict, so that the result is accurate, the constraint among objects is more and complex, and the tool can be used for settlement when the precision is high;
PGS results are relatively poor in accuracy and stability, but they are fast in settlement speed, so they can be used in a large amount in games.
In the related art, since the method for determining the collision in the game is complex and inaccurate, a large amount of memory is required to be occupied, and the game effect is affected.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a physical settlement method and a physical settlement device in a game scene, which at least solve the technical problem that the effect of a game is affected due to inaccurate game collision detection in the related art.
According to an aspect of an embodiment of the present invention, there is provided a physical settlement method in a game scene, including: performing collision detection on a plurality of virtual three-dimensional models in the three-dimensional game scene, and determining a plurality of target three-dimensional models which collide; acquiring parameter sets to be used of the plurality of target three-dimensional models, wherein the parameter sets to be used comprise: the position parameter of each target three-dimensional model in the plurality of target three-dimensional models and the normal direction of the collision surface of each target three-dimensional model; and carrying out physical settlement according to the parameter set to be used to obtain a settlement result.
Further, performing collision detection on the plurality of virtual three-dimensional models, determining the plurality of target three-dimensional models includes: selecting, namely selecting a virtual three-dimensional model to be detected currently from the plurality of virtual three-dimensional models; a removing step of removing a first-type virtual three-dimensional model from the plurality of virtual three-dimensional models by using a wide-phase collision detection algorithm and reserving a second-type virtual three-dimensional model, wherein the distance between the first-type virtual three-dimensional model and the virtual three-dimensional model to be detected is larger than a preset threshold value, and the distance between the second-type virtual three-dimensional model and the virtual three-dimensional model to be detected is smaller than or equal to the preset threshold value; judging, to be specific, judging whether all virtual three-dimensional models in the plurality of virtual three-dimensional models are traversed, if yes, determining the reserved second-type virtual three-dimensional model as the plurality of target three-dimensional models, and if no, returning to the selecting step.
Further, obtaining the parameter set to be used includes: calculating collision points of collision in the multiple target three-dimensional models by using a narrow-phase collision detection algorithm; and determining the position parameters of the collision points and the normal direction of the collision points on the collision surface as a to-be-used parameter set of the target three-dimensional model to which the collision points belong.
Further, performing physical settlement according to the parameter set to be used, and obtaining the settlement result includes: setting the parameter set to be used as input parameters of a first settlement device and/or a second settlement device based on the constrained degree of each target three-dimensional model; and iteratively solving the input parameters by using the first and/or second settlers to obtain the settlement result.
Further, setting the set of parameters to be used as the input parameters based on the degree of constraint of each target three-dimensional model includes: setting a first part of to-be-used parameter set of a first part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of the first settlement device based on the constrained degree of each target three-dimensional model, wherein the first part of target three-dimensional models meet preset constraint limiting conditions; and setting a second part of to-be-used parameter set of a second part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of the second settlement device based on the constrained degree of each target three-dimensional model, wherein the second part of target three-dimensional models do not meet the preset constraint limiting condition.
According to another aspect of the embodiment of the present invention, there is also provided a physical settlement device in a game scene, including: the detection module is used for carrying out collision detection on a plurality of virtual three-dimensional models in the three-dimensional game scene and determining a plurality of target three-dimensional models which collide; the acquisition module is used for acquiring parameter sets to be used of the multiple target three-dimensional models, wherein the parameter sets to be used comprise: the position parameter of each target three-dimensional model in the plurality of target three-dimensional models and the normal direction of the collision surface of each target three-dimensional model; and the settlement module is used for carrying out physical settlement according to the parameter set to be used to obtain a settlement result.
Further, the detection module includes: a selecting unit, configured to select a virtual three-dimensional model to be currently detected from the plurality of virtual three-dimensional models; a removing unit, configured to remove a first type of virtual three-dimensional model from the plurality of virtual three-dimensional models by using a wide-phase collision detection algorithm, and reserve a second type of virtual three-dimensional model, where a distance between the first type of virtual three-dimensional model and the virtual three-dimensional model to be detected is greater than a preset threshold, and a distance between the second type of virtual three-dimensional model and the virtual three-dimensional model to be detected is less than or equal to the preset threshold; the judging unit is used for judging whether all the virtual three-dimensional models in the plurality of virtual three-dimensional models are traversed, if yes, the reserved second-type virtual three-dimensional models are determined to be the plurality of target three-dimensional models, and if no, the selecting unit is returned.
Further, the acquisition module includes: a calculation unit for calculating collision points at which collisions occur in the plurality of target three-dimensional models using a narrow-phase collision detection algorithm; and the determining unit is used for determining the position parameter of the collision point and the normal direction of the collision point on the collision surface as a to-be-used parameter set of the target three-dimensional model to which the collision point belongs.
Further, the settlement module includes: a setting unit configured to set the parameter set to be used as an input parameter of the first and/or second settlers based on the degree of constraint of each target three-dimensional model; and the settlement unit is used for iteratively solving the input parameters by using the first settlement device and/or the second settlement device to obtain the settlement result.
Further, the setting unit is configured to set a first part to-be-used parameter set of a first part of target three-dimensional models in the plurality of target three-dimensional models as an input parameter of the first settlement device based on the constrained degree of each target three-dimensional model, where the first part of target three-dimensional models meets a preset constraint limiting condition; and setting a second part of to-be-used parameter set of a second part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of the second settlement device based on the constrained degree of each target three-dimensional model, wherein the second part of target three-dimensional models do not meet the preset constraint limiting condition.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium storing a computer program, wherein the computer program is configured to execute the physical settlement method within a game scene according to the present invention at runtime.
According to another aspect of the embodiments of the present invention, there is also provided a processor for running a program, wherein the program is configured to execute the physical settlement method within a game scene according to the present invention at runtime.
According to another aspect of embodiments of the present invention there is also provided an electronic device comprising a memory and a processor, the memory having stored therein a computer program, the processor being arranged to run the computer program to perform the physical settlement method within a game scene of the present invention.
In the embodiment of the invention, a plurality of virtual three-dimensional models in a three-dimensional game scene are adopted to carry out collision detection, and a plurality of target three-dimensional models which collide are determined; obtaining parameter sets to be used of a plurality of target three-dimensional models, wherein the parameter sets to be used comprise: the method comprises the steps of (1) position parameters of each target three-dimensional model in a plurality of target three-dimensional models and the normal direction of a collision surface of each target three-dimensional model; according to the parameter set to be used, physical settlement is carried out, and a settlement result is obtained, so that the technical effect of more accurate collision calculation of the three-dimensional model in the game scene is realized, and the technical problem of influencing the game effect due to inaccurate game collision detection in the related art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a physical settlement method within a game scene according to an embodiment of the invention;
fig. 2 is a schematic diagram of an alternative physical settlement device within a game scene according to embodiments of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the present invention, there is provided a method embodiment of physical settlement within a game scene, it being noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 1 is a physical settlement method within a game scene according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S102, collision detection is carried out on a plurality of virtual three-dimensional models in a three-dimensional game scene, and a plurality of target three-dimensional models with collision are determined;
step S104, obtaining parameter sets to be used of a plurality of target three-dimensional models, wherein the parameter sets to be used comprise: the method comprises the steps of (1) position parameters of each target three-dimensional model in a plurality of target three-dimensional models and the normal direction of a collision surface of each target three-dimensional model;
and step S106, performing physical settlement according to the parameter set to be used to obtain a settlement result.
Through the steps, collision detection can be carried out on a plurality of virtual three-dimensional models in the three-dimensional game scene, and a plurality of target three-dimensional models with collision can be determined; obtaining parameter sets to be used of a plurality of target three-dimensional models, wherein the parameter sets to be used comprise: the method comprises the steps of (1) position parameters of each target three-dimensional model in a plurality of target three-dimensional models and the normal direction of a collision surface of each target three-dimensional model; according to the parameter set to be used, physical settlement is carried out, and a settlement result is obtained, so that the technical effect of more accurate collision calculation of the three-dimensional model in the game scene is realized, and the technical problem of influencing the game effect due to inaccurate game collision detection in the related art is solved.
The technical scheme of the embodiment of the invention can be applied to object collision detection calculation of a three-dimensional game scene, wherein at least two virtual three-dimensional models are arranged in the three-dimensional game scene, the models can be static objects or movable objects or game roles, collision detection is carried out on a plurality of three-dimensional models in the game scene, colliding target three-dimensional models are determined, all parameters to be used of the target three-dimensional models, including the position parameters of each target three-dimensional model and the normal direction of a collision surface, can be obtained, more parameters can be obtained besides the parameters, the types of the parameters to be used can be changed according to different application scenes, the settlement result is obtained according to the parameter sets to be used, and the process of physical settlement can be carried out on related data of the collision process.
Optionally, performing collision detection on the plurality of virtual three-dimensional models, and determining the plurality of target three-dimensional models includes the following three steps:
selecting, namely selecting a virtual three-dimensional model to be detected currently from a plurality of virtual three-dimensional models;
removing the first-class virtual three-dimensional model from the plurality of virtual three-dimensional models by using a wide-phase collision detection algorithm, and reserving the second-class virtual three-dimensional model, wherein the distance between the first-class virtual three-dimensional model and the virtual three-dimensional model to be detected is larger than a preset threshold value, and the distance between the second-class virtual three-dimensional model and the virtual three-dimensional model to be detected is smaller than or equal to the preset threshold value;
judging, namely judging whether all the virtual three-dimensional models in the plurality of virtual three-dimensional models are traversed, if so, determining the reserved second-type virtual three-dimensional model as a plurality of target three-dimensional models, and if not, returning to the selecting step.
In a specific game scene, a plurality of virtual three-dimensional models may exist, for two virtual three-dimensional models, if the distance between the two virtual three-dimensional models exceeds a certain distance (a preset threshold value), the two virtual three-dimensional models cannot collide, so that collision possibility of the two virtual three-dimensional models can be eliminated when collision detection is carried out, each detection process selects a virtual three-dimensional model to be detected currently, a virtual three-dimensional model with the distance exceeding the set distance between the virtual three-dimensional model to be detected is removed by using a wide-phase collision detection algorithm, one virtual three-dimensional model with the distance smaller than or equal to the set distance between the virtual three-dimensional model to be detected is reserved until all virtual three-dimensional models in the whole scene are traversed, and only a second virtual three-dimensional model is left.
Optionally, obtaining the set of parameters to be used includes: calculating collision points of collision in the multiple target three-dimensional models by using a narrow-phase collision detection algorithm; and determining the position parameters of the collision points and the normal direction of the collision points on the collision surface as a to-be-used parameter set of the target three-dimensional model to which the collision points belong.
The method comprises the steps of obtaining parameter sets to be used of a plurality of target three-dimensional models, calculating collision points of the plurality of target three-dimensional models through a narrow-phase collision detection algorithm, determining the position parameters of the collision points and the normal direction of the collision points on a collision surface as the parameter sets to be used of the target three-dimensional models to which the collision points belong, and combining the wide-phase collision detection algorithm with the narrow-phase collision detection algorithm, so that the calculation of the collision process is faster, more efficient and more accurate.
Optionally, performing physical settlement according to the parameter set to be used, and obtaining a settlement result includes: setting a parameter set to be used as an input parameter of the first settlement device and/or the second settlement device based on the constrained degree of each target three-dimensional model; and iteratively solving the input parameters by using the first settlement device and/or the second settlement device to obtain a settlement result.
The first and second settlers may be PGS and TGS settlers, the TGS settlers may be used for settling a relatively more constrained model in a game scene, the PGS settlers may be used for settling a relatively less constrained model in a game scene, the constrained degree in this embodiment may be a degree of freedom constraint, for example, a door-to-door constraint condition, if there is no door-axis constraint, the door has six degrees of freedom, xyz-direction movement and rotation around xyz-axis, there is a door-axis constraint, the degree of freedom is reduced, a set of parameters to be used is set as input parameters of the first and/or second settlers based on the constrained degree of each target three-dimensional model, and then two settlers are used to iteratively solve the input parameters respectively to obtain a settlement result.
Optionally, setting the set of parameters to be used as the input parameters based on the degree of constraint of each target three-dimensional model includes: setting a first part to-be-used parameter set of a first part of target three-dimensional models in a plurality of target three-dimensional models as input parameters of a first settlement device based on the constrained degree of each target three-dimensional model, wherein the first part of target three-dimensional models meet preset constraint limiting conditions; and setting a second part of to-be-used parameter set of a second part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of a second settlement device based on the constrained degree of each target three-dimensional model, wherein the second part of target three-dimensional models do not meet the preset constraint limiting condition.
Since the two settlers are used for settlement, corresponding parameter sets to be used of the target three-dimensional model meeting the preset constraint limiting conditions are respectively input into the two settlers, the parameter sets to be used input into the two settlers are different, and the two settlers perform physical settlement on the collision process according to the different parameter sets to be used.
Through the scheme of the embodiment, the physical settlement of the collision process in the three-dimensional game scene can be more accurate and efficient, and the user experience of the game process is improved.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
According to another embodiment of the present invention, there is also provided a physical settlement device in a game scene for implementing the above-described physical settlement method in a game scene. FIG. 2 is a schematic diagram of an alternative physical settlement device within a game scene according to embodiments of the invention, as shown in FIG. 2, which may include:
the detection module 10 is used for performing collision detection on a plurality of virtual three-dimensional models in the three-dimensional game scene and determining a plurality of target three-dimensional models which collide;
the obtaining module 20 is configured to obtain a set of parameters to be used of the plurality of target three-dimensional models, where the set of parameters to be used includes: the method comprises the steps of (1) position parameters of each target three-dimensional model in a plurality of target three-dimensional models and the normal direction of a collision surface of each target three-dimensional model;
the settlement module 30 is configured to perform physical settlement according to the parameter set to be used, and obtain a settlement result.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. The above-described modules may be implemented in software or hardware as a part of the apparatus.
Through the module, the technical problem of influencing the game effect caused by inaccurate game collision detection can be solved, and the technical effect of more accurate collision calculation of the three-dimensional model in the game scene is further achieved.
Optionally, the detection module includes: the selection unit is used for selecting a virtual three-dimensional model to be detected currently from the plurality of virtual three-dimensional models; a removing unit, configured to remove a first type of virtual three-dimensional model from the plurality of virtual three-dimensional models by using a wide-phase collision detection algorithm, and reserve a second type of virtual three-dimensional model, where a distance between the first type of virtual three-dimensional model and the virtual three-dimensional model to be detected is greater than a preset threshold, and a distance between the second type of virtual three-dimensional model and the virtual three-dimensional model to be detected is less than or equal to the preset threshold; the judging unit is used for judging whether all the virtual three-dimensional models in the plurality of virtual three-dimensional models are traversed, if yes, determining the reserved second-type virtual three-dimensional model as a plurality of target three-dimensional models, and if no, returning to the selecting unit.
Optionally, the acquiring module includes: a calculation unit for calculating collision points at which collisions occur in the plurality of target three-dimensional models using a narrow-phase collision detection algorithm; and the determining unit is used for determining the position parameter of the collision point and the normal direction of the collision point on the collision surface as a parameter set to be used of the target three-dimensional model to which the collision point belongs.
Optionally, the settlement module includes: a setting unit configured to set a set of parameters to be used as input parameters of the first and/or second settlers based on the degree of constraint of each target three-dimensional model; and the settlement unit is used for carrying out iterative solution on the input parameters by using the first settlement device and/or the second settlement device to obtain a settlement result.
Optionally, the setting unit is configured to set a first part of to-be-used parameter set of a first part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of the first settlement device based on the constrained degree of each target three-dimensional model, where the first part of target three-dimensional models meets a preset constraint limiting condition; and setting a second part of to-be-used parameter set of a second part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of a second settlement device based on the constrained degree of each target three-dimensional model, wherein the second part of target three-dimensional models do not meet the preset constraint limiting condition.
According to an embodiment of the present invention, there is also provided an electronic device for implementing the above-mentioned physical settlement method in a game scene, the electronic device including:
1) Processor and method for controlling the same
2) Memory device
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
The embodiment of the invention also provides a storage medium.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
s1, performing collision detection on a plurality of virtual three-dimensional models in a three-dimensional game scene, and determining a plurality of target three-dimensional models which collide;
s2, acquiring parameter sets to be used of a plurality of target three-dimensional models, wherein the parameter sets to be used comprise: the method comprises the steps of (1) position parameters of each target three-dimensional model in a plurality of target three-dimensional models and the normal direction of a collision surface of each target three-dimensional model;
and S3, performing physical settlement according to the parameter set to be used to obtain a settlement result.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
selecting, namely selecting a virtual three-dimensional model to be detected currently from a plurality of virtual three-dimensional models; removing the first-class virtual three-dimensional model from the plurality of virtual three-dimensional models by using a wide-phase collision detection algorithm, and reserving the second-class virtual three-dimensional model, wherein the distance between the first-class virtual three-dimensional model and the virtual three-dimensional model to be detected is larger than a preset threshold value, and the distance between the second-class virtual three-dimensional model and the virtual three-dimensional model to be detected is smaller than or equal to the preset threshold value; judging, namely judging whether all the virtual three-dimensional models in the plurality of virtual three-dimensional models are traversed, if so, determining the reserved second-type virtual three-dimensional model as a plurality of target three-dimensional models, and if not, returning to the selecting step.
Calculating collision points of collision in the multiple target three-dimensional models by using a narrow-phase collision detection algorithm; and determining the position parameters of the collision points and the normal direction of the collision points on the collision surface as a to-be-used parameter set of the target three-dimensional model to which the collision points belong.
Setting a parameter set to be used as an input parameter of the first settlement device and/or the second settlement device based on the constrained degree of each target three-dimensional model; and iteratively solving the input parameters by using the first settlement device and/or the second settlement device to obtain a settlement result.
Setting a first part to-be-used parameter set of a first part of target three-dimensional models in a plurality of target three-dimensional models as input parameters of a first settlement device based on the constrained degree of each target three-dimensional model, wherein the first part of target three-dimensional models meet preset constraint limiting conditions; and setting a second part of to-be-used parameter set of a second part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of a second settlement device based on the constrained degree of each target three-dimensional model, wherein the second part of target three-dimensional models do not meet the preset constraint limiting condition.
Optionally, the storage medium is further configured to store program code for performing the steps included in the method in the above embodiment, which is not described in detail in this embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (11)

1. A method of physical settlement within a game scene, comprising:
performing collision detection on a plurality of virtual three-dimensional models in the three-dimensional game scene, and determining a plurality of target three-dimensional models which collide;
acquiring parameter sets to be used of the plurality of target three-dimensional models, wherein the parameter sets to be used comprise: the position parameter of each target three-dimensional model in the plurality of target three-dimensional models and the normal direction of the collision surface of each target three-dimensional model;
performing physical settlement according to the parameter set to be used to obtain a settlement result;
wherein performing collision detection on the plurality of virtual three-dimensional models, determining the plurality of target three-dimensional models includes:
selecting, namely selecting a virtual three-dimensional model to be detected currently from the plurality of virtual three-dimensional models;
a removing step of removing a first-type virtual three-dimensional model from the plurality of virtual three-dimensional models by using a wide-phase collision detection algorithm and reserving a second-type virtual three-dimensional model, wherein the distance between the first-type virtual three-dimensional model and the virtual three-dimensional model to be detected is larger than a preset threshold value, and the distance between the second-type virtual three-dimensional model and the virtual three-dimensional model to be detected is smaller than or equal to the preset threshold value;
judging, to be specific, judging whether all virtual three-dimensional models in the plurality of virtual three-dimensional models are traversed, if yes, determining the reserved second-type virtual three-dimensional model as the plurality of target three-dimensional models, and if no, returning to the selecting step.
2. The method of claim 1, wherein obtaining the set of parameters to be used comprises:
calculating collision points of collision in the multiple target three-dimensional models by using a narrow-phase collision detection algorithm;
and determining the position parameters of the collision points and the normal direction of the collision points on the collision surface as a to-be-used parameter set of the target three-dimensional model to which the collision points belong.
3. The method of claim 1, wherein physically settling accounts according to the set of parameters to be used, the settling results comprising:
setting the parameter set to be used as input parameters of a first settlement device and/or a second settlement device based on the constrained degree of each target three-dimensional model;
and iteratively solving the input parameters by using the first and/or second settlers to obtain the settlement result.
4. A method according to claim 3, wherein setting the set of parameters to be used as the input parameters based on the degree of constraint of each target three-dimensional model comprises:
setting a first part of to-be-used parameter set of a first part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of the first settlement device based on the constrained degree of each target three-dimensional model, wherein the first part of target three-dimensional models meet preset constraint limiting conditions;
and setting a second part of to-be-used parameter set of a second part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of the second settlement device based on the constrained degree of each target three-dimensional model, wherein the second part of target three-dimensional models do not meet the preset constraint limiting condition.
5. A physical settlement device in a game scene, comprising:
the detection module is used for carrying out collision detection on a plurality of virtual three-dimensional models in the three-dimensional game scene and determining a plurality of target three-dimensional models which collide;
the acquisition module is used for acquiring parameter sets to be used of the multiple target three-dimensional models, wherein the parameter sets to be used comprise: the position parameter of each target three-dimensional model in the plurality of target three-dimensional models and the normal direction of the collision surface of each target three-dimensional model;
the settlement module is used for carrying out physical settlement according to the parameter set to be used to obtain a settlement result;
wherein, the detection module includes:
a selecting unit, configured to select a virtual three-dimensional model to be currently detected from the plurality of virtual three-dimensional models;
a removing unit, configured to remove a first type of virtual three-dimensional model from the plurality of virtual three-dimensional models by using a wide-phase collision detection algorithm, and reserve a second type of virtual three-dimensional model, where a distance between the first type of virtual three-dimensional model and the virtual three-dimensional model to be detected is greater than a preset threshold, and a distance between the second type of virtual three-dimensional model and the virtual three-dimensional model to be detected is less than or equal to the preset threshold;
the judging unit is used for judging whether all the virtual three-dimensional models in the plurality of virtual three-dimensional models are traversed, if yes, the reserved second-type virtual three-dimensional models are determined to be the plurality of target three-dimensional models, and if no, the selecting unit is returned.
6. The apparatus of claim 5, wherein the acquisition module comprises:
a calculation unit for calculating collision points at which collisions occur in the plurality of target three-dimensional models using a narrow-phase collision detection algorithm;
and the determining unit is used for determining the position parameter of the collision point and the normal direction of the collision point on the collision surface as a to-be-used parameter set of the target three-dimensional model to which the collision point belongs.
7. The apparatus of claim 5, wherein the settlement module comprises:
a setting unit configured to set the parameter set to be used as an input parameter of the first and/or second settlers based on the degree of constraint of each target three-dimensional model;
and the settlement unit is used for iteratively solving the input parameters by using the first settlement device and/or the second settlement device to obtain the settlement result.
8. The apparatus according to claim 7, wherein the setting unit is configured to set a first set of parameters to be used for a first part of a first partial target three-dimensional model among the plurality of target three-dimensional models as the input parameters of the first settlement device based on the degree of constraint of each target three-dimensional model, wherein the first partial target three-dimensional model satisfies a preset constraint defining condition; and setting a second part of to-be-used parameter set of a second part of target three-dimensional models in the plurality of target three-dimensional models as input parameters of the second settlement device based on the constrained degree of each target three-dimensional model, wherein the second part of target three-dimensional models do not meet the preset constraint limiting condition.
9. A storage medium having a computer program stored therein, wherein the computer program is arranged to execute the physical settlement method within the game scene as claimed in any one of claims 1 to 4 at run-time.
10. A processor for running a program, wherein the program is arranged to execute the physical settlement method within the game scene as claimed in any one of claims 1 to 4 at run time.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the physical settlement method within the game scene as claimed in any one of claims 1 to 4.
CN202010408562.5A 2020-05-14 2020-05-14 Physical settlement method and device in game scene Active CN111569424B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010408562.5A CN111569424B (en) 2020-05-14 2020-05-14 Physical settlement method and device in game scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010408562.5A CN111569424B (en) 2020-05-14 2020-05-14 Physical settlement method and device in game scene

Publications (2)

Publication Number Publication Date
CN111569424A CN111569424A (en) 2020-08-25
CN111569424B true CN111569424B (en) 2023-04-28

Family

ID=72126557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010408562.5A Active CN111569424B (en) 2020-05-14 2020-05-14 Physical settlement method and device in game scene

Country Status (1)

Country Link
CN (1) CN111569424B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704134B (en) * 2021-09-23 2023-06-06 腾讯科技(深圳)有限公司 Model detection method and related device
CN117237575B (en) * 2023-11-10 2024-02-06 光轮智能(北京)科技有限公司 Indoor scene generation method, control device and readable storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001162048A (en) * 1999-12-14 2001-06-19 Namco Ltd Sport game device and play control method for sport game
JP2005250688A (en) * 2004-03-02 2005-09-15 Nec Corp Policy analysis system and method, and program for policy analysis
EP1913987A1 (en) * 2006-10-19 2008-04-23 Nintendo Co., Limited Storage medium storing a game program, game apparatus, and game control method
CN104606887A (en) * 2014-12-30 2015-05-13 北京像素软件科技股份有限公司 Collision judgment method
CN107145227A (en) * 2017-04-20 2017-09-08 腾讯科技(深圳)有限公司 The exchange method and device of virtual reality scenario
CN108339270A (en) * 2018-02-09 2018-07-31 网易(杭州)网络有限公司 The processing method of static component, rendering intent and device in scene of game
CN108970113A (en) * 2018-07-26 2018-12-11 广州多益网络股份有限公司 A kind of collision checking method, device, equipment and medium
CN109242973A (en) * 2018-09-18 2019-01-18 珠海金山网络游戏科技有限公司 A kind of crash tests method, apparatus, electronic equipment and storage medium
CN110180182A (en) * 2019-04-28 2019-08-30 腾讯科技(深圳)有限公司 Collision checking method, device, storage medium and electronic device
CN110210141A (en) * 2019-06-04 2019-09-06 宝业湖北建工集团有限公司 Model collision detection method, device and electronic equipment based on BIM technology
CN110505493A (en) * 2019-09-04 2019-11-26 广州华多网络科技有限公司 Collision checking method, game interaction method and live broadcast system based on game
CN110507989A (en) * 2019-09-06 2019-11-29 网易(杭州)网络有限公司 A kind of control method of cloud game, device, electronic equipment and readable storage medium storing program for executing
CN110969687A (en) * 2019-11-29 2020-04-07 中国商用飞机有限责任公司北京民用飞机技术研究中心 Collision detection method, device, equipment and medium
CN111104749A (en) * 2019-12-24 2020-05-05 山东恒道如一数字传媒有限公司 Collision detection algorithm based on progressive external ball structure

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9116799B2 (en) * 2013-06-30 2015-08-25 Freescale Semiconductor, Inc. Method for detecting bank collision at a memory and device therefor

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001162048A (en) * 1999-12-14 2001-06-19 Namco Ltd Sport game device and play control method for sport game
JP2005250688A (en) * 2004-03-02 2005-09-15 Nec Corp Policy analysis system and method, and program for policy analysis
EP1913987A1 (en) * 2006-10-19 2008-04-23 Nintendo Co., Limited Storage medium storing a game program, game apparatus, and game control method
CN104606887A (en) * 2014-12-30 2015-05-13 北京像素软件科技股份有限公司 Collision judgment method
CN107145227A (en) * 2017-04-20 2017-09-08 腾讯科技(深圳)有限公司 The exchange method and device of virtual reality scenario
CN108339270A (en) * 2018-02-09 2018-07-31 网易(杭州)网络有限公司 The processing method of static component, rendering intent and device in scene of game
CN108970113A (en) * 2018-07-26 2018-12-11 广州多益网络股份有限公司 A kind of collision checking method, device, equipment and medium
CN109242973A (en) * 2018-09-18 2019-01-18 珠海金山网络游戏科技有限公司 A kind of crash tests method, apparatus, electronic equipment and storage medium
CN110180182A (en) * 2019-04-28 2019-08-30 腾讯科技(深圳)有限公司 Collision checking method, device, storage medium and electronic device
CN110210141A (en) * 2019-06-04 2019-09-06 宝业湖北建工集团有限公司 Model collision detection method, device and electronic equipment based on BIM technology
CN110505493A (en) * 2019-09-04 2019-11-26 广州华多网络科技有限公司 Collision checking method, game interaction method and live broadcast system based on game
CN110507989A (en) * 2019-09-06 2019-11-29 网易(杭州)网络有限公司 A kind of control method of cloud game, device, electronic equipment and readable storage medium storing program for executing
CN110969687A (en) * 2019-11-29 2020-04-07 中国商用飞机有限责任公司北京民用飞机技术研究中心 Collision detection method, device, equipment and medium
CN111104749A (en) * 2019-12-24 2020-05-05 山东恒道如一数字传媒有限公司 Collision detection algorithm based on progressive external ball structure

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
一种快速计算三维空间中物体碰撞接触面的方法;傅由甲等;《计算机仿真》;20050130(第01期);全文 *
基于概率密度估计的SMOTE改进算法研究;李涛等;《南京师大学报(自然科学版)》;20190320(第01期);全文 *
塔群防碰撞监测系统的研究;闫佳妮等;《建筑机械》;20110709(第13期);全文 *

Also Published As

Publication number Publication date
CN111569424A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN106355431B (en) Cheating flow detection method and device and terminal
CN109523621B (en) Object loading method and device, storage medium and electronic device
CN111569424B (en) Physical settlement method and device in game scene
CN111177887A (en) Method and device for constructing simulation track data based on real driving scene
CN113312361B (en) Track query method, device, equipment, storage medium and computer program product
CN107679626A (en) Machine learning method, device, system, storage medium and equipment
CN113256755B (en) Image rendering method, intelligent terminal and storage device
CN109377552B (en) Image occlusion calculating method, device, calculating equipment and storage medium
CN105631746A (en) Network transaction risk identification method and system based on computer system
US10372571B2 (en) Method and apparatus for testing compatibility of 3D engine
CN117036445A (en) Depth estimation method, device, computer equipment and medium based on random distribution
CN108470368B (en) Method and device for determining rendering object in virtual scene and electronic equipment
CN114917590B (en) Virtual reality game system
KR101927861B1 (en) Method and apparatus for removing noise based on mathematical morphology from geometric data of 3d space
CN107393019B (en) Particle-based cloth simulation method and device
CN111538410A (en) Method and device for determining target algorithm in VR scene and computing equipment
CN112242959B (en) Micro-service current-limiting control method, device, equipment and computer storage medium
CN113963028A (en) Collision detection method and device, computer equipment and storage medium
CN109543557B (en) Video frame processing method, device, equipment and storage medium
CN113240720A (en) Three-dimensional surface reconstruction method and device, server and readable storage medium
CN111467795B (en) Physical settlement method and device in game scene
CN111475307B (en) Physical settlement processing method and device
CN116721187B (en) Animation dynamic loading and unloading method, device, equipment and medium based on scene cutting
CN113360356B (en) Method for identifying reading cheating behaviors, computing device and computer storage medium
CN115964305B (en) Cross-project test case library management method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant