Summary of the invention
In view of this, the embodiment of the present application provides a kind of model construction method and system, calculates equipment and storage medium,
To solve technological deficiency existing in the prior art.
The embodiment of the present application discloses a kind of model construction method, comprising:
Fragment point number and the fragment point position for determining model to be constructed, according to the fragment of model to be constructed point number and broken
Block point position obtains the construction connected graph of the model to be constructed;
The model to be constructed is cut according to construction connected graph, obtains the fragment of the model to be constructed;
It determines the bonding force between fragment, is obtained according to the bonding force between the construction connected graph and fragment described to structure
The cum rights connected graph of modeling type;
Spliced according to fragment of the cum rights connected graph to the model to be constructed, generates object module.
Optionally, the fragment point number of determination model to be constructed and fragment point position, according to the broken of model to be constructed
Block point number and fragment point position obtain the construction connected graph of the model to be constructed, comprising:
The figure percent information for obtaining model to be constructed, according to the figure percent information of the model to be constructed, determine to
The fragment point number of tectonic model and fragment point position;
The initial connected graph of model to be constructed is obtained according to the fragment of model to be constructed point number and fragment point position, it will be first
Construction connected graph of the beginning connected graph as the model to be constructed.
Optionally, the fragment point number of determination model to be constructed and fragment point position, according to the broken of model to be constructed
Block point number and fragment point position obtain the construction connected graph of the model to be constructed, comprising:
Obtain the figure percent information and offset random number of model to be constructed;
According to the figure percent information of the model to be constructed, the fragment point number and fragment point of model to be constructed are determined
It sets;The initial connected graph of the model to be constructed is obtained according to the fragment of model to be constructed point number and fragment point position;
According to the offset random number and initial connected graph, the construction connected graph of the model to be constructed is obtained.
Optionally, further includes: according to the connection relationship of other tectonic models in model to be constructed and 3D scene, determine institute
State the anchor point of model to be constructed;
The fragment point number and fragment point position according to model to be constructed obtains initially connecting for the model to be constructed
Logical figure, comprising:
The first of the model to be constructed is obtained according to the fragment of model to be constructed point number and fragment point position and anchor point
Beginning connected graph.
Optionally, the bonding force between the determining fragment, according to the bonding force between the construction connected graph and fragment
Obtain the cum rights connected graph of the model to be constructed, comprising:
According to the area of the joint face of fragment, the bonding force between the fragment is determined;
The bonding weight between the fragment is determined according to the bonding force,
Connected according to the cum rights that the bonding weight between the construction connected graph and the fragment obtains the model to be constructed
Logical figure.
It is optionally, described that the model to be constructed is cut according to construction connected graph, comprising:
Based on Thiessen polygon algorithm, the model to be constructed is cut according to construction connected graph.
On the other hand, disclosed herein as well is a kind of modeling systems, comprising:
First generation module is configured to determine that fragment point number and the fragment point position of model to be constructed, according to structure
The fragment point number of modeling type and fragment point position obtain the construction connected graph of the model to be constructed;
Cutting module is configured as cutting the model to be constructed according to construction connected graph, obtains described to structure
The fragment of modeling type;
Second generation module, the bonding force being configured to determine that between fragment, according to the construction connected graph and fragment it
Between bonding force obtain the cum rights connected graph of the model to be constructed;
Third generation module is configured as being spelled according to fragment of the cum rights connected graph to the model to be constructed
It connects, generates object module.
Optionally, first generation module, comprising:
First acquisition submodule is configured as obtaining the figure percent information of model to be constructed, according to the mould to be constructed
The figure percent information of type determines fragment point number and the fragment point position of model to be constructed;
First generates submodule, is configured as being obtained according to the fragment point number and fragment point position of model to be constructed to structure
The initial connected graph of modeling type, using initial connected graph as the construction connected graph of the model to be constructed.
Optionally, first generation module, comprising:
Second acquisition submodule is configured as obtaining the figure percent information of model to be constructed and offset random number;
Second generates submodule, is configured as determining mould to be constructed according to the figure percent information of the model to be constructed
The fragment point number of type and fragment point position;It is obtained according to the fragment of model to be constructed point number and fragment point position described to structure
The initial connected graph of modeling type;
Third generates submodule, is configured as being obtained described to structure according to the offset random number and initial connected graph
The construction connected graph of modeling type.
Optionally, further includes: determining module is configured as according to other tectonic models in model to be constructed and 3D scene
Connection relationship, determine the anchor point of the model to be constructed;
The fragment point number and fragment point position according to model to be constructed obtains initially connecting for the model to be constructed
Logical figure, comprising:
The first of the model to be constructed is obtained according to the fragment of model to be constructed point number and fragment point position and anchor point
Beginning connected graph.
Optionally, second generation module, comprising:
First determines submodule, is configured as the area of the joint face according to fragment, determines the bonding between the fragment
Power;
Second determines submodule, is configured as determining the bonding weight between the fragment according to the bonding force,
4th generates submodule, is configured as being obtained according to the bonding weight between the construction connected graph and the fragment
The cum rights connected graph of the model to be constructed.
Optionally, the cutting module is configured to based on Thiessen polygon algorithm, according to construction connected graph pair
The model to be constructed is cut.
On the other hand, disclosed herein as well is a kind of calculating equipment, including memory, processor and storage are on a memory
And the computer instruction that can be run on a processor, the processor realize the model construction method when executing described instruction
Step.
On the other hand, disclosed herein as well is a kind of computer readable storage medium, it is stored with computer instruction, this refers to
The step of model construction method is realized when order is executed by processor.
A kind of model construction method provided by the present application and system calculate equipment and storage medium, pass through cum rights connected graph
The corresponding object module of model to be constructed in 3D scene is generated, the object module, can be according to cum rights during rupture
Connected graph determines the object module failure mode, so as to make a large amount of fine arts resource without fine arts personnel, can make
Object module is made, and then the Production Time of object module can be saved.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with
Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments,
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims
The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly
Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes
One or more associated any or all of project listed may combine.
It will be appreciated that though may be retouched using term first, second etc. in this specification one or more embodiment
Various information are stated, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other
It opens.For example, first can also be referred to as second, class in the case where not departing from this specification one or more scope of embodiments
As, second can also be referred to as first.Depending on context, word as used in this " if " can be construed to
" ... when " or " when ... " or " in response to determination ".
In this application, a kind of model construction method and system are provided, calculates equipment and storage medium, in following reality
It applies in example and is described in detail one by one.
Fig. 1 is to show the structural block diagram of the calculating equipment 100 according to one embodiment of this specification.The calculating equipment 100
Component include but is not limited to memory 110 and processor 120.Processor 120 is connected with memory 110 by bus 130,
Database 150 is for saving data.
Calculating equipment 100 further includes access device 140, access device 140 enable calculate equipment 100 via one or
Multiple networks 160 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network
(WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 140 may include wired or wireless
One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area
Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect
Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, other unshowned portions in the above-mentioned component and Fig. 1 of equipment 100 are calculated
Part can also be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in FIG. 1 merely for the sake of
Exemplary purpose, rather than the limitation to this specification range.Those skilled in the art can according to need, and increases or replaces it
His component.
Calculating equipment 100 can be any kind of static or mobile computing device, including mobile computer or mobile meter
Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement
Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting
Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 100 can also be mobile or state type
Server.
Wherein, processor 120 can execute the step in method shown in Fig. 2.Fig. 2 shows according to one embodiment of the application
Model construction method schematic flow chart, including step 202 is to step 208.
Step 202: fragment point number and the fragment point position of model to be constructed are determined, according to the fragment of model to be constructed point
Number and fragment point position obtain the construction connected graph of the model to be constructed.
Step 204: the model to be constructed being cut according to construction connected graph, obtains the broken of the model to be constructed
Block.
Step 206: determining the bonding force between fragment, obtained according to the bonding force between the construction connected graph and fragment
The cum rights connected graph of the model to be constructed.
Step 208: being spliced according to fragment of the cum rights connected graph to the model to be constructed, generate target mould
Type.
By the corresponding object module of model to be constructed in cum rights connected graph generation 3D scene, the object module is rupturing
During, it can determine the object module failure mode, according to cum rights connected graph so as to make without fine arts personnel
A large amount of fine arts resource, can produce object module, and then can save the Production Time of object module.
On the other hand, the application also proposed a kind of model construction method, show referring to Fig. 3, Fig. 3 according to the application one
The schematic flow chart of the model construction method of embodiment, including step 302 is to step 310:
Step 302: obtaining the figure percent information of model to be constructed, believed according to the figure ratio of the model to be constructed
Breath, determines fragment point number and the fragment point position of model to be constructed.
Step 304: initially connecting for model to be constructed is obtained according to the fragment of model to be constructed point number and fragment point position
Logical figure, using initial connected graph as the construction connected graph of the model to be constructed.
Referring to fig. 4, Fig. 4 shows the initial connected graph according to one embodiment of the application, according to building model to be constructed
Figure percent information, determine building model to be constructed fragment point number be 16 and fragment point position, thus
To the initial connected graph of building model to be constructed, the initial connected graph of the building model to be constructed includes described initially connecting
The number of tie point, the position of tie point in logical figure and the connection relationship between tie point, and by building mould to be constructed
The initial connected graph of type is as construction connected graph.
Step 306: the model to be constructed being cut according to construction connected graph, obtains the broken of the model to be constructed
Block.
It is shown referring to Fig. 5, Fig. 5 broken according to the model to be constructed of one embodiment of the application determined according to initial connected graph
Corresponding space partitioning algorithm pair can be used according to the construction connected graph of building model to be constructed in the structural schematic diagram for splitting mode
Building model to be constructed is split, with 16 fragments that the joint face of generation is concordant.
According to using initial connected graph as the construction connected graph of the model to be constructed, treats tectonic model and carry out cutting energy
Enough improve the formation speed of fragment.
Step 308: determining the bonding force between fragment, obtained according to the bonding force between the construction connected graph and fragment
The cum rights connected graph of the model to be constructed.
Step 310: being spliced according to fragment of the cum rights connected graph to the model to be constructed, generate target mould
Type.
The building status diagram of the object module according to one embodiment of the application is shown referring to Fig. 6, Fig. 6, in determination
In the case where cum rights connected graph, 16 fragments are spliced according to the cum rights connected graph of building model to be constructed, wherein
The position of each fragment point and the tie point of cum rights connected graph correspond.
Splicing can be carried out to fragment according to cum rights connected graph generates the object module that can be ruptured, it is easy to operate.Broken
When splitting object module, object module can be carried out brokenly according to the stress condition of bonding force and the object module between fragment
It splits.
On the other hand, the application also proposed a kind of model construction method, and Fig. 7 is shown according to one embodiment of the application
The schematic flow chart of model construction method, including step 702 is to step 712:
Step 702: obtaining the figure percent information and offset random number of model to be constructed.
Step 704: according to the figure percent information of the model to be constructed, determine model to be constructed fragment point number and
Fragment point position;The initial of model to be constructed is obtained with fragment point position according to the fragment of model to be constructed point number to be connected to
Figure.
Step 706: according to the offset random number and initial connected graph, obtaining the construction connection of the model to be constructed
Figure.
The construction connected graph according to one embodiment of the application is shown referring to Fig. 8, Fig. 8, according to the offset random number
The position of the obtained tie point in construction connected graph more tends to building to be constructed compared to the position of tie point in initial connected graph
The mode of object model rupture.
Step 708: the model to be constructed being cut according to construction connected graph, obtains the broken of the model to be constructed
Block.
It is shown referring to Fig. 9, Fig. 9 broken according to the model to be constructed of one embodiment of the application determined according to initial connected graph
The structural schematic diagram of mode is split,
Building model to be constructed is cut according to the construction connected graph that the offset random number obtains, is obtained
16 fragments, and the joint face of the fragment can be uneven, so that the characteristics of fragment is more in line with fragmentation.
Step 710: determining the bonding force between fragment, obtained according to the bonding force between the construction connected graph and fragment
The cum rights connected graph of the model to be constructed.
Step 712: being spliced according to fragment of the cum rights connected graph to the model to be constructed, generate target mould
Type.
The building status diagram of the object module according to one embodiment of the application is shown referring to Figure 10, Figure 10, true
In the case where determining cum rights connected graph, 16 fragments are spliced according to the cum rights connected graph of building model to be constructed,
In each fragment point position and cum rights connected graph tie point correspond.
Optionally, further includes: according to the connection relationship of other tectonic models in model to be constructed and 3D scene, determine institute
State the anchor point of model to be constructed;
The fragment point number and fragment point position according to model to be constructed obtains initially connecting for the model to be constructed
Logical figure, comprising:
The first of the model to be constructed is obtained according to the fragment of model to be constructed point number and fragment point position and anchor point
Beginning connected graph.
It, can be by the construction mould of other in the object module of generation and 3D scene by determining anchor point in initial connected graph
Type is fixed.Such as wall lamp is fixed by anchor point and wall, bridge is consolidated by multiple anchor points (bridge pier) and ground
It is fixed, and each anchor point has adsorpting aggregation effect to a certain range of fragment.
Optionally, the bonding force between the determining fragment, according to the bonding force between the construction connected graph and fragment
Obtain the cum rights connected graph of the model to be constructed, comprising:
According to the area of the joint face of fragment, the bonding force between the fragment is determined;
The bonding weight between the fragment is determined according to the bonding force,
Connected according to the cum rights that the bonding weight between the construction connected graph and the fragment obtains the model to be constructed
Logical figure.
A kind of area of the joint face of the fragment described in enforceable scheme is bigger, the bonding between the corresponding fragment
Power is bigger.The bonding force between the fragment is labeled by bonding weight, the splicing to fragment can be convenient for, thus
During rupturing to object module, object module can be made to rupture more life-like.
It is optionally, described that the model to be constructed is cut according to construction connected graph, comprising:
Based on Thiessen polygon (Voronoi) algorithm, the model to be constructed is cut according to construction connected graph.
By selecting suitable data structure, motor point Substitution Rules and iterative method divide empty the Thiessen polygon algorithm
Between, and the point set in segmented areas is marked into compression, so that plane or n-dimensional space are divided into periodically or quasi-periodically
Piecemeal.
It on the other hand, is to show basis referring to Figure 11, Figure 11 disclosed herein as well is a kind of modeling system 1100
The structural schematic diagram of the modeling system 1100 of one embodiment of the application, comprising:
First generation module 1102 is configured to determine that fragment point number and the fragment point position of model to be constructed, according to
The fragment point number of model to be constructed and fragment point position obtain the construction connected graph of the model to be constructed;
Cutting module 1104 is configured as cutting the model to be constructed according to construction connected graph, obtain described
The fragment of model to be constructed;
Second generation module 1106, the bonding force being configured to determine that between fragment, according to the construction connected graph and broken
Bonding force between block obtains the cum rights connected graph of the model to be constructed;
Third generation module 1108 is configured as being carried out according to fragment of the cum rights connected graph to the model to be constructed
Splicing generates object module.
The modeling system passes through the corresponding object module of model to be constructed in cum rights connected graph generation 3D scene, institute
Object module is stated during rupture, the object module failure mode can be determined according to cum rights connected graph, so as to
A large amount of fine arts resource is made without fine arts personnel, object module can be produced, and then the production of object module can be saved
Time.
Optionally, first generation module, comprising:
First acquisition submodule is configured as obtaining the figure percent information of model to be constructed, according to the mould to be constructed
The figure percent information of type determines fragment point number and the fragment point position of model to be constructed;
First generates submodule, is configured as being obtained according to the fragment point number and fragment point position of model to be constructed to structure
The initial connected graph of modeling type, using initial connected graph as the construction connected graph of the model to be constructed.
It is described first generate submodule using initial connected graph as the construction connected graph of the model to be constructed, and obtain to
The cum rights connected graph of tectonic model, can be improved the formation speed of cum rights connected graph.The cutting module 1104 is according to will be initial
Construction connected graph of the connected graph as the model to be constructed treats tectonic model and carries out cutting the generation speed that can be improved fragment
Degree.
Optionally, first generation module, comprising:
Second acquisition submodule is configured as obtaining the figure percent information of model to be constructed and offset random number;
Second generates submodule, is configured as determining mould to be constructed according to the figure percent information of the model to be constructed
The fragment point number of type and fragment point position;It is obtained according to the fragment of model to be constructed point number and fragment point position described to structure
The initial connected graph of modeling type;
Third generates submodule, is configured as being obtained described to structure according to the offset random number and initial connected graph
The construction connected graph of modeling type.
Wherein, the third generates submodule and is connected according to the construction obtained by the offset random number and initial connected graph
Logical figure, can make fragment more true to nature, to improve the bandwagon effect of animation.
Optionally, further includes: determining module is configured as according to other tectonic models in model to be constructed and 3D scene
Connection relationship, determine the anchor point of the model to be constructed;
The fragment point number and fragment point position according to model to be constructed obtains initially connecting for the model to be constructed
Logical figure, comprising:
The first of the model to be constructed is obtained according to the fragment of model to be constructed point number and fragment point position and anchor point
Beginning connected graph.
The determining module, can will be in the object module of generation and 3D scene by determining anchor point in initial connected graph
Other tectonic models be fixed.Such as wall lamp is fixed by anchor point and wall, bridge passes through multiple anchor points (bridge pier)
It is fixed with ground, and each anchor point has adsorpting aggregation effect to a certain range of fragment.
Optionally, second generation module, comprising:
First determines submodule, is configured as the area of the joint face according to fragment, determines the bonding between the fragment
Power;
Second determines submodule, is configured as determining the bonding weight between the fragment according to the bonding force,
4th generates submodule, is configured as being obtained according to the bonding weight between the construction connected graph and the fragment
The cum rights connected graph of the model to be constructed.
The bonding force between the fragment is labeled by bonding weight, the splicing to fragment can be convenient for, thus
During rupturing to object module, object module can be made to rupture more life-like.
Optionally, the cutting module is configured to based on Thiessen polygon algorithm, according to construction connected graph pair
The model to be constructed is cut.
By selecting suitable data structure, motor point Substitution Rules and iterative method divide empty the Thiessen polygon algorithm
Between, and the point set in segmented areas is marked into compression, so that plane or n-dimensional space are divided into periodically or quasi-periodically
Piecemeal.
One embodiment of the application also provides a kind of calculating equipment, including memory, processor and storage are on a memory simultaneously
The step of computer instruction that can be run on a processor, the processor executes model construction method as previously described.
One embodiment of the application also provides a kind of computer readable storage medium, is stored with computer instruction, the instruction
The step of model construction method as previously described is realized when being executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited
The technical solution of storage media and the technical solution of above-mentioned model construction method belong to same design, the technical solution of storage medium
The detail content being not described in detail may refer to the description of the technical solution of above-mentioned model construction method.
The computer instruction includes computer program code, the computer program code can for source code form,
Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute
State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code
Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory),
Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior
Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts
Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because
According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen
It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
The application preferred embodiment disclosed above is only intended to help to illustrate the application.There is no detailed for alternative embodiment
All details are described, are not limited the invention to the specific embodiments described.Obviously, according to the content of this specification,
It can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain the application
Principle and practical application, so that skilled artisan be enable to better understand and utilize the application.The application is only
It is limited by claims and its full scope and equivalent.