CN110404261A - The construction method and device of virtual networks in game - Google Patents

The construction method and device of virtual networks in game Download PDF

Info

Publication number
CN110404261A
CN110404261A CN201910771299.3A CN201910771299A CN110404261A CN 110404261 A CN110404261 A CN 110404261A CN 201910771299 A CN201910771299 A CN 201910771299A CN 110404261 A CN110404261 A CN 110404261A
Authority
CN
China
Prior art keywords
road
crossing
road network
virtual
attribute
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.)
Granted
Application number
CN201910771299.3A
Other languages
Chinese (zh)
Other versions
CN110404261B (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.)
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 CN201910771299.3A priority Critical patent/CN110404261B/en
Publication of CN110404261A publication Critical patent/CN110404261A/en
Application granted granted Critical
Publication of CN110404261B publication Critical patent/CN110404261B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • 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/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • 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/80Special adaptations for executing a specific game genre or game mode

Landscapes

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

Abstract

The present invention provides the construction methods and device of virtual networks in a kind of game, are related to field of computer technology, comprising: obtain editor's information of the first road network;According to the road attribute of preset point of contact setting rule and first road network, by the crossing line segment group of road line segment group and the first road network that the first line segment group cutting is the first road network, and determine the segmental information of the segmental information at the crossing of the first road network and the road of the first road network;Generate the corresponding virtual crossing in each crossing of first road network;Generate the corresponding virtual crossing of every road of first road network;The virtual crossing of first road network and virtual road are combined, the virtual networks of first road network are generated.The building difficulty in turn reducing virtual networks, improves building efficiency.

Description

The construction method and device of virtual networks in game
Technical field
This application involves field of computer technology, more particularly, to the construction method and dress of virtual networks in a kind of game It sets.
Background technique
More and more game, including mobile phone games, towards big world, open world enriches details, true to restore Game experiencing direction develop, in other words, more and more maps are increasing, and content is also more and more abundant.
Current mode is mainly developer to realize each of map element, still, this mode face Face following difficulty: resource quantity required for building map is extremely huge, and human cost is higher and higher.The development cycle is long simultaneously, special It is not project initial stage, affects the product online time.
Summary of the invention
In view of this, this application provides the construction methods and device of virtual networks in a kind of game, to reduce in game The construction cost of road network improves the efficiency of the building of virtual networks in game, and then shortens the development cycle.
In a first aspect, the embodiment of the present application provides a kind of construction method of virtual networks in game.It include: acquisition first Editor's information of road network, editor's information of first road network include that the crossing description of first via net and the road of the first road network are retouched It states, crossing position of the description including first point of first road network and the crossing attribute corresponding to first point, the first via The road description of net includes the first line segment group position and the road attribute corresponding to the first line segment group;It is arranged according to preset point of contact The first line segment group cutting is the road line segment group and first of the first road network by the road attribute of regular and described first road network The crossing line segment group of road network, and determine the segmental information of the segmental information at the crossing of the first road network and the road of the first road network, institute The segmental information for stating the crossing of the first road network includes the crossing line segment group of first point and the first road network, the road of first road network Segmental information include the first road network road line segment group;According to the segmental information at each crossing of first road network, correspondence The road attribute of crossing attribute at first point and the crossing line segment group corresponding to the first road network generates the every of first road network The corresponding virtual crossing in a crossing;According to the segmental information of every road of first road network and corresponding to the road of the first road network The road attribute of route segment group generates the corresponding virtual road of every road of first road network;By first road network pair Virtual crossing and the virtual road combination answered, generate the virtual networks of first road network.
In a possible realization, the editor's information for obtaining the first road network, comprising: obtain the editor of the second road network Information, editor's information of second road network include the road description of the crossing description and the second road network of the second road network;According to pre- If modification rule correct the second road network editor's information, obtain editor's information of modified second road network;It will be modified described Editor's information of second road network is divided into editor's information of multiple first road networks according to preset division rule;Wherein, described pre- If division rule include: the first adjacent road network editor's information between include overlapping part.
In a possible realization, the method also includes: by corresponding each first road network pair of second road network The virtual networks answered merge, and obtain the virtual networks of second road network.
In a possible realization, the description of the crossing of second road network includes the position of second point and corresponds to second The crossing attribute of point, the road description of second road network includes second line segment group position and the road corresponding to second line segment group Attribute;The preset modification rule includes following one or more: judging that the intersection between the second line segment group of intersection is No there are second points, if it does not, increasing the corresponding second point of intersection;The trend for correcting second line segment group, so that same The corresponding line segment trend of Duan Daolu is consistent;Second point and second line segment are merged or split, so that passing through between second point Individual second line segment connection.
In a possible realization, according to the segmental information at each crossing of first road network, correspond at first point Crossing attribute and road attribute corresponding to crossing line segment group, generate the corresponding virtual road in each crossing of first road network The step of mouth, comprising: from the segmental information at the crossing of first road network, separation outlet attribute is the cutting at rotary island crossing Information;For the segmental information at each rotary island crossing, it is performed both by following steps: according to the crossing line segment group at the rotary island crossing Positional relationship and road attribute corresponding to the crossing line segment group, every two adjacent crossing line segment generate a U-shaped outline border;
The blending portion of external road is generated according to the corresponding multiple U-shaped outline borders in the rotary island crossing;According to the rotary island First position at crossing and crossing attribute generate the inside astragal part at the rotary island crossing;By the rotary island crossing The blending portion of external road and internal astragal part merge, and walking along the street Face Map of going forward side by side obtains virtual rotary island.
In a possible realization, according to the segmental information at each crossing of first road network, correspond at first point Crossing attribute and road attribute corresponding to crossing line segment group, generate the corresponding virtual road in each crossing of first road network The step of road, comprising: from the segmental information at the crossing of first road network, separation outlet attribute is the cutting at general crossing Information;According to the positional relationship of the crossing line segment group at the general crossing and corresponding to the road attribute of the crossing line segment group, often Two adjacent crossing line segments translate the specified width, which width on road outward, obtain a general crossing intersection point, the specified width, which width according to The corresponding road attribute of every two adjacent crossing line segments determines;According to the point of contact of the corresponding intersection point in each general crossing, The outer profile for determining the general crossing, the outer profile based on the general crossing carry out road surface and curb textures;Described logical With on the road surface textures at crossing, the corresponding position in the point of contact generates zebra stripes, obtains dummy general crossing.
In a possible realization, the road attribute of first road network includes the road width of the first road network;According to The segmental information of every road of first road network and road attribute corresponding to road line segment group generate first road network Every road corresponding virtual road the step of, comprising: according to the road line segment group pair of every road of first road network The road width answered generates the outline border of every road;Successively judged according to the road description of every road of first road network With the presence or absence of racetrack portion;For there are the roads of racetrack portion in first road network, the road description of the road is separated For racetrack portion and straight way part;According to preset curved road surface textures rule, move towards to carry out along bend based on the outline border of road The road surface textures of racetrack portion;According to preset straight way road surface textures rule, the outline border based on road carries out the road of straight way part Face Map;There are the merging of the road surface of the road surface of the racetrack portion of the road of racetrack portion and straight way part by described, and according to institute The corresponding road attribute for stating the road there are racetrack portion generates curb and graticule, and obtaining this, described there are the roads of racetrack portion The virtual road on road.
In a possible realization, according to the segmental information of every road of first road network and correspond to Road The road attribute of section group, the step of generating every road corresponding virtual crossing of first road network, further includes: for not depositing In the road of racetrack portion, according to preset straight way road surface textures rule, the outline border based on the road carries out the road of straight way part Face Map, and curb and graticule are generated according to the corresponding road attribute of the road line segment group of the road, obtain the virtual of the road Road.
In a possible realization, according to preset curved road surface textures rule, the outline border based on road is walked along bend To carry out racetrack portion road surface textures the step of, comprising: judge whether the corresponding turning amplitude of the racetrack portion meets Road service requirement;If do not met, the outline border of the road of the racetrack portion is smoothed, and based on after smoothing processing Outline border, according to road outline border along bend move towards carry out road surface textures.
In a possible realization, further includes: in the corresponding virtual crossing of the virtual networks of the first road network and virtual road The joining place on road generates pavement or gutter.
In a possible realization, further includes: the road outline border of the virtual networks based on first road network, according to pre- If virtual adjunct create-rule, generates the virtual adjunct in the roadside of first road network.
In a possible realization, further includes: determine Virtual Terrain;The virtual networks of first road network are projected On the Virtual Terrain of same position, and the Virtual Terrain is smoothed.
In a possible realization, the method is applied to exploitation terminal, and the exploitation terminal can show graphical user Interface, the graphic user interface include the virtual networks, and the virtual networks are corresponding with the first attribute, first attribute The road attribute of crossing attribute and/or the first road network including the first road network, the method also includes: in response to being directed to the void The attribute modification trigger action of quasi- road network, display properties modifiers panel;In response to being directed to the attribute modification object palette In the first attribute modification trigger action, modify first attribute.
In a possible realization, the method is applied to exploitation terminal, and the exploitation terminal can show graphical user Interface, the graphic user interface include the virtual networks, and the virtual networks include virtual module, and the virtual module is Virtual crossing and/or virtual road, the method also includes: behaviour is triggered in response to the attribute modification for the first virtual module Make, shows the second virtual module to be sampled;Response is directed to the attribute sampling operation of the second virtual module, virtual by described second The attribute of module is applied to first virtual module.
In a possible realization, editor's information of the first road network includes the road enclosed area of editor, the editor Road enclosed area be corresponding with attribute, this method further include: determine the virtual crossing of the first road network and the outline border of virtual road Information;According to the outline border information of the virtual crossing of the first road network and virtual road, road enclosed area undetermined is generated;According to pre- If matching rule, the road enclosed area of the road enclosed area and the editor undetermined is matched, by the road of the editor The inheritance of attribute of road enclosed area gives its matched road enclosed area undetermined.
Second aspect provides a kind of construction device of virtual networks in game.The device includes: acquiring unit, is used for Editor's information of the first road network is obtained, editor's information of first road network includes crossing description and the first road network of first via net Road description, the crossing description of first road network including first point position and corresponding to first point of crossing attribute, institute The road description for stating the first road network includes the first line segment group position and the road attribute corresponding to the first line segment group;Cutting unit, It is first by the first line segment group cutting for the road attribute according to preset point of contact setting rule and first road network The road line segment group of road network and the crossing line segment group of the first road network, and determine the segmental information and the first via at the crossing of the first road network The segmental information of the road of net, the segmental information at the crossing of first road network include the crossing line segment of first point and the first road network Group, the segmental information of the road of first road network include the road line segment group of the first road network;Generation unit, for according to The segmental information at each crossing of the first road network, the crossing attribute corresponding to first point and the crossing line segment corresponding to the first road network The road attribute of group generates the corresponding virtual crossing in each crossing of first road network;Generation unit is also used to, according to described The road attribute of the segmental information of every road of the first road network and the road line segment group corresponding to the first road network generates described the The corresponding virtual road of every road of one road network;Assembled unit is used for the corresponding virtual crossing of first road network and void Quasi- road combination, generates the virtual networks of first road network.
The third aspect, the embodiment of the present application provide a kind of computer readable storage medium again, described computer-readable to deposit Storage media be stored with machine can operating instruction, the computer can operating instruction by processor call and run when, the meter Calculation machine can operating instruction promote the processor to run above-mentioned first aspect or second aspect the method.
The embodiment of the present invention bring it is following the utility model has the advantages that
The construction method and device of virtual networks in a kind of game provided in an embodiment of the present invention.The first road network can be obtained Editor's information, editor's information of first road network include first via net crossing description and the first road network road description, should Crossing position of the description including first point of first road network and the crossing attribute corresponding to first point, the road of first road network are retouched It states including the first line segment group position and corresponding to the road attribute of the first line segment group, road network is described by Points And lines with this, drop Low editor's difficulty of editor's information of road network, and the resource needed when operation;By the way that rule is arranged according to preset point of contact It is road line segment group and crossing line segment group, and cutting based on crossing by the first line segment group cutting with the road attribute of the first road network The segmental information of point information and road generates the corresponding virtual crossing in each crossing and the corresponding virtual road of every road respectively; Finally virtual crossing and virtual road are combined, generates virtual networks, it can be by virtual networks answering according to generation logic with this Miscellaneous degree is divided, and is respectively processed, and the complexity of editor's information of road network is reduced, and reduces number in treatment process According to interfere with each other, improve the building efficiency of virtual networks, while reducing costs, the accuracy rate of virtual networks is higher.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the application specific embodiment or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the application, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the construction method flow diagram of virtual networks in a kind of game provided by the embodiments of the present application;
Fig. 2 is in game provided by the embodiments of the present application in the construction method of virtual networks the one of editor's information of road network A example;
Fig. 3 be game provided by the embodiments of the present application in virtual networks construction method in, editor's information of road network it is another One example;
Fig. 4 is to increase the one of the first point process in game provided by the embodiments of the present application in the construction method of virtual networks A example;
Fig. 5 be game provided by the embodiments of the present application in virtual networks construction method in, editor's information of road network it is another One example;
Fig. 6 be game provided by the embodiments of the present application in virtual networks construction method in, editor's information of road network it is another One example;
Fig. 7 be game provided by the embodiments of the present application in virtual networks construction method in, editor's information of road network it is another One example;
Fig. 8 is an example of blocking process in game provided by the embodiments of the present application in the construction method of virtual networks;
Fig. 9 is in game provided by the embodiments of the present application in the construction method of virtual networks, and another of segmental information shows Example;
In construction method of the Figure 10 for virtual networks in game provided by the embodiments of the present application, piecemeal rotary island generating process One example;
In construction method of the Figure 11 for virtual networks in game provided by the embodiments of the present application, piecemeal rotary island generating process Another example;
In construction method of the Figure 12 for virtual networks in game provided by the embodiments of the present application, piecemeal rotary island generating process Another example;
In construction method of the Figure 13 for virtual networks in game provided by the embodiments of the present application, general crossing segmental information One example;
In construction method of the Figure 14 for virtual networks in game provided by the embodiments of the present application, general crossing generating process Another example;
In construction method of the Figure 15 for virtual networks in game provided by the embodiments of the present application, general crossing generating process Another example;
In construction method of the Figure 16 for virtual networks in game provided by the embodiments of the present application, general crossing generating process Another example;
In construction method of the Figure 17 for virtual networks in game provided by the embodiments of the present application, general crossing generating process Another example;
Figure 18 is the construction device structural schematic diagram of virtual networks in a kind of game provided by the embodiments of the present application;
Figure 19 is a kind of computer equipment structural schematic diagram provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with attached drawing to the application Technical solution be clearly and completely described, it is clear that described embodiment is some embodiments of the present application, rather than Whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall in the protection scope of this application.
The term " includes " and " having " and their any deformation being previously mentioned in the entry of the embodiment of the present application, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of other are not listed or unit, or optionally It further include the other step or units intrinsic for these process, methods, product or equipment.
The embodiment of the present invention is further introduced with reference to the accompanying drawing.
Fig. 1 is the construction method flow diagram of virtual networks in a kind of game provided in an embodiment of the present invention.Such as Fig. 1 institute Show, this method comprises:
S110 obtains editor's information of the first road network.
Editor's information of first road network includes the road description of the crossing description and the first road network of first via net.This first Crossing position of the description including first point of road network and the crossing attribute corresponding to first point;The road description packet of first road network Include the first line segment group position and the road attribute corresponding to the first line segment group.
First line segment group cutting is the according to the road attribute of preset point of contact setting rule and the first road network by S120 The road line segment group of one road network and the crossing line segment group of the first road network, and determine the segmental information and first at the crossing of the first road network The segmental information of the road of road network.
The segmental information at the crossing of first road network includes the crossing line segment group of first point and the first road network;First road network Road segmental information include the first road network road line segment group.
S130 according to the segmental information at each crossing of the first road network, corresponding to first point of crossing attribute and corresponds to The road attribute of the crossing line segment group of first road network generates the corresponding virtual crossing in each crossing of the first road network.
S140, the road of the road line segment group according to the segmental information of every road of the first road network and corresponding to the first road network Road attribute generates the corresponding virtual road of every road of the first road network.
S150 combines the corresponding virtual crossing of the first road network and virtual road, generates the virtual networks of the first road network.
It describes in detail below to above-mentioned steps S110-S150.
In above-mentioned steps S110, road network information that editor's information of road network can be indicated by Points And lines.Wherein, point For determining position, for example, can indicate position by the longitude and latitude or coordinate of point.Line can be closed by the connection between point To indicate, which can be used to identify road for system;According to the position of the line and point corresponding with the line, the position of road can be determined It sets.In some instances, point or line can have attribute, which can be identified by way of label.All It may include some for identifying the point that road crosses, this is used to indicate the point that road crosses and is properly termed as crossing mark in point Point.Wherein, the line between joint is properly termed as road markings line segment.
For example, Fig. 2 shows editor's information of road network may include multiple points and a plurality of line.Wherein, point 200 and point 204 For crossing;Line segment group between point 200 and point 204 is that " 200,201,202,203,204 ", which is road.
In specific implementation, editor's information of road network can be edited by developer.As an example, developer can be with Using map as reference, to edit editor's information of road network, for example, can be using OSM as the reference information of editor's road network.Separately Outside, in order to cope with the editor of large-scale road network, an OSM exploitation server can be built to facilitate multiple person cooperational editor's road network Edit information.Exploitation terminal can obtain editor's information of road network by exploitation server, can also edit the editor of road network Information.
In some embodiments, editor's information of the first road network can be obtained by developer's direct editing, be also possible to The editor's information for the second road network edited according to developer is divided to obtain.
As an example, above-mentioned steps S110 can be achieved by the steps of:
Step 1.1) obtains editor's information of the second road network.Editor's information of second road network includes the road of the second road network The road description of mouth description and the second road network;
Step 1.2) corrects editor's information of the second road network according to preset modification rule, obtains modified second road network Editor's information;
Step 1.3) is divided into multiple first by editor's information of modified second road network according to preset division rule Editor's information of road network.Wherein, the preset division rule may include: the first adjacent road network editor's information between include The part of overlapping.
For above-mentioned steps 1.1), the crossing of above-mentioned second road network describes the position including second point and corresponds to second point Crossing attribute.The road description of above-mentioned second road network includes second line segment group position and the road category corresponding to second line segment group Property.
For above-mentioned steps 1.2), which can be an error detection process, the editor of editor's information of the second road network Cheng Zhong can only generally guarantee that format is correct, but can not check whether data comply with standard.It may insure by amendment scheme subsequent The available correct data of algorithm.There are two types of amendment schemes, and one is the editor's letters for directly prompting the second road network of developer Cease it is problematic, so that developer re-starts editor.Another is to be automatically corrected number according to preset modification rule According to.Which kind of is specifically depended on the difficulty for being automatically repaired realization using.
Above-mentioned preset modification rule may include following one or more:
Judge that the intersection between the second line segment of intersection whether there is second point, if it does not, increasing intersection pair The second point answered;
The trend of second line segment group is corrected, so that the corresponding line segment trend of same section of road is consistent;
Second point and second line segment are merged or split, so that being connected between second point by individual second line segment It connects.
For example, as shown in figure 3, for indicating the line segment group " 12,13,14,15 " and " 3,4,5,6 " cross, still of road There is no joints.
It, can first to line segment, " 13,14 " " 4,5 " near joint with line segment when increasing the corresponding second point of intersection It interrupts, then carries out vertex merging again and obtain joint.As shown in figure 4, can by be used to indicate road line segment group " 12,13, 14,15 " and " 3,4,5,6 " squeeze out upwards, and a circle is generated near vertex, and squeeze out, are allowed to for indicating upwards The line segment group " 12,13,14,15 " and " 3,4,5,6 " extrusion and the intersection of the extrusion of circle, are carrying out phase reducing, and retain on road After the line of bottom, realize to line segment " 13,14 " and line segment " 4,5 " interrupt near joint, then will interrupt and to carry out a vertex and melt Conjunction obtains joint.
For another example as shown in figure 5, for indicate road line segment group " 51,52,53,54 " be same section of road, still, " 51,52 " " 53,54 " move towards is inconsistent with line segment for line segment.At this point it is possible to adjust line segment trend.For example, as shown in fig. 6, logical Cross adjustment line segment " 53,54 " trend so that the line segment group for indicating road " 51,52,53,54 " trend is consistent.
For above-mentioned steps 1.3), in some embodiments, forms and deposit between the component (for example, road or crossing etc.) in city In very strong relevance.As space increases, the type of component is also continuously increased, and the network that is mutually related between component is multiple Miscellaneous degree will be with the increase of the speed of geometry grade.By splitting these associations, the demand to hardware can be reduced.
After the size of entire scene is more than a certain size, whole load is nearly impossible.Segmentation spatially Just at inevitable choice.Dividing grid by certain unit-sized is a more commonly used preset division rule.In addition, The preset division rule will keep associated integrality when can also including: piecemeal, even if the content that is mutually related is super Region should be also in inside a block out;In order to avoid meeting difficulty when piecemeal, the generation of the object of super large is avoided as far as possible. Such as the road of very long several pieces of a leap that do not divide.This is also unfavorable to game performance.
It in one example, can be according to presetting size for editor's information of the second road network as shown in Figure 7 Grid carries out Preliminary division to the layout of the second road network.As shown in connection with fig. 8, can by the line segment and point in the second road network, to Upper extrusion;And a cube is copied on the grid for needing piecemeal, becoming for the cube can be the side length of grid Twice.The figure squeezed out on grid is cut using the cube, retains bottom line segment and point, obtains the line of the first road network Section and point.Aforesaid operations, the line segment and point of available each first road network successively are carried out to each grid.It is implementing When, can once cut completion, then successively execute above-mentioned steps S110-S150, be also possible to every time for grid into Row cutting after obtaining a piecemeal, executes above-mentioned steps S110-S150, after the completion of execution, then carries out the cutting of next piecemeal. Furthermore it is possible to execute above-mentioned steps S110-S150 for each piecemeal by way of executing parallel.
In addition, needing to merge to obtain final result after obtaining virtual networks for each piecemeal.It, should based on this Method further include: the virtual networks of corresponding each first road network of the second road network are merged, the virtual networks of the second road network are obtained.
Editor's information for the road network corrected, it may be convenient to distinguish crossing and connect the road at crossing.With this It is a bit foundation, further crossing is separated, to be respectively processed.
In one example, for some special crossings, the virtual crossing of special rotary island type can be generated.It is based on This, above-mentioned steps S130 can specifically include:
Step 2.1), from the segmental information at the crossing of the first road network, separation outlet attribute is the cutting at rotary island crossing Information.
For example, as shown in figure 9, segmental information may include, the 1: 91 and first line segment " 91,92 ", " 91,93 ", " 91,94 ", " 91,95 " and " 91,96 " the first line segment groups constituted.
For the segmental information at each rotary island crossing, it is performed both by following steps 2.2)-step 2.5):
Step 2.2), according to the positional relationship of the crossing line segment group at rotary island crossing and corresponding to the road of the crossing line segment group Attribute, every two adjacent crossing line segment generate a U-shaped outline border.
For example, as shown in Figure 10, according to the first line segment " 91,92 " and " 91,93 " positional relationship and the first line segment " 91, 92 " and " 91,93 " it is corresponding have a lot of social connections, generate U-shaped outline border 1001.
Step 2.3) generates the blending portion of external road according to the corresponding multiple U-shaped outline borders in rotary island crossing.
For example, as shown in figure 11, the blending portion of external road is generated according to the corresponding multiple U-shaped outline borders in rotary island crossing 1101。
Step 2.4) generates the inside astragal at rotary island crossing according to the first of rotary island crossing position and crossing attribute Part.
For example, as shown in figure 12, it is raw according to the size of the first of rotary island crossing: 91 position and the crossing of the first road network At the inside astragal part 1201 at rotary island crossing.
The blending portion of the external road at rotary island crossing and internal astragal part are merged, and carried out by step 2.5) Road surface textures obtain virtual rotary island.
In one example, above-mentioned steps S130 can specifically include following steps, to realize the life at dummy general crossing At:
Step 3.1), from the segmental information at the crossing of the first road network, separation outlet attribute is the cutting at general crossing Information.
As shown in figure 13, general crossing segmental information may include, the 1: 131 and first line segment " 131,132 ", " 131,133 ", " 131,134 " and " 131,135 " the first line segment groups constituted.
Step 3.2), according to the positional relationship of the crossing line segment group at general crossing and corresponding to the road of the crossing line segment group Attribute, every two adjacent crossing line segments translate the specified width, which width on road outward, obtain a general crossing intersection point.The specified width, which width It is determined according to the road attribute for corresponding to every two adjacent crossing line segments.
For example, as shown in figure 14, according to the crossing line segment " 132,134 " and " 133,135 " of first road network at general crossing Positional relationship and road width, every two adjacent crossing line segments translate the specified width, which width on road outward (for example, road width Half), general crossing intersection point 141,142,143 and 144 is obtained respectively.
Step 3.3) determines the outer profile at general crossing according to the corresponding intersection point in each general crossing and point of contact, based on logical Road surface and curb textures are carried out with the outer profile at crossing.
Wherein, point of contact can be that the point of contact that rule determines is arranged according to preset point of contact in aforementioned S120.
In one example, based on intersection point 151,152,153 and 154 as shown in figure 15, which can be based on Figure 14 Shown in method hair determine that each intersection point does vertical line to original path, at most obtain two vertical line intersection points (may also only one or Person does not have, and three roads as shown in figure 16 cross, and point 161 i.e. no corresponding vertical point crosses for 4 roads, if vertical line In the another side of joint, being considered as does not have vertical line intersection point in original road), for example, intersection point 151 and 152 is on same road Hang down point 155 and 156, takes the point 155 farthest from road joint, as point of contact (when not having vertical line intersection point, then taking joint).
Vertical line section is done with road line segment after point of contact extrapolation certain distance, the width of the vertical line section is equal to road width.Sequentially Connection vertical line endpoint and intersection point have just obtained the outer profile at crossing, for example, as shown in figure 17 1701.Done at point of contact it is round and smooth, Obtain round and smooth corner.
Step 3.4), on the road surface textures at general crossing, the corresponding position in point of contact generates zebra stripes, obtains dummy general Crossing.
Wherein, zebra stripes one is perpendicular to point of contact are chiefly used in T font crossing, angle changing rate is orthogonal there are two types of form Crossroad etc..Another kind is two intersection point line directions, is chiefly used in the biggish crossing of tilt angle.The setting of the zebra stripes Mode can be preset, for example, can edit in the attribute at crossing.
Each road is all a line segment group, traverses these line segment groups, generates each road.When generating road, The part of bend can individually be handled.In one example, above-mentioned steps S140 can specifically include:
Step 4.1) generates every road according to the corresponding road width of road line segment group of every road of the first road network The outline border on road;
Step 4.2) successively judges whether there is racetrack portion according to the road description of every road of the first road network;
The road description of the road is separated into curved by step 4.3) for there are the roads of racetrack portion in the first road network Road part and straight way part;
Step 4.4) is moved towards to carry out bend along bend based on the outline border of road according to preset curved road surface textures rule Partial road surface textures;
Step 4.5), according to preset straight way road surface textures rule, the outline border based on road carries out the road surface of straight way part Textures;
The road surface of step 4.6), road surface and straight way part that the racetrack portion of the road of racetrack portion will be present merges, and According to there are the corresponding road attributes of the road of racetrack portion to generate curb and graticule, the road there are racetrack portion is obtained Virtual road.
Step 4.7), according to preset straight way road surface textures rule, is based on the road for the road of racetrack portion is not present The outline border on road carries out the road surface textures of straight way part, and generates curb according to the corresponding road attribute of the road line segment group of the road And graticule, obtain the virtual road of the road.
In step 4.2), bend can be separated by the angle of abutment points by independent processing.In each point can be with Which the point for obtaining his adjoining is.The abutment points on each vertex are one or two.Illustrate that he is road if it is one Endpoint, do not need to calculate.If there are two abutment points, illustrate that he is the middle section of road.Abutment points and current vertex can To form two sides, the angle that this two sides are formed is calculated.If angle is less than first threshold, it may be considered that being curved Road, wherein the setting value can predefine.
In some embodiments, above-mentioned steps 4.4) it can specifically include following steps:
Judge whether the corresponding turning amplitude of racetrack portion meets road service requirement;
If do not met, the outline border of the road of racetrack portion is smoothed, and based on the outline border after smoothing processing, It moves towards to carry out road surface textures along bend according to the outline border of road;
If met, the road surface textures of progress racetrack portion are moved towards along bend based on the outline border of road.
Wherein, road service requirement can be that turning amplitude cannot be excessive.For example, abutment points and current vertex can form Two sides calculate the angle that this two sides are formed.If angle is less than second threshold, it may be considered that being not meet road Service requirement, wherein the setting value can predefine, which can be greater than second threshold.In addition, road service requirement It can also include other requirements, can specifically be set according to the running requirement of real road.
In step 4.7), racetrack portion and straight way portion point are merged, the generation on road surface just completes, then again In addition curb and graticule.UV (mapping coordinates system) segmentation on road surface follows road surface to move towards, so as to when adding wheel trajectories etc., more It is convenient.In addition, the UV of textures can also be divided by certain length, guarantee every section of UV all in 0~1 section.
Wherein, UV refers to the coordinate system of textures.For example, the UV on vertex refers to that vertex is projected to the seat of textures by certain rule Coordinate in mark system.This projection is a kind of three-dimensional open and flat transformation to two-dimensional textures of model.He determines textures such as What is covered on model.We just need to calculate its corresponding UV value when generation vertex, just can guarantee that textures correctly paste On model.
The construction method and device of virtual networks in a kind of game provided in an embodiment of the present invention.The first road network can be obtained Editor's information, editor's information of first road network include first via net crossing description and the first road network road description, should Crossing position of the description including first point of first road network and the crossing attribute corresponding to first point, the road of first road network are retouched It states including the first line segment group position and corresponding to the road attribute of the first line segment group, road network is described by Points And lines with this, drop Low editor's difficulty of editor's information of road network, and the resource needed when operation;By the way that rule is arranged according to preset point of contact It is road line segment group and crossing line segment group by the first line segment group cutting with the road attribute of the first road network, and is based on the first road network The segmental information at crossing and the segmental information of road of the first road network generate the corresponding void in each crossing of the first road network respectively The corresponding virtual road of every road at quasi- crossing and the first road network;To finally virtual crossing and virtual road be combined, be generated Virtual networks can be divided according to complexity with this, and are respectively processed by virtual networks, reduce the volume of road network The complexity of volume information reduces interfering with each other for data in treatment process, improves the building efficiency of virtual networks, reduce While cost, the accuracy rate of virtual networks is higher.
The embodiment of the present invention can also be realized according to precision not by the modification rule of editor's information of the road network of offer Editor's information of high road network generates the higher virtual networks of precision, and accuracy rate with higher, while reducing road network Editor's information editor's difficulty.In addition, divided by the modified editor's information of the second road network by block, and respectively into Row processing can reduce requirement of the treatment process to hardware, and improve the formation speed of virtual networks.
In addition, can also be carried out to crossing and road according to complexity further in the building process of virtual networks Subdivision, and is respectively processed, and the complexity of editor's information of road network is lower, data the case where interfering with each other in treatment process Less, the building of virtual networks is more efficient, and cost is lower, and the accuracy rate of virtual networks is higher.
In some embodiments, in textures, if crossing has some seams and occurs when encountering big corner.In road network The editor that edits information and when amendment, can keep the normal of crossing junction unanimously can effectively avoid crossing seam. Furthermore it is also possible to be modified as follows:
As an example, it is generated in the joining place of the corresponding virtual crossing of virtual networks of the first road network and virtual road Pavement or gutter.To use the modes such as pavement or gutter to cover seam.
As another example, if encountering small gap, interface can be grouped, then vertex merging is to together may be used With very good solution seam problems.
In addition, also having seam problems in curb and ground, a part of area can be overlapped in textures.Dan Shi, can be with Avoid plane from being overlapped as far as possible, if the case where encountering overlapping, be staggered up and down, and adjacent edge generate one it is vertical Face avoids seeing gap when camera lens level.
In some embodiments, this method further include: the road outline border based on virtual networks, according to presetting virtual adjunct Create-rule generates the virtual adjunct in roadside.
Wherein, the point that the outline border of road extracts can be used to generate the adjunct in roadside.It can be according to virtual networks Road outline border, isolate road surface part;According to adjunct attribute (for example, spacing, end to end cutting etc.) process points distribution, carry Enter adjusting parameter (for example, Random-Rotation, random size, random site offset etc.);For be spaced biggish adjunct (for example, Dustbin), merging a little can be done automatically when cutting larger end to end.
It sometimes appear that the problem of adjunct is overlapped, the embodiment of the present invention can also provide when multilayer adjunct generates Collision rule.
As an example: collision rule -- remove: the adjunct covered by the higher attached object point of priority removes;
As another example: collision rule -- it squeezes: the adjunct in a certain distance from the higher adjunct of priority It is squeezed.
In some embodiments, virtual networks can be supported according to hypsography.The height of road surface curve is by locality The height of shape obtains.Since the realization of all virtual networks before is all in one plane completed, collected height is not P.y can be directly stored to, and (P is locative variable, and y represents vertical direction.) in, and need temporarily to exist in other variable. It is just filled P.y is highly stored to when to the last constructing road surface.
In further embodiments, in order to which solve can be by difference polishing, with landform between each sampled point of road network Not the case where actual conditions are not met, and are easy to appear interspersed phenomenon.This method can also specifically include the steps of determining that virtually Shape;The virtual networks are projected on the Virtual Terrain of same position, and Virtual Terrain is smoothed.
In some embodiments, virtual networks can also be edited.
It is, for example, possible to use a set of indexes by road and crossing, the attribute of every road and crossing is arranged, and The object palette of corresponding accessory attribute.Individual attribute can be arranged in every road, each crossing.Each index has its correspondence Geometry, for storing corresponding data.Unique identification corresponding with road can be used to indicate in index, so as to Retain editor's information of unchanged road network when road network iteration.
As an example, this method is applied to exploitation terminal, which can show graphic user interface, the figure User interface includes virtual networks, which is corresponding with the first attribute, which includes that the crossing of the first road network belongs to The road attribute of property and/or the first road network, this method further include:
Step 5.1), in response to being directed to the attribute modification trigger action of virtual networks, display properties modifiers panel;
Step 5.2), in response to the modification trigger action for the first attribute in attribute modification object palette, modification the One attribute.
In some embodiments, during the treatment, attribute is essentially all that point or line are corresponding.Due to having in process It is many to merge, cutting, the operation of reconstruction.Attribute is difficult directly to hand on.The embodiment of the present invention can be original by resampling The method of data acquires the attribute of an initial data before needing using attribute, achievees the purpose that direct transitive attribute, side Just quick, strong applicability.
As an example, this method is applied to exploitation terminal, which can show graphic user interface, the figure User interface includes virtual networks, which includes virtual module, which is virtual crossing and/or virtual road Road, this method further include:
Step 6.1) shows that be sampled second is empty in response to being directed to the attribute modification trigger action of the first virtual module Quasi- module;
Step 6.2), response is directed to the attribute sampling operation of the second virtual module, by the attribute of second virtual module Applied to first virtual module.
In addition, in some instances, virtual module also could alternatively be editor's information of road network, for example, crossing attribute or Road attribute etc..
Through the embodiment of the present invention, it can modify in real time to the virtual networks of generation, and graphical user can be passed through Interface, to provide more intuitive effect, the user experience is improved.
In addition, in some embodiments, building process avoids duplicate calculating that from can significantly and being promoted often than relatively time-consuming Construct efficiency.The method of above-mentioned piecemeal, can be to avoid largely computing repeatedly, and intermediate result can be kept to repeat It utilizes.
In another example, timesharing calculating can be carried out.For example, intermediate node can be arranged rationally to separate each step Suddenly, or certain intermediate results are stored, to avoid largely computing repeatedly.It can also be when encountering building mistake, these middle nodes Point can be very good that building process is helped to start to continue to construct in nearest correct node.These intermediate nodes are sometimes It can be used as the transfer mode of data.
In another example, preview can also be created.Wherein, the process for constructing rule, is usually associated with multiple numerical value Or the iteration of node.If being intended merely to see the structure of some adjustment, do not need to cover entire building process in fact.This When can to create calculation amount small but can quickly obtain the preview process of result, can greatly accelerate iteration speed.Preview Process can be separated with the building process of virtual networks, and preview process and virtual networks can be realized by handoff functionality Construct the switching of process.
In another example, it can also can optimize the resource for generating and being more suitable for building rule refinement.Building generates Resource be very flexible in fact, for example bend needs points how many sections on earth, can be determined, be avoided by angle and length completely Waste on the number of face.
In other embodiments, editor's information of road network can also include the road enclosed area of editor.
But during data edition, be difficult to the road actually generated have a lot of social connections consider it is thorough, so these edit Road enclosed area sometimes far from road, sometimes again and road coincidence.
It can be tied according to the outline border information in crossing and road generating process, to generate road enclosed area undetermined The road enclosed area and road enclosed area undetermined collected are compiled in collaboration with, it is corresponding can to determine that the function of enclosed area undetermined generates Function and concrete shape.In one example, editor's information of the first road network includes the road enclosed area of editor, the volume The road enclosed area collected is corresponding with attribute, this method further include:
Determine the virtual crossing of the first road network and the outline border information of virtual road;
According to above-mentioned outline border information, road enclosed area undetermined is generated;
According to preset matching rule, the road enclosed area of road enclosed area and editor undetermined is matched, by editor's The inheritance of attribute of road enclosed area gives its matched road enclosed area undetermined.
Wherein, preset matching rule may include that position is identical;Or position is identical and shape is close;Or it is closely located to And shape close to etc..
Figure 18 provides a kind of construction device structural schematic diagram of virtual networks in game.As shown in figure 18, the device packet It includes:
Acquiring unit 1801, for obtaining editor's information of the first road network, editor's information of first road network includes the One road network crossing description and the first road network road description, first road network crossing description including first point position and Corresponding to first point of crossing attribute, the road description of first road network including the first line segment group position and corresponds to First Line The road attribute of section group;
Cutting unit 1802, for the road attribute according to preset point of contact setting rule and first road network, by institute The crossing line segment group of road line segment group and the first road network that the first line segment group cutting is the first road network is stated, and determines the first road network The segmental information of the road of the segmental information at crossing and the first road network, the segmental information at the crossing of first road network include first The crossing line segment group of point and the first road network, the segmental information of the road of first road network includes the road line segment of the first road network Group;
Generation unit 1803, for according to each crossing of first road network segmental information, corresponding to first point The road attribute of crossing attribute and the crossing line segment group corresponding to the first road network, each crossing for generating first road network are corresponding Virtual crossing;
Generation unit 1803 is also used to, and according to the segmental information of every road of first road network and corresponds to the first via The road attribute of the road line segment group of net generates the corresponding virtual road of every road of first road network;
Assembled unit 1804, for combining the corresponding virtual crossing of first road network and virtual road, described in generation The virtual networks of first road network.
In some embodiments, acquiring unit 1801 is specifically used for:
Obtain editor's information of the second road network, editor's information of second road network include the second road network crossing description and The road description of second road network;
Editor's information that the second road network is corrected according to preset modification rule obtains editor's letter of modified second road network Breath;
By editor's information of modified second road network according to preset division rule, it is divided into multiple first road networks Edit information;Wherein, the preset division rule includes: the portion including overlapping between editor's information of the first adjacent road network Point.
In some embodiments, generation unit 1803 is also used to:
The corresponding virtual networks of corresponding each first road network of second road network are merged, second road network is obtained Virtual networks.
In some embodiments, second road network crossing description include second point position and corresponding to second point Crossing attribute, the road description of second road network include second line segment group position and the road category corresponding to second line segment group Property;
The preset modification rule includes following one or more:
Judge that the intersection between the second line segment of intersection whether there is second point, if it does not, increasing intersection pair The second point answered;
The trend of second line segment group is corrected, so that the corresponding line segment trend of same section of road is consistent;
Second point and second line segment are merged or split, so that being connected between second point by individual second line segment It connects.
In some embodiments, generation unit 1803 is specifically used for:
From the segmental information at the crossing of first road network, separation outlet attribute is the segmental information at rotary island crossing; For the segmental information at each rotary island crossing, it is performed both by following steps:
According to the positional relationship of the crossing line segment group at the rotary island crossing and corresponding to the road attribute of the crossing line segment group, Every two adjacent crossing line segment generates a U-shaped outline border;
The blending portion of external road is generated according to the corresponding multiple U-shaped outline borders in the rotary island crossing;
According to first position at the rotary island crossing and crossing attribute, the inside astragal portion at the rotary island crossing is generated Point;
The blending portion of the external road at the rotary island crossing and internal astragal part are merged, walking along the street face paste of going forward side by side Figure obtains virtual rotary island.
In some embodiments, generation unit 1803 is specifically used for:
From the segmental information at the crossing of first road network, separation outlet attribute is that the general crossing at general crossing is cut Divide information;
According to the positional relationship of the crossing line segment group at general crossing road corresponding with the crossing line segment group is corresponded to Attribute, every two adjacent crossing line segments translate the specified width, which width on road outward, obtain a general crossing intersection point, the specified width Degree is determined according to the corresponding road attribute of every two adjacent crossing line segments;
According to the corresponding intersection point in each general crossing and point of contact, determines the outer profile at the general crossing, be based on institute The outer profile for stating general crossing carries out road surface and curb textures;
On the road surface textures at the general crossing, the corresponding position in the point of contact generates zebra stripes, obtains dummy general Crossing.
In some embodiments, the road attribute of first road network includes the road width of the first road network;Generation unit 1803 are specifically used for:
According to the corresponding road width of road line segment group of every road of first road network, the outer of every road is generated Frame;
Racetrack portion is successively judged whether there is according to the road description of every road of first road network;
For there are the roads of racetrack portion in first road network, the road description of the road is separated into racetrack portion With straight way part;
According to preset curved road surface textures rule, the road surface of progress racetrack portion is moved towards along bend based on the outline border of road Textures;
According to preset straight way road surface textures rule, the outline border based on road carries out the road surface textures of straight way part;
There are the merging of the road surface of the road surface of the racetrack portion of the road of racetrack portion and straight way part by described, and according to institute The corresponding road attribute for stating the road there are racetrack portion generates curb and graticule, and obtaining this, described there are the roads of racetrack portion The virtual road on road.
In some embodiments, generation unit 1803 is specifically used for:
For the road of racetrack portion is not present, according to preset straight way road surface textures rule, the outline border based on the road The road surface textures of straight way part are carried out, and curb and graticule are generated according to the corresponding road attribute of the road line segment group of the road, Obtain the virtual road of the road.
Generation unit 1803 is specifically used in some embodiments:
Judge whether the corresponding turning amplitude of the racetrack portion meets road service requirement;
If do not met, the outline border of the road of the racetrack portion is smoothed, and based on smoothing processing after Outline border moves towards to carry out road surface textures along bend according to the outline border of road.
In some embodiments, generation unit 1803 is also used to:
Pavement or draining are generated in the joining place of the corresponding virtual crossing of the virtual networks of the first road network and virtual road Ditch.
In some embodiments, generation unit 1803 is also used to:
The road outline border of virtual networks based on first road network is generated according to virtual adjunct create-rule is preset The virtual adjunct in the roadside of first road network.
In some embodiments, generation unit 1803 is also used to:
Determine Virtual Terrain;
The virtual networks of first road network are projected on the Virtual Terrain of same position, and to the Virtual Terrain into Row smoothing processing.
In some embodiments, described device is applied to exploitation terminal, and the exploitation terminal can show graphic user interface, The graphic user interface includes the virtual networks, and the virtual networks are corresponding with the first attribute, and first attribute includes The crossing attribute of first road network and/or the road attribute of the first road network, further includes:
Display unit, for the attribute modification trigger action in response to being directed to the virtual networks, display properties modifies work Has panel;
Generation unit 1803 is also used to, and is touched in response to the modification for the first attribute in the attribute modification object palette Hair operation, modifies first attribute.
In some embodiments, described device is applied to exploitation terminal, and the exploitation terminal can show graphic user interface, The graphic user interface includes the virtual networks, and the virtual networks include virtual module, and the virtual module is virtual Crossing and/or virtual road, further includes:
Display unit shows to be sampled for the attribute modification trigger action in response to being directed to the first virtual module Two virtual modules;
Generation unit 1803 is also used to, and response is directed to the attribute sampling operation of the second virtual module, virtual by described second The attribute of module is applied to first virtual module.
In some embodiments, editor's information of first road network includes the road enclosed area of editor, the editor Road enclosed area be corresponding with attribute.Generation unit 1803 is also used to:
Determine the virtual crossing of the first road network and the outline border information of virtual road;
According to the outline border information of the virtual crossing of the first road network and virtual road, road enclosed area undetermined is generated;
According to preset matching rule, the road enclosed area of the road enclosed area and the editor undetermined is matched, The inheritance of attribute of the road enclosed area of the editor is given into its matched road enclosed area undetermined.
As shown in figure 19, a kind of computer equipment 1900 provided by the embodiments of the present application, comprising: processor 1901, storage Device 1902 and bus, the memory 1902 is stored with the executable machine readable instructions of the processor 1901, when electronics is set When received shipment row, by bus communication between the processor 1901 and the memory 1902, the processor 1901 executes institute Machine readable instructions are stated, to execute as in above-mentioned game the step of the construction method of virtual networks.
Specifically, above-mentioned memory 1902 and processor 1901 can be general memory and processor, not do here It is specific to limit, when the computer program of 1901 run memory 1902 of processor storage, it is able to carry out in above-mentioned game virtual The construction method of road network.
Corresponding to the building of virtual networks in above-mentioned game, the embodiment of the present application also provides a kind of computer-readable storages Medium is stored with computer program on the computer readable storage medium, and the computer program is held when being run by processor In the above-mentioned game of row the step of the building of virtual networks.
In game provided by the embodiment of the present application the construction device of virtual networks can in equipment specific hardware or Person is installed on software or firmware in equipment etc..The technology of device provided by the embodiment of the present application, realization principle and generation Effect is identical with preceding method embodiment, and to briefly describe, Installation practice part does not refer to place, can refer to preceding method reality Apply corresponding contents in example.It is apparent to those skilled in the art that for convenience and simplicity of description, foregoing description System, the specific work process of device and unit, the corresponding process during reference can be made to the above method embodiment, herein no longer It repeats.
In embodiment provided herein, it should be understood that disclosed device and method, it can be by others side Formula is realized.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, only one kind are patrolled Function division is collected, there may be another division manner in actual implementation, in another example, multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some communication interfaces, device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in embodiment provided by the present application can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, develop terminal or the network equipment etc.) execute each embodiment of the application described in control method for movement whole or Part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), Random access memory (RAM, Random Access Memory), magnetic or disk etc. be various to can store program code Medium.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing, in addition, term " the One ", " second ", " third " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Finally, it should be noted that embodiment described above, the only specific embodiment of the application, to illustrate the application Technical solution, rather than its limitations, the protection scope of the application is not limited thereto, although with reference to the foregoing embodiments to this Shen It please be described in detail, those skilled in the art should understand that: anyone skilled in the art Within the technical scope of the present application, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the range of the embodiment of the present application technical solution.Should all cover the application protection scope it It is interior.Therefore, the protection scope of the application should be subject to the protection scope in claims.

Claims (17)

1. the construction method of virtual networks in a kind of game characterized by comprising
Obtain editor's information of the first road network, editor's information of first road network include first road network crossing description and The road description of first road network, first road network crossing description including first point position and correspond to described first The crossing attribute of point, the road description of first road network include the first line segment group position and corresponding to the first line segment group Road attribute;
It is described by the first line segment group cutting according to the road attribute of preset point of contact setting rule and first road network The crossing line segment group of the road line segment group of first road network and first road network, and determine the cutting at the crossing of first road network The segmental information of the road of information and first road network, the segmental information at the crossing of first road network include described first point With the crossing line segment group of first road network, the segmental information of the road of first road network includes the road of first road network Line segment group;
According to the segmental information at each crossing of first road network, the crossing attribute and correspondence corresponding to described first point In the road attribute of the crossing line segment group of first road network, the corresponding virtual road in each crossing of first road network is generated Mouthful;
The road of road line segment group according to the segmental information of every road of first road network and corresponding to first road network Road attribute generates the corresponding virtual road of every road of first road network;
The corresponding virtual crossing of first road network and virtual road are combined, the virtual networks of first road network are generated.
2. the method according to claim 1, wherein the editor's information for obtaining the first road network, comprising:
Obtain editor's information of the second road network, editor's information of second road network include second road network crossing description and The road description of second road network;
Editor's information that second road network is corrected according to preset modification rule obtains the editor of modified second road network Information;
By editor's information of modified second road network according to preset division rule, it is divided into multiple first road networks Edit information;Wherein, the preset division rule includes: between editor's information of adjacent first road network including overlapping Part.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
The corresponding virtual networks of corresponding each first road network of second road network are merged, second road network is obtained Virtual networks.
4. according to the method described in claim 2, it is characterized in that, the crossing description of second road network includes the position of second point Set and corresponding to the second point crossing attribute, the road description of second road network includes second line segment group position and correspondence In the road attribute of the second line segment group;
The preset modification rule includes following one or more:
Judge that the intersection between the second line segment of intersection whether there is second point, if it does not, it is corresponding to increase intersection Second point;
The trend of the second line segment group is corrected, so that the corresponding line segment trend of same section of road is consistent;
The second point and the second line segment are merged or split, so that by individually described between the second point Second line segment connection.
5. the method according to claim 1, wherein being believed according to the cutting at each crossing of first road network The road attribute of breath, the crossing attribute and the crossing line segment group corresponding to first road network for corresponding at described first point, The step of generating the corresponding virtual crossing in each crossing of first road network, comprising:
From the segmental information at the crossing of first road network, separation outlet attribute is the segmental information at rotary island crossing;For The segmental information at each rotary island crossing, is performed both by following steps:
According to the positional relationship of the crossing line segment group at the rotary island crossing and corresponding to the road attribute of the crossing line segment group, every two A adjacent crossing line segment generates a U-shaped outline border;
The blending portion of external road is generated according to the corresponding multiple U-shaped outline borders in the rotary island crossing;
According to first position at the rotary island crossing and crossing attribute, the inside astragal part at the rotary island crossing is generated;
The blending portion of the external road at the rotary island crossing and internal astragal part are merged, walking along the street Face Map of going forward side by side obtains To virtual rotary island.
6. the method according to claim 1, wherein being believed according to the cutting at each crossing of first road network The road attribute of breath, the crossing attribute and the crossing line segment group corresponding to first road network for corresponding at described first point, The step of generating the corresponding virtual crossing in each crossing of first road network, comprising:
From the segmental information at the crossing of first road network, separation outlet attribute is the segmental information at general crossing;
According to the positional relationship of the crossing line segment group at the general crossing and corresponding to the road attribute of the crossing line segment group, every two The adjacent crossing line segment of item translates the specified width, which width on road outward, obtains a general crossing intersection point, the specified width, which width is according to right The road attribute of every two adjacent crossing line segments of Ying Yu determines;
According to the corresponding intersection point in each general crossing and point of contact, the outer profile at the general crossing is determined, based on described logical Road surface and curb textures are carried out with the outer profile at crossing;
On the road surface textures at the general crossing, the corresponding position in the point of contact generates zebra stripes, obtains dummy general crossing.
7. the method according to claim 1, wherein the road attribute of first road network includes road width; The road category of road line segment group according to the segmental information of every road of first road network and corresponding to first road network Property, the step of generating every road corresponding virtual road of first road network, comprising:
According to the corresponding road width of road line segment group of every road of first road network, the outline border of every road is generated;
Racetrack portion is successively judged whether there is according to the road description of every road of first road network;
For there are the road of racetrack portion, the road description of the road is separated into racetrack portion and straight in first road network Road part;
According to preset curved road surface textures rule, pasted based on the outline border of road along the road surface that bend moves towards to carry out racetrack portion Figure;
According to preset straight way road surface textures rule, the outline border based on road carries out the road surface textures of straight way part;
There are the merging of the road surface of the road surface of the racetrack portion of the road of racetrack portion and straight way part by described, and are deposited according to described Curb and graticule are generated in the corresponding road attribute of the road of racetrack portion, it is described there are the road of racetrack portion to obtain this Virtual road.
8. the method according to the description of claim 7 is characterized in that according to the segmental information of every road of first road network With the road attribute for the road line segment group for corresponding to first road network, the corresponding void of every road of first road network is generated The step of quasi- road, further includes:
For the road of racetrack portion is not present, according to preset straight way road surface textures rule, the outline border based on the road is carried out The road surface textures of straight way part, and curb and graticule are generated according to the corresponding road attribute of the road line segment group of the road, it obtains The virtual road of the road.
9. the method according to the description of claim 7 is characterized in that being based on road according to preset curved road surface textures rule Outline border along bend move towards carry out racetrack portion road surface textures the step of, comprising:
Judge whether the corresponding turning amplitude of the racetrack portion meets road service requirement;
If do not met, the outline border of the road of the racetrack portion is smoothed, and based on the outline border after smoothing processing, It moves towards to carry out road surface textures along bend according to the outline border of road.
10. the method according to claim 1, wherein further include:
Pavement or draining are generated in the corresponding virtual crossing of virtual networks of first road network and the joining place of virtual road Ditch.
11. the method according to claim 1, wherein further include:
The road outline border of virtual networks based on first road network, according to presetting virtual adjunct create-rule, described in generation The virtual adjunct in the roadside of the first road network.
12. the method according to claim 1, wherein further include:
Determine Virtual Terrain;
The virtual networks of first road network are projected on the Virtual Terrain of same position, and the Virtual Terrain are carried out flat Sliding processing.
13. the method according to claim 1, wherein the method is applied to exploitation terminal, the exploitation terminal It can show that graphic user interface, the graphic user interface include the virtual networks, the virtual networks are corresponding with the first category Property, first attribute includes the crossing attribute of first road network and/or the road attribute of first road network, the method Further include:
In response to being directed to the attribute modification trigger action of the virtual networks, display properties modifiers panel;
In response to the modification trigger action for the first attribute in the attribute modification object palette, modifies described first and belong to Property.
14. the method according to claim 1, wherein the method is applied to exploitation terminal, the exploitation terminal It can show that graphic user interface, the graphic user interface include the virtual networks, the virtual networks include virtual module, The virtual module be virtual crossing and/or virtual road, the method also includes:
In response to being directed to the attribute modification trigger action of the first virtual module, the second virtual module to be sampled is shown;
Response is directed to the attribute sampling operation of the second virtual module, and the attribute of second virtual module is applied to described first Virtual module.
15. the method according to claim 1, wherein editor's information of first road network includes the road of editor The road enclosed area of road enclosed area, the editor is corresponding with attribute, the method also includes:
Determine the virtual crossing of first road network and the outline border information of virtual road;
According to the outline border information of the virtual crossing of first road network and virtual road, road enclosed area undetermined is generated;
According to preset matching rule, the road enclosed area of the road enclosed area and the editor undetermined is matched, by institute The inheritance of attribute for stating the road enclosed area of editor gives its matched road enclosed area undetermined.
16. the construction device of virtual networks in a kind of game characterized by comprising
Acquiring unit, for obtaining editor's information of the first road network, editor's information of first road network includes the first via Net crossing description and first road network road description, first road network crossing description including first point position and Corresponding to described first point of crossing attribute, the road description of first road network including the first line segment group position and corresponds to institute State the road attribute of the first line segment group;
Cutting unit, for the road attribute according to preset point of contact setting rule and first road network, by the First Line Section group cutting is the road line segment group of first road network and the crossing line segment group of first road network, and determines the first via The segmental information of the road of the segmental information at the crossing of net and first road network, the segmental information at the crossing of first road network Including first point and the crossing line segment group of first road network, the segmental information of the road of first road network include described first The road line segment group of road network;
Generation unit, for according to the segmental information at each crossing of first road network, described corresponding to described first point The road attribute of crossing attribute and the crossing line segment group corresponding to first road network generates each crossing of first road network Corresponding virtual crossing;
Generation unit is also used to, according to the segmental information of every road of first road network and corresponding to first road network The road attribute of road line segment group generates the corresponding virtual road of every road of first road network;
Assembled unit generates first road network for combining the corresponding virtual crossing of first road network and virtual road Virtual networks.
17. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has machine that can transport Row instruction, the computer can operating instruction by processor call and run when, the computer can operating instruction promote institute It states processor and runs any method of the claim 1 to 15.
CN201910771299.3A 2019-08-20 2019-08-20 Method and device for constructing virtual road network in game Active CN110404261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910771299.3A CN110404261B (en) 2019-08-20 2019-08-20 Method and device for constructing virtual road network in game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910771299.3A CN110404261B (en) 2019-08-20 2019-08-20 Method and device for constructing virtual road network in game

Publications (2)

Publication Number Publication Date
CN110404261A true CN110404261A (en) 2019-11-05
CN110404261B CN110404261B (en) 2023-04-28

Family

ID=68368146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910771299.3A Active CN110404261B (en) 2019-08-20 2019-08-20 Method and device for constructing virtual road network in game

Country Status (1)

Country Link
CN (1) CN110404261B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111035925A (en) * 2019-11-21 2020-04-21 网易(杭州)网络有限公司 Method and device for generating virtual traffic road network model in game and electronic device
CN111626264A (en) * 2020-06-06 2020-09-04 梁志彬 Live-action feedback type driving simulation method and device and server
CN112076477A (en) * 2020-08-24 2020-12-15 网易(杭州)网络有限公司 Virtual road generation method and device
CN112530013A (en) * 2021-02-09 2021-03-19 腾讯科技(深圳)有限公司 Intersection region determination method and device, storage medium and electronic device
CN112774197A (en) * 2019-11-06 2021-05-11 网易(杭州)网络有限公司 Road transition section generation method and device, electronic equipment and storage medium
CN115797506A (en) * 2022-12-16 2023-03-14 江苏泽景汽车电子股份有限公司 Method and device for drawing lane line object, terminal equipment and storage medium
CN116212392A (en) * 2023-05-08 2023-06-06 腾讯科技(深圳)有限公司 Virtual intersection generation method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162154A (en) * 2007-11-06 2008-04-16 北京航空航天大学 Road network model based on virtual nodes
CN102436678A (en) * 2010-09-29 2012-05-02 比亚迪股份有限公司 Method and system for generating three-dimensional road model
US20130328916A1 (en) * 2012-06-06 2013-12-12 Apple Inc. Smoothing Road Geometry
CN105426380A (en) * 2015-08-26 2016-03-23 中国人民解放军装甲兵工程学院 Road network regional cropping method and apparatus
CN108229510A (en) * 2016-12-21 2018-06-29 中国移动通信集团辽宁有限公司 Determine the method, apparatus and system of road area
CN110102058A (en) * 2019-06-10 2019-08-09 网易(杭州)网络有限公司 The generation method of Virtual Building model, device, processor and terminal in game

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162154A (en) * 2007-11-06 2008-04-16 北京航空航天大学 Road network model based on virtual nodes
CN102436678A (en) * 2010-09-29 2012-05-02 比亚迪股份有限公司 Method and system for generating three-dimensional road model
US20130328916A1 (en) * 2012-06-06 2013-12-12 Apple Inc. Smoothing Road Geometry
CN105426380A (en) * 2015-08-26 2016-03-23 中国人民解放军装甲兵工程学院 Road network regional cropping method and apparatus
CN108229510A (en) * 2016-12-21 2018-06-29 中国移动通信集团辽宁有限公司 Determine the method, apparatus and system of road area
CN110102058A (en) * 2019-06-10 2019-08-09 网易(杭州)网络有限公司 The generation method of Virtual Building model, device, processor and terminal in game

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112774197A (en) * 2019-11-06 2021-05-11 网易(杭州)网络有限公司 Road transition section generation method and device, electronic equipment and storage medium
CN112774197B (en) * 2019-11-06 2024-05-28 网易(杭州)网络有限公司 Road transition section generation method and device, electronic equipment and storage medium
CN111035925A (en) * 2019-11-21 2020-04-21 网易(杭州)网络有限公司 Method and device for generating virtual traffic road network model in game and electronic device
CN111035925B (en) * 2019-11-21 2023-05-26 网易(杭州)网络有限公司 Method and device for generating virtual traffic road network model in game and electronic device
CN111626264A (en) * 2020-06-06 2020-09-04 梁志彬 Live-action feedback type driving simulation method and device and server
CN112076477B (en) * 2020-08-24 2024-05-28 网易(杭州)网络有限公司 Virtual road generation method and device
CN112076477A (en) * 2020-08-24 2020-12-15 网易(杭州)网络有限公司 Virtual road generation method and device
CN112530013A (en) * 2021-02-09 2021-03-19 腾讯科技(深圳)有限公司 Intersection region determination method and device, storage medium and electronic device
CN112530013B (en) * 2021-02-09 2021-05-25 腾讯科技(深圳)有限公司 Intersection region determination method and device, storage medium and electronic device
CN115797506A (en) * 2022-12-16 2023-03-14 江苏泽景汽车电子股份有限公司 Method and device for drawing lane line object, terminal equipment and storage medium
CN115797506B (en) * 2022-12-16 2023-11-17 江苏泽景汽车电子股份有限公司 Method, device, terminal equipment and storage medium for drawing lane line object
CN116212392B (en) * 2023-05-08 2023-08-08 腾讯科技(深圳)有限公司 Virtual intersection generation method and device, electronic equipment and storage medium
CN116212392A (en) * 2023-05-08 2023-06-06 腾讯科技(深圳)有限公司 Virtual intersection generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110404261B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN110404261A (en) The construction method and device of virtual networks in game
US9305380B2 (en) Generating land cover for display by a mapping application
CN102436678B (en) Method and system for generating three-dimensional road model
CN103500468B (en) Based on the space curved surface method for reconstructing of boundary constraint
CN111080786A (en) BIM-based indoor map model construction method and device
CN106709126A (en) Road network construction model based on urban roads
CN110909961A (en) BIM-based indoor path query method and device
CN101950435A (en) Navigation-based method for generating interactive non-blocking three-dimensional topographic map
CN109872390A (en) A kind of method for organizing of magnanimity threedimensional model
CN113706715B (en) Random controllable city generation method
CN111035925B (en) Method and device for generating virtual traffic road network model in game and electronic device
CN104217580A (en) Vehicle crowd animation oriented method and vehicle crowd animation oriented system for semantically modeling road networks
CN105426380B (en) The region method of cutting out and device of road network
CN108376423B (en) A kind of safety in production VR real training guidance path dynamic programming method and system
CN112288854B (en) Construction method of three-dimensional model of overpass
CN109741451A (en) A kind of system that three-dimensional earth's surface BIM model is constructed based on topographic map
CN113744401A (en) Terrain splicing method and device, electronic equipment and storage medium
Cura et al. Streetgen: In base city scale procedural generation of streets: road network, road surface and street objects
JP2021086629A (en) Polyline contributor in civil engineering
CN112231423A (en) Fault structure automatic recovery method and device based on geological map
CN112076477A (en) Virtual road generation method and device
CN117011413A (en) Road image reconstruction method, device, computer equipment and storage medium
CN116764225A (en) Efficient path-finding processing method, device, equipment and medium
Gao et al. A procedural generation method of urban roads based on osm
CN102460515B (en) Utilize the additional content provided for image-region to generate modified image

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