CN106846489B - A method of obj file is handled based on vtk - Google Patents
A method of obj file is handled based on vtk Download PDFInfo
- Publication number
- CN106846489B CN106846489B CN201710034246.4A CN201710034246A CN106846489B CN 106846489 B CN106846489 B CN 106846489B CN 201710034246 A CN201710034246 A CN 201710034246A CN 106846489 B CN106846489 B CN 106846489B
- Authority
- CN
- China
- Prior art keywords
- vertex
- dough sheet
- shared
- new
- dough
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/30—Polynomial surface description
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Computer Graphics (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Physics (AREA)
- Mathematical Optimization (AREA)
- Geometry (AREA)
- Mathematical Analysis (AREA)
- Algebra (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Image Generation (AREA)
Abstract
The invention discloses a kind of methods based on vtk processing obj file, step 1: reading the dough sheet inside obj file, construct inverted index table.Step 2: finding shared vertex.Step 3: generating new vertex.If having searched out shared vertex, building dough sheet vertex id is updated, goes to step 5.It is if it is not found, then generate the same vertex in new position, after go to step 4.Step 4: increasing dough sheet.New vertex is produced, for the continuity between new and old vertex, needs to increase the dough sheet on a new and old vertex of connection, and vertex set is added in new summit.Step 5: subsequent vertex and subsequent dough sheet, dough sheet still have subsequent vertex untreated, go to step 2.Model goes to step 1 there are also subsequent dough sheet.Step 6: all dough sheets are split as tri patch and formed by tri patch, the step.Step 7: curved surface is smooth.With loop tessellation algorithm, smoothing model.
Description
Technical field
The invention belongs to field of Computer Graphics more particularly to a kind of methods based on vtk processing obj file.
Background technique
Threedimensional model is the Polygons Representation of object, and logical conventional computer or other video equipments are shown.Display
Object can be the entity of real world, be also possible to imaginary object.Thing existing for any physics nature is ok
It is indicated with threedimensional model.
The object smooth for expression, required polygon quantity is more, if lazy weight will to construct
The threedimensional model of processing is not smooth enough, just needs automatically to increase dough sheet quantity using tessellation algorithm at this time, so that mould
Type is smooth, however input face face required by tessellation algorithm is that continuously, the curved surface of Discrete facet construction is directly applied carefully
Divide algorithm that will generate many cavities.It, may be for multiple texture coordinates, however in vtk (vision for the vertex of polygon
Chemical industry has function library, Visualization Toolkit) in vertex id (identity card, identification) can only be with
One texture coordinate id is corresponding, and it is not enough that this allows for a vertex, and it is the same to need to increase new position.
Summary of the invention
Goal of the invention: vertex different for texture coordinate, in order to apply tessellation algorithm, also to guarantee dough sheet it
Between connectivity, the invention proposes one on the basis of not changing model, rationally increasing dough sheet to guarantee all dough sheets is
The method of connection.
For class vtkObjReader built in vtk (the included .obj formatted file of vtk tool storage room handles class) Shortcomings
In the case where, the present invention provides a kind of methods for handling obj file.
The method specifically includes following steps:
Step 1: dough sheet is read.The dough sheet in obj file threedimensional model is read, inverted index table is constructed.
Step 2: find shared vertex: the identifier on dough sheet vertex is<vertex id, texture coordinate k>, id indicates vertex
Identification number, since (threedimensional model vertex provides the spatial relation of model to the multiple texture coordinates of a vertex correspondence, top
The corresponding texture coordinate of point provides the pattern of model surface, i.e. textures).So such vertex need to generate it is multiple multiple
System.When reading n-th of dough sheet vertex, then the identifier on the dough sheet vertex is < vertex idn, texture coordinate kn>, idnIt indicates n-th
The identification number on dough sheet vertex, knIndicate the texture coordinate on n-th of dough sheet vertex, n value is natural number, if the dough sheet vertex is answered
Exist in system and is mapped to texture coordinate knMapping relations, and dough sheet goes to step 2 there are still other unread vertex;It is other
Situation goes to step 3;
Step 3: generating new vertex.If having searched out shared vertex, building dough sheet vertex id is updated, goes to step 5.
If it is not found, then generation and vertex idnThe same vertex in position, goes to step 4;
Step 4: increasing dough sheet: increasing the dough sheet on a new and old vertex of connection, and vertex set, the top is added in new summit
Point set is the set on all dough sheet vertex read;
Step 5: if dough sheet still has subsequent vertex untreated, going to step 2;If there are also subsequent dough sheets for threedimensional model, turn
Step 1;Other situations go to step 6;
Step 6: tri patch, since entire model includes many dough sheets, the number of vertex of dough sheet is different, in order to simplify meter
Interpolation arithmetic when calculating texture coordinate and it is subsequent tessellation algorithm can be run on model, the step is by all dough sheets
It is split as tri patch composition.
Step 7: curved surface is smooth.With loop tessellation algorithm, smoothing model.
In step 1, in order to determine the processing sequence of dough sheet, three-dimensional surface for monolith connection, it is specified that, the construction in face
Journey be it is continuous, i.e., when front be it is continuous, after addition new dough sheet, resulting three-dimensional surface is still connection, Suo Youxin
The face of selection is certain and when there is shared change in front, so construction inverted index table, index entry is side, is worth for dough sheet.
In step 2, during increasing dough sheet to model, what the face constituted was made of many multi-panel pieces, in order to keep
The manifold structure in face, the vertex inside dough sheet cannot be used for sharing.So the shared vertex found in the present invention should be at face side
Edge, whether a vertex is in face edge is equivalent to around this vertex all occupied by dough sheet, centered on the vertex,
By its 360 equal part of neighborhood, portion indicates that once the space of formation is known as 360 degree of spaces, (during increasing dough sheet to model,
The face constituted is made of many multi-panel pieces, for the manifold structure of retaining surface.Vertex inside dough sheet cannot be used for sharing.
So the shared vertex found should be at face edge, the face of threedimensional model is spliced by various dough sheets, vertex point
For two classes, for one kind inside face, one kind is in face edge) in order to accelerate search speed, it will be all stored in when the marginal point of front
In one queue, after newly having added dough sheet, it is as follows to update rule for this queue of real-time update:
For each vertex on the dough sheet:
(1) vertex that can be shared searched out deletes that (the increased dough sheet of step 4 can make vertex be in face from queue
It is internal);
(2) as follows for the vertex processing that cannot be shared: will be when the angle in front piece increases to 360 corresponding to the point
It spends in space, if 360 degree of spaces are filled, deletes the point, otherwise only update 360 degree of spaces corresponding to the point.Example
Son: when initial, 360 degree of spaces corresponding to vertex (o) are sky, and a increases angle aob (a, o, b are vertex representation) 360 degree of spaces
Middle increase (a, b);B increases angle (boc), increases (b, c) in 360 degree of spaces;
Merge (a, b) at this time, (b, c) is (a, c);C increases angle (coa), and (c a) merges at this time for increase in 360 degree of spaces
(a, c) (c, a) for (a a) deletes o point in the queue at this time, and o point becomes internal node at this time, rather than fringe node.
After searching out shared vertex, if it is possible to it is shared, continue with the next vertex of dough sheet.Otherwise, 3 are gone to step.
In step 3, according to the inverted index table of foundation, what is obtained every time is the dough sheet for having connected side, the dough sheet centainly and
There is the connection on side in the face being currently generated, can be learned in step 3 using the information and belong to 360 degree of spaces by increased dough sheet which is fast
The both sides endpoint taking-up of this fan-shaped white space is denoted as A, B, remembers that shared vertex is X, for retaining surface by fan-shaped white space
The correctness of popular characteristic and texture.The new vertex Y as X position is generated using following rule:
Y1=α * X1+β*A1+γ*B1,
Wherein, Y1Indicate the coordinate of vertex Y, A1And B1Respectively indicate the coordinate of point A and the coordinate of point B, alpha+beta+γ=1 and
α, beta, gamma > 0, α, beta, gamma vertex specific gravity factor (general value is respectively 0.9,0.05,0.05), the corresponding texture coordinate of vertex Y
Yt are as follows: Yt=α * Xt+ β * At+ γ * Bt,
Wherein, At and Bt is respectively the corresponding texture coordinate of point A texture coordinate corresponding with point B, then exchanges X and Y, i.e.,
By exchange corresponding to the id of vertex.
Proving that this kind transformation does not change expression (by taking the straight line AB as an example) B ' of texture below is B point according to the new of above-mentioned generation
Vertex proves AB ' and B below ' as the interpolation result put between B (c, β) indicate (AC/AB, AB '/AB):
B '=β * B+ (1- β) * A, C=c*B+ (1-c) * A;
(1) C (c < β) C=c/ β * B '+(1-c/ β) * A=c*B+ (1-c) * A between AB '
(2) C (c > β) C=(c- β)/(1- β) * B+ (1-c)/(1- β) * B '=c*B+ (1-c) * A between B ' B
In step 4, for the manifold feature of retaining surface, the increased dough sheet of institute is not Chong Die with original face, and in order to
In subsequent curved surface smoothing step, the original netted result of retaining surface.And (AXBY) of increased dough sheet, both (BXAY) normal direction
The selection in the direction principle almost the same based on adjacent dough sheet normal vector is measured, dough sheet normal vector is determined by the right-hand rule.
The subsequent vertex and subsequent dough sheet step stage play stage transfer, the effect that control program executes.
During the tri patch, since entire model includes many dough sheets, the number of vertex of dough sheet is different, for letter
Change calculate texture coordinate when interpolation arithmetic and it is subsequent tessellation algorithm can be run on model, which will own
Dough sheet is split as tri patch composition.
During the curved surface is smooth, the unsmooth of dough sheet is since dough sheet is excessive caused, which passes through loop tessellation,
Increase dough sheet number, smoothing model.
The utility model has the advantages that the present invention solves the problems of the prior art: 1) being directed to vertex: if two dough sheets include same
Texture coordinate corresponding to a apex coordinate and apex coordinate is the same.The two faces are shared at this time changes vertex id, if vertex
Texture coordinate corresponding to coordinate is different, which just will create the duplication of itself.Reduce the vertex pair stored required for wanting
As;2) it is directed to dough sheet: when vertex generates self-replication, needing to increase transition dough sheet, to guarantee the continuity of entire curved surface.
Detailed description of the invention
The present invention is done with reference to the accompanying drawings and detailed description and is further illustrated, it is of the invention above-mentioned or
Otherwise advantage will become apparent.
Fig. 1 a is that occupied there is something special in current 360 degree of spaces of O point.
Fig. 1 b is 360 degree of spatial variations situations after the new angle AOE of insertion.
Fig. 1 c is that O point and O ' put 360 degree of space schematic diagrames when O point is not shared.
Fig. 2 is that class vtkObjReader built in vtk handles obj formatted file effect.
Fig. 3 is using loop tessellation algorithm effect.
Fig. 4 and Fig. 5 is the effect using method proposed by the present invention.
Fig. 6 is flow chart of the present invention.
Specific embodiment
The present invention will be further described with reference to the accompanying drawings and embodiments.
The quantity that the present invention is suitable for the dough sheet inside obj file is inadequate, is not enough to generate the situation of a smoothing model,
Independent each fettucelle of processing of built-in class vtkObjReader at this time.The invention proposes new processing obj formatted files
Method.1) when handling dough sheet, consider the shared of vertex, make it possible to share the same vertex dough sheet it is really shared be
In vertex set the same vertex (vertex can share the coordinate position for referring to vertex and for texture coordinate position phase
Together), sharing vertex at least can reduce half for vertex set.2) when needing to generate a new vertex, new summit with it is original
Although vertex position is identical, in curved surface elaboration phase, since refinement is an approximate algorithm, so the position on vertex may
It will deviate, new summit may will be separated with original vertices.So that threedimensional model generates many cavities.It proposes in new summit
The transition dough sheet between original vertices guarantees continuity.3) loop tessellation algorithm is used on the continuous surface piece of generation,
Smoothing model.As shown in fig. 6, the present invention includes the following steps:
Step 1: dough sheet is read.The dough sheet in obj file threedimensional model is read, inverted index table is constructed.
Step 2: finding shared vertex: since (threedimensional model vertex provides the multiple texture coordinates of a vertex correspondence
The spatial relation of model, texture coordinate corresponding to vertex provide the pattern of model surface, i.e. textures).So in this way
Vertex need to generate multiple duplications.The identifier on dough sheet vertex be<vertex id, texture coordinate k>, id indicate vertex mark
Number, when reading n-th of dough sheet vertex, then the identifier on the dough sheet vertex is < vertex idn, texture coordinate kn>, idnIt indicates n-th
The identification number on dough sheet vertex, knIndicate the texture coordinate on n-th of dough sheet vertex, n value is natural number, if the dough sheet vertex is answered
Exist in system and is mapped to texture coordinate knMapping relations, and dough sheet goes to step 2 there are still other unread vertex;It is other
Situation goes to step 3;
Step 3: generating new vertex.If having searched out shared vertex, building dough sheet vertex id is updated, goes to step 5.
If it is not found, then generation and vertex idnThe same vertex in position, goes to step 4;
Step 4: increasing dough sheet: increasing the dough sheet on a new and old vertex of connection, and vertex set, the top is added in new summit
Point set is the set on all dough sheet vertex read;
Step 5: if dough sheet still has subsequent vertex untreated, going to step 2;If there are also subsequent dough sheets for threedimensional model, turn
Step 1;Other situations go to step 6;
Step 6: tri patch, since entire model includes many dough sheets, the number of vertex of dough sheet is different, in order to simplify meter
Interpolation arithmetic when calculating texture coordinate and it is subsequent tessellation algorithm can be run on model, the step is by all dough sheets
It is split as tri patch composition.
Step 7: curved surface is smooth.With loop tessellation algorithm, smoothing model.
In step 1, in order to determine the processing sequence of dough sheet, three-dimensional surface for monolith connection, it is specified that, the construction in face
Journey be it is continuous, i.e., when front be it is continuous, after addition new dough sheet, resulting three-dimensional surface is still connection, Suo Youxin
The face of selection is certain and when there is shared change in front, so construction inverted index table, index entry is side, is worth for dough sheet.
In step 2, during increasing dough sheet to model, what the face constituted was made of many multi-panel pieces, in order to keep
The manifold structure in face, the vertex inside dough sheet cannot be used for sharing.So the shared vertex found in the present invention should be at face side
Edge, whether a vertex is in face edge and is equivalent to 360 degree of this vertex whether occupied by surrounding dough sheet, in order to accelerate to search
Speed will be all stored in a queue when the marginal point of front, after newly having added dough sheet, this queue of real-time update, more
New rule is as follows:
For each impacted vertex:
(1) vertex that can be shared searched out deletes that (the increased dough sheet of step 4 can make vertex be in face from queue
It is internal);
(2) processing of other vertex is as follows: it will increase in 360 degree of spaces corresponding to the point at the angle worked as in front piece,
If 360 degree of spaces are filled, the point is deleted, otherwise only updates 360 degree of spaces corresponding to the point.Example: when initial,
360 degree of spaces corresponding to vertex (o) are sky, a increase increase in angle aob (a, o, b are vertex representation) 360 degree spaces (a,
b);B increases angle (boc), increases (b, c) in 360 degree of spaces;
Merge (a, b) at this time, (b, c) is (a, c);C increases angle (coa), and (c a) merges at this time for increase in 360 degree of spaces
(a, c) (c, a) for (a a) deletes o point in the queue at this time, and o point becomes internal node at this time, rather than fringe node.
After searching out shared vertex, if can share, the next vertex of dough sheet is continued with.Otherwise, 3 are gone to step.
In step 3, according to the inverted index table of foundation, what is obtained every time is the dough sheet for having connected side, the dough sheet centainly and
There is the connection on side in the face being currently generated, can be learned in step 3 using the information and belong to 360 degree of spaces by increased dough sheet which is fast
The both sides endpoint taking-up of this fan-shaped white space is denoted as A, B, remembers that shared vertex is X, for the prevalence of retaining surface by white space
The correctness of characteristic and texture.The new vertex Y as X position is generated using following rule:
Y1=α * X1+β*A1+γ*B1,
Wherein, Y1Indicate the coordinate of vertex Y, A1And B1Respectively indicate the coordinate of point A and the coordinate of point B, alpha+beta+γ=1 and
α, beta, gamma > 0, α, beta, gamma vertex specific gravity factor, the corresponding texture coordinate Yt of vertex Y are as follows: Yt=α * Xt+ β * At+ γ * Bt,
Wherein, At and Bt is respectively the corresponding texture coordinate of point A texture coordinate corresponding with point B, then exchanges X and Y, i.e.,
By exchange corresponding to the id of vertex.
Proving that this kind transformation does not change expression (by taking the straight line AB as an example) B ' of texture below is B point according to the new of above-mentioned generation
Vertex proves AB ' and B below ' as the interpolation result put between B (c, β) indicate (AC/AB, AB '/AB):
B '=β * B+ (1- β) * A, C=c*B+ (1-c) * A
(1) C (c < β) C=c/ β * B '+(1-c/ β) * A=c*B+ (1-c) * A between AB '
(2) C (c > β) C=(c- β)/(1- β) * B+ (1-c)/(1- β) * B '=c*B+ (1-c) * A between B ' B
In step 4, for the manifold feature of retaining surface, the increased dough sheet of institute is not Chong Die with original face, and in order to
In subsequent curved surface smoothing step, the original netted result of retaining surface.All selections increase dough sheet (AXBY), the choosing in the direction (BXAY)
It selects based on the principle for keeping dough sheet normal vector almost the same.Dough sheet normal vector is determined by the right-hand rule.
The subsequent vertex and subsequent dough sheet step stage play stage transfer, the effect that control program executes.
During the tri patch, since entire model includes many dough sheets, the number of vertex of dough sheet is different, for letter
Change calculate texture coordinate when interpolation arithmetic and it is subsequent tessellation algorithm can be run on model, which will own
Dough sheet is split as tri patch composition.
During the curved surface is smooth, the unsmooth of dough sheet is since dough sheet is excessive caused, which passes through loop tessellation,
Increase dough sheet number, smoothing model.
Embodiment:
The present invention using the above scheme, realizes and has reappeared the face as derived from faceGen in vtk.
Be implemented as follows: Loop subdivision is a kind of subdivision rule of triangular mesh, it is divided according to 1-4 triangle,
Each edge, which calculates, generates a new vertex, while each original vertices update position.
Step 1: establish inverted index table, the data structure used is side for dictionary<key, value be dough sheet set>;When
When reading a dough sheet, which is added to the dough sheet side as in the value set of key.Finally return that this row of falling
Concordance list.
Step 2: during increasing dough sheet to model, what the face constituted was made of many multi-panel pieces, for retaining surface
Manifold structure.Vertex inside dough sheet cannot be used for sharing.So the shared vertex that we find should be at face edge, one
Whether vertex is in face edge and is equivalent to 360 degree of this vertex whether occupied by surrounding dough sheet.And it updates.The one of this use
The line segment that a length is 360 recycles array.A, B are searched in subscript item first, it is any to choose two index value a if can not find,
B represents A and B.And by between a to the b for setting 1. selections between A and B should full text 0.When the line segment for being 360 by length all sets one
Later, corresponding vertex is removed from edge vertices table, and as shown in Fig. 1 a~Fig. 1 c, Fig. 1 a is that ought be inserted into dough sheet AOB and face
The occupancy situation (black indicates occupied, and white space indicates vacant) in the corresponding 360 degree of spaces piece COD time point O, figure
1b is inserted into dough sheet AOE on the basis of Fig. 1 a, and vertex O is and corresponding as the O three-dimensional coordinate of the vertex Fig. 1 a in AOE at this time
Texture coordinate id is the same, and both vertex O are shared at this time, and (black indicates occupied, white space to 360 degree of space hold situations of O point
Indicate vacant) as shown in Figure 1 b.Fig. 1 c is inserted into dough sheet AOE on the basis of Fig. 1 a, at this time vertex O and the vertex Fig. 1 a in AOE
O three-dimensional coordinate is the same, but corresponding texture coordinate id is different, and both vertex O cannot share at this time.Vertex O in original image 1a
It is displaced to O ', and increases even surface AOCO ', O and O ' puts 360 degree of space hold situations (occupied, blank of black expression at this time
Region indicates vacant) as illustrated in figure 1 c.
Step 3: specified parameter alpha=0.9, β=0.05, γ=0.05 generates new vertex Y inside dough sheet, and by Y with
Old vertex X Content is called.
Step 4: generating new dough sheet.The sequence arranged between dough sheet vertex is needed to pay attention to during dough sheet in step 2,
As shown in Figure 1, the difference because shared side is sorted in adjacent surface, the with good grounds information of institute, which determines, increases dough sheet vertex flow direction.
Step 5: playing transfer control action;
Step 6,7 using class vtkTriangleFilter built in vtk (carried in vtk tool storage room by threedimensional model
The processing class of all dough sheet trigonometric ratios) and vtkLoopSubdivisionFilter (loop tessellation algorithm in vtk tool storage room
Realization class) realize.Fig. 2 is vtk (The Visualization Toolkit) built-in processing class vtkObjReader processing three
The effect picture of faceform is tieed up, it is excessive unsmooth between dough sheet and dough sheet.Fig. 3 is in vtk (The Visualization
Toolkit) flat with tessellation algorithm on the basis of built-in processing class vtkObjReader processing three-dimensional face model result
The effect picture of sliding formwork type, dough sheet is smooth, but discontinuous between dough sheet.Fig. 4 and Fig. 5 is to apply increase transition proposed by the present invention
Dough sheet method connects the flow display effect picture of the three-dimensional face model of dough sheet.
The present invention provides a kind of methods based on vtk processing obj file, implement method and the way of the technical solution
There are many diameter, the above is only a preferred embodiment of the present invention, it is noted that for those skilled in the art
For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications should also regard
For protection scope of the present invention.All undefined components in this embodiment can be implemented in the prior art.
Claims (3)
1. a kind of method of view-based access control model chemical industry tool function library vtk processing obj file, which comprises the steps of:
Step 1, the dough sheet in obj file threedimensional model is read, inverted index table is constructed;In the inverted index table of construction, index
Item is side, is worth for dough sheet;
Step 2, find shared vertex: the identifier on dough sheet vertex is<vertex id, texture coordinate k>, id indicates the mark on vertex
Number, when reading n-th of dough sheet vertex, then the identifier on the dough sheet vertex is < vertex idn, texture coordinate kn>, idnIt indicates n-th
The identification number on dough sheet vertex, knIndicate the texture coordinate on n-th of dough sheet vertex, n value is natural number, if the dough sheet vertex is answered
Exist in system and is mapped to texture coordinate knMapping relations, and dough sheet goes to step 2 there are still other unread vertex;It is other
Situation goes to step 3;
In step 2, the shared vertex of searching is in face edge, and whether a shared vertex is in face edge and is equivalent to described share
Whether around vertex all occupied by dough sheet, centered on sharing vertex by this, by its 360 equal part of neighborhood, portion is indicated once, shape
At space be known as 360 degree of spaces, during searching, will be all stored in a queue when the marginal point of front, when new plus
After entering dough sheet, it is as follows to update rule for queue described in real-time update:
For each vertex on the dough sheet, the vertex that can be shared searched out is deleted from queue;
It is as follows for the vertex processing that cannot be shared: 360 degree of skies corresponding to the vertex will to be increased to when the angle in front piece
Between in, if 360 degree of spaces are filled, delete the vertex, otherwise only update 360 degree of spaces corresponding to the vertex;
After searching out shared vertex, if it is possible to it is shared, it continues with the next vertex of dough sheet and otherwise goes to step 3;
Step 3, it generates new vertex: if having searched out shared vertex, updating building dough sheet vertex id, go to step 5;If
It does not find, then generates and vertex idnThe same vertex in position, goes to step 4;
Step 4, increase dough sheet: increasing the dough sheet on a new and old vertex of connection, and vertex set, the vertex set is added in new summit
For the set on all dough sheet vertex read;
Step 5, if dough sheet still has subsequent vertex untreated, 2 are gone to step;If threedimensional model is gone to step there are also subsequent dough sheet
1;Other situations go to step 6;
Step 6, all dough sheets tri patch: are split as tri patch;
Step 7, curved surface is smooth: using loop tessellation algorithm, smoothing model.
2. the method according to claim 1, wherein being learned in step 2 and being increased according to inverted index table in step 3
The dough sheet added belongs to which block sector white space in 360 degree of spaces, and the both sides endpoint of the sector white space is taken out difference
It is denoted as A and B, remembers that shared vertex is X, the new vertex Y as X position is generated using following rule:
Y1=α * X1+β*A1+γ*B1,
Wherein, Y1Indicate the coordinate of vertex Y, X1Indicate the coordinate of shared vertex X, A1And B1The coordinate of point A is respectively indicated with point B's
Coordinate, alpha+beta+γ=1 and α, beta, gamma > 0, α, beta, gamma respectively indicate the specific gravity factor of vertex X, the specific gravity factor of vertex A, vertex B
Specific gravity factor, the corresponding texture coordinate Yt of vertex Y are as follows:
Yt=α * Xt+ β * At+ γ * Bt,
Wherein, At and Bt is respectively the corresponding texture coordinate of point A texture coordinate corresponding with point B, then exchanges X and Y, i.e., will top
Exchange corresponding to point id.
3. according to the method described in claim 2, it is characterized in that, the increased dough sheet of institute is not heavy with original face in step 4
It is folded, and the selection in both AXBY, BXAY of increased dough sheet normal vector direction follows the adjacent consistent principle of dough sheet normal vector,
Dough sheet normal vector is determined by the right-hand rule.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710034246.4A CN106846489B (en) | 2017-01-18 | 2017-01-18 | A method of obj file is handled based on vtk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710034246.4A CN106846489B (en) | 2017-01-18 | 2017-01-18 | A method of obj file is handled based on vtk |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106846489A CN106846489A (en) | 2017-06-13 |
CN106846489B true CN106846489B (en) | 2019-04-30 |
Family
ID=59124741
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710034246.4A Active CN106846489B (en) | 2017-01-18 | 2017-01-18 | A method of obj file is handled based on vtk |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106846489B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109446286B (en) * | 2018-09-28 | 2022-01-04 | 山东中创软件商用中间件股份有限公司 | Visualization method and device for highway road network map |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101639946A (en) * | 2009-08-26 | 2010-02-03 | 北京农业信息技术研究中心 | Plant leaf three-dimensional model geometric description and curved surface reconstruction method and system |
CN103810752A (en) * | 2014-02-18 | 2014-05-21 | 海信集团有限公司 | Liver segmenting method based on medical image and liver segmenting system thereof |
CN105006021A (en) * | 2015-06-30 | 2015-10-28 | 南京大学 | Color mapping method and device suitable for rapid point cloud three-dimensional reconstruction |
CN106202928A (en) * | 2016-07-05 | 2016-12-07 | 浙江工业大学义乌科学技术研究院有限公司 | A kind of method of newly-generated model vertices texture coordinate after computation organization cuts |
-
2017
- 2017-01-18 CN CN201710034246.4A patent/CN106846489B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101639946A (en) * | 2009-08-26 | 2010-02-03 | 北京农业信息技术研究中心 | Plant leaf three-dimensional model geometric description and curved surface reconstruction method and system |
CN103810752A (en) * | 2014-02-18 | 2014-05-21 | 海信集团有限公司 | Liver segmenting method based on medical image and liver segmenting system thereof |
CN105006021A (en) * | 2015-06-30 | 2015-10-28 | 南京大学 | Color mapping method and device suitable for rapid point cloud three-dimensional reconstruction |
CN106202928A (en) * | 2016-07-05 | 2016-12-07 | 浙江工业大学义乌科学技术研究院有限公司 | A kind of method of newly-generated model vertices texture coordinate after computation organization cuts |
Also Published As
Publication number | Publication date |
---|---|
CN106846489A (en) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4467267B2 (en) | Image processing method, image processing apparatus, and image processing system | |
JP4733116B2 (en) | Resource management for rule-based procedural terrain generation | |
CN103559374B (en) | A kind of method carrying out face disintegrated type surface subdivision on plurality of subnets lattice model | |
JP4824019B2 (en) | A terrain editing tool for rule-based procedural terrain generation | |
US5727138A (en) | Method of and apparatus for generating three-dimensional model | |
JP2008500637A (en) | Rule-based procedural terrain generation | |
CN105718643A (en) | Optimization view angle based ship production design drawing-inspection device implementation method | |
CN109636889B (en) | Large-scale three-dimensional terrain model rendering method based on dynamic sewing belt | |
CN114241151A (en) | Three-dimensional model simplification method and device, computer equipment and computer storage medium | |
CN109697748A (en) | Model compression processing method, model pinup picture processing method device, storage medium | |
CN103370731B (en) | Estimate the method blocked in virtual environment | |
CN102663802B (en) | A kind of game landform road generates method and apparatus | |
CN105913475A (en) | Dynamic visualized method of space-time change process | |
Zhang et al. | A geometry and texture coupled flexible generalization of urban building models | |
CN106846489B (en) | A method of obj file is handled based on vtk | |
CN113781642A (en) | Three-dimensional model multi-level LOD generation method based on face reduction algorithm | |
CN115087983A (en) | Method and system for hybrid modeling using geometric patches | |
CN115544634B (en) | Oil and gas field level digital twin model space coordinate transformation method and system | |
CN109598792B (en) | Automatic placing method of building notes in three-dimensional scene | |
CN106716500A (en) | Program, information processing device, depth definition method, and recording medium | |
KR100693134B1 (en) | Three dimensional image processing | |
JP4896237B2 (en) | Image processing method, image processing apparatus, and image processing system | |
CN109859294A (en) | A kind of VR cartoon character three-dimensional modeling optimization method | |
CN113656514B (en) | Mine three-dimensional model visualization method and device | |
WO2022227293A1 (en) | Texture mapping method, apparatus, electronic device, and storage medium |
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 |