[go: nahoru, domu]

CN106408644B - Three dimensions control cage arrangement method - Google Patents

Three dimensions control cage arrangement method Download PDF

Info

Publication number
CN106408644B
CN106408644B CN201610814832.6A CN201610814832A CN106408644B CN 106408644 B CN106408644 B CN 106408644B CN 201610814832 A CN201610814832 A CN 201610814832A CN 106408644 B CN106408644 B CN 106408644B
Authority
CN
China
Prior art keywords
vertex
control cage
grid
texture
arrangement method
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
Application number
CN201610814832.6A
Other languages
Chinese (zh)
Other versions
CN106408644A (en
Inventor
邓正杰
何书前
石春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi Huacheng Design Co.,Ltd.
Original Assignee
Hainan Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hainan Normal University filed Critical Hainan Normal University
Priority to CN201610814832.6A priority Critical patent/CN106408644B/en
Publication of CN106408644A publication Critical patent/CN106408644A/en
Application granted granted Critical
Publication of CN106408644B publication Critical patent/CN106408644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention belongs to field of Computer Graphics, and in particular to a kind of control cage arrangement method of threedimensional model.Requirement with user to Three-dimensional Display effect is also higher and higher, and the threedimensional model used is more and more finer, and required number of vertex is more and more.It is many to assist the control to threedimensional model using needing to construct control cage, but existing control cage arrangement method, it comes with some shortcomings.The present invention is exactly to propose to promote this respect to work.The present invention is based on rendering pipelines, in specified angle observing and nursing, texture using A32B32G32R32 format is the characteristics of 2 d texture can record three-dimensional information again, generate forward sight and back view grid surface, they are stitched together again, finally according to normal vector and direction of observation, grid vertex toward extrapolation certain distance, to constitute control cage.Fig. 1 shows the control cage arrangement schematic diagram an of cylinder model.The effect of the cross section of cylindrical body is shown in figure.

Description

Three dimensions control cage arrangement method
Technical field
The invention belongs to field of Computer Graphics, and in particular to a kind of control cage arrangement method of threedimensional model.
Background technique
Now in many computer graphics applications, as the performance of hardware device is stronger and stronger, user imitates display The requirement of fruit is also higher and higher.Also increasingly finer as requiring object module used in application, details is more, required top Points are more.In addition with the extensive use of 3-D graphic, user constructs a large amount of three-dimensional grid model, but also continuous Increase.
User constructs threedimensional model, usually be not only intactly shown, but can in application process, It is controlled or is edited.Since the vertex of refined model is more and more, directly its vertex is controlled or edited, it is past Compare redundancy toward operation, difficulty is bigger, and calculation amount is relatively more.Such as: deformation operation is carried out to model, direct opposite vertexes carry out Operation is infeasible one by one.The similar thinking of deformation based on adjacent area primarily now has two class grid deforming methods: bent Face deformation and geometric distortion.Geometric distortion needs by some point, line, surface or grid to be medium, constructs deformable space, from And by adjusting medium, make geometric distortion, so that the master mould being in space be made to deform indirectly.One type space Deformation method relies on the coordinate that control grid computing goes out deformation, such as: Green's coordinate [Lipman Y, Levin D, Cohen-Or D. Green coordinates. ACM Trans. on Graphics, 2009,27 (3): 78.], is deforming It can be calculated rapidly in the process as a result, so being widely studied and applied.Its control grid used is and master mould shape It is similar, but be the less encirclement grid of number of vertex, also referred to as Cage or control cage.It is advantageous that directly processing high-precision is multiple The thorny problem of parasitic mode type is converted into the indirect processing to control cage, complexity and model complexity and its side of expression algorithm Formula separation, can substantially reduce algorithm complexity, and the applicability of expansion algorithm.This just needs corresponding to different Construction of A Model Cage is controlled, so fast constructing the corresponding very worth research of control cage.
Cage is controlled for Cage() construction, there are some research achievements.Xian et al. is proposed based on voxelization Automatic cage generation method. [Xian CH, Lin HW, Gao SM. Automatic generation of coarse bounding cages from dense meshes. In: Yong JH, Spagnuolo M, eds. Proc. of the IEEE International Conference on Shape Modeling and Applications. Los Alamitos:IEEE Computer Society Press, 2009. 21 27.] it is calculated by geometry by model AABB(Axis Aligned Bounding Box) bounding box voxelization (voxelization), voxel (voxel) is divided into three Class: external, the intersection of internal and model Feature element;By the critical surface of Feature element and external voxel, obtained after trigonometric ratio Grid is surrounded to initial;Finally, obtaining cage to grid progress fairing processing is surrounded.This method needs to carry out voxel to bounding box Change and classifies.Article [Ben-Chen M, Weber O, Gotsman C. Spatial of the Ben-Chen et al. in deformation transfer deformation transfer. In: Tamstorf R, Fellner D, eds. Proc. of the 2009 ACM SIGGRAPH/Eurographics Symp. on Computer Animation. New York: ACM Press, 2009. 67 74.] method for how constructing cage also taught.It is generated by continuous iteration toward extrapolation, reconstruct, simplified process cage.The point cloud that wherein extrapolation obtains every time will form new grid by Poisson reconstruct, and calculation amount is not small, and iteration Number be difficult to predict.Deng et al. proposes the construction cage method [Deng for the convex progressive simplification of guarantor measured based on second order error ZJ, Luo XN, Miao XP. Automatic cage building with quadric error metrics. Journal of Computer Science and Technology, 2011,26(3):538−547.].This method is to cage Number of vertex accurately control, but finding new point every time is all a quadratic programming problem, and time cost is slightly larger.Li et al. people exists [Li L, Li GQ, Huang LW. Generation of equidistance cages. Journal of Computer-Aided Design & Computer Graphics, 2011,23(6): 956−963 (in Chinese With English abstract)] in propose that extracting three-dimensional distance field contour surface by voxelization constructs cage.In the party Simplified model is needed to improve the efficiency of calculating distance field in method, the grid for extracting Iso-surface Reconstruction is also required to simplify.Xian etc. People automatically generates cage [Xian CH, Lin HW, Gao SM. using OBB(Oriented Bounding Box) bounding box Automatic cage generation by improved OBBs for mesh deformation. The Visual Computer, 2012, 28(1):21−33.].The general shape for the cage embodiment model that this method generates and certain language Adopted information, but with master mould not enough close to.Old snow et al. proposes cage generation method [old snow, Liu based on visual shell Great waves, Feng Jieqing, the cage based on visual shell are generated, Journal of Software, 2013,24 (10): 2379-2390].This method Visual shell based on master mould, the i.e. visual effect of some angle of master mould reduce expression and complexity to master mould The relationship of degree.But since this method is the intersection of the area of space formed by silhouette and the corresponding viewpoint of object, institute It cannot be embodied with the recessed area of the model (such as: cup) for indent.
As GPU hardware performance is constantly promoted, more and more calculate is realized by GPU, especially can parallel computation Content.Three-dimensional grid reconstruct also belongs to one of which.Deng et al. proposes a kind of three-dimensional grid weight based on the rendering pipeline of GPU Structure method [Deng ZJ, He SQ, Shi C, Ma CH, Wu XJ. An algorithm of 3D mesh reconstructing based on the rendering pipeline. Icmit-16, Advances in Computer Science Research.].Original is reconfigured quickly out from specified viewing angle by rendering pipeline in this method The grid surface of the specified fineness of model visibility region.From multiple angles and reconstructed surface is generated, then is fused together, The reconstructed mesh of the fineness of entire master mould can be generated.This method is not reconfigured quickly merely with GPU parallel computation, right As long as recessed area is visible to be handled, but gained grid can not encase master mould, so cannot be as control cage.
Summary of the invention
Present invention aim to address deficiency of the existing method on control cage arrangement, propose a kind of based on rendering pipeline Control cage arrangement method.Threedimensional model is constructed some visual angle under specified fineness by rendering pipeline by this method Forward sight reconstructed mesh and back view reconstructed mesh, forward sight reconstructed mesh toward being pushed forward, and back view reconstructed mesh toward pusher, then two Gap between a grid increases by a circle vertex to suture, to construct the control cage of master mould.
The present invention is attained in that a kind of Three dimensions control cage arrangement method, step packet by following technical solution It includes:
(1) former grid data is read in;
(2) post-processing object is set as A32B32G32R32 format texture object, and setting depth manner of comparison;
(3) vertex shader calculates: other than the transformation of the normal world, viewing transformation and projective transformation, returning each top Point mixes the texture color that a coordinate with the vertex in object space is value;
(4) pixel coloring device calculates: directly output rasterizes obtained texture sampling color value;
(5) if not obtaining forward sight and back also depending on two as a result, returning to (2) renders another;Otherwise, (6) are executed;
(6) forward sight is fallen the corresponding pixel of wherein non-model depending on texture filtering with back, existed further according to each residual pixel Relative position in 2 d texture constructs the topological structure of grid surface.The topological structure and vertex are (i.e. each pixel The three-dimensional vertices that tri- channel color values of RGB are constructed as XYZ) construct forward sight grid surface and back view grid surface;
(7) two textures are combined, are each vertex on the boundary of forward sight curved surface, are found on back view curved surface in same sight Corresponding vertex creates a vertex with the midpoint of every two corresponding vertex.Using these vertex as suture vertex, forward sight curved surface It is stitched together with back depending on curved surface;
(8) normal vector for finding out each suture vertex, its past extrapolation certain distance;
(9) past to be pushed forward certain distance according to direction of visual lines all vertex of forward sight curved surface;The all of back view curved surface Vertex, toward pusher certain distance.
Detailed description of the invention
Fig. 1 is forward sight and back view mesh stitch schematic diagram in the method for the present invention.
Fig. 2 is the suture vertex extrapolation schematic diagram of the method for the present invention.
Fig. 3 is that the forward sight of the method for the present invention and back view especially push away schematic diagram.
Specific embodiment
Each step of the invention is further illustrated with reference to the accompanying drawing.
In (2), present most digital displaying callipers have been supported directly to be rendered on a texture.In order to obtain forward sight and Back view curved surface, two post-processing object textures should be different resource.The depth manner of comparison setting rendered twice is respectively adopted " closer " (D3DCMP_LESS is used in Direct3D) and " farther and equal " (use D3DCMP_ in Direct3D GREATEREQUAL) two ways.This will make in carrying out rasterization process, using different depth comparative approach, thus To different results.From the point of view of visual effect, the result that closer mode obtains is exactly forward sight reconstructed mesh, and farther and equal side What formula obtained is back view reconstructed mesh.
In (3), to the texture color that vertex is matched, the purpose is to allow the object vertex in projector space being rasterized The apex coordinate in corresponding object space still can be very easily accessed in Cheng Zhong.Therefore, it is possible to use various moneys The mode of source output, uses the texture of A32B32G32R32 format here.The channel R saves X-coordinate, and the channel G saves Y coordinate, also There is channel B to save Z coordinate.Code used in vertex shader can be such that
void VertDepth(float4 S : POSITION, out float4 SP : POSITION, out float4 SPT : TEXCOORD1)
{ SP=mul (S, W); SP = mul(SP , V ); SP = mul(SP , P ); SPT = S;}
Wherein, S is master mould vertex, and W is world's transformation matrix, and V is viewing transformation matrix, and P is projective transformation matrix, SP For the vertex in projector space, SPT is the newborn texture color value of output.Certain program is also not necessarily limited to this, as long as can be realized Corresponding function.
In (4), code used in pixel coloring device can be such that
void PixDepth(float4 SPT : TEXCOORD1, out float4 SN : COLOR)
{ SN=SPT;}
Wherein, SPT is rasterisation and the texture color that sampling obtains, i.e. sampling obtain the coordinate of corresponding points on master mould. Certain program is also not necessarily limited to this, as long as corresponding functions can be realized.
In (5), different sequences can be specified by user, but always all generations of forward sight and back view, after just carrying out afterwards Continuous operation.It is worth noting that, in this process, cannot the viewing angle or distance otherwise will affect and generate below Two textures it is inconsistent on profile.
In (6), designated value can be preset before not being rendered in two textures, such as: three channels of RGB are all Very big number, then after rendering, since the pixel covered in model is written with the coordinate of model, so which is easily discriminated Belong to model a bit, which is non-model.Herein, each pixel is both a pixel in piece image in texture, also Correspond to a point in three-dimensional space.The neighbouring relations that each vertex can be determined according to the positional relationship between pixel, from And construct three-dimensional grid curved surface.
In (7), if transformation matrix does not change, then model in two textures during generating two textures Boundary should be just overlapped.The pixel of same position is on model boundary so in two textures, is in same sight Corresponding points and corresponding three-dimensional vertices.A kind of mode of curved surface suture can be such as Fig. 1.In such as figure, it is assumed that be from the right Observing and nursing, what black lines indicated is that front reconstructs resulting grid surface, then the grid (only showing part) on the right To use " closer " manner of comparison to obtain forward sight reconstructed mesh curved surface, and the grid (only showing part) on the left side is back apparent weight structure Grid surface.From the point of view of observer, corresponding points are in same sight on the boundary of two curved surfaces.Take the midpoint of corresponding points, structure New summit is made, then constructs triangle together with border vertices, forms suture zone.
In (8), to each stitch points, in conjunction with in its same sight point and boundary on an adjacent point, i.e., It may make up a triangle, using vector multiplication cross, find out the normal vector of triangle.The mode such as Fig. 2 of stitch points toward extrapolation.In figure By taking the cross section of a cylinder model as an example, display includes corresponding grid vertex.The normal vector of stitch points passes through one Thin arrow indicates.Stitch points can move a certain distance outward along normal vector.Specific extrapolation distance, user can be according to moulds Type situation is adjusted.Then corresponding side is also and then adjusted.Mobile result is represented by dashed line.
In (9), direction of visual lines can be calculated according to any pair of vertex described in (7).Two apex coordinate phases Subtract, direction of visual lines or its opposite direction can be obtained.Example such as Fig. 3 of forward sight and the past extrapolation of back view curved surface.The figure is still with circle For the cross section of type cylinder models, display includes corresponding grid vertex.Stitch points release after, then forward sight curved surface along The opposite direction of direction of observation moves a certain distance, and back is moved a certain distance depending on curved surface along direction of observation.Mobile result It is represented by dashed line.The control cage grid of master mould can be constructed in this way.
The method of the present invention is based on rendering pipeline, for the various representations of model, such as: it is parameterized model, polygon Shape grid, point cloud etc., as long as object can be rendered, can form depth field corresponding with object, so that it may with this method come structure Produce the corresponding Three dimensions control cage with object module.

Claims (6)

1. a kind of Three dimensions control cage arrangement method, which is characterized in that the step of this method mainly includes following 4 points:
(1) in vertex shader implementation procedure, mix one to each vertex is with coordinate of the vertex in object space The texture color of value;
(2) in pixel coloring device implementation procedure, the apex coordinate saved in texture is directly exported;
(3) forward sight grid surface and back view grid surface are generated by the texture of output;
(4) forward sight and back view curved surface suture, and vertex is constituted control cage toward extrapolation.
2. Three dimensions control cage arrangement method according to claim 1, wherein the texture of the output uses The texture of A32B32G32R32 format not only shows the resulting two-dimensional position relationship of projection, but also the apex coordinate of record three-dimensional grid.
3. Three dimensions control cage arrangement method according to claim 1, wherein the generation forward sight grid surface includes:
(1) before rendering, depth manner of comparison is arranged to retain closer point;
(2) after rendering, grid vertex is constructed according to pixel value in resulting texture, according to the two dimension between the pixel in texture Positional relationship constructs the topological structure of grid, to construct forward sight grid surface.
4. Three dimensions control cage arrangement method according to claim 1, wherein the generation, which is carried on the back depending on grid surface, includes:
(1) before rendering, depth manner of comparison is arranged to retain farther and equal point;
(2) after rendering, grid vertex is constructed according to pixel value in resulting texture, according to the two dimension between the pixel in texture Positional relationship constructs the topological structure of grid, to construct back view grid surface.
5. Three dimensions control cage arrangement method according to claim 1, wherein the curved surface, which sutures, includes:
(1) according to the two of output textures, the one-to-one relationship on the borderline vertex of two curved surfaces is determined, with every a pair of of top The midpoint of point constructs new summit;
(2) triangle is constructed using new summit and the border vertices of two curved surfaces, two curved surfaces is stitched together.
6. Three dimensions control cage arrangement method according to claim 1, wherein described that vertex is constituted control cage toward extrapolation Include:
(1) its normal vector is found out according to triangle adjacent thereto for the vertex created for suture, allows it along normal direction It measures toward extrapolation a certain distance;
(2) for the vertex on forward sight curved surface, along the opposite direction of direction of observation, mobile a certain distance;
(3) for the vertex on back view curved surface, along direction of observation, mobile a certain distance.
CN201610814832.6A 2016-09-12 2016-09-12 Three dimensions control cage arrangement method Active CN106408644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610814832.6A CN106408644B (en) 2016-09-12 2016-09-12 Three dimensions control cage arrangement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610814832.6A CN106408644B (en) 2016-09-12 2016-09-12 Three dimensions control cage arrangement method

Publications (2)

Publication Number Publication Date
CN106408644A CN106408644A (en) 2017-02-15
CN106408644B true CN106408644B (en) 2019-01-25

Family

ID=57998985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610814832.6A Active CN106408644B (en) 2016-09-12 2016-09-12 Three dimensions control cage arrangement method

Country Status (1)

Country Link
CN (1) CN106408644B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339342B (en) * 2019-11-08 2023-05-05 深圳北航新兴产业技术研究院 Three-dimensional model retrieval method based on angle ternary center loss
TWI760675B (en) * 2020-01-06 2022-04-11 財團法人工業技術研究院 Method for defect inspection of machining path

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270356A (en) * 2011-07-28 2011-12-07 东莞中山大学研究院 Construction method of control cage based on comparison method
US8175741B2 (en) * 2009-12-22 2012-05-08 Ko Young-A Method for creating panels and pattern-making

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8175741B2 (en) * 2009-12-22 2012-05-08 Ko Young-A Method for creating panels and pattern-making
CN102270356A (en) * 2011-07-28 2011-12-07 东莞中山大学研究院 Construction method of control cage based on comparison method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Automatic cage generation by improved OBBs for mesh deformation;Chuhua Xian et al;《The Visual Computer》;20110421;第28卷(第1期);第21-33页
基于可视外壳的cage生成;陈雪 等;《软件学报》;20131031;第24卷(第10期);第2379-2390页

Also Published As

Publication number Publication date
CN106408644A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN109147048B (en) Three-dimensional mesh reconstruction method by utilizing single-sheet colorful image
Müller et al. Wrinkle Meshes.
Wang et al. Feature based 3D garment design through 2D sketches
Geuzaine et al. Gmsh: A 3‐D finite element mesh generator with built‐in pre‐and post‐processing facilities
WO2017206325A1 (en) Calculation method and apparatus for global illumination
KR101199475B1 (en) Method and apparatus for reconstruction 3 dimension model
US7843463B1 (en) System and method for bump mapping setup
JP5055214B2 (en) Image processing apparatus and image processing method
CN103530907B (en) Complicated three-dimensional model drawing method based on images
US9367943B2 (en) Seamless fracture in a production pipeline
Jin et al. General constrained deformations based on generalized metaballs
Frisken et al. Designing with distance fields
Archirapatkave et al. GPGPU acceleration algorithm for medical image reconstruction
CN111127658A (en) Point cloud reconstruction-based feature-preserving curved surface reconstruction method for triangular mesh curved surface
Aguilera et al. A parallel resampling method for interactive deformation of volumetric models
CN106408644B (en) Three dimensions control cage arrangement method
CN105279788B (en) A kind of method for generating object floodlight scanning body
Petkov et al. Interactive visibility retargeting in vr using conformal visualization
JP5642804B2 (en) Display processing method and apparatus
Wang et al. Freeform extrusion by sketched input
Tao et al. Animation Rendering Optimization Based on Ray Tracing and Distributed Algorithm
CN114078180A (en) Three-dimensional hair model generation method and device, electronic equipment and storage medium
Ogáyar et al. Fast and simple hardware accelerated voxelizations using simplicial coverings
Jain et al. Learning to reconstruct symmetric shapes using planar parameterization of 3D surface
Rongmao et al. Research on 3D Visualization Technology of Electromagnetic Field Based on OSG

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240122

Address after: 230000 floor 1, building 2, phase I, e-commerce Park, Jinggang Road, Shushan Economic Development Zone, Hefei City, Anhui Province

Patentee after: Dragon totem Technology (Hefei) Co.,Ltd.

Country or region after: China

Address before: 571158 No.99 Longkun South Road, Qiongshan District, Haikou City, Hainan Province

Patentee before: HAINAN NORMAL University

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240925

Address after: Room 802, Building 7, Chantuo Jinxiu, No. 2698 Chanba Second Road, Chanba Ecological Zone, Xi'an City, Shaanxi Province 710000

Patentee after: Shaanxi Huacheng Design Co.,Ltd.

Country or region after: China

Address before: 230000 floor 1, building 2, phase I, e-commerce Park, Jinggang Road, Shushan Economic Development Zone, Hefei City, Anhui Province

Patentee before: Dragon totem Technology (Hefei) Co.,Ltd.

Country or region before: China