CN109976827A - Loading method, server and the terminal of model - Google Patents
Loading method, server and the terminal of model Download PDFInfo
- Publication number
- CN109976827A CN109976827A CN201910178088.9A CN201910178088A CN109976827A CN 109976827 A CN109976827 A CN 109976827A CN 201910178088 A CN201910178088 A CN 201910178088A CN 109976827 A CN109976827 A CN 109976827A
- Authority
- CN
- China
- Prior art keywords
- model
- terminal
- vertex data
- loading
- hierarchical mode
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the present invention provides a kind of loading method of model, is applied to server, the loading method includes: to be layered to model, obtains the hierarchical mode of different accuracy, and each hierarchical mode is made of the tri patch for corresponding to precision;According to the precision of hierarchical mode from thick to thin, double labelling is carried out to the vertex data of all tri patch;Wherein, the first mark information is the number of the hierarchical mode of most coarseness belonging to vertex data, and the second mark information is serial number of the vertex data in default vertex sequence;The downloading request that terminal is sent is received, the loading environment parameter of terminal is recorded in request, terminal is returned to according to the vertex data of loading environment parameter selection target hierarchy model, for terminal loads;Wherein, the precision of target hierarchy model and loading environment parameter are positively correlated.The embodiment of the present invention solves in traditional scheme performance is lower, network environment the is poor terminal Caton phenomenon that may be present when loading and rendering the higher model of fineness.
Description
Technical field
The present embodiments relate to field of computer technology, loading method, server more particularly, to a kind of model
And terminal.
Background technique
Virtual reality technology VR (Virtual Reality) and augmented reality AR technology (Augmented Realty) it is emerging
It rises and promotes, proposition very high request is interacted with virtual or real world to model.With the development of computer graphics, terminal
GL is standardized perfect, to realize VR, AR interaction on terminal browser, then especially be moved in terminal browser
Realize that the real-time loading of Caton and rendering are not particularly important superior performance in the terminal browser of moved end.
The method that rending model is loaded in existing mobile terminal terminal browser is to generate in user and browser page special
When fixed alternative events, browser reads in memory and simultaneously carries out sequence of operations, complete model from remote server download model
Load and rendering, are finally presented in terminal browser.In this scheme, model once loads completion.But the method is also deposited
In obvious disadvantage:
1, when the production of the details of model is careful, the data volume of vertex and dough sheet is larger, or even is up to up to a hundred million sometimes.
In this case, the poor user of network environment, which downloads, postpones larger, user experience while real-time cannot be guaranteed
It is very poor.
2, when model details production it is careful when, vertex and dough sheet quantity are larger, to the CPU and GPU of equipment all propose compared with
High request.In this case, the browser of the lower mobile device of performance more serious Caton will occurs and fall frame phenomenon, smooth
Property and authenticity will be greatly reduced.
3, when model quantity is more, since all models all default holding high-precision, so performance can be with pattern number
The increase of amount and reduce.
Summary of the invention
The embodiment of the present invention provides a kind of adding for model for overcoming the above problem or at least being partially solved the above problem
Support method, server and terminal.
First aspect, the embodiment of the present invention provide a kind of loading method of model, are applied to server, the load side
Method includes:
Model is layered, obtains the hierarchical mode of different accuracy, each hierarchical mode is by corresponding to the triangular facet of precision
Piece composition;
According to the precision of hierarchical mode from thick to thin, double labelling is carried out to the vertex data of all tri patch;Wherein,
One mark information is the number of the hierarchical mode of most coarseness belonging to vertex data, and the second mark information is vertex data default
Serial number in vertex sequence;
The downloading request that terminal is sent is received, the loading environment parameter of terminal is recorded in the request, according to the load
The vertex data of conditional parameter selection target hierarchical mode returns to terminal, for terminal loads;
Wherein, the precision of the target hierarchy model and the loading environment parameter are positively correlated.
The second aspect, the embodiment of the present invention provide a kind of loading method of model, are applied to terminal, the loading method
Include:
Downloading request is sent to server, the loading environment parameter of terminal is recorded in the request;
Receive the vertex data for the target hierarchy model that the server is returned according to the downloading request;
According to the serial number of the vertex data received, every three vertex datas are formed into a tri patch by ascending order, with
Obtain model to be presented;
Wherein, in the vertex data tool there are two mark information, wherein the first mark information be belonging to vertex data most
The number of the hierarchical mode of coarseness, the second mark information are serial number of the vertex data in default vertex sequence.
The third aspect, the embodiment of the present invention provide a kind of server, comprising:
Hierarchical block obtains the hierarchical mode of different accuracy, each hierarchical mode is by corresponding to for being layered to model
The tri patch of precision forms;
Mark module carries out the vertex data of all tri patch for the precision according to hierarchical mode from thick to thin
Double labelling;Wherein, the first mark information is the number of the hierarchical mode of most coarseness belonging to vertex data, and the second mark information is
Serial number of the vertex data in default vertex sequence;
Transmission module, for receiving the downloading request of terminal transmission, the loading environment parameter of record terminal in the request,
Terminal is returned to according to the vertex data of the loading environment parameter selection target hierarchy model, for terminal loads;
Wherein, the precision of the target hierarchy model and the loading environment parameter are positively correlated.
Fourth aspect, the embodiment of the present invention provide a kind of terminal, comprising:
Request module, for being sent out to server
It send downloading to request, the loading environment parameter of terminal is recorded in the request;
Receiving module, for receiving the number of vertex for the target hierarchy model that the server is returned according to the downloading request
According to;
Every three vertex datas are formed one by ascending order for the serial number according to the vertex data received by display module
A tri patch, to obtain model to be presented;
Wherein, in the vertex data tool there are two mark information, wherein the first mark information be belonging to vertex data most
The number of the hierarchical mode of coarseness, the second mark information are serial number of the vertex data in default vertex sequence.
5th aspect, the embodiment of the present invention provides a kind of electronic equipment, including memory, processor and is stored in memory
Computer program that is upper and can running on a processor, the processor realize such as first aspect or second when executing described program
Provided by aspect the step of method.
6th aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, are stored thereon with calculating
Machine program, when which is executed by processor the step of realization method as provided by first aspect or second aspect.
Model loading method provided in an embodiment of the present invention, by server end with the method for double labelling position to model into
Row it is with different levels pretreatment, download according to loading environment parameter adaptive and construct render different levels model, according to reality
Rendering situation dynamic adjustment model level and etc. adding to solve the terminal that performance is lower in traditional scheme, network environment is poor
It carries and when rendering fineness higher model Caton phenomenon that may be present.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram of the loading method of model provided in an embodiment of the present invention;
Fig. 2 is structural schematic diagram of the same threedimensional model of the embodiment of the present invention under different levels;
Fig. 3 is the flow diagram of the loading method of the model of another embodiment of the present invention;
Fig. 4 is the structural schematic diagram of server provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of terminal provided in an embodiment of the present invention;
Fig. 6 is the entity structure schematic diagram of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Fig. 1 is the flow diagram of the loading method of model provided in an embodiment of the present invention, which is applied to clothes
Business device, as shown in Figure 1, the loading method includes:
S101, model is layered, obtains the hierarchical mode of different accuracy, each hierarchical mode is by corresponding to the three of precision
Edged surface piece composition.
It should be noted that the loading method of the embodiment of the present invention is executed by server, add relative to what terminal side executed
Support method more belongs to the preprocessing process to model.In embodiments of the present invention, model can be two dimensional model, be also possible to
Threedimensional model is realized by being layered to model and provides the model of different accuracy according to the different demands of terminal side.The present invention
Level number is arranged to each hierarchical mode in embodiment, and level number and hierarchical rule directly have corresponding relationship, for example, layering number
Bigger, then hierarchical mode inner vertex data are more, and the dough sheet for including is more, and details is more careful.Fig. 2 is the same of the embodiment of the present invention
Structural schematic diagram of one threedimensional model under different levels, wherein a is layering result of the threedimensional model under level 1: only 1
Dough sheet;B is group result of the threedimensional model under level 2: sharing 4 tri patch;C is point of the threedimensional model under level 3
Group result: 16 tri patch are shared.
S102, the precision according to hierarchical mode from thick to thin carry out double labelling to the vertex data of all tri patch;Its
In, the first mark information is the number of the hierarchical mode of most coarseness belonging to vertex data, and the second mark information is vertex data
Serial number in default vertex sequence.
By taking threedimensional model shown in Fig. 2 as an example, first to the first mark information of label respectively of three vertex in a, then to b
In four tri patch in not yet the first mark information of label the first mark information of vertex data label, finally in c 16
Not yet the first mark information of vertex data label of the first mark information of label in a tri patch.0~12 implements for the present invention
Second mark information of each vertex data in example, from figure 2 it can be seen that the embodiment of the present invention is the generation according to tri patch
Second mark information of sequence notation.
Double labelling is arranged by opposite vertexes data in the embodiment of the present invention, so that on the one hand vertex data is provided with layering and belongs to
Property, so that it is subsequent when needing to extract a certain hierarchical mode, corresponding vertex data can be extracted according to the first mark information;
On the other hand, since the second mark information illustrates the sequence of vertex information generation, when terminal creates model
Model is gradually obtained according to the sequence of the second mark information.
S103, the downloading request that terminal is sent is received, the loading environment parameter of terminal is recorded in the request, according to described
The vertex data of loading environment parameter selection target hierarchy model returns to terminal, for terminal loads;
Wherein, the precision of the target hierarchy model and the loading environment parameter are positively correlated.
It should be noted that the terminal of the embodiment of the present invention is when sending downloading request to server section, meeting is in the request
The loading environment parameter for the terminal write, such as the hardware equipment information and network speed information of terminal.The embodiment of the present invention in advance can be right
Hardware equipment information and network speed information are classified, and hardware device is more advanced, and network speed is faster, then are sent to the target hierarchy of terminal
Model accuracy is higher.Therefore, after receiving the downloading request of terminal transmission, target hierarchy model is determined according to loading environment parameter
Vertex data return to terminal, so that terminal loads out model according to vertex data.
The loading method of the model of the embodiment of the present invention, by being carried out in the method for double labelling position to model in server end
It is with different levels pretreatment, download according to loading environment parameter adaptive and construct render different levels model, according to practical wash with watercolours
Dye situation dynamic adjustment model level and etc. loaded to solve the terminal that performance is lower in traditional scheme, network environment is poor
And Caton phenomenon that may be present when the rendering higher model of fineness.
On the basis of the various embodiments described above, as a kind of alternative embodiment, model is layered, obtains different accuracy
Hierarchical mode, specifically:
The model is layered according to sequence from thick to thin, before carrying out next secondary clearing every time, to being layered
Model in the vertex data of tri patch mark first mark information and the second mark information.
By taking threedimensional model shown in Fig. 2 as an example, the first layer hierarchical mode of most coarseness is firstly generated, to three in a
Vertex respectively the first mark information of label and the second mark information (the second mark information of each vertex data is merely illustrated in Fig. 2,
The first mark information is not shown) medium-grained second layer hierarchical mode then is being generated, to three vertex newly-generated in b point
Not the first mark information of label and the second mark information ultimately produce fine-grained third layer hierarchical mode, to newly-generated in c
12 vertex the first mark information of label and the second mark information respectively.
On the basis of the various embodiments described above, as a kind of alternative embodiment, according to the loading environment parameter selection pair
The vertex data for the hierarchical mode answered returns to terminal, specifically:
The one-to-one relationship of S201, the value range for establishing different loading environment parameters and each hierarchical mode.
For example, can be according to the assessment data of the performance class of existing CPU and GPU to equipment, by the hardware item of equipment
Part is divided into multiple grades, and multiple grades equally are arranged to network speed, material is thus formed the grade of different loading environment parameters, this
A grade can the suitable model accuracy of embodiment device, therefore loading environment parameter is adapted to each hierarchical mode, according to
Corresponding hierarchical mode is arranged in the value range of each loading environment parameter.It is understood that loading environment parameter is lower
Terminal, the precision of corresponding hierarchical mode also can be lower.
S202, when the received loading environment parameter, corresponding hierarchical mode, knot are obtained according to the corresponding relationship
It closes precision and is less than the corresponding hierarchical mode as the target hierarchy model.
Specifically, when the matched hierarchical mode of loading environment institute received is the 3rd layer of hierarchical mode, it is assumed that co-exist in
5 layers of hierarchical mode, and the more low then precision of the number of plies of hierarchical mode is lower, then target hierarchy model includes the 1st~3 layer of layering mould
Type.
S203, the vertex data of all tri patch in the target hierarchy model is returned into terminal.
Fig. 3 is the flow diagram of the loading method of the model of another embodiment of the present invention, application of the embodiment of the present invention
In terminal, as shown in Figure 3, comprising:
S301, downloading request is sent to server, the loading environment parameter of terminal is recorded in the request.
It should be noted that the terminal of the embodiment of the present invention can be sent out when obtaining model from server to server first
It makes arrangements for his funeral the loading environment parameter at end, such as the hardware equipment information and network speed information of terminal.
S302, the vertex data for receiving the target hierarchy model that the server is returned according to the downloading request;Wherein,
There are two mark informations for tool in the vertex data, wherein the first mark information is the layering mould of most coarseness belonging to vertex data
The number of type, the second mark information are serial number of the vertex data in default vertex sequence.
The embodiment of the present invention in advance can be classified hardware equipment information and network speed information, and hardware device is more advanced, net
Speed is faster, then the target hierarchy model accuracy for being sent to terminal is higher.
Every three vertex datas are formed a triangular facet by ascending order by the serial number for the vertex data that S303, basis receive
Piece, to obtain model to be presented.
It as shown in Figure 2, is according to newly-generated when opposite vertexes of embodiment of the present invention data carry out the label of the second mark information
The sequence notation of tri patch according to the serial number of vertex data, tri patch one by one, example therefore can be sequentially generated
Such as, vertex data 0,1 and 2 is attached first, the hierarchical mode 1 of most rough grade is generated, then by vertex data 3,4 and 5
It is attached, to generate the hierarchical mode 2 of higher precision on the basis of hierarchical mode 1, continues to connect 6,7 and 8
It connects, 9,10 and 11 is attached, is attached 12,13 and 14, that is, produce the full accuracy with 16 dough sheet numbers
Hierarchical mode 3.
It is understood that after generating model to be presented, if textures have been assigned when modeling, according in model file
Textures information, give and map corresponding specific textures on the model for having assigned material, be in the specific time rendering of needs later
Model can be presented in terminal.
The loading method of the model of the embodiment of the present invention, by server send downloading request, the server for being according to
Downloading request returns to the model for meeting the loading environment of terminal, and the unnecessary rendering of reduction is happy, to promote actual rendering effect
Fruit.
On the basis of the various embodiments described above, as a kind of alternative embodiment, the embodiment of the present invention is also supported in virtualphase
When machine changes at a distance from model, the step of adjusting the loading result of model, specifically include:
Establish the distance range of virtual camera and the model to be presented and the one-to-one relationship of each hierarchical mode.
It should be noted that model, when showing, actually terminal can be arranged a virtual camera and carry out simulation model
Visual angle, when virtual camera and model are closing the distance, it is clear that model can amplify, and may just need this when to improve mould
The precision of type, when virtual camera and model zoom out apart from when, model will reduce, this moment may need to reduce model
Precision.Therefore, the embodiment of the present invention can establish different grades according to virtual camera at a distance from model, then with each point
Layer model establishes corresponding relationship.
After obtaining the model to be presented, monitor presently described virtual camera and the model to be presented away from
From according to the determining corresponding hierarchical mode of the distance, as benchmark model.
After the terminal of the embodiment of the present invention prepares to show (acquisition) target hierarchy model (model i.e. to be presented), it can supervise
Presently described virtual camera is surveyed at a distance from target hierarchy model, corresponding hierarchical mode is determined according to the distance, as base
Quasi-mode type.It is understood that terminal, after receiving target hierarchy model, meeting is according to full accuracy in target hierarchy model
Hierarchical mode finds corresponding display distance and provides optimal display to adjust the distance of virtual camera and target hierarchy model
Effect.
The accuracy for judging the benchmark model Yu the model to be presented, current according to judging result and terminal
Loading environment parameter adjusts the loading result of model.
For the embodiment of the present invention after the benchmark model of acquisition, the precision for judging benchmark model and target hierarchy model is high
It is low, according to the current loading environment parameter of judging result and terminal, the loading result of model to be presented is adjusted, specifically, packet
It includes:
If the vertex data of the benchmark model is downloaded from server, and the current loading environment parameter of terminal with it is described
Benchmark model matches, then loads the benchmark model;
If the vertex data of the benchmark model is downloaded from server, and terminal it is current loading environment parameter it is matched
The precision of hierarchical mode is lower than the benchmark model, then loads the model to be presented;
If the vertex data of the benchmark model is not downloaded from server, and the current loading environment parameter of terminal with it is described
Benchmark model matches, then sends and download to server, to obtain and load the benchmark model;
If the vertex data of the benchmark model is not downloaded from server, and terminal it is current loading environment parameter it is matched
The precision of hierarchical mode is lower than the benchmark model, then loads the model to be presented;
If the precision of benchmark model is not higher than the model to be presented, the benchmark model is loaded.
The embodiment of the present invention realizes according to virtual camera the effect of dynamic adjustment model precision at a distance between model, energy
Enough promote rendering effect.
Fig. 4 is the structural schematic diagram of server provided in an embodiment of the present invention, as shown in figure 4, the server includes: layering
Module 401, mark module 402 and transmission module 403, in which:
Hierarchical block 401 obtains the hierarchical mode of different accuracy for being layered to model, each hierarchical mode by
The tri patch composition of corresponding precision;
Mark module 402, for the precision according to hierarchical mode from thick to thin, to the vertex datas of all tri patch into
Row double labelling;Wherein, the first mark information is the number of the hierarchical mode of most coarseness belonging to vertex data, the second mark information
For serial number of the vertex data in default vertex sequence;
Transmission module 403 records the loading environment ginseng of terminal for receiving the downloading request of terminal transmission in the request
Number, returns to terminal according to the vertex data of the loading environment parameter selection target hierarchy model, for terminal loads;
Wherein, the precision of the target hierarchy model and the loading environment parameter are positively correlated.
Server provided in an embodiment of the present invention specifically executes implementation of the loading method in server side of above-mentioned each model
Example process, please specifically be detailed in the content of embodiment of the above-mentioned each loading method in server side, details are not described herein.The present invention is real
Apply example offer server with the method for double labelling position to model carry out it is with different levels pretreatment, it is adaptive according to loading environment parameter
It should download and construct the model of rendering different levels, solve to pass according to practical rendering situation dynamic adjustment model level
The terminal that in system scheme, performance is lower, network environment is poor is that may be present when loading and rendering the higher model of fineness
Caton phenomenon.
Fig. 5 is the structural schematic diagram of terminal provided in an embodiment of the present invention, as shown in figure 5, the terminal includes: request module
501, receiving module 502 and display module 503, in which:
Request module 501 records the loading environment ginseng of terminal for sending downloading request to server in the request
Number;
Receiving module 502, for receiving the top for the target hierarchy model that the server is returned according to the downloading request
Point data;
Display module 503 is formed every three vertex datas by ascending order for the serial number according to the vertex data received
One tri patch, to obtain model to be presented;
Wherein, in the vertex data tool there are two mark information, wherein the first mark information be belonging to vertex data most
The number of the hierarchical mode of coarseness, the second mark information are serial number of the vertex data in default vertex sequence
Terminal provided in an embodiment of the present invention by sending downloading request to server, request according to downloading by the server for being
The model for meeting the loading environment of terminal is returned, unnecessary rendering is reduced happily, to promote actual rendering effect.
Fig. 6 is the entity structure schematic diagram of electronic equipment provided in an embodiment of the present invention, as shown in fig. 6, the electronic equipment
It may include: processor (processor) 610,620, memory communication interface (Communications Interface)
(memory) 630 and communication bus 640, wherein processor 610, communication interface 620, memory 630 pass through communication bus 640
Complete mutual communication.Processor 610 can call the meter that is stored on memory 630 and can run on processor 610
Calculation machine program, to execute the xxxxxxxxxxx method of the various embodiments described above offer, for example, model is layered, is obtained
The hierarchical mode of different accuracy, each hierarchical mode are made of the tri patch for corresponding to precision;From thick to thin according to hierarchical mode
Precision, double labelling is carried out to the vertex datas of all tri patch;Wherein, the first mark information is most thick belonging to vertex data
The number of the hierarchical mode of granularity, the second mark information are serial number of the vertex data in default vertex sequence;Receive terminal hair
The downloading sent is requested, and the loading environment parameter of terminal is recorded in the request, according to the loading environment parameter selection target point
The vertex data of layer model returns to terminal, for terminal loads.It is requested alternatively, sending downloading to server, in the request
Record the loading environment parameter of terminal;Receive the vertex for the target hierarchy model that the server is returned according to the downloading request
Data;According to the serial number of the vertex data received, every three vertex datas are formed into a tri patch by ascending order, to obtain
Model to be presented;Wherein, there are two mark informations for tool in the vertex data, wherein the first mark information is vertex data institute
Belong to the number of the hierarchical mode of most coarseness, the second mark information is serial number of the vertex data in default vertex sequence.
In addition, the logical order in above-mentioned memory 630 can be realized by way of SFU software functional unit and conduct
Independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, originally
The technical solution of the inventive embodiments substantially part of the part that contributes to existing technology or the technical solution in other words
It can be embodied in the form of software products, which is stored in a storage medium, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes the present invention respectively
The all or part of the steps of a embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory
(ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk
Etc. the various media that can store program code.
The embodiment of the present invention also provides a kind of non-transient computer readable storage medium, is stored thereon with computer program,
The computer program is implemented to carry out the loading method of the model of the various embodiments described above offer when being executed by processor, such as wraps
It includes: model is layered, obtain the hierarchical mode of different accuracy, each hierarchical mode is by corresponding to the tri patch group of precision
At;According to the precision of hierarchical mode from thick to thin, double labelling is carried out to the vertex data of all tri patch;Wherein, the first mark
Remember that information is the number of the hierarchical mode of most coarseness belonging to vertex data, the second mark information is vertex data on default vertex
Serial number in sequence;The downloading request that terminal is sent is received, the loading environment parameter of terminal is recorded in the request, according to described
The vertex data of loading environment parameter selection target hierarchy model returns to terminal, for terminal loads.Alternatively, being sent out to server
It send downloading to request, the loading environment parameter of terminal is recorded in the request;The server is received to be returned according to downloading request
The vertex data of the target hierarchy model returned;According to the serial number of the vertex data received, by ascending order by every three vertex datas
A tri patch is formed, to obtain model to be presented;Wherein, there are two mark informations for tool in the vertex data, wherein
First mark information is the number of the hierarchical mode of most coarseness belonging to vertex data, and the second mark information is vertex data pre-
If the serial number in vertex sequence.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.
Claims (10)
1. a kind of loading method of model, it is applied to server, which is characterized in that the loading method includes:
Model is layered, obtains the hierarchical mode of different accuracy, each hierarchical mode is by corresponding to the tri patch group of precision
At;
According to the precision of hierarchical mode from thick to thin, double labelling is carried out to the vertex data of all tri patch;Wherein, the first mark
Remember that information is the number of the hierarchical mode of most coarseness belonging to vertex data, the second mark information is vertex data on default vertex
Serial number in sequence;
The downloading request that terminal is sent is received, the loading environment parameter of terminal is recorded in the request, according to the loading environment
The vertex data of parameter selection target hierarchy model returns to terminal, for terminal loads;
Wherein, the precision of the target hierarchy model and the loading environment parameter are positively correlated.
2. loading method according to claim 1, which is characterized in that it is described that model is layered, obtain different accuracy
Hierarchical mode, specifically:
The model is layered according to sequence from thick to thin, before carrying out next secondary clearing every time, to the mould being layered
The vertex data of tri patch in type marks first mark information and the second mark information.
3. loading method according to claim 1, which is characterized in that described corresponding according to the loading environment parameter selection
The vertex data of hierarchical mode return to terminal, specifically:
Establish the value range of different loading environment parameters and the one-to-one relationship of each hierarchical mode;
When the received loading environment parameter, corresponding hierarchical mode is obtained according to the corresponding relationship, it is small in conjunction with precision
In the corresponding hierarchical mode as the target hierarchy model;
The vertex data of all tri patch in the target hierarchy model is returned into terminal.
4. a kind of loading method of model, is applied to terminal, the loading method includes:
Downloading request is sent to server, the loading environment parameter of terminal is recorded in the request;
Receive the vertex data for the target hierarchy model that the server is returned according to the downloading request;
According to the serial number of the vertex data received, every three vertex datas are formed into a tri patch by ascending order, to obtain
Model to be presented;
Wherein, there are two mark informations for tool in the vertex data, wherein the first mark information is most coarse grain belonging to vertex data
The number of the hierarchical mode of degree, the second mark information are serial number of the vertex data in default vertex sequence.
5. loading method according to claim 4, which is characterized in that further include:
Establish the distance range of virtual camera and the model to be presented and the one-to-one relationship of each hierarchical mode;
After obtaining the model to be presented, presently described virtual camera is monitored at a distance from the model to be presented, root
Corresponding hierarchical mode is determined according to the distance, as benchmark model;
The accuracy for judging the benchmark model Yu the model to be presented adds according to judging result and terminal are current
Conditional parameter is carried, the loading result of model to be presented is adjusted.
6. loading method according to claim 4, which is characterized in that described to add according to judging result and terminal are current
Conditional parameter is carried, the loading result of model to be presented is adjusted, specifically:
If the precision of benchmark model is higher than the model to be presented:
If the vertex data of the benchmark model is downloaded from server, and the current loading environment parameter of terminal and the benchmark
Model matches, then loads the benchmark model;
If the vertex data of the benchmark model is downloaded from server, and the matched layering of loading environment parameter that terminal is current
The precision of model is lower than the benchmark model, then loads the model to be presented;
If the vertex data of the benchmark model is not downloaded from server, and the current loading environment parameter of terminal and the benchmark
Model matches, then sends and download to server, to obtain and load the benchmark model;
If the vertex data of the benchmark model is not downloaded from server, and the matched layering of loading environment parameter that terminal is current
The precision of model is lower than the benchmark model, then loads the model to be presented;
If the precision of benchmark model is not higher than the model to be presented, the benchmark model is loaded.
7. a kind of server characterized by comprising
Hierarchical block obtains the hierarchical mode of different accuracy, each hierarchical mode is by corresponding to precision for being layered to model
Tri patch composition;
Mark module carries out double marks to the vertex data of all tri patch for the precision according to hierarchical mode from thick to thin
Note;Wherein, the first mark information is the number of the hierarchical mode of most coarseness belonging to vertex data, and the second mark information is vertex
Serial number of the data in default vertex sequence;
Transmission module, for receiving the downloading request of terminal transmission, the loading environment parameter of record terminal in the request, according to
The vertex data of the loading environment parameter selection target hierarchy model returns to terminal, for terminal loads;
Wherein, the precision of the target hierarchy model and the loading environment parameter are positively correlated.
8. a kind of terminal characterized by comprising
Request module records the loading environment parameter of terminal for sending downloading request to server in the request;
Receiving module, for receiving the vertex data for the target hierarchy model that the server is returned according to the downloading request;
Every three vertex datas are formed one three by ascending order for the serial number according to the vertex data received by display module
Edged surface piece, to obtain model to be presented;
Wherein, there are two mark informations for tool in the vertex data, wherein the first mark information is most coarse grain belonging to vertex data
The number of the hierarchical mode of degree, the second mark information are serial number of the vertex data in default vertex sequence.
9. a kind of electronic equipment characterized by comprising
At least one processor;And
At least one processor being connect with the processor communication, in which:
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy
Enough loading methods for executing the model as described in any one of claim 1 to 6.
10. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited
Computer instruction is stored up, the computer instruction makes the computer execute the model as described in any one of claim 1 to 6
Loading method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910178088.9A CN109976827B (en) | 2019-03-08 | 2019-03-08 | Model loading method, server and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910178088.9A CN109976827B (en) | 2019-03-08 | 2019-03-08 | Model loading method, server and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109976827A true CN109976827A (en) | 2019-07-05 |
CN109976827B CN109976827B (en) | 2020-08-21 |
Family
ID=67078290
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910178088.9A Active CN109976827B (en) | 2019-03-08 | 2019-03-08 | Model loading method, server and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109976827B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111773719A (en) * | 2020-06-23 | 2020-10-16 | 完美世界(北京)软件科技发展有限公司 | Rendering method and device of virtual object, storage medium and electronic device |
CN111966942A (en) * | 2020-08-11 | 2020-11-20 | 济南科明数码技术股份有限公司 | VR display method, system and equipment of mobile terminal |
CN113535271A (en) * | 2021-07-28 | 2021-10-22 | 浙江大华技术股份有限公司 | Loading method and device of algorithm model, storage medium and electronic device |
CN113538698A (en) * | 2020-04-16 | 2021-10-22 | 同济大学 | Model display device and model display method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103701798A (en) * | 2013-12-24 | 2014-04-02 | 秦皇岛数据产业研究院有限公司 | Intelligent progressive transmission system and transmission method for three-dimensional model |
CN106296779A (en) * | 2015-05-19 | 2017-01-04 | 深圳市腾讯计算机系统有限公司 | A kind of threedimensional model rendering indication method and system |
CN107992661A (en) * | 2017-11-27 | 2018-05-04 | 中车工业研究院有限公司 | CAD modeling datas streaming method, server and client side |
-
2019
- 2019-03-08 CN CN201910178088.9A patent/CN109976827B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103701798A (en) * | 2013-12-24 | 2014-04-02 | 秦皇岛数据产业研究院有限公司 | Intelligent progressive transmission system and transmission method for three-dimensional model |
CN106296779A (en) * | 2015-05-19 | 2017-01-04 | 深圳市腾讯计算机系统有限公司 | A kind of threedimensional model rendering indication method and system |
CN107992661A (en) * | 2017-11-27 | 2018-05-04 | 中车工业研究院有限公司 | CAD modeling datas streaming method, server and client side |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113538698A (en) * | 2020-04-16 | 2021-10-22 | 同济大学 | Model display device and model display method |
CN111773719A (en) * | 2020-06-23 | 2020-10-16 | 完美世界(北京)软件科技发展有限公司 | Rendering method and device of virtual object, storage medium and electronic device |
CN111966942A (en) * | 2020-08-11 | 2020-11-20 | 济南科明数码技术股份有限公司 | VR display method, system and equipment of mobile terminal |
CN111966942B (en) * | 2020-08-11 | 2024-06-07 | 济南科明数码技术股份有限公司 | VR display method, system and equipment of mobile terminal |
CN113535271A (en) * | 2021-07-28 | 2021-10-22 | 浙江大华技术股份有限公司 | Loading method and device of algorithm model, storage medium and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN109976827B (en) | 2020-08-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109976827A (en) | Loading method, server and the terminal of model | |
CN103093499B (en) | A kind of city three-dimensional model data method for organizing being applicable to Internet Transmission | |
CN107193911A (en) | A kind of three-dimensional visualization engine and WEB application routine call method based on BIM models | |
WO2005119643A2 (en) | Resource management for rule-based procedural terrain generation | |
WO2005119597A2 (en) | Terrain editor tool for rule-based procedural terrain generation | |
CN110990516A (en) | Map data processing method and device and server | |
CN109448094A (en) | A kind of texture maps set dispatching method | |
CN103021020A (en) | Three-dimensional (3D) rendering method based on multiple light sources | |
CN107992661A (en) | CAD modeling datas streaming method, server and client side | |
CN107341761A (en) | A kind of calculating of deep neural network performs method and system | |
CN111773719A (en) | Rendering method and device of virtual object, storage medium and electronic device | |
CN111773699B (en) | Terrain deformation method and device | |
CN103345507B (en) | A kind of method based on collision box principle dynamic load three-dimensional map | |
CN115228083A (en) | Resource rendering method and device | |
CN115996173A (en) | Communication optimization method and system for parallel training of distributed deep learning operator | |
CN113470172B (en) | Method for converting OBJ three-dimensional model into 3DTiles | |
CN114742949A (en) | Intelligent merging method for large-scale live-action three-dimensional data | |
CN113032699B (en) | Model construction method, model construction device and processor of robot | |
CN115006842A (en) | Scene map generation method and device, storage medium and computer equipment | |
CN114255312A (en) | Processing method and device of vegetation image and electronic equipment | |
CN117953181B (en) | Vertex layering and incremental LOD method and system for WEB3D | |
Ma et al. | Block shuffle: a method for high-resolution fast style transfer with limited memory | |
CN117115805B (en) | Random irregular object identification method and device under Unreal Engine platform | |
FR2994500A1 (en) | METHOD OF OPTIMIZING THE EXECUTION OF A GRAPHIC PIPELINE | |
CN117808949B (en) | Scene rendering method |
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 |