CN117205561A - Navigation data processing method and device, electronic equipment and storage medium - Google Patents

Navigation data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117205561A
CN117205561A CN202311209292.5A CN202311209292A CN117205561A CN 117205561 A CN117205561 A CN 117205561A CN 202311209292 A CN202311209292 A CN 202311209292A CN 117205561 A CN117205561 A CN 117205561A
Authority
CN
China
Prior art keywords
polygon
navigation
model
union
target area
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
CN202311209292.5A
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202311209292.5A priority Critical patent/CN117205561A/en
Publication of CN117205561A publication Critical patent/CN117205561A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the disclosure provides a navigation data processing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a plurality of models contained in a target area in response to the selection of the target area needing navigation data updating from the virtual scene; obtaining at least one first navigation polygon corresponding to the at least one first model, and obtaining at least one second navigation polygon corresponding to the at least one second model; updating the walkable polygon set of the target area based on the position relation between the first navigation polygon and the second navigation polygon; and regenerating the navigation grid of the target area based on the updated walkable polygon set. According to the embodiment of the disclosure, the navigation data of the whole virtual world can be obtained by simply calculating the navigation polygon relation of the adjacent parts of the model in the running process in the items of fixed navigation data of the model and random transformation of the model position.

Description

Navigation data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a navigation data processing method, a navigation data processing apparatus, an electronic device, and a computer readable storage medium.
Background
In existing three-dimensional games, the area available for road finding is usually recorded by means of a navigation grid (such as recast navigation), and the construction of the navigation grid is a very complex and time-consuming process, such as recast navigation needs to be performed: the method comprises the steps of voxelizing a scene model, filtering walking surfaces, dividing the walking surfaces into areas which are as large as possible, continuous, non-overlapping and have no holes in the middle according to the calculated walking surfaces by using a specific algorithm, generating contours, simplifying the contours, generating polygonal grids, generating height details and the like.
In the existing engine, two schemes of real-time construction and offline storage of navigation data of the whole world are generally provided for users to select. These two schemes are designed for generality, but are not capable of processing the items of fixed input model navigation data and random change of model positions or the items of simple modification of the walking ability of the local navigation area at any position during operation, because the former has too much redundant calculation, the latter is very time-consuming.
Disclosure of Invention
In view of the above, embodiments of the present disclosure are presented to provide a navigation data processing method and a corresponding navigation data processing apparatus, an electronic device, and a computer-readable storage medium that overcome or at least partially solve the above problems.
The embodiment of the disclosure discloses a navigation data processing method, which comprises the following steps:
determining a plurality of models contained in a target area in response to the selection of the target area needing navigation data updating from the virtual scene; wherein the plurality of models includes at least one first model that does not move and at least one second model that moves from other regions in the virtual scene to the target region;
obtaining at least one first navigation polygon corresponding to the at least one first model, and obtaining at least one second navigation polygon corresponding to the at least one second model;
updating the walkable polygon set of the target area based on the positional relationship of the first navigation polygon and the second navigation polygon;
and regenerating the navigation grid of the target area based on the updated walkable polygon set.
The embodiment of the disclosure also discloses a navigation data processing device, which comprises:
the determining module is used for determining a plurality of models contained in a target area needing navigation data updating in response to the selection of the target area from the virtual scene; wherein the plurality of models includes at least one first model that does not move and at least one second model that moves from other regions in the virtual scene to the target region;
an acquisition module for acquiring at least one first navigation polygon corresponding to the at least one first model and at least one second navigation polygon corresponding to the at least one second model;
the updating module is used for updating the walkable polygon set of the target area based on the position relation between the first navigation polygon and the second navigation polygon;
and the generation module is used for regenerating the navigation grid of the target area based on the updated walkable polygon set.
The embodiment of the disclosure also discloses an electronic device, which comprises: a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor implements a navigation data processing method as described above.
The disclosed embodiments also disclose a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a navigation data processing method as described above.
Embodiments of the present disclosure include the following advantages:
in the embodiment of the disclosure, in response to selecting a target area that needs to be updated with navigation data from a virtual scene, a plurality of models included in the target area may be determined, where the plurality of models included may include a first model and a second model, the first model refers to a model that is not moving in the target area, the second model refers to a model that moves from other areas in the virtual scene to the target area, a previously generated navigation polygon corresponding to the first model, that is, a first navigation polygon, is acquired, and a previously generated navigation polygon corresponding to the second model, that is, a second navigation polygon, is acquired, then a set of walkable polygons corresponding to the target area may be updated based on a positional relationship between the first navigation polygon and the second navigation polygon, and finally a navigation grid of the target area may be regenerated based on the updated set of walkable polygons. By adopting the mode, the regenerated navigation grid of the target area can be combined with the navigation grids of other areas in the virtual scene to obtain the navigation grid of the whole virtual scene, the navigation data of the whole virtual world can be obtained by simply calculating the navigation polygon relation of the adjacent parts of the model in the project of fixed navigation data of the model but random transformation of the model position during operation, compared with the navigation data of the whole virtual world reconstructed from the step of voxemizing the model of the scene, the cost of generating new navigation data is reduced to the relation of only a small quantity of polygons, and the calculation resource can be saved.
Drawings
FIG. 1 is a schematic diagram of a model with fixed model navigation data but optionally variable model position;
FIG. 2 is a flow chart of steps of a navigation data processing method provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart of steps of another navigation data processing method provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of performing a difference set operation and a union set operation on two polygons in accordance with an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a navigation data modification process of an embodiment of the present disclosure;
FIG. 6 is a schematic architecture diagram of a navigation data processing method according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a model of bridge connection routing according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a model of cross-block routing in accordance with an embodiment of the present disclosure;
fig. 9 is a block diagram of a navigation data processing apparatus according to an embodiment of the present disclosure.
Detailed Description
To make the above objects, features and advantages of the present disclosure more comprehensible, the present disclosure is described in further detail below with reference to the accompanying drawings and detailed description, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, but not all embodiments. All other embodiments derived by a person of ordinary skill in the art based on the embodiments in the disclosure fall within the scope of the disclosure.
In the existing engine, two schemes of real-time construction and offline storage of navigation data of the whole world are generally provided for users to select.
The real-time construction scheme is to reconstruct the navigation data of the world, and if the navigation data with high precision and large range is required to be reconstructed, the construction process is time-consuming. While the off-line approach to storing navigation data throughout the world does not allow modification of already existing navigation data.
These two schemes are designed for versatility, and are not applicable in the case of items where model navigation data is fixed but the model position is arbitrarily changed, or in the case of items where simple modification of the walkability of a local navigation area is required at an arbitrary position at the time of operation.
As shown in fig. 1, the navigation data of the model a is fixed, the navigation data of the model B is fixed, but the position of the A, B model can be edited and replaced at will according to the needs of the user, and the navigation data of the whole virtual world needs to be reconstructed according to the traditional implementation method.
Based on this, the disclosure relates to providing a navigation data processing method, which takes a model or a model combination as a basic unit, can derive navigation data corresponding to the model or the model combination, the position of the model in a virtual scene can be changed at will, after the position is changed, a navigation grid of a target area can be regenerated by determining the target area to which the model moves, and then the navigation grid of the whole virtual world can be spliced without reconstructing the navigation data of the whole virtual world from the step of voxelization of the scene model.
In the embodiment of the disclosure, in response to selecting a target area needing to be updated with navigation data from a virtual scene, a plurality of models contained in the target area may be determined, where the plurality of models may include a first model and a second model, the first model refers to a model that is not moving in the target area, the second model refers to a model that moves from other areas in the virtual scene to the target area, a previously generated navigation polygon corresponding to the first model, that is, a first navigation polygon, is acquired, and a previously generated navigation polygon corresponding to the second model, that is, a second navigation polygon, is acquired, then a set of walkable polygons corresponding to the target area may be updated based on a positional relationship between the first navigation polygon and the second navigation polygon, and finally a navigation grid of the target area may be regenerated based on the updated set of walkable polygons. By adopting the mode, the regenerated navigation grid of the target area can be combined with the navigation grids of other areas in the virtual scene to obtain the navigation grid of the whole virtual scene, the navigation data of the whole virtual world can be obtained by simply calculating the navigation polygon relation of the adjacent parts of the model in the project of fixed navigation data of the model but random transformation of the model position during operation, compared with the navigation data of the whole virtual world reconstructed from the step of voxemizing the model of the scene, the cost of generating new navigation data is reduced to the relation of only a small quantity of polygons, and the calculation resource can be saved.
Referring to fig. 2, a step flowchart of a navigation data processing method provided by an embodiment of the present disclosure may specifically include the following steps:
in step 201, in response to selecting a target area from the virtual scene, in which navigation data update is required, a plurality of models included in the target area are determined.
Wherein the plurality of models includes at least one first model that does not move and at least one second model that moves from other regions in the virtual scene to the target region.
In the embodiment of the present disclosure, the terminal device may be a desktop computer, a notebook computer, a tablet computer, a game console, a smart phone, etc. that is responsible for executing each step in a navigation data processing method, but is not limited thereto. The terminal equipment is provided with a game application program of the target game, and a graphical user interface of the target game is provided through the terminal equipment. A virtual scene of the virtual world is displayed in the graphical user interface. The virtual scene may include various models, for example, a model of a virtual building, a model of a virtual road, a model of a virtual bridge, and the like.
In the embodiment of the disclosure, a user may designate a target area in a virtual scene where navigation data update is required, and illustratively, the user may frame one of the areas in the virtual scene, with the area as the target area. After the target area is selected, a model associated with the navigation data contained in the target area may be determined. Specifically, the models in the target area may be divided into a first model and a second model, wherein the first model refers to a model that is in the target area and has not moved, and the second model refers to a model that moves from other areas in the virtual scene to the target area.
Step 202, obtaining at least one first navigation polygon corresponding to at least one first model, and obtaining at least one second navigation polygon corresponding to at least one second model.
In the present disclosure, the navigation data corresponding to the model or the model combination may be derived and stored separately in units of the model or the model combination, for example, the navigation data of the model a may be derived and stored separately, or the navigation data of the model combination AB may be derived and stored separately, where the model combination AB may be a combined model of the model a and the model B. Thus, in the embodiments of the present disclosure, after determining the models included in the target area, navigation data corresponding to each model may be acquired separately, wherein the navigation data includes navigation polygon data. Thus, based on the navigation polygon data corresponding to each model, the first navigation polygon corresponding to the first model and the second navigation polygon corresponding to the second model can be determined.
Step 203, updating the walkable polygon set of the target area based on the positional relationship between the first navigation polygon and the second navigation polygon.
The walkable polygons in the walkable polygon set are used to form a navigation grid.
In the embodiment of the disclosure, the position relationship between the first navigation polygon and the second navigation polygon may be determined, if there are a plurality of first navigation polygons and a plurality of second navigation polygons, the position relationship between the plurality of first navigation polygons and the plurality of second navigation polygons needs to be determined, and then the walkable polygon set of the target area is updated based on the position relationship. Based on different position relations, updating modes corresponding to different walkable polygon sets, specifically, the position relations of the first navigation polygon and the second navigation polygon can comprise an intersecting relation and a non-intersecting relation.
As an example, if the first navigation polygon does not intersect the second navigation polygon and the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to the walkable region range, the second navigation polygon may be directly added to the walkable polygon set.
Step 204, regenerating the navigation grid of the target area based on the updated walkable polygon set.
After the navigation grids of the target area are generated, the navigation grids of the whole virtual scene can be obtained by combining the navigation grids of other areas in the virtual scene.
In summary, in the embodiment of the present disclosure, the navigation grid of the regenerated target area may be combined with the navigation grids of other areas in the virtual scene to obtain the navigation grid of the entire virtual scene, and in the item where the navigation data of the model is fixed but the model position is transformed randomly, the navigation polygon relationship at the adjacent part of the model can be simply calculated during operation to obtain the navigation data of the entire virtual world.
Referring to fig. 3, a flowchart illustrating steps of another navigation data processing method provided by an embodiment of the present disclosure may specifically include the following steps:
in step 301, in response to selecting a target area from the virtual scene, in which navigation data update is required, a plurality of models included in the target area are determined.
Wherein the plurality of models includes at least one first model that does not move and at least one second model that moves from other regions in the virtual scene to the target region. The target area may be a custom area.
Step 302, obtaining at least one first navigation polygon corresponding to at least one first model, and obtaining at least one second navigation polygon corresponding to at least one second model.
In an alternative embodiment of the present disclosure, the serialized data corresponding to the at least one second navigation polygon is stored in a local database, and the step 302 of obtaining the at least one second navigation polygon corresponding to the at least one second model may specifically include the following sub-steps:
obtaining serialized data corresponding to the at least one second navigational polygon from a local database;
and performing deserialization processing on the serialized data corresponding to the at least one second navigation polygon to obtain the at least one second navigation polygon corresponding to the at least one second model.
In an optional embodiment of the present disclosure, the navigation data processing method of the present disclosure may specifically further include the following steps:
and serializing and storing navigation polygon data corresponding to at least one second navigation polygon in a local database in a binary form.
In the embodiment of the disclosure, the navigation polygon data corresponding to the second model may be stored in the local database in a binary format in advance, for example, may be stored in a local hard disk. When the navigation polygon data is needed to be utilized for reconstructing the navigation grid in the running process of the application program, the navigation polygon data can be directly obtained from a local database, and the navigation polygon data is subjected to serialization processing, so that deserialization processing is needed first.
Similarly, the navigation polygon data corresponding to the first model may be stored in the local database in a binary format in advance, for example, may be stored in a local hard disk. When the navigation polygon data is needed to be utilized for reconstructing the navigation grid in the running process of the application program, the navigation polygon data can be directly obtained from a local database, and the navigation polygon data is subjected to serialization processing, so that deserialization processing is needed first.
Step 303, determining whether the first navigation polygon intersects the second navigation polygon.
In implementations, it may be determined whether the first navigation polygon and the second navigation polygon intersect based on the coordinate information of the two. For example, the maximum transverse (X), maximum longitudinal (Y), maximum vertical (Z), minimum transverse, minimum longitudinal, and minimum vertical coordinates of the first and second navigation polygons P and Q may be compared, and if pmax < QminX or pmax < QminY or PmaxZ < QminX > QmaxX or PminY > QmaxY or PminZ > QmaxZ, it may be determined that the first and second navigation polygons P and Q do not intersect without preliminary screening; if the preliminary screening is met, it is further necessary to calculate whether each edge in the first navigation polygon P intersects the second navigation polygon Q, and if any edge intersects the second navigation polygon Q, the calculation process of step 304 is entered.
Step 304, if the first navigation polygon intersects the second navigation polygon, a difference set or union of the first navigation polygon and the second navigation polygon is calculated, so as to obtain a corresponding difference set polygon or union polygon.
Fig. 4 is a schematic diagram of performing a difference set operation and a union set operation on two polygons according to an embodiment of the present disclosure, where the upper diagram in fig. 4 shows that a first navigation polygon P and a second navigation polygon Q perform the difference set operation to obtain a difference set polygon Z; the lower graph shows that the union operation is performed on the first navigation polygon P and the second navigation polygon Q to obtain a union polygon Z.
In an alternative embodiment of the present disclosure, the step 304 of calculating the difference set or union of the first navigation polygon and the second navigation polygon to obtain a corresponding difference set polygon or union polygon may specifically include the following sub-steps:
acquiring attribute information of a set second navigation polygon;
if the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to the range of the non-walkable area, calculating a difference set of the first navigation polygon and the second navigation polygon to obtain a corresponding difference set polygon;
if the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to the walkable region range, calculating a union of the first navigation polygon and the second navigation polygon to obtain a corresponding union polygon.
In the embodiment of the present disclosure, the user may further set attribute information of the second navigation polygon, for example, the walkable attribute information of the second navigation polygon may be modified from the original walkable region range to the non-walkable region range, or the walkable attribute information of the second navigation polygon may be modified from the original walkable region range of all virtual objects to only the specified virtual object walkable region range.
In the present disclosure, if the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to the non-walkable region range, calculating a difference set polygon of the first navigation polygon and the second navigation polygon; if the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to the walkable region range, calculating a union polygon of the first navigation polygon and the second navigation polygon; wherein the default first navigation polygon belongs to the walkable region range.
Step 305, determine if the difference set polygon or the union polygon is a simple convex polygon.
And 306, if the difference set polygon or the union polygon is not a simple convex polygon, performing subdivision processing on the difference set polygon or the union polygon, and adding a plurality of simple convex polygons obtained after subdivision into the movable polygon set.
In an optional embodiment of the present disclosure, the navigation data processing method of the present disclosure may specifically further include the following steps:
if the difference set polygon or the union polygon is a simple convex polygon, the difference set polygon or the union polygon is added to the set of walkable polygons.
Fig. 5 is a schematic diagram of a navigation data modification process according to an embodiment of the disclosure, which specifically includes the following steps:
1. and inputting a target area, wherein the target area is an area needing to update navigation data.
2. Acquiring navigation polygons corresponding to all models related to navigation data in a target area, wherein the navigation polygons can comprise first navigation polygons corresponding to original first models of the target area, all the original first navigation polygons form a walkable polygon set List of the target area, list (i) represents any first navigation polygon in the walkable polygon set, and i=List.num () -1; and a second navigation polygon Q corresponding to a second model which is added to the target area, wherein the second model which is added to the target area is specifically a model which moves from other areas in the virtual scene to the target area.
3. Judging whether the first navigation polygon List (i) is intersected with the second navigation polygon Q, and if not, acquiring the next first navigation polygon; if so, step 4 is performed.
4. And calculating a difference set or a union of the first navigation polygon List (i) and the second navigation polygon Q to obtain a difference set polygon or a union polygon Z.
5. Judging whether the difference set polygon or the union polygon Z is a simple convex polygon or not, if so, directly adding the difference set polygon or the union polygon Z into the walkable polygon set; if not, carrying out subdivision processing on the difference set polygon or the union set polygon Z, and adding a plurality of simple convex polygons obtained after subdivision into the walkable polygon set.
6. Judging whether all the first navigation polygons are traversed, and ending the flow if the first navigation polygons are traversed; if not, a next first navigation polygon is acquired.
In an alternative embodiment of the present disclosure, the splitting process of the difference set polygon or the union set polygon in step 307 may specifically include the following sub-steps:
if the difference set polygon or the union polygon is a concave polygon, adopting a rotation segmentation method to split the difference set polygon or the union polygon;
if the number of the vertexes of the difference set polygon or the union polygon exceeds a preset number threshold, splitting the difference set polygon or the union polygon by adopting a dichotomy;
if the difference set polygon or the union polygon is a polygon with holes, the difference set polygon or the union polygon is split by adopting an ear cutting method.
Since the polygon forming the navigation grid is required to be a simple convex polygon (since the distance between any two points in the convex polygon is shortest) and the number of the vertexes is limited, different subdivision modes are adopted correspondingly for different situations to carry out subdivision processing.
Step 307, regenerating the navigation grid of the target area based on the updated walkable polygon set.
In an alternative embodiment of the present disclosure, the step 307 of regenerating the navigation grid of the target area based on the updated walkable polygon set may specifically include the following sub-steps:
and regenerating a navigation grid of the target area based on the vertex data of each polygon in the updated walkable polygon set and the connection relation of each polygon.
According to the vertex data of the polygons in the updated walkable polygon set, the connection relation of the polygons can regenerate navigation data according to the data form required by the navigation grid and replace the original navigation data.
FIG. 6 is a schematic diagram of a navigation data processing method according to an embodiment of the present disclosure, wherein the tool portion includes automatic collision generation and serialized storage; the navigation loading part comprises reverse sequence loading, local navigation modification and navigation data splicing; the path-finding part comprises bridge connection path-finding and cross-block path-finding.
Specifically, after the navigation grid is regenerated, a route may be found based on the regenerated navigation grid. The bridge connection route searching is shown in fig. 7, the two models are mutually disjoint, the intercommunicated route is fixed as a bridge, and the navigation data of the models can not be combined at the moment. Assuming that a route is to be from a point in model A to a point in model B, the route is directly from the point in model A to point 1, from the model of the bridge to point 1 to point 2, and from point 2 to the point in model B. In the case of block-crossing road finding, as shown in fig. 8, two models directly intersect, at this time, a point O existing in both model a and model B needs to be found, and then the point O inside model a is found to the point O, and the point O is found to the point inside model B.
In summary, in the embodiment of the present disclosure, the navigation grid of the regenerated target area may be combined with the navigation grids of other areas in the virtual scene to obtain the navigation grid of the entire virtual scene, and in the item where the navigation data of the model is fixed but the model position is transformed randomly, the navigation polygon relationship at the adjacent part of the model can be simply calculated during operation to obtain the navigation data of the entire virtual world.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the disclosed embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the disclosed embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the disclosed embodiments.
Referring to fig. 9, a block diagram of a navigation data processing apparatus provided in an embodiment of the present disclosure is shown, which may specifically include the following modules:
a determining module 901, configured to determine, in response to selecting a target area that needs to be updated with navigation data from a virtual scene, a plurality of models included in the target area; wherein the plurality of models includes at least one first model that does not move and at least one second model that moves from other regions in the virtual scene to the target region;
an acquisition module 902 for acquiring at least one first navigation polygon corresponding to the at least one first model and at least one second navigation polygon corresponding to the at least one second model;
an updating module 903, configured to update the walkable polygon set of the target area based on a positional relationship between the first navigation polygon and the second navigation polygon;
a generating module 904, configured to regenerate a navigation grid of the target area based on the updated walkable polygon set.
In an embodiment of the present disclosure, the serialized data corresponding to the at least one second navigation polygon is stored in a local database, and the obtaining module includes:
an acquisition sub-module for acquiring, from the local database, serialized data corresponding to the at least one second navigation polygon;
and the deserialization processing sub-module is used for deserializing the serialized data corresponding to the at least one second navigation polygon to obtain the at least one second navigation polygon corresponding to the at least one second model.
In an embodiment of the disclosure, the apparatus further includes:
and the storage module is used for serializing and storing the navigation polygon data corresponding to the at least one second navigation polygon in the local database in a binary form.
In an embodiment of the present disclosure, the update module includes:
a first judging sub-module for judging whether the first navigation polygon intersects with the second navigation polygon;
a calculating sub-module, configured to calculate a difference set or a union of the first navigation polygon and the second navigation polygon if the first navigation polygon intersects the second navigation polygon, so as to obtain a corresponding difference set polygon or union polygon;
the second judging submodule is used for judging whether the difference set polygon or the union polygon is a simple convex polygon or not;
and the subdivision and addition sub-module is used for performing subdivision processing on the difference polygon or the union polygon if the difference polygon or the union polygon is not a simple convex polygon, and adding a plurality of simple convex polygons obtained after subdivision into the movable polygon set.
In an embodiment of the present disclosure, the update module further includes:
and the adding submodule is used for adding the difference set polygon or the union polygon into the walkable polygon set if the difference set polygon or the union polygon is a simple convex polygon.
In an embodiment of the present disclosure, the computing submodule includes:
an obtaining unit, configured to obtain attribute information of the set second navigation polygon;
the first calculating unit is used for calculating a difference set between the first navigation polygon and the second navigation polygon to obtain a corresponding difference set polygon if the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to an area range where the second navigation polygon cannot walk;
and the second calculation unit is used for calculating a union of the first navigation polygon and the second navigation polygon if the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to the walkable region range, so as to obtain the corresponding union polygon.
In an embodiment of the present disclosure, the splitting and adding sub-module includes:
the first subdivision processing unit is used for performing subdivision processing on the difference set polygon or the union polygon by adopting a rotation segmentation method if the difference set polygon or the union polygon is a concave polygon;
the second subdivision processing unit is used for performing subdivision processing on the difference set polygon or the union polygon by adopting a dichotomy if the number of the vertexes of the difference set polygon or the union polygon exceeds a preset number threshold;
and the third subdivision processing unit is used for performing subdivision processing on the difference set polygon or the union polygon by adopting an ear cutting method if the difference set polygon or the union polygon is a polygon with holes.
In an embodiment of the disclosure, the generating module includes:
and the generation sub-module is used for regenerating the navigation grid of the target area based on the updated vertex data of each polygon in the walkable polygon set and the connection relation of each polygon.
In summary, in the embodiment of the present disclosure, the navigation grid of the regenerated target area may be combined with the navigation grids of other areas in the virtual scene to obtain the navigation grid of the entire virtual scene, and in the item where the navigation data of the model is fixed but the model position is transformed randomly, the navigation polygon relationship at the adjacent part of the model can be simply calculated during operation to obtain the navigation data of the entire virtual world.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The embodiment of the disclosure also provides an electronic device, including: the navigation data processing method comprises a processor, a memory and a computer program which is stored in the memory and can run on the processor, wherein the computer program realizes the processes of the navigation data processing method embodiment when being executed by the processor, and can achieve the same technical effect, and the repetition is avoided, and the description is omitted here.
The embodiments of the present disclosure further provide a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements each process of the above-mentioned embodiments of a navigation data processing method, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the disclosed embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present disclosure 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 computer-usable program code embodied therein.
Embodiments of the present disclosure are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the disclosed embodiments 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 embodiment and all such alterations and modifications as fall within the scope of the disclosed embodiments.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail a navigation data processing method and a navigation data processing apparatus, an electronic device and a computer readable storage medium provided by the present disclosure, and specific examples have been applied herein to illustrate the principles and embodiments of the present disclosure, the above examples being provided only to assist in understanding the methods of the present disclosure and the core ideas thereof; meanwhile, as one of ordinary skill in the art will have variations in the detailed description and the application scope in light of the ideas of the present disclosure, the present disclosure should not be construed as being limited to the above description.

Claims (11)

1. A navigation data processing method, the method comprising:
determining a plurality of models contained in a target area in response to the selection of the target area needing navigation data updating from the virtual scene; wherein the plurality of models includes at least one first model that does not move and at least one second model that moves from other regions in the virtual scene to the target region;
obtaining at least one first navigation polygon corresponding to the at least one first model, and obtaining at least one second navigation polygon corresponding to the at least one second model;
updating the walkable polygon set of the target area based on the positional relationship of the first navigation polygon and the second navigation polygon;
and regenerating the navigation grid of the target area based on the updated walkable polygon set.
2. The method of claim 1, wherein the serialized data corresponding to the at least one second navigational polygon is stored in a local database, and wherein the obtaining the at least one second navigational polygon corresponding to the at least one second model comprises:
obtaining serialized data corresponding to the at least one second navigational polygon from the local database;
and performing deserialization processing on the serialized data corresponding to the at least one second navigation polygon to obtain the at least one second navigation polygon corresponding to the at least one second model.
3. The method according to claim 2, wherein the method further comprises:
and serializing and storing navigation polygon data corresponding to the at least one second navigation polygon in the local database in a binary form.
4. The method of claim 1, wherein updating the set of walkable polygons of the target region based on the positional relationship of the first navigational polygon and the second navigational polygon comprises:
judging whether the first navigation polygon is intersected with the second navigation polygon or not;
if the first navigation polygon is intersected with the second navigation polygon, calculating a difference set or a union set of the first navigation polygon and the second navigation polygon to obtain a corresponding difference set polygon or union set polygon;
judging whether the difference set polygon or the union polygon is a simple convex polygon or not;
if the difference set polygon or the union polygon is not a simple convex polygon, performing subdivision processing on the difference set polygon or the union polygon, and adding a plurality of simple convex polygons obtained after subdivision into the movable polygon set.
5. The method according to claim 4, wherein the method further comprises:
if the difference set polygon or the union polygon is a simple convex polygon, the difference set polygon or the union polygon is added to the set of walkable polygons.
6. The method of claim 4, wherein the computing the difference set or union of the first navigation polygon and the second navigation polygon to obtain a corresponding difference set polygon or union polygon comprises:
acquiring the set attribute information of the second navigation polygon;
if the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to the range of the non-walkable region, calculating a difference set between the first navigation polygon and the second navigation polygon to obtain a corresponding difference set polygon;
if the attribute information of the second navigation polygon indicates that the second navigation polygon belongs to the walkable region range, calculating a union of the first navigation polygon and the second navigation polygon to obtain the corresponding union polygon.
7. The method of claim 4, wherein the splitting the difference set polygon or the union set polygon comprises:
if the difference set polygon or the union polygon is a concave polygon, adopting a rotation segmentation method to carry out subdivision treatment on the difference set polygon or the union polygon;
if the number of the vertexes of the difference set polygon or the union polygon exceeds a preset number threshold, splitting the difference set polygon or the union polygon by adopting a dichotomy;
if the difference set polygon or the union polygon is a polygon with holes, an ear cutting method is adopted to split the difference set polygon or the union polygon.
8. The method of claim 1, wherein the regenerating the navigation grid of the target area based on the updated set of walkable polygons comprises:
and regenerating the navigation grid of the target area based on the updated vertex data of each polygon in the walkable polygon set and the connection relation of each polygon.
9. A navigation data processing device, the device comprising:
the determining module is used for determining a plurality of models contained in a target area needing navigation data updating in response to the selection of the target area from the virtual scene; wherein the plurality of models includes at least one first model that does not move and at least one second model that moves from other regions in the virtual scene to the target region;
an acquisition module for acquiring at least one first navigation polygon corresponding to the at least one first model and at least one second navigation polygon corresponding to the at least one second model;
the updating module is used for updating the walkable polygon set of the target area based on the position relation between the first navigation polygon and the second navigation polygon;
and the generation module is used for regenerating the navigation grid of the target area based on the updated walkable polygon set.
10. An electronic device, comprising: a processor, a memory and a computer program stored on the memory and capable of running on the processor, which computer program, when executed by the processor, carries out the steps of a navigation data processing method according to any one of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of a navigation data processing method according to any one of claims 1 to 8.
CN202311209292.5A 2023-09-18 2023-09-18 Navigation data processing method and device, electronic equipment and storage medium Pending CN117205561A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311209292.5A CN117205561A (en) 2023-09-18 2023-09-18 Navigation data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311209292.5A CN117205561A (en) 2023-09-18 2023-09-18 Navigation data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117205561A true CN117205561A (en) 2023-12-12

Family

ID=89038550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311209292.5A Pending CN117205561A (en) 2023-09-18 2023-09-18 Navigation data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117205561A (en)

Similar Documents

Publication Publication Date Title
EP1302904B1 (en) Object modeling
US11928391B2 (en) Hybrid surface modelling with subdivision surfaces and NURBS surfaces
JP2915826B2 (en) Interference check device
JP6850116B2 (en) Notch detection
CN110717213B (en) Method and device for rapidly generating BIM construction model of railway bridge
KR20140088027A (en) Groups of faces that form a geometrical pattern
CN113190006B (en) Robot path planning method, device and storage medium
CN107066646B (en) Method, system, and medium for topology change in constrained asymmetric subdivision networks
JP2019091445A (en) Creation of automated assembly mate for frequently used parts
CN114065357A (en) Revit-based segment assembly bridge modeling method and system
US20240085881A1 (en) Computer aided generative design with layer boundary determination to facilitate 2.5-axis subtractive manufacturing processes
US11307559B2 (en) Generation of holding tabs for fixing a part during machining
CN117205561A (en) Navigation data processing method and device, electronic equipment and storage medium
CN115779424B (en) Navigation grid path finding method, device, equipment and medium
JP2017519264A (en) Method and apparatus for generating a numerical representation of a three-dimensional object suitable for use in the production of a three-dimensional object by stereolithography
US9639992B2 (en) Methods and systems for multilevel editing of subdivided polygonal data
EP4195086A1 (en) Computer aided generative design with feature thickness control to facilitate manufacturing and structural performance
CN116229116A (en) Process multiplexing processing method and system based on similar parts and electronic equipment
US8990050B2 (en) Systems and methods of updating graphical objects
CN114202642A (en) Method and device for filling oversized holes in three-dimensional triangulation network model
JP4771822B2 (en) Numerical analysis mesh generation device, numerical analysis mesh generation method, numerical analysis mesh generation program
EP3674931A1 (en) Flexible modeling using a weak type definition
JP2810051B2 (en) Automatic element dividing device
JP2001092805A (en) Device and method for generating analytical mesh and recording medium
CN113297401B (en) Half data structure generation method, data processing method, device and equipment

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