CN100437642C - Pre-process method of searching model geometric space outline - Google Patents

Pre-process method of searching model geometric space outline Download PDF

Info

Publication number
CN100437642C
CN100437642C CNB2006100651915A CN200610065191A CN100437642C CN 100437642 C CN100437642 C CN 100437642C CN B2006100651915 A CNB2006100651915 A CN B2006100651915A CN 200610065191 A CN200610065191 A CN 200610065191A CN 100437642 C CN100437642 C CN 100437642C
Authority
CN
China
Prior art keywords
information
array
summit
face
limit
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
CNB2006100651915A
Other languages
Chinese (zh)
Other versions
CN101046889A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CNB2006100651915A priority Critical patent/CN100437642C/en
Publication of CN101046889A publication Critical patent/CN101046889A/en
Application granted granted Critical
Publication of CN100437642C publication Critical patent/CN100437642C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The present invention discloses a preprocessing method for searching model geometrical space contour line. Said method includes the following steps: storing all the edge information of all the faces of said model, adding double-normal information into all the edge information, using first edge of edge information in which the double-normal information is added as current edge; according to the following steps traversing all the edges of stored model until the traverse is completed; judging that the current edge information is existed in the edge sequence list or not, if it is existed, removing current edge information, otherwise, making the current edge information be stored in edge sequence list.

Description

A kind of preprocess method of searching model geometric space outline
Technical field
The present invention relates to animation design technique, relate in particular to a kind of preprocess method of searching model geometric space outline.
Background technology
In current various recreation and cartoon making, pursue characteristic and style more and more, the non-photo live stage that engenders is played up (NPR, Non-Photorealistic Rendering), and for example to play up be exactly wherein more or less freely realization characteristic and style one to cartoon.In this playing up, gordian technique is searching of model silhouette line, wherein the 3D geometric space outline search hardware requirement very lowly, be easy to realize, so be widely adopted.
Generally, in the searching of 3D geometric space outline, according to specific circumstances, the model that needs can be played up is divided into several faces, and each face all is made of a triangle, and each triangle all has three limits, the shared limit of adjacent triangle, referring to Fig. 1, Fig. 1 is the model structure synoptic diagram, wherein triangle f1 and f2 common edge AB.The outline line of model just is meant on a certain viewpoint direction, two masks on a shared limit have different directivity, the this edge that is shared is exactly the part of model silhouette line, the outline line of model has just been formed on all such limits, referring to Fig. 2, Fig. 2 is the outline line synoptic diagram of carton model, and the black line frame among Fig. 2 is exactly the carton model silhouette line of carton on this viewpoint direction.The directivity of face can determine that it is exactly to have different normal directions that two masks have different directivity by normal information.
From above-described outline line definition as can be known, search the geometric space outline of model, need know composition model leg-of-mutton side information, whether two leg-of-mutton normal information of two shared this edges of triangle and shared this edge are arranged, for can not comprised the leg-of-mutton normal direction negate of this edge by two shared limits of triangle, as one of them normal information, that is to say no matter whether the limit is by its usefulness, necessarily comprise two normal information in the side information.For the situation that two shared limits of triangle are arranged, two normal information are exactly two leg-of-mutton normal information on shared this limit; For having only a triangle to exclusively enjoy the situation on this limit, two normal information are exactly to exclusively enjoy the leg-of-mutton normal information on this limit and with the information of its normal direction negate.So, in order to search the geometric space outline of model, need earlier the structure of models data to be carried out pre-service, obtain comprising the edge sequence tabulation of two normal information.
The preprocess method of existing definite side information and two normal information is: at first, preserve all leg-of-mutton side informations of composition model, comprise corresponding leg-of-mutton normal information in the side information, then, from first leg-of-mutton article one limit, travel through all leg-of-mutton limits successively, search other triangle on shared this limit, other leg-of-mutton normal information on shared this limit is joined in the side information, for the leg-of-mutton situation that does not find shared this limit, the information that exclusively enjoys the leg-of-mutton normal direction negate on this limit is joined in the side information; After the same method, traveled through all leg-of-mutton side informations successively after, the edge sequence tabulation that comprises two normal information that output is obtained.
Can see that from top description current pretreatment approaches is whenever to search a limit just to need all triangles of traversal, has repeated to do a large amount of work, efficient is lower; In addition, because in the triangle of composition model, can have a large amount of common edge, for example, triangle f1 among Fig. 1 and f2 are with regard to common edge AB, yet, when beginning to search the triangle of other shared AB with the limit AB of triangle f1, can find triangle f2, so limit AB can preserve the normal information of f1 and f2, similarly, when beginning to search the triangle of other shared AB with the limit AB of triangle f2, can find triangle f1 again, so limit AB can preserve the normal information of f1 and f2 again, so can contain the information of a large amount of repetitions in the edge sequence that comprises two normal information of output in the end, this increases unnecessary information can for undoubtedly searching of follow-up geometric space outline, influences the search efficiency and the processing speed of geometric space outline.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of preprocess method of searching model geometric space outline, use search efficiency and processing speed that method of the present invention can improve geometric space outline.
In order to realize the foregoing invention purpose, the invention provides a kind of preprocess method of searching model geometric space outline, comprising:
A, all side informations and the summit relevant information of preserving all faces of composition model, and add two normal information in all side informations will add article one limit in the side information of two normal information as working as the front;
Whether B, judgement are worked as information in front and are kept in the edge sequence tabulation, if give up current side information; Otherwise, current side information is kept in the edge sequence tabulation;
C, judge whether to travel through all limits of all faces of the composition model of being preserved, if not, execution in step B as working as the front, is returned in next bar limit; Otherwise, the tabulation of output edge sequence;
Described can be triangle projective planum;
Wherein, all side informations of all faces of composition model and summit relevant information are kept in the steps A: in first array, second array and the boolean's array;
Described first array is used for preserving successively according to the order of face call number the call number on two summits;
Described second array is used to preserve the summit and by which face is owned;
Described boolean's array is used for writing down determined limit, two summits and whether is kept at the edge sequence tabulation;
Step B is described to be judged as:
Judge whether the Boolean variable value when two summits in front all is false in boolean's array, if be not kept in the edge sequence tabulation; Otherwise, be kept in the edge sequence tabulation;
When not preserving, step B further comprises:
The Boolean variable value that to work as two summits in front changes true into.
In all side informations, add two normal information described in the steps A, can comprise:
A21, with article one limit in first array as working as the front;
A22, being benchmark when the call number on a summit in front, in second array, search the face on shared this summit, and find wherein shared face when another summit in front, the normal information of the face that found is joined in two vertex information, if do not find shared face, join in two vertex information exclusively enjoying the normal information of the face that deserves two summits in front and the information of normal direction negate when another summit in front;
A23, with next the bar limit in first array as working as the front, return execution in step a22, all limits in having searched first array.
Can see that from such scheme the preprocess method of a kind of searching model geometric space outline provided by the invention has following beneficial effect:
1, use method provided by the invention, by relatively judging, give up the side information of having preserved, only output does not contain the edge sequence of repetition side information, simplify the required information of geometric space outline of searching, the data structure of Optimization Model, thereby improve the efficient that geometric space outline is searched, under limiting case, after N leg-of-mutton model being arranged, adopt the vertex information and two normal information that has the definite side information of way extraction now, geometric space outline is searched needs to handle 6N summit, and through after the optimization of the present invention, geometric space outline is searched and is only needed to handle 3N summit, and efficient can double;
2, method provided by the invention does not need whenever to search all limits that a limit just travels through all faces of model, but the call number of the face that the summit had by determining the limit directly navigates to other face of common edge, seek rate is very fast, by program run the time, having 20,000 leg-of-mutton models just can optimize in less than one second time finishes, do not influence searching of geometric space outline, and through the model data after the present invention's optimization, be applied in later play up with search procedure in, can raise the efficiency and processing speed.
Description of drawings
Fig. 1 is the model structure synoptic diagram;
Fig. 2 is the outline line synoptic diagram of carton model;
Fig. 3 is the preprocess method process flow diagram according to the searching model geometric space outline of the embodiment of the invention.
Embodiment
In order to make the features and advantages of the present invention clearer, the invention will be further described in conjunction with specific embodiments with reference to the accompanying drawings.
Main thought of the present invention is: by relatively judging the side information of giving up the two normal information of band of having preserved, output does not contain the edge sequence of the two normal information of band of repetition side information.
Referring to Fig. 3, Fig. 3 is the preprocess method process flow diagram according to the searching model geometric space outline of the embodiment of the invention, and concrete operations flow process and step are as follows:
Each triangle of step 301, traversal model is stored the information on leg-of-mutton every limit, and leg-of-mutton normal information is stored in the corresponding side information, with article one limit in the side information as working as the front;
Each triangle of composition model all has the call number (index) of oneself, also all there is vertex index number (vertexcount) on leg-of-mutton each summit, here, for convenience of description, array vTrgledge is set as first array, be used for preserving all leg-of-mutton side informations according to the order of triangle call number, because leg-of-mutton limit is determined by two summits, so, leg-of-mutton every limit can be preserved by preserving two summits, so, in array vTrgledge, it is right to preserve vertex information successively according to the triangle call number, and in each vertex information, add corresponding leg-of-mutton normal information, so for a triangle, just need to preserve three pairs of vertex information that add this triangle normal information, referring to table 1, table 1 is that first the leg-of-mutton side information with composition model is kept at the example among the array vTrgledge, this triangle call number is 0, the call number on three summits is respectively 10,11,12, then be kept in the array successively according to leg-of-mutton call number for other triangle and get final product, the numeral in its bracket is the leg-of-mutton call number at place, summit.
The normal information of 10 (0)+triangles 0 The normal information of 11 (0)+triangles 0
The normal information of 11 (0)+triangles 0 The normal information of 12 (0)+triangles 0
The normal information of 12 (0)+triangles 0 The normal information of 10 (0)+triangles 0
Table 1
Introduce an array vTrglIndex[vertexcount again] as second array, be used to preserve vertex index number for indexed number of the summit of vertexcount for the triangle of index all; Referring to table 2, table 2 is array vTrglIndex[vertexcount] example, wherein three of triangle 0 summits are respectively 10,11,12, three summits of triangle 1 are respectively 11,12,13, that is to say, summit 11 and 12 is by triangle 0 and 1 total; Be kept in the array successively for other vertex of a triangle and get final product, the numeral summit in its bracket by which triangle all.
10(0)
11(0,1)
12(0,1)
13(1)
Table 2
In addition, introduce boolean's array bvertexmeet[vertexcounta again] [vertexcountb], be used to write down two vertex v ertexcounta, whether the determined limit of vertexcountb is kept in the edge sequence tabulation, wherein vertexcounta and vertexcountb represent the call number on two different summits, bvertexmeet[vertexcounta] initial value of [vertexcountb] is false, represent that this determined limit, two summits is not kept in the edge sequence tabulation, referring to table 3, table 3 is under initial situation, boolean's array bvertexmeet[vertexcounta on three limits of triangle 0] example of [vertexcountb].
bvertexmeet[10][11]=false
bvertexmeet[11][12]=false
bvertexmeet[12][10]=false
Table 3
After having traveled through all triangles of model, all leg-of-mutton side informations and summit relevant information store array vTrgledge, array vTrglIndex[vertexcount respectively into] and boolean's array bvertexmeet[vertexcounta] in [vertexcountb], so, by array vTrglIndex[vertexcount] just can know that call number is that the summit of vertexcount is shared by which triangle, this can be used for the limit of cocked hat in step 302, accelerate the speed of traversal simultaneously.
Step 302, search sharedly when triangle in front, sharedly then should leg-of-mutton normal information join in the current side information when triangle in front if having, otherwise, will exclusively enjoy and work as leg-of-mutton normal direction negate in front, join in the current side information;
Particularly, in array vTrgledge according to the example shown in the table 1, first summit with first leg-of-mutton article one limit begins, in table 2, find the triangle on all shared these summits, judge whether also another summit on shared this limit of triangle is wherein arranged, if having, then should leg-of-mutton normal information join in the vertex information, otherwise,, join in the vertex information first leg-of-mutton normal direction negate.
Still the example that is exemplified as to be lifted in the step 301, first summit 10 from article one limit of triangle 0, it is also total by which triangle to search summit, 10 in table 2, have only triangle 0 to comprise summit 10 as can be known, then illustrate in triangle 0 only to be exclusively enjoyed by triangle 0 by summit 10 and 11 determined limits, so, again with the normal direction negate of triangle 0, join in the information of summit 10 and 11, at this moment, just comprise two normal information in summit 10 and 11 the information; Summit 11 for second limit in the table 1, it is also total by which triangle to search summit 11 in table 2, as can be known except triangle 0, also have triangle 1 to comprise summit 11, so, in table 1, search triangle 1 except comprising summit 11 again, whether also comprise summit 12, just judge triangle 1 whether with triangle 0 shared summit 11 and the 12 second limits of determining, here, because the array vTrgledge shown in the table 1 preserves leg-of-mutton limit successively according to the sequencing of triangle call number, if so find triangle 1 also to comprise summit 11, usually just can know that the 4th to the 6th array is the limit of expression triangle 1 in table 1, because principle according to array vTrgledge, three arrays in front are limits of expression triangle 0, and ensuing three arrays are limits of expression triangle 1, so whether also comprise summit 12 as long as search at correspondence position.
Can see that from top description whenever searching a limit compared to existing technology all needs to travel through the limit of being stored among the pass group vTrgledge, above traversal is faster.
Step 303, judge whether current side information is stored in the edge sequence tabulation, if then abandon current side information; Otherwise, current side information is kept in the edge sequence tabulation;
Whether current side information is stored in the edge sequence tabulation, the value of Boolean variable that can be by judging two summits is judged, under the initial situation, summit 10,11 limits of determining are not kept in the edge sequence tabulation, therefore, bvertexmeet[10] [11]=false, so, only need to judge bvertexmeet[10] [11]=false, and bvertexmeet[11 simultaneously] [10]=false, just can think summit 10,11 are not kept in the edge sequence tabulation, so just with summit 10, the 11 two normal information together with adding are kept in the edge sequence tabulation, simultaneously, make bvertexmeet[11] [10]=true, bvertexmeet[10] [11]=true, expression summit 10 and 11 limits of determining have been kept in the edge sequence tabulation, in the ergodic process afterwards, needn't preserve summit 10 and 11 limits of determining again.The edge sequence tabulation here is exactly the edge sequence that does not contain the repetition side information of the final output of the embodiment of the invention.
Step 304, judge whether that all limits all travel through and finish, if not, will descend on one side as working as the front, return execution in step 302; Otherwise the tabulation of output edge sequence finishes.
Limits all among the set of variables vTrgledge has all been traveled through, and corresponding information is saved in the edge sequence tabulation, just preserved the edge sequence of optimizing through the present invention like this in edge sequence tabulation, carried out follow-up geometry borderline when searching, processing speed will be improved.
The above description according to the embodiment of the invention with reference to Fig. 3 carried out pretreated method and process to searching of model geometric space outline, adopt above-described method and step, data structure to model is optimized, the edge sequence that is not contained duplicate message, for searching of follow-up geometric space outline provides the data of simplifying most, search the speed of handling with NPR thereby can improve geometric space outline, therefore efficient also be improved.
The above is preferred embodiment of the present invention only, is not in order to limit protection scope of the present invention.

Claims (2)

1, a kind of preprocess method of searching model geometric space outline is characterized in that, this method comprises:
A, all side informations and the summit relevant information of preserving all faces of composition model, and add two normal information in all side informations will add article one limit in the side information of two normal information as working as the front; Described face is a triangle projective planum;
Whether B, judgement are worked as information in front and are kept in the edge sequence tabulation, if give up current side information; Otherwise, current side information is kept in the edge sequence tabulation;
C, judge whether to travel through all limits of all faces of the composition model of being preserved, if not, execution in step B as working as the front, is returned in next bar limit; Otherwise, the tabulation of output edge sequence;
Wherein, all side informations of all faces of composition model and summit relevant information are kept in the steps A: in first array, second array and the boolean's array;
Described first array is used for preserving successively according to the order of face call number the call number on two summits;
Described second array is used to preserve the summit and by which face is owned;
Described boolean's array is used for writing down determined limit, two summits and whether is kept at the edge sequence tabulation;
Step B is described to be judged as:
Judge whether the Boolean variable value when two summits in front all is false in boolean's array, if be not kept in the edge sequence tabulation; Otherwise, be kept in the edge sequence tabulation;
When not preserving, step B further comprises:
The Boolean variable value that to work as two summits in front changes true into.
2, method according to claim 1 is characterized in that, adds two normal information described in the steps A in all side informations, comprising:
A21, with article one limit in first array as working as the front;
A22, being benchmark when the call number on a summit in front, in second array, search the face on shared this summit, and find wherein shared face when another summit in front, the normal information of the face that found is joined in two vertex information, if do not find shared face, join in two vertex information exclusively enjoying the normal information of the face that deserves two summits in front and the information of normal direction negate when another summit in front;
A23, with next the bar limit in first array as working as the front, return execution in step a22, all limits in having searched first array.
CNB2006100651915A 2006-03-27 2006-03-27 Pre-process method of searching model geometric space outline Active CN100437642C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100651915A CN100437642C (en) 2006-03-27 2006-03-27 Pre-process method of searching model geometric space outline

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100651915A CN100437642C (en) 2006-03-27 2006-03-27 Pre-process method of searching model geometric space outline

Publications (2)

Publication Number Publication Date
CN101046889A CN101046889A (en) 2007-10-03
CN100437642C true CN100437642C (en) 2008-11-26

Family

ID=38771470

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100651915A Active CN100437642C (en) 2006-03-27 2006-03-27 Pre-process method of searching model geometric space outline

Country Status (1)

Country Link
CN (1) CN100437642C (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1155715A (en) * 1995-10-06 1997-07-30 任天堂株式会社 Antialiasing of silhouette edges
EP1049049A2 (en) * 1999-04-26 2000-11-02 Spatial Technology, Inc. Curved surface reconstruction at plural resolution levels

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1155715A (en) * 1995-10-06 1997-07-30 任天堂株式会社 Antialiasing of silhouette edges
EP1049049A2 (en) * 1999-04-26 2000-11-02 Spatial Technology, Inc. Curved surface reconstruction at plural resolution levels

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Non-Photorealistic Rendering in Chinese Painting of Animals. Jun-Wei,Yeh,Ming,Ouhyoung.系统仿真学报,第14卷第9期. 2002
Non-Photorealistic Rendering in Chinese Painting of Animals. Jun-Wei,Yeh,Ming,Ouhyoung.系统仿真学报,第14卷第9期. 2002 *

Also Published As

Publication number Publication date
CN101046889A (en) 2007-10-03

Similar Documents

Publication Publication Date Title
US6075541A (en) Topographic triangulation in reduced time
CN110177094A (en) A kind of user community recognition methods, device, electronic equipment and storage medium
CN104809154A (en) Method and device for recommending information
CN101984443B (en) Improved flexible cloth collision processing method
CN105939493A (en) Video barrage display method and video barrage display device
CN109646957B (en) Method and device for realizing tailing special effect
CN102393646B (en) Multilayered dynamic collision detecting method and system for blade production line
CN107300917A (en) A kind of vision SLAM rear ends optimization method based on layer architecture
CN102682476B (en) The boolean operation method of triangle grid data and system thereof
CN110975290A (en) Path planning method and system based on pattern database
CN100437642C (en) Pre-process method of searching model geometric space outline
KR20230043958A (en) Image grouping method and apparatus during 3D reconstruction, electronic device and computer readable storage medium
CN102929621A (en) Method and device for drawing overlapped objects
Fong An eclectic approach to turning points in migration
CN111596347A (en) Method and device for rapidly calculating surface layer longitudinal and transverse wave velocity ratio
CN103700137A (en) Space-time related hierachical shielding removal method
CN107783978A (en) A kind of big data inquiry return method and device
US7937411B2 (en) Finite-state machine augmented for multiple evaluations of text
CN111829526B (en) Distance map reconstruction and jumping point path planning method based on anti-collision radius
CN110188290B (en) Distributed unmanned warehouse location recommendation intelligent algorithm based on star topology structure
CN110975291A (en) Path extraction method and system
CN110222055A (en) The single-wheel core value maintaining method of multiple edge update under a kind of Dynamic Graph
Zachmann et al. An architecture for hierarchical collision detection
CN111783977B (en) Neural network training process intermediate value storage compression method and device based on regional gradient update
CN106202408A (en) Data query server based on OLAP, system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant