CN110201394A - Generation method, device, storage medium, processor and the terminal of accessory model - Google Patents
Generation method, device, storage medium, processor and the terminal of accessory model Download PDFInfo
- Publication number
- CN110201394A CN110201394A CN201910486588.9A CN201910486588A CN110201394A CN 110201394 A CN110201394 A CN 110201394A CN 201910486588 A CN201910486588 A CN 201910486588A CN 110201394 A CN110201394 A CN 110201394A
- Authority
- CN
- China
- Prior art keywords
- model
- sampled point
- accessory
- accessory model
- sample path
- 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
Links
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
- A63F13/56—Computing 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
Abstract
The invention discloses a kind of generation method of accessory model, device, storage medium, processor and terminals.Wherein, this method comprises: obtaining the road network of scene of game, wherein, road network is made of multiple crossing model components and the splicing of multiple road model components, and each crossing model component is crossed by the road model component of the different trends in part in multiple road model components to be formed;Model component to be configured is chosen from road network, and obtains sample path on model component to be configured;At least a kind of accessory model is generated on model component to be configured according to preset rules file and sample path.The present invention solves the accessory model style sheet one that provided road network accessory model generating mode is configured in the related technology, and the scope of application has the technical issues of limitation.
Description
Technical field
The present invention relates to computer fields, are situated between in particular to a kind of generation method of accessory model, device, storage
Matter, processor and terminal.
Background technique
The accessory model used in road network (such as: city road network, rural road network) refers to and path space position
The various models of tight association may include: fence, flower bed, trees, dustbin, bus station etc..The quantity of accessory model is many
More, spatial position is more clear, therefore sequencing automation is suitble to generate.In addition, being connected with each other, not having apertured attachment mould
Type, such as fence, isolation strip flower bed etc., commonly known as non-individual body.The accessory model being separated, such as trees, usually quilt
Referred to as discontinuous body.
Currently, gradually start to generate roadnet with automation in the scene of game development process of big world, it can
Efficiently, specification ground configuration road network, saves human cost and time cost.And the weight that accessory model is constituted as road scene
Part is wanted, atmosphere is set off by contrast and visual experience has extreme influence, therefore how automatically, efficiently, is aesthetically generated and road mould
Type component or the matched accessory model of crossing model component, it will largely affect the picture product an of road scene
Matter, to influence the picture quality of entire game.
The generating mode of provided accessory model may include: in the related technology
Mode one, the position and orientation that accessory model is manually specified;
The advantage of which is: without learning cost, easily controllable, however, for scene automation in big world generates,
Its obvious shortcoming is:
(1) position of three-dimensional space and the assignment procedure of direction are very complicated, need multiple angle confirmation positions and direction
Correctness, be easy to appear and wear the maloperations such as mould floating.
(2) assignment procedure of large-scale accessory model needs to consume a large amount of human cost and time cost.
(3) later maintenance is very difficult.
Mode two puts accessory model according to certain intervals using programmatic way;
The advantage of which is: improving the allocative efficiency of large-scale accessory model, while its upright position can also
To be obtained by detection, however, the obvious shortcoming of which is: the style sheet one of accessory model be easy to cause aestheticly tired,
Moreover, the configuration mode of this intermittent can not also be applied on the connected models such as electric wire.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The present invention at least partly embodiment provides a kind of generation method of accessory model, device, storage medium, processor
And terminal, at least to solve the accessory model sample that provided road network accessory model generating mode is configured in the related technology
Formula is single, and the scope of application has the technical issues of limitation.
A wherein embodiment according to the present invention, provides a kind of generation method of accessory model, comprising:
Obtain the road network of scene of game, wherein road network is by multiple crossing model components and multiple road models
Component splicing composition, each crossing model component are handed over by the road model component of the different trends in part in multiple road model components
It converges and is formed;Model component to be configured is chosen from road network, and obtains sample path on model component to be configured;Root
At least a kind of accessory model is generated on model component to be configured according to preset rules file and sample path.
Optionally, it includes: the edge to model component to be configured that sample path is obtained on model component to be configured
It is sampled, obtains edge sample result;Interpolation calculation is carried out according to edge sample result and back gauge parameter, obtains sampling road
Diameter, wherein back gauge parameter is for indicating sample path and the distance between the edge of model component to be configured.
Optionally, generated on model component to be configured according to preset rules file and sample path it is at least a kind of attached
Before part model, further includes: obtain the first label information of model component to be configured and the second mark of preset rules file
Sign information;In the case where the first label information and the second label information match, determine by preset rules file be applied to
The model component of configuration.
Optionally, at least a kind of attachment is generated on model component to be configured according to preset rules file and sample path
Model includes: the classification information and every a kind of accessory model that at least a kind of accessory model is obtained from preset rules file
Grouping information, wherein grouping information is determined according to sample path;The category of every group of accessory model is obtained from preset rules file
Property information aggregate, wherein attribute information set includes: subclass, status data, arrangement mode under classification information;According to category
Property information aggregate at least a kind of accessory model is generated in sample path.
Optionally, being integrated into sample path according to attribute information and generating at least a kind of accessory model includes: when arrangement side
It when formula is discontinuous arrangement, is sampled in sample path according to spacing parameter, obtains multiple sampled points, wherein spacing ginseng
Number is for indicating the distance between two neighboring sampled point;It is sampled some or all of in multiple sampled points according to arrangement mode
Point generates at least a kind of accessory model, and according to the display state of at least a kind of accessory model of status data adjustment.
Optionally, according to arrangement mode, sampled point generates at least a kind of attachment some or all of in multiple sampled points
After model, further includes: when different classes of accessory model is when the first sampled point collides, by different classes of attachment mould
First kind accessory model in type is retained in the first sampled point, and by the second class attachment mould in different classes of accessory model
Type is moved to the second sampled point, wherein and the second sampled point is to traverse adjacent sampled point one by one since the first sampled point, until
Obtain the sampled point that different classes of accessory model no longer collides.
Optionally, being integrated into sample path according to attribute information and generating at least a kind of accessory model includes: when arrangement side
When formula is continuous arrangement, is sampled in sample path according to spacing parameter, obtain multiple sampled points, wherein spacing parameter
For indicating the distance between two neighboring sampled point;When the first direction and the second angle between are greater than preset threshold
When, the first grid posture of the first accessory model is adjusted based on third sampled point, and attached based on the adjustment second of the 4th sampled point
Second grid posture of part model, wherein first is oriented direction of the third sampled point in sample path, and second is oriented
Direction of four sampled points in sample path, the 4th sampled point are the next sampled points adjacent with third sampled point;To first
Same vertices in grid posture and the second grid posture are attached processing, determine interpolation direction;On interpolation direction, use
Weight is weighted interpolation processing to the point coordinate in the first accessory model and the point coordinate in the second accessory model, generates at least
A kind of accessory model, wherein ratio of the weight between the first difference and the second difference, the first difference are in the first grid posture
Each vertex subpoint on sample path of any vertex in subpoint and the first grid posture in sample path
Minimum value between difference, the second difference be subpoint of each vertex in sample path in the first grid posture most
Difference between big value and minimum value.
Optionally, adjusting the first grid posture of the first accessory model based on third sampled point includes: in the first attachment mould
After the Grid Projection to sample path of type, the nearest first position and and third of the distance between third sampled point is obtained
The farthest second position of the distance between sampled point;First position and the second position are carried out respectively to be aligned place with third sampled point
Reason adjusts the first grid posture.
Optionally, adjusting the second grid posture of the second accessory model based on the 4th sampled point includes: in the second attachment mould
After the Grid Projection to sample path of type, the third place nearest with the distance between the 4th sampled point is obtained and with the 4th
The 4th farthest position of the distance between sampled point;The third place and the 4th position are carried out being aligned place with the 4th sampled point respectively
Reason adjusts the second grid posture.
Optionally, after being integrated into sample path according to attribute information and generating at least a kind of accessory model, further includes:
Extension element is added in accessory model some or all of at least a kind of accessory model.
A wherein embodiment according to the present invention, additionally provides a kind of generating means of accessory model, comprising:
First obtains module, for obtaining the road network of scene of game, wherein road network is by multiple crossing model groups
Part and multiple road model components splicing composition, each crossing model component are moved towards by part in multiple road model components is different
Road model component cross to be formed;First processing module, for choosing model component to be configured from road network, and
Sample path is obtained on model component to be configured;Generation module, for according to preset rules file and sample path wait match
At least a kind of accessory model is generated on the model component set.
Optionally, first processing module includes: sampling unit, is adopted for the edge to model component to be configured
Sample obtains edge sample result;Interpolating unit is obtained for carrying out interpolation calculation according to edge sample result and back gauge parameter
Sample path, wherein back gauge parameter is for indicating sample path and the distance between the edge of model component to be configured.
Optionally, above-mentioned apparatus further include: second obtains module, for obtaining the first label of model component to be configured
Second label information of information and preset rules file;Determining module, in the first label information and the second label information
In the case where matching, preset rules file is applied to model component to be configured by determination.
Optionally, generation module includes: first acquisition unit, for obtaining at least a kind of attachment from preset rules file
The grouping information of the classification information of model and every a kind of accessory model, wherein grouping information is determined according to sample path;
Second acquisition unit, for obtaining the attribute information set of every group of accessory model from preset rules file, wherein attribute information
Set includes: subclass, status data, arrangement mode under classification information;Generation unit, for being integrated into according to attribute information
At least a kind of accessory model is generated in sample path.
Optionally, generation unit includes: the first sampling subelement, is used for when arrangement mode is discontinuous arrangement, according to
Spacing parameter is sampled in sample path, obtains multiple sampled points, wherein spacing parameter is for indicating two neighboring sampling
The distance between point;First generate subelement, for according to arrangement mode some or all of in multiple sampled points sampled point
At least a kind of accessory model is generated, and according to the display state of at least a kind of accessory model of status data adjustment.
Optionally, above-mentioned apparatus further include: Second processing module, for when different classes of accessory model is in the first sampling
When point collides, the first kind accessory model in different classes of accessory model is retained in the first sampled point, and will not
The second class accessory model in generic accessory model is moved to the second sampled point, wherein the second sampled point is adopted from first
Sampling point starts to traverse adjacent sampled point one by one, until obtaining the sampled point that different classes of accessory model no longer collides.
Optionally, generation unit includes: the second sampling subelement, for when arrangement mode is continuous arrangement, according to
It is sampled in sample path away from parameter, obtains multiple sampled points, wherein spacing parameter is for indicating two neighboring sampled point
The distance between;Adjust subelement, for when first towards and the second angle between be greater than preset threshold when, based on the
Three sampled points adjust the first grid posture of the first accessory model, and adjust the of the second accessory model based on the 4th sampled point
Two grid postures, wherein first is oriented direction of the third sampled point in sample path, and second, which is oriented the 4th sampled point, exists
Direction in sample path, the 4th sampled point are the next sampled points adjacent with third sampled point;Connect subelement, for pair
Same vertices in first grid posture and the second grid posture are attached processing, determine interpolation direction, determine interpolation direction;
Second generates subelement, is used in interpolation direction, using weight to the point coordinate and the second attachment mould in the first accessory model
Point coordinate in type is weighted interpolation processing, generates at least a kind of accessory model, wherein weight is that the first difference and second are poor
Ratio between value, the first difference are subpoint and first grid of any vertex in sample path in the first grid posture
Difference of each vertex between the minimum value of the subpoint in sample path in posture, the second difference are the first grid posture
In difference of each vertex between the maxima and minima of the subpoint in sample path.
Optionally, subelement is adjusted, for after the Grid Projection to sample path of the first accessory model, is obtained and the
The nearest first position of the distance between three sampled points and the second position farthest with the distance between third sampled point;And
First position and the second position are subjected to registration process with third sampled point respectively, adjust the first grid posture.
Optionally, subelement is adjusted, for after the Grid Projection to sample path of the second accessory model, is obtained and the
The nearest the third place of the distance between four sampled points and fourth position farthest with the distance between the 4th sampled point;And
The third place and the 4th position are subjected to registration process with the 4th sampled point respectively, adjust the second grid posture.
Optionally, above-mentioned apparatus further include: adding module, for attached some or all of at least a kind of accessory model
Extension element is added on part model.
A wherein embodiment according to the present invention additionally provides a kind of storage medium, and storage medium includes the program of storage,
In, in program operation, equipment where control storage medium executes the generation method of the accessory model of above-mentioned any one.
A wherein embodiment according to the present invention, additionally provides a kind of processor, which is characterized in that processor is for running journey
Sequence, wherein program executes the generation method of the accessory model of above-mentioned any one when running.
A wherein embodiment according to the present invention, additionally provides a kind of terminal, comprising: one or more processors, memory,
Display device and one or more program, wherein one or more programs are stored in memory, and be configured as by
One or more processors execute, and one or more programs are used to execute the generation method of the accessory model of above-mentioned any one.
In the present invention at least partly embodiment, using the road network for obtaining scene of game, the road network is by multiple
Crossing model component and multiple road model components splicing composition, each crossing model component is by multiple road model components middle parts
The road model component of point different trends crosses the mode to be formed, by choosing model component to be configured from road network,
And sample path is obtained on model component to be configured, and according to preset rules file and sample path in mould to be configured
At least a kind of accessory model is generated on type component, has been reached and has been met in game in the scene of big world automation on a large scale, efficiently
The purpose of road scene demand is generated, to realize the road network accessory model configuration process of scale, automation, is promoted
The convenience of later maintenance improves the technology of game visual experience so that road scene ambiance effect is more true beautiful
Effect, and then solve the accessory model pattern that provided road network accessory model generating mode is configured in the related technology
It is single, and the scope of application has the technical issues of limitation.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 shows a kind of hardware of the terminal (or mobile device) of generation method for realizing accessory model
Structural block diagram;
Fig. 2 is the wherein flow chart of the generation method of the accessory model of an embodiment according to the present invention;
Fig. 3 is the schematic diagram of the acquisition sample path process of a wherein alternative embodiment according to the present invention;
Fig. 4 is that wherein the collision of an alternative embodiment avoids process schematic according to the present invention;
Fig. 5 is the schematic diagram of the non-individual body interpolation generating process of a wherein alternative embodiment according to the present invention;
Fig. 6 is the wherein structural block diagram of the generating means of the accessory model of an embodiment according to the present invention;
Fig. 7 is the wherein structural block diagram of the generating means of the accessory model of an alternative embodiment according to the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
A wherein embodiment according to the present invention, provides a kind of embodiment of the generation method of accessory model, needs to illustrate
, step shown in the flowchart of the accompanying drawings can hold in a computer system such as a set of computer executable instructions
Row, although also, logical order is shown in flow charts, and it in some cases, can be to be different from sequence herein
Execute shown or described step.
This method embodiment can execute in mobile terminal, terminal or similar arithmetic unit.Fig. 1 is shown
A kind of hardware block diagram of the terminal (or mobile device) of generation method for realizing accessory model.Such as Fig. 1
Shown, terminal 10 (or mobile device) may include that one or more (is come in figure using 102a, 102b ... ..., 102n
Showing) (processor 102 can include but is not limited to central processing unit (CPU), graphics processor (GPU), number to processor 102
The processing unit of signal processing (DSP) chip, microprocessor (MCU) or programmable logic device (FPGA) etc.), for storing number
According to memory 104 and for the transmitting device of communication function.It in addition to this, can also include: display, input/output
Interface (I/O interface), the port universal serial bus (USB) (a port that can be used as in the port of I/O interface is included),
Network interface, power supply and/or camera.It will appreciated by the skilled person that structure shown in FIG. 1 is only to illustrate, simultaneously
The structure of above-mentioned terminal 10 (or mobile device) is not caused to limit.For example, terminal 10 (or mobile device)
It may also include than shown in Fig. 1 more perhaps less component or with the configuration different from shown in Fig. 1.
It is to be noted that said one or multiple processors 102 and/or other data processing circuits lead to herein
Can often " data processing circuit " be referred to as.The data processing circuit all or part of can be presented as software, hardware, firmware
Or any other combination.In addition, data processing circuit for single independent processing module or all or part of can be integrated to meter
In any one in other elements in calculation machine terminal 10 (or mobile device).As involved in the embodiment of the present application,
The data processing circuit controls (such as the selection for the variable resistance end path connecting with interface) as a kind of processor.
Memory 104 can be used for storing the software program and module of application software, such as the attachment in the embodiment of the present invention
Corresponding program instruction/the data storage device of the generation method of model, processor 102 are stored in memory 104 by operation
Software program and module realize the life of above-mentioned accessory model thereby executing various function application and data processing
At method.Memory 104 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetic
Property storage device, flash memory or other non-volatile solid state memories.In some instances, memory 104 can further comprise
The memory remotely located relative to processor 102, these remote memories can pass through network connection to terminal 10.
The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Transmitting device is used to that data to be received or sent via a network.Above-mentioned network specific example may include calculating
The wireless network that the communication providers of machine terminal 10 provide.In an example, transmitting device includes a network adapter
(Network Interface Controller, referred to as NIC), can be connected by base station with other network equipments so as to
It is communicated with internet.In an example, transmitting device can be radio frequency (Radio Frequency, referred to as RF) mould
Block is used to wirelessly be communicated with internet.
Display can such as touch-screen type liquid crystal display (LCD), the liquid crystal display aloow user with
The user interface of terminal 10 (or mobile device) interacts.In some embodiments, above-mentioned computer shown in FIG. 1
Terminal 10 (or mobile device) has touch display (also referred to as " touch screen " or " touch display screen ").In some embodiments
In, above-mentioned terminal 10 (or mobile device) shown in FIG. 1 has graphic user interface (GUI), and user can pass through touching
The finger contact and/or gesture touched on touch sensitive surface to carry out human-computer interaction with GUI, and human-computer interaction function herein optionally wraps
Include following interaction: creation webpage, drawing, word processing, production electronic document, game, video conference, instant messaging, transmitting-receiving electricity
Sub- mail, call interface play digital video, playback digital music and/or web browsing etc., for executing above-mentioned human-computer interaction
The executable instruction of function is configured/is stored in the executable computer program product of one or more processors or readable storage
In medium.
Above-mentioned terminal 10 (or mobile device) can be smart phone (such as Android phone, iOS mobile phone),
The terminals such as tablet computer, applause computer and mobile internet device (Mobile Internet Devices, MID), PAD are set
It is standby.
The life that one kind runs on the accessory model of above-mentioned terminal (or mobile device) is provided in the present embodiment
At method, Fig. 2 is the wherein flow chart of the generation method of the accessory model of an embodiment according to the present invention, as shown in Fig. 2, the party
Method includes the following steps:
Step S22 obtains the road network of scene of game, wherein road network is by multiple crossing model components and multiple
Road model component splicing composition, each crossing model component is by the different road moulds moved towards in part in multiple road model components
Type component crosses to be formed;
Step S24 chooses model component to be configured from road network, and obtains and adopt on model component to be configured
Sample path;
Step S26 is generated on model component to be configured at least a kind of attached according to preset rules file and sample path
Part model.
Through the above steps, can be using the road network for obtaining scene of game, the road network is by multiple crossing models
Component and multiple road model components splicing composition, each crossing model component are walked by part difference in multiple road model components
To road model component cross the mode to be formed, by choosing model component to be configured from road network, and wait match
Sample path is obtained on the model component set, and according to preset rules file and sample path on model component to be configured
At least a kind of accessory model is generated, has reached to meet in game and is automated on a large scale in the scene of big world, efficiently generates road
The purpose of scene demand improves later period dimension to realize the road network accessory model configuration process of scale, automation
The convenience of shield improves the technical effect of game visual experience, in turn so that road scene ambiance effect is more true beautiful
Solve the accessory model style sheet one that provided road network accessory model generating mode is configured in the related technology, and
The scope of application has the technical issues of limitation.
Road network generally includes: multiple road model components and multiple crossing model components, wherein road model component
Surface be strip regular grid.The road model component is the infrastructure component for forming road network, may include but unlimited
In: forthright model component, detour model component.Crossing model component is by the different roads moved towards in part in multiple road model components
Road model component crosses to be formed.Such as: crossing model component can be by an east-west road model component and a south
The road model component of north trend crosses to form T-shaped road junction or crossroad.Another example is: crossing model component can be by three
The road model component of difference trend crosses to form the junction of three roads.
It is relatively flat along road model component in view of accessory model (such as: greenbelt, street lamp) is usually in road both sides
Capable two boundaries setting (such as: continuous setting is arranged at equal intervals), therefore, can respectively with each edge circle at a distance of default
Identical sample path is moved towards in setting at the position of distance, to configure at least a kind of accessory model in sample path.
Above-mentioned preset rules file, which is used to describe at least generating mode of one kind accessory model in sample path, (and can claim
Make a living into style).Content in the preset rules file can include but is not limited to: the attachment mould of the generation in sample path
Type classification (such as: tree, street lamp), accessory model geometric parameter (such as: the parameters such as scaling, direction, offset of accessory model can be set
Set in a random interval to realize vision difference), accessory model arrangement mode (such as: discrete arrangement, continuous arrangement, point
Section arrangement), whether can configure in accessory model extension element, accessory model collision avoidance strategy.
In one alternate embodiment, it is necessary first to determine the group of multiple road model components and multiple crossing model components
At mode.In view of in the City scenarios of real life, either urban road or intersection usually all can include lane
And pavement, therefore, in order to enable game City scenarios more fit in actual life, above-mentioned each crossing model component and every
The building form of a road model component can include lane and pavement.Secondly, according to determining road model component and road
The building form of mouth model component, configures corresponding model component in the EasyRoad plug-in unit of Unity3D.Then, exist
Multiple road model components and multiple crossing model components are spliced by sports ground using model component fastening means in Unity3D
Road network used in scape.
It should be noted that when model component to be configured is road model component, on model component to be configured
Generate road accessory model.When model component to be configured is crossing model component, generated on model component to be configured
Crossing accessory model.
Optionally, in step s 24, sample path is obtained on model component to be configured may include step performed below
It is rapid:
Step S241 samples the edge of model component to be configured, obtains edge sample result;
Step S242 carries out interpolation calculation according to edge sample result and back gauge parameter, obtains sample path, wherein side
Away from parameter for indicating sample path and the distance between the edge of model component to be configured.
By analyzing the grid of model component to be configured, the edge of model component to be configured is sampled, is obtained
Edge sample is as a result, it is possible thereby to extract grid edge vertices.Then, pass through the side of sample path and model component to be configured
Back gauge parameter between edge carries out interpolation calculation between the two sides grid edge vertices of model component to be configured, is sampled
Path.
Fig. 3 is the schematic diagram of the acquisition sample path process of a wherein alternative embodiment according to the present invention, as shown in figure 3,
By analyzing the grid of model component to be configured, the edge of model component to be configured is sampled, grid can be extracted
Edge vertices (are made of) solid line with the arrow.Interpolation calculation is carried out between the grid edge vertices of two sides by back gauge parameter,
Obtain sample path (being made of dotted line with the arrow).
Optionally, in step S24, according to preset rules file and sample path generated on model component to be configured to
Can also include step performed below before few one kind accessory model:
Step S23 obtains the first label information of model component to be configured and the second label of preset rules file
Information, and in the case where the first label information and the second label information match, preset rules file is applied to by determination
Model component to be configured.
Preset rules file and model component to be configured usually can all have genre labels, if model group to be configured
First label information of part and the second label information of preset rules file meet matching condition, then it is default to choose this
Rule file is applied on model component to be configured.
In addition, by label brush label can be added for road network, matched with corresponding preset rules file,
And then generate the road network accessory model in entire scene of game.
Optionally, it in step S26, is generated on model component to be configured according to preset rules file and sample path
At least a kind of accessory model may include step performed below:
Step S261, classification information and every one kind that at least a kind of accessory model is obtained from preset rules file are attached
The grouping information of part model, wherein grouping information is determined according to sample path;
Step S262 obtains the attribute information set of every group of accessory model, wherein attribute information from preset rules file
Set includes: subclass, status data, arrangement mode under classification information;
Step S263 is integrated into sample path according to attribute information and generates at least a kind of accessory model.
In same sample path both can with separately distributed same category of accessory model, such as: it is separately distributed tree or
Street lamp can also be distributed a variety of different classes of accessory models simultaneously, such as: mixed distribution tree and street lamp.Under each classification also
Multiple subclasses can be set, such as: the subclasses such as Chinese parasol tree tree, cinnamomum camphora tree are arranged in the classification of tree.It is each in sample path to adopt
Sampling point can be by multiple subclass accessory model mixed distributions, wherein mixed proportion stochastic parameter is adjustable.
Above-mentioned grouping information can be determined according to sample path.The accessory model being located in same sample path can
To be in same group.It is attached in two sample paths respectively close to both sides of the road edge by taking road model component as an example
Part model (such as: tree) two accessory model groups can be divided into.
Above-mentioned status data can include but is not limited to: the parameters such as scaling, direction, offset of accessory model, these parameters
It can be set in a random interval, therefore, even if visual difference also may be implemented generating the same accessory model
It is different.
Further, by providing discrete, continuous, segmentation, a variety of arrangement modes end to end and combinations thereof, to be suitable for not
The demand of same type accessory model.Discrete arrangement mode is that road accessory model is put according to sampled point.Continuously arrangement mode is
It sets sampling interval to comprising just accommodating accessory model under the conditions of scaling, and needs to regenerate grid.It is segmented arrangement side
Formula is one group of accessory model to be put according to certain intervals and quantity, and different structure is used between section and section.Arrangement mode end to end
It is only to need to put accessory model in the head position and tail position of model component to be configured.
Optionally, it in step S263, is integrated into sample path according to attribute information and generates at least a kind of accessory model
May include step performed below:
Step S2631 is sampled in sample path when arrangement mode is discontinuous arrangement according to spacing parameter,
Obtain multiple sampled points, wherein spacing parameter is for indicating the distance between two neighboring sampled point;
Step S2632, according to arrangement mode, sampled point generation is at least a kind of attached some or all of in multiple sampled points
Part model, and according to the display state of at least a kind of accessory model of status data adjustment.
Still it as shown in figure 3, after getting sample path, can be adopted in sample path according to spacing parameter
Sample, to obtain the base position of one group of accessory model.It, can be according to part or all of when arrangement mode is discontinuous arrangement
Sampled point position generates at least a kind of accessory model.Such as: it, can be in each of sample path under discrete arrangement mode
Sampled point position generates an accessory model.Again for example:, can be in the first of sample path under arrangement mode end to end
Sampled point and end sampled point position generate an accessory model.
It should be noted that crossing accessory model can be by presetting the crossing accessory model at specific type crossing
Coordinate position under the local spatial coordinate of model component, and keep relative position and direction constant, then it is applied to trip
Other same type crossing model components in scene of playing, only need at this time by the local spatial coordinate of specific type crossing model component
Under coordinate position be converted into corresponding world coordinates and can be obtained the placement position of crossing accessory model.
Optionally, in step S2632, according to arrangement mode some or all of in multiple sampled points sampled point generate to
Can also include step performed below after few one kind accessory model:
Step S2633, when different classes of accessory model is when the first sampled point collides, by different classes of attachment
First kind accessory model in model is retained in the first sampled point, and by the second class attachment in different classes of accessory model
Model is moved to the second sampled point, wherein the second sampled point is to traverse adjacent sampled point one by one since the first sampled point, directly
To the sampled point for obtaining different classes of accessory model and no longer colliding.
Problem is interted for model, by the way that the collision detection matrix of different classes of accessory model is arranged, one type is sent out
The accessory model of raw collision is mobile to next sampled point position, so that the accessory model to collide is separated from each other.
Specifically, it is contemplated that multiple groups accessory model may be interted when back gauge is close, in order to avoid such case hair
It is raw, need to configure the collision detection matrix of each major class accessory model.Fig. 4 is that wherein an alternative embodiment is touched according to the present invention
It hits and avoids process schematic, as shown in figure 4, when carrying out collision detection to first kind accessory model and the second class accessory model,
In the generating process of different classes of accessory model, if it have been determined that the placement position of first kind accessory model, and
Find that the second class accessory model collides with the first kind accessory model when putting the second class accessory model, then just needing
The placement position of a kind of accessory model remains stationary, then again by the second class accessory model from current sampling point (i.e. above-mentioned first
Sampled point) start to traverse adjacent next sampled point (i.e. above-mentioned second sampled point) one by one, and moving condition is kept, until the
A kind of accessory model no longer collides with the second class accessory model.
Optionally, it in step S263, is integrated into sample path according to attribute information and generates at least a kind of accessory model
May include step performed below:
Step S2634 is sampled in sample path according to spacing parameter, is obtained when arrangement mode is continuous arrangement
To multiple sampled points, wherein spacing parameter is for indicating the distance between two neighboring sampled point;
Step S2635 is based on third sampled point when first towards with the second angle between greater than preset threshold
The first grid posture of the first accessory model is adjusted, and adjusts the second grid appearance of the second accessory model based on the 4th sampled point
State, wherein first is oriented direction of the third sampled point in sample path, and second is oriented the 4th sampled point in sample path
On direction, the 4th sampled point is the next sampled point adjacent with third sampled point;
Step S2636 is attached processing to the same vertices in the first grid posture and the second grid posture, determines and insert
It is worth direction, determines interpolation direction;
Step S2637, on interpolation direction, using weight to the point coordinate and the second accessory model in the first accessory model
On point coordinate be weighted interpolation processing, generate at least a kind of accessory model, wherein weight is the first difference and the second difference
Between ratio, the first difference is subpoint and first grid appearance of any vertex in sample path in the first grid posture
Difference of each vertex between the minimum value of the subpoint in sample path in state, the second difference are in the first grid posture
Difference of each vertex between the maxima and minima of the subpoint in sample path.
It is original attached not changing when accessory model is the model that the needs such as electric wire, railing, isolation strip flower bed are closely arranged
In the case of part model meshes, in the accessory model joint of model component bend to be configured it is possible that interspersed and gap
Etc. abnormal conditions.At this time, it may be necessary to by adjusting accessory model grid so that accessory model joint reach close-packed arrays just like
The effect of one.
In one alternate embodiment, the original mesh of the original mesh of the first accessory model and the second accessory model is existed
Model is towards (i.e. along the direction of sample path, from initial position direction terminal position, initial position and terminal position are sampling
Two adjacent sampled points on path) the obtained position nearest apart from initial position of upslide movie queen and farthest apart from initial position
Position, and the position nearest apart from terminal position and the position farthest apart from terminal position, respectively with it is two neighboring adjacent
Path sample point alignment, to obtain two grid postures.
Fig. 5 is the schematic diagram of the non-individual body interpolation generating process of a wherein alternative embodiment according to the present invention, such as Fig. 5 institute
Show, after the Grid Projection to sample path of the first accessory model, obtains and (be equivalent to above-mentioned third to sample with initial position
Point) the distance between nearest first position and the second position farthest with the distance between initial position;Then by first
Position and the second position carry out registration process with initial position respectively, adjust the first grid posture of the first accessory model.
After the Grid Projection to sample path of the second accessory model, obtains and (be equivalent to the above-mentioned 4th with terminal position
Sampled point) the distance between nearest the third place and with the 4th farthest position of the distance between terminal position;Then will
The third place and the 4th position carry out registration process with terminal position respectively, adjust the second grid posture of the second accessory model.
After getting above-mentioned first grid posture and the second grid posture, by the first grid posture and the second grid appearance
Same vertices in state are attached processing, to realize the original mesh of the first accessory model and the original net of the second accessory model
Point in lattice close to initial position finally closer to initial position, the point close to terminal position finally closer to terminal position, into
And use following formula 1 slotting by being weighted to the point coordinate on the point coordinate and the second accessory model in the first accessory model
Value handles to obtain the point coordinate of new grid:
V=(1- α) * vs+α*ve... formula 1;
Wherein, α is calculated using following formula 2:
Wherein, vsFor the point coordinate in the first grid posture, veFor the point coordinate in the second grid posture, weight α is first
Ratio between difference and the second difference, the first difference are projection of any vertex in sample path in the first grid posture
Difference of each vertex between the minimum value of the subpoint in sample path in point and the first grid posture, the second difference are
Difference of each vertex between the maxima and minima of the subpoint in sample path in first grid posture.
It should be noted that in order to avoid number of grid is excessive, therefore only in the direction of initial position and terminal position
Angle just samples above-mentioned interpolation method and generates at least a kind of accessory model when being greater than preset threshold.
Optionally, in step S263, be integrated into sample path according to attribute information generate at least a kind of accessory model it
Afterwards, can also include step performed below:
Step S264 adds extension element in accessory model some or all of at least a kind of accessory model.
Particular attachment model may include multiple components, but be not intended to be configured as an overall model again, to avoid
Component collocation is relatively fixed.It therefore, can be (above-mentioned for this group of accessory model addition subassembly when one group of accessory model is arranged
Extension element).Multiple groups subclass can also be arranged in the classification of subassembly.In addition, subassembly can also be the non-physical object such as light,
Such as: set random adjustable for the lighting programmers of one group of street lamp.Therefore, it is convenient for the expansion of accessory model by setting subassembly
Exhibition, to reach visual effect abundant.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Additionally provide a kind of generating means of accessory model in the present embodiment, the device for realizing above-described embodiment and
Preferred embodiment, the descriptions that have already been made will not be repeated.As used below, predetermined function may be implemented in term " module "
The combination of the software and/or hardware of energy.It is hard although device described in following embodiment is preferably realized with software
The realization of the combination of part or software and hardware is also that may and be contemplated.
Fig. 6 is the wherein structural block diagram of the generating means of the accessory model of an embodiment according to the present invention, as shown in fig. 6,
The device includes: the first acquisition module 10, for obtaining the road network of scene of game, wherein road network is by multiple crossings
Model component and multiple road model components splicing composition, each crossing model component by multiple road model components part not
Road model component with trend crosses to be formed;First processing module 20, for choosing model to be configured from road network
Component, and sample path is obtained on model component to be configured;Generation module 30, for according to preset rules file and sampling
Path generates at least a kind of accessory model on model component to be configured.
Optionally, first processing module 20 includes: sampling unit (not shown), for model component to be configured
Edge sampled, obtain edge sample result;Interpolating unit (not shown), for according to edge sample result and side
Interpolation calculation is carried out away from parameter, obtains sample path, wherein back gauge parameter is for indicating sample path and model group to be configured
The distance between edge of part.
Optionally, Fig. 7 is the wherein structural block diagram of the generating means of the accessory model of an alternative embodiment according to the present invention,
As shown in fig. 7, above-mentioned apparatus further include: second obtains module 40, and the first label for obtaining model component to be configured is believed
Second label information of breath and preset rules file;Determining module 50, in the first label information and the second label information
In the case where matching, preset rules file is applied to model component to be configured by determination.
Optionally, generation module 30 includes: first acquisition unit (not shown), for obtaining from preset rules file
Take the classification information of at least a kind of accessory model and the grouping information of every a kind of accessory model, wherein grouping information foundation is adopted
Sample path determines;Second acquisition unit (not shown), for obtaining every group of accessory model from preset rules file
Attribute information set, wherein attribute information set includes: subclass, status data, arrangement mode under classification information;It generates
Unit (not shown) generates at least a kind of accessory model for being integrated into sample path according to attribute information.
Optionally, generation unit (not shown) includes: the first sampling subelement (not shown), for when arrangement
When mode is discontinuous arrangement, is sampled in sample path according to spacing parameter, obtain multiple sampled points, wherein spacing
Parameter is for indicating the distance between two neighboring sampled point;First generates subelement (not shown), for according to arrangement
Mode sampled point some or all of in multiple sampled points generates at least a kind of accessory model, and according to status data adjust to
The display state of few one kind accessory model.
Optionally, as shown in fig. 7, above-mentioned apparatus further include: Second processing module 60, for working as different classes of attachment mould
Type is retained in the first sampling when the first sampled point collides, by the first kind accessory model in different classes of accessory model
Point, and the second class accessory model in different classes of accessory model is moved to the second sampled point, wherein the second sampled point
It is to traverse adjacent sampled point one by one since the first sampled point, no longer collides until obtaining different classes of accessory model
Sampled point.
Optionally, generation unit (not shown) includes: the second sampling subelement (not shown), for when arrangement
It when mode is continuous arrangement, is sampled in sample path according to spacing parameter, obtains multiple sampled points, wherein spacing ginseng
Number is for indicating the distance between two neighboring sampled point;Subelement (not shown) is adjusted, for when first towards with the
When two angles between is greater than preset threshold, the first grid posture of the first accessory model is adjusted based on third sampled point,
And the second grid posture of the second accessory model is adjusted based on the 4th sampled point, wherein first, which is oriented third sampled point, exists
Direction in sample path, second is oriented direction of the 4th sampled point in sample path, and the 4th sampled point is adopted with third
The adjacent next sampled point of sampling point;Subelement (not shown) is connected, for the first grid posture and the second grid appearance
Same vertices in state are attached processing, determine interpolation direction, determine interpolation direction;Second generation subelement (does not show in figure
Out), it is used in interpolation direction, using weight to the point coordinate in the first accessory model and the point coordinate in the second accessory model
It is weighted interpolation processing, generates at least a kind of accessory model, wherein ratio of the weight between the first difference and the second difference
Value, the first difference be subpoint of any vertex in sample path in the first grid posture with it is each in the first grid posture
Difference of a vertex between the minimum value of the subpoint in sample path, the second difference are each top in the first grid posture
Difference of the point between the maxima and minima of the subpoint in sample path.
Optionally, subelement (not shown) is adjusted, for the Grid Projection in the first accessory model to sample path
Later, the first position nearest with the distance between third sampled point and farthest with the distance between third sampled point is obtained
The second position;And first position and the second position are subjected to registration process with third sampled point respectively, adjust the first grid appearance
State.
Optionally, subelement (not shown) is adjusted, for the Grid Projection in the second accessory model to sample path
Later, the third place nearest with the distance between the 4th sampled point and farthest with the distance between the 4th sampled point is obtained
4th position;And the third place and the 4th position are subjected to registration process with the 4th sampled point respectively, adjust the second grid appearance
State.
Optionally, as shown in fig. 7, above-mentioned apparatus further include: adding module 70, at least a kind of accessory model
Extension element is added in part or all of accessory model.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong
Following manner realization is crossed, but not limited to this: above-mentioned module is respectively positioned in same processor;Alternatively, above-mentioned modules are with any
Combined form is located in different processors.
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein
The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps
Calculation machine program:
S1 obtains the road network of scene of game, wherein road network is by multiple crossing model components and multiple road moulds
Type component splicing composition, each crossing model component is by the different road model components moved towards in part in multiple road model components
It crosses to be formed;
S2 chooses model component to be configured from road network, and sampling road is obtained on model component to be configured
Diameter;
S3 generates at least a kind of attachment mould according to preset rules file and sample path on model component to be configured
Type.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (Read-
Only Memory, referred to as ROM), it is random access memory (Random Access Memory, referred to as RAM), mobile hard
The various media that can store computer program such as disk, magnetic or disk.
The embodiments of the present invention also provide a kind of processor, which is arranged to run computer program to execute
Step in any of the above-described embodiment of the method.
Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:
S1 obtains the road network of scene of game, wherein road network is by multiple crossing model components and multiple road moulds
Type component splicing composition, each crossing model component is by the different road model components moved towards in part in multiple road model components
It crosses to be formed;
S2 chooses model component to be configured from road network, and sampling road is obtained on model component to be configured
Diameter;
S3 generates at least a kind of attachment mould according to preset rules file and sample path on model component to be configured
Type.
Optionally, the specific example in the present embodiment can be with reference to described in above-described embodiment and optional embodiment
Example, details are not described herein for the present embodiment.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others
Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit illustrated as separation assembly 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
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (23)
1. a kind of generation method of accessory model characterized by comprising
Obtain the road network of scene of game, wherein the road network is by multiple crossing model components and multiple road models
Component splicing composition, each crossing model component is by the different road model groups moved towards in part in the multiple road model component
Part crosses to be formed;
Model component to be configured is chosen from the road network, and sampling road is obtained on the model component to be configured
Diameter;
At least a kind of attachment mould is generated on the model component to be configured according to preset rules file and the sample path
Type.
2. the method according to claim 1, wherein obtaining the sampling on the model component to be configured
Path includes:
The edge of the model component to be configured is sampled, edge sample result is obtained;
Interpolation calculation is carried out according to the edge sample result and back gauge parameter, obtains sample path, wherein the back gauge parameter
For indicating the sample path and the distance between the edge of model component to be configured.
3. the method according to claim 1, wherein according to the preset rules file and the sample path
Before at least a kind of accessory model described in being generated on the model component to be configured, further includes:
Obtain the first label information of the model component to be configured and the second label information of the preset rules file;
In the case where first label information and second label information match, determine the preset rules file
It is applied to the model component to be configured.
4. the method according to claim 1, wherein being existed according to the preset rules file and the sample path
At least a kind of accessory model is generated on the model component to be configured includes:
The classification information and every a kind of accessory model of at least a kind of accessory model are obtained from the preset rules file
Grouping information, wherein the grouping information is determined according to the sample path;
The attribute information set of every group of accessory model is obtained from the preset rules file, wherein the attribute information set
It include: subclass, status data, the arrangement mode under the classification information;
It is integrated into the sample path according to the attribute information and generates at least a kind of accessory model.
5. according to the method described in claim 4, it is characterized in that, being integrated into the sample path according to the attribute information
Generating at least a kind of accessory model includes:
When the arrangement mode is discontinuous arrangement, is sampled in the sample path according to spacing parameter, obtain institute
State multiple sampled points, wherein the spacing parameter is for indicating the distance between two neighboring sampled point;
According to the arrangement mode, sampled point generates at least a kind of attachment some or all of in the multiple sampled point
Model, and according to the display state of status data adjustment at least a kind of accessory model.
6. according to the method described in claim 5, it is characterized in that, according to the arrangement mode in the multiple sampled point
Some or all of after sampled point generates at least a kind of accessory model, further includes:
When different classes of accessory model is when the first sampled point collides, by the different classes of accessory model
A kind of accessory model is retained in first sampled point, and by the second class attachment mould in the different classes of accessory model
Type is moved to the second sampled point, wherein second sampled point is to traverse adjacent adopt one by one since first sampled point
Sampling point, until obtaining the sampled point that the different classes of accessory model no longer collides.
7. according to the method described in claim 4, it is characterized in that, being integrated into the sample path according to the attribute information
Generating at least a kind of accessory model includes:
It when the arrangement mode is continuous arrangement, is sampled, is obtained described in the sample path according to spacing parameter
Multiple sampled points, wherein the spacing parameter is for indicating the distance between two neighboring sampled point;
When first towards with the second angle between greater than preset threshold, the first attachment mould is adjusted based on third sampled point
First grid posture of type, and adjust based on the 4th sampled point the second grid posture of the second accessory model, wherein described the
One is oriented direction of the third sampled point in the sample path, and described second is oriented the 4th sampled point in institute
The direction in sample path is stated, the 4th sampled point is the next sampled point adjacent with the third sampled point;
Processing is attached to the same vertices in the first grid posture and the second grid posture, determines interpolation side
To;
On the interpolation direction, using weight on the point coordinate and second accessory model in first accessory model
Point coordinate be weighted interpolation processing, generate at least a kind of accessory model, wherein the weight is the first difference and the
Ratio between two differences, first difference are any vertex in the first grid posture in the sample path
Difference of each vertex between the minimum value of the subpoint in the sample path in subpoint and the first grid posture
Value, second difference are the maximum value of subpoint of each vertex in the sample path in the first grid posture
Difference between minimum value.
8. the method according to the description of claim 7 is characterized in that adjusting the first attachment mould based on the third sampled point
The first grid posture of type includes:
After the Grid Projection to the sample path of first accessory model, obtain between the third sampled point
Apart from nearest first position and with the farthest second position of the distance between the third sampled point;
The first position and the second position are subjected to registration process, adjustment described first with the third sampled point respectively
Grid posture.
9. the method according to the description of claim 7 is characterized in that adjusting the second attachment mould based on the 4th sampled point
The second grid posture of type includes:
After the Grid Projection to the sample path of second accessory model, obtain between the 4th sampled point
Apart from nearest the third place and with the 4th farthest position of the distance between the 4th sampled point;
The third place and the 4th position are subjected to registration process, adjustment described second with the 4th sampled point respectively
Grid posture.
10. according to the method described in claim 4, it is characterized in that, being integrated into the sampling road according to the attribute information
After at least a kind of accessory model described in being generated on diameter, further includes:
Extension element is added in accessory model some or all of at least a kind of accessory model.
11. a kind of generating means of accessory model characterized by comprising
First obtains module, for obtaining the road network of scene of game, wherein the road network is by multiple crossing model groups
Part and multiple road model components splicing composition, each crossing model component are different by part in the multiple road model component
The road model component of trend crosses to be formed;
First processing module, for choosing model component to be configured from the road network, and in the mould to be configured
Sample path is obtained on type component;
Generation module, for according to preset rules file and the sample path generated on the model component to be configured to
Few one kind accessory model.
12. device according to claim 11, which is characterized in that the first processing module includes:
Sampling unit samples for the edge to the model component to be configured, obtains edge sample result;
Interpolating unit, for obtaining sample path according to the edge sample result and back gauge parameter progress interpolation calculation,
In, the back gauge parameter is for indicating the sample path and the distance between the edge of model component to be configured.
13. device according to claim 11, which is characterized in that described device further include:
Second obtains module, for obtaining the first label information and preset rules text of the model component to be configured
Second label information of part;
Determining module, for determining institute in the case where first label information and second label information match
It states preset rules file and is applied to the model component to be configured.
14. device according to claim 11, which is characterized in that the generation module includes:
First acquisition unit, for obtaining the classification information of at least a kind of accessory model from the preset rules file,
And the grouping information of every a kind of accessory model, wherein the grouping information is determined according to the sample path;
Second acquisition unit, for obtaining the attribute information set of every group of accessory model from the preset rules file, wherein
The attribute information set includes: subclass, status data, arrangement mode under the classification information;
Generation unit generates at least a kind of attachment mould for being integrated into the sample path according to the attribute information
Type.
15. device according to claim 14, which is characterized in that the generation unit includes:
First sampling subelement, is used for when the arrangement mode is discontinuous arrangement, according to spacing parameter on the sampling road
It is sampled on diameter, obtains the multiple sampled point, wherein the spacing parameter is for indicating between two neighboring sampled point
Distance;
First generates subelement, for according to the arrangement mode, sampled point to be raw some or all of in the multiple sampled point
At at least a kind of accessory model, and according to the display state of status data adjustment at least a kind of accessory model.
16. device according to claim 15, which is characterized in that described device further include:
Second processing module, for when different classes of accessory model is when the first sampled point collides, by the inhomogeneity
First kind accessory model in other accessory model is retained in first sampled point, and by the different classes of attachment mould
The second class accessory model in type is moved to the second sampled point, wherein second sampled point is opened from first sampled point
Beginning traverses adjacent sampled point one by one, until obtaining the sampled point that the different classes of accessory model no longer collides.
17. device according to claim 14, which is characterized in that the generation unit includes:
Second sampling subelement, is used for when the arrangement mode is continuous arrangement, according to spacing parameter in the sample path
On sampled, obtain the multiple sampled point, wherein the spacing parameter be used for indicate between two neighboring sampled point away from
From;
Subelement is adjusted, for being sampled based on third when first towards with the second angle between greater than preset threshold
First grid posture of point the first accessory model of adjustment, and the second grid based on the 4th sampled point the second accessory model of adjustment
Posture, wherein described first is oriented direction of the third sampled point in the sample path, and described second is oriented institute
State direction of the 4th sampled point in the sample path, the 4th sampled point is adjacent with the third sampled point next
A sampled point;
Subelement is connected, for being attached place to the same vertices in the first grid posture and the second grid posture
Reason, determines interpolation direction;
Second generates subelement, is used in the interpolation direction, using weight to the point coordinate in first accessory model
It is weighted interpolation processing with the point coordinate in second accessory model, generates at least a kind of accessory model, wherein institute
Ratio of the weight between the first difference and the second difference is stated, first difference is any top in the first grid posture
Throwing of the point in the subpoint in the sample path and each vertex in the first grid posture in the sample path
Difference between the minimum value of shadow point, second difference are each vertex in the first grid posture on the sampling road
Difference between the maxima and minima of subpoint on diameter.
18. device according to claim 17, which is characterized in that the adjustment subelement, in first attachment
After the Grid Projection of model to the sample path, the nearest first position of the distance between the third sampled point is obtained
And with the farthest second position of the distance between the third sampled point;And by the first position and the second position
Registration process is carried out with the third sampled point respectively, adjusts the first grid posture.
19. device according to claim 17, which is characterized in that the adjustment subelement, in second attachment
After the Grid Projection of model to the sample path, the nearest the third place of the distance between the 4th sampled point is obtained
And farthest the 4th position with the distance between the 4th sampled point;And by the third place and the 4th position
Registration process is carried out with the 4th sampled point respectively, adjusts the second grid posture.
20. device according to claim 14, which is characterized in that described device further include:
Adding module, for adding extension element in accessory model some or all of at least a kind of accessory model.
21. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program
When control the storage medium where equipment perform claim require any one of 1 to 10 described in accessory model generation side
Method.
22. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run
Benefit require any one of 1 to 10 described in accessory model generation method.
23. a kind of terminal characterized by comprising one or more processors, memory, display device and one or more
A program, wherein one or more of programs are stored in the memory, and are configured as by one or more
A processor executes, and one or more of programs are for accessory model described in any one of perform claim requirement 1 to 10
Generation method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910486588.9A CN110201394B (en) | 2019-06-05 | 2019-06-05 | Generation method and device of accessory model, storage medium, processor and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910486588.9A CN110201394B (en) | 2019-06-05 | 2019-06-05 | Generation method and device of accessory model, storage medium, processor and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110201394A true CN110201394A (en) | 2019-09-06 |
CN110201394B CN110201394B (en) | 2023-03-24 |
Family
ID=67790989
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910486588.9A Active CN110201394B (en) | 2019-06-05 | 2019-06-05 | Generation method and device of accessory model, storage medium, processor and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110201394B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112076478A (en) * | 2020-09-25 | 2020-12-15 | 网易(杭州)网络有限公司 | Game path generation method and device |
CN112569601A (en) * | 2019-09-30 | 2021-03-30 | 超级魔方(北京)科技有限公司 | Splicing method and device of model components in game and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101894396A (en) * | 2010-07-21 | 2010-11-24 | 北京水晶石数字科技有限公司 | Method for three-dimensional scene automatic paving |
CN101930623A (en) * | 2009-06-26 | 2010-12-29 | 比亚迪股份有限公司 | Three-dimensional road modeling method and device |
CN102436678A (en) * | 2010-09-29 | 2012-05-02 | 比亚迪股份有限公司 | Method and system for generating three-dimensional road model |
US20140309914A1 (en) * | 2010-03-11 | 2014-10-16 | Inrix, Inc. | Learning road navigation paths based on aggregate driver behavior |
CN105913483A (en) * | 2016-03-31 | 2016-08-31 | 百度在线网络技术(北京)有限公司 | Method and device for generating three-dimensional crossing road model |
CN107192393A (en) * | 2017-07-20 | 2017-09-22 | 南京多伦科技股份有限公司 | The maintenance system and method for a kind of road-map-data |
US20170284812A1 (en) * | 2016-04-01 | 2017-10-05 | Here Global B.V. | Road Geometry Matching with Componentized Junction Models |
CN107281755A (en) * | 2017-07-14 | 2017-10-24 | 网易(杭州)网络有限公司 | Construction method, device, storage medium, processor and the terminal of detection model |
CN108985269A (en) * | 2018-08-16 | 2018-12-11 | 东南大学 | Converged network driving environment sensor model based on convolution sum cavity convolutional coding structure |
-
2019
- 2019-06-05 CN CN201910486588.9A patent/CN110201394B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101930623A (en) * | 2009-06-26 | 2010-12-29 | 比亚迪股份有限公司 | Three-dimensional road modeling method and device |
US20140309914A1 (en) * | 2010-03-11 | 2014-10-16 | Inrix, Inc. | Learning road navigation paths based on aggregate driver behavior |
CN101894396A (en) * | 2010-07-21 | 2010-11-24 | 北京水晶石数字科技有限公司 | Method for three-dimensional scene automatic paving |
CN102436678A (en) * | 2010-09-29 | 2012-05-02 | 比亚迪股份有限公司 | Method and system for generating three-dimensional road model |
CN105913483A (en) * | 2016-03-31 | 2016-08-31 | 百度在线网络技术(北京)有限公司 | Method and device for generating three-dimensional crossing road model |
US20170284812A1 (en) * | 2016-04-01 | 2017-10-05 | Here Global B.V. | Road Geometry Matching with Componentized Junction Models |
CN107281755A (en) * | 2017-07-14 | 2017-10-24 | 网易(杭州)网络有限公司 | Construction method, device, storage medium, processor and the terminal of detection model |
CN107192393A (en) * | 2017-07-20 | 2017-09-22 | 南京多伦科技股份有限公司 | The maintenance system and method for a kind of road-map-data |
CN108985269A (en) * | 2018-08-16 | 2018-12-11 | 东南大学 | Converged network driving environment sensor model based on convolution sum cavity convolutional coding structure |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112569601A (en) * | 2019-09-30 | 2021-03-30 | 超级魔方(北京)科技有限公司 | Splicing method and device of model components in game and electronic equipment |
CN112569601B (en) * | 2019-09-30 | 2024-03-22 | 超级魔方(北京)科技有限公司 | Splicing method and device of model components in game and electronic equipment |
CN112076478A (en) * | 2020-09-25 | 2020-12-15 | 网易(杭州)网络有限公司 | Game path generation method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110201394B (en) | 2023-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106570822B (en) | Face mapping method and device | |
CN108460840A (en) | The methods of exhibiting and displaying device of virtual house decoration | |
CN101859224B (en) | Method and system for scratching target object from digital picture | |
CN110197534A (en) | Hooking method, device, processor and the terminal of Virtual Building accessory model | |
CN109427088A (en) | A kind of rendering method and terminal of illumination simulation | |
WO2015074575A1 (en) | Method and apparatus for obtaining three-dimensional thermodynamic diagram | |
CN107622371A (en) | A kind of Domestic furnishing design system based on VR virtual designs | |
CN110201394A (en) | Generation method, device, storage medium, processor and the terminal of accessory model | |
CN108133454B (en) | Space geometric model image switching method, device and system and interaction equipment | |
CN103559007A (en) | Method and device for dynamically generating screen wallpaper | |
CN103942053A (en) | Three-dimensional model gesture touch browsing interaction method based on mobile terminal | |
CN108762628B (en) | Page element mobile display method and device, terminal equipment and storage medium | |
CN107590337A (en) | A kind of house ornamentation displaying interactive approach and device | |
CN110992510A (en) | Security scene VR-based automatic night patrol inspection method and system | |
CN109698914A (en) | A kind of lightning special efficacy rendering method, device, equipment and storage medium | |
CN111105507A (en) | Virtual accessory model generation method and device, processor and electronic device | |
CN110264396A (en) | Video human face replacement method, system and computer readable storage medium | |
CN109839827A (en) | A kind of gesture identification intelligent home control system based on total space location information | |
CN109509057A (en) | A kind of indoor design method and device | |
CN104615366A (en) | Gesture interactive method oriented to multiple devices | |
CN106530408A (en) | Museum temporary exhibition planning and design system | |
CN106952346B (en) | System and method for generating suspended ceiling 3D model based on drawing plane polygon | |
CN108846901A (en) | Model introduction method and device | |
CN103500464B (en) | A kind of 3D render scenes is simulated the real-time regulating method of linear light source | |
CN206282360U (en) | The system of museum's Temporary Display planning and designing |
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 |