CN107248187B - Method for quickly cutting and recombining three-dimensional model textures - Google Patents

Method for quickly cutting and recombining three-dimensional model textures Download PDF

Info

Publication number
CN107248187B
CN107248187B CN201710362746.0A CN201710362746A CN107248187B CN 107248187 B CN107248187 B CN 107248187B CN 201710362746 A CN201710362746 A CN 201710362746A CN 107248187 B CN107248187 B CN 107248187B
Authority
CN
China
Prior art keywords
texture
picture
rectangles
dimensional model
pasted
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
CN201710362746.0A
Other languages
Chinese (zh)
Other versions
CN107248187A (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.)
Wuhan Infoearth Information Co ltd
Original Assignee
Wuhan Infoearth Information 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 Wuhan Infoearth Information Co ltd filed Critical Wuhan Infoearth Information Co ltd
Priority to CN201710362746.0A priority Critical patent/CN107248187B/en
Publication of CN107248187A publication Critical patent/CN107248187A/en
Application granted granted Critical
Publication of CN107248187B publication Critical patent/CN107248187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a method for quickly cutting and recombining textures of a three-dimensional model, which comprises the steps of cutting the textures to divide three-dimensional model picture data into texture rectangles with a certain inclusion relation, filling all the texture rectangles into a new three-dimensional model picture by adopting a binary tree image-inserting method according to the width of the texture rectangles to realize the recombination of the three-dimensional model, and calculating new texture coordinates. According to the method, the effective area of the picture can be maximized by using the binary tree interpolation, rapid recombination is realized, the memory occupation is reduced by using the cut and recombined textures after the model is split, and the smooth loading and displaying of the large three-dimensional model are realized.

Description

Method for quickly cutting and recombining three-dimensional model textures
Technical Field
The invention relates to the technical field of image processing, in particular to realization of texture cutting and recombination after splitting a big data three-dimensional model, and particularly relates to a method for quickly cutting and recombining textures of a three-dimensional model.
Background
The three-dimensional model can visually and comprehensively display data. But the data is large, certain requirements are required on machine hardware, and the performance is not very friendly. With the popularity of three-dimensional models and the continuous expansion of application ranges, the optimization of performance is imperative.
The existing big data three-dimensional model has the defects of poor smoothness in performance and overlarge occupied resource due to the fact that the problem of large redundancy of textures after big data splitting is left over because the simple model splitting is relatively simple, but the texture splitting is difficult to realize.
Therefore, the method is very important for realizing texture splitting and optimizing the memory occupation and performance problems according to model splitting. Therefore, the problem of large data browsing and unsmooth use can be solved, the user experience is improved, the memory occupation is saved, and the requirement of browsing three-dimensional data on computer hardware is lowered.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method for quickly cutting and recombining the texture of a three-dimensional model, which cuts texture pictures and only extracts the texture information needed by the model when the big data is subjected to model splitting. In order to solve the technical problems, the invention adopts the technical scheme that:
the invention provides a method for quickly cutting and recombining three-dimensional model textures, which comprises the following steps:
s1, extracting texture rectangles according to the picture data of the original three-dimensional model;
s2, sorting the texture rectangles from big to small according to a quick sorting method;
s3, calculating the minimum square for pasting the texture rectangles according to the areas of all the rectangles, and pasting all the texture rectangles into the minimum square in sequence according to the sequence by adopting a binary tree method;
and S4, calculating new texture coordinates according to the old texture coordinates, the starting coordinates of the texture rectangles, the width and height of the original three-dimensional model picture data, the width and height of the new three-dimensional model picture and the starting coordinates of the new picture to which the texture rectangles are attached.
The invention has the beneficial effects that:
the effective area of the picture can be maximized by utilizing the binary tree interpolation, the rapid recombination is realized, the memory occupation is reduced by using the cut and recombined texture after the model is split, and the smooth loading and displaying of the large three-dimensional model are realized.
Drawings
FIG. 1 is a schematic diagram of rectangular picture reorganization according to the present invention;
FIG. 2 is a diagram of texture segmentation and reorganization according to the present invention, wherein (A) is a diagram of a triangle and its minimum bounding rectangle in an original three-dimensional model picture, and (B) is a diagram of the triangle and its minimum bounding rectangle in a new image after reorganization.
Detailed Description
The invention is further explained below with reference to the drawings and examples.
As shown in FIG. 1, the present invention provides a method for rapid texture cutting and reorganization of a three-dimensional model, comprising the following steps:
s1, firstly, extracting the minimum external rectangles of all triangular surfaces from the image data of the original three-dimensional model, then traversing all rectangular texture image information, judging whether rectangles with inclusion relations and rectangles with intersection exist according to the positions and sizes of the rectangles, merging and reserving the image information of larger rectangles if rectangles with inclusion relations exist, and if a plurality of rectangles have certain proportion overlapping, establishing new rectangles for framing all overlapped rectangles and reserving the image information of larger rectangles, thereby generating a to-be-pasted rectangular texture image set.
S2, sorting the texture rectangles from big to small according to a quick sorting method; to reduce the complexity of the procedure, it is not necessary to rotate rectangles that are taller than wide. Through practice, sorting is respectively carried out according to the rectangular area, the rectangular height, the rectangular width and the like, and the highest space utilization rate is found according to high sorting.
S3, re-filling all rectangles into the new picture, where the width and height of the new picture are determined, and filling rules are also applied. And calculating the sum of the areas of all rectangles, then taking the length of the minimum square in the opening direction, and then sequentially pasting all rectangles to a new picture according to the sequence by adopting a binary tree method. The method specifically comprises the following steps:
s31, calculating the sum of the areas of all rectangular texture pictures in the rectangular picture set to be pasted, and then calculating the side length of the smallest square for pasting the rectangular texture pictures by adopting a method of square opening and rounding up;
and S32, pasting the rectangular texture pictures in the rectangular texture picture list to be pasted into the minimum square in sequence by adopting a binary tree image inserting method.
S321, defining an area, which is not pasted with the rectangular texture picture, in the minimum square for pasting the rectangular texture picture as an idle area, extracting the texture picture with the maximum picture height in a rectangular texture picture list to be pasted, aligning and pasting the texture picture with the upper left corner of the idle area, and deleting the picture record in the list;
s322, dividing the residual idle area into a right idle area and a lower idle area according to the lower edge of the pasted texture picture;
s323, extracting the texture picture with the largest picture height in the rectangular texture picture list to be pasted, and judging whether the width and the height of the picture are not more than those of the right idle area:
if so, filling and pasting the texture picture to a right idle area, deleting the picture record in the list, dividing the area into two parts again according to the method in the step S322, and then repeatedly executing the step until all pictures are pasted;
otherwise, jumping to step S324;
s324, judging whether the width and the height of the texture picture are not larger than those of the lower idle area:
if so, filling and pasting the texture picture to a lower free area, deleting the picture record in the list, dividing the area into two parts again according to the method in the step S322, jumping to the step S323, extracting the next texture picture and performing filling and pasting operation until all pictures are pasted;
otherwise, the side length of the minimum square is expanded according to the specified proportion, and the step S323 is skipped.
S4, calculating new texture coordinates newUV according to the following formula:
Figure BDA0001300790320000041
wherein oldUV is an old texture picture coordinate, (oldX, oldY) represents a start point coordinate of an original rectangle, (Swidth, stretch) represents a width and a height of an original three-dimensional model picture, (Nwidth, nhight) represents a width and a height of a new three-dimensional model picture, and (newX, newY) represents a start point coordinate of a texture rectangle pasted on a new picture.
Specifically, as shown in fig. 2, the original three-dimensional model picture is as shown in fig. 2(a), the texture used by one surface of the model is triangle ABC, the UV coordinates of three vertexes of the original triangle ABC are assumed to be { a (0.5,0), B (0.3,0.45), and C (0.7 ) }, the coordinate (30,0) of the upper left vertex of the minimum circumscribed rectangle in the rectangular coordinate system is defined as the starting coordinate of the minimum circumscribed rectangle, the width and height of the original three-dimensional model picture are both 100, the starting coordinate of the reconstructed rectangle in fig. 2(B) is (0,0), and the width and height of the new picture are respectively 80. The coordinates of a1 are: x is (0.5 × 100-30+0)/80 is 0.25, y is (0 × 100-0+0)/80 is 0, and so on, the UV coordinates of the new graph can be calculated.
The parts not described in the specification are prior art or common general knowledge. The present embodiments are illustrative only and not intended to limit the scope of the present invention, and modifications and equivalents thereof by those skilled in the art are considered to fall within the scope of the present invention as set forth in the claims.

Claims (3)

1. A method for fast cutting and recombining three-dimensional model textures is characterized in that: the method comprises the following steps:
s1, extracting texture rectangles according to the picture data of the original three-dimensional model;
s2, sorting the texture rectangles from big to small according to a quick sorting method;
s3, calculating the minimum square for pasting the texture rectangles according to the areas of all the rectangles, and adopting a binary tree method to paste all the texture rectangles into the minimum square in sequence according to the sequence to generate a new three-dimensional model picture;
s4, calculating new texture coordinates according to the old texture coordinates, the starting coordinates of the texture rectangles, the width and height of the original three-dimensional model picture data, the width and height of the new three-dimensional model picture and the starting coordinates of the new picture to which the texture rectangles are attached;
the step S1 specifically includes: firstly, extracting the minimum external rectangles of all triangular surfaces from the image data of an original three-dimensional model, traversing all rectangular texture image information, judging whether rectangles with inclusion relations and rectangles with intersection exist according to the positions and sizes of the rectangles, merging and reserving the image information of larger rectangles if the rectangles with inclusion relations exist, and establishing new rectangles for framing all overlapped rectangles and reserving the image information of larger rectangles if a plurality of rectangles are overlapped in a certain proportion, thereby generating a to-be-pasted rectangular texture image set;
the step S3 specifically includes the following sub-steps:
s31, calculating the sum of the areas of all rectangular texture pictures in the rectangular picture set to be pasted, and then calculating the side length of the smallest square for pasting the rectangular texture pictures by adopting a method of square opening and rounding up;
and S32, pasting the rectangular texture pictures in the rectangular texture picture list to be pasted into the minimum square in sequence by adopting a binary tree image inserting method.
2. The method for rapid texture cutting and reorganization of three-dimensional models according to claim 1, wherein: the step S32 specifically includes the following sub-steps:
s321, defining an area, which is not pasted with the rectangular texture picture, in the minimum square for pasting the rectangular texture picture as an idle area, extracting the texture picture with the maximum picture height in a rectangular texture picture list to be pasted, aligning and pasting the texture picture with the upper left corner of the idle area, and deleting the picture record in the list;
s322, dividing the residual idle area into a right idle area and a lower idle area according to the lower edge of the pasted texture picture;
s323, extracting the texture picture with the largest picture height in the rectangular texture picture list to be pasted, and judging whether the height and the width of the picture are not more than the height and the width of the right idle area:
if so, filling and pasting the texture picture to a right idle area, deleting the picture record in the list, dividing the area into two parts again according to the method in the step S322, and then repeatedly executing the step until all pictures are pasted;
otherwise, jumping to step S324;
s324, judging whether the height and the width of the texture picture are not larger than those of the lower idle area:
if so, filling and pasting the texture picture to a lower free area, deleting the picture record in the list, dividing the area into two parts again according to the method in the step S322, jumping to the step S323, extracting the next texture picture and performing filling and pasting operation until all pictures are pasted;
otherwise, the side length of the minimum square is expanded according to the specified proportion, and the step S323 is skipped.
3. The method for rapid texture cutting and reorganization of three-dimensional models according to claim 2, wherein: the new texture coordinate newUV in step S4 is calculated according to the following formula:
Figure FDA0002585028280000031
wherein oldUV is an old texture picture coordinate, (oldX, oldY) represents a start point coordinate of an original rectangle, (Swidth, stretch) represents a width and a height of a three-dimensional model picture, (Nwidth, nhight) represents a width and a height of a new three-dimensional model picture, and (newX, newY) represents a start point coordinate of a texture rectangle pasted on a new picture.
CN201710362746.0A 2017-05-22 2017-05-22 Method for quickly cutting and recombining three-dimensional model textures Active CN107248187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710362746.0A CN107248187B (en) 2017-05-22 2017-05-22 Method for quickly cutting and recombining three-dimensional model textures

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710362746.0A CN107248187B (en) 2017-05-22 2017-05-22 Method for quickly cutting and recombining three-dimensional model textures

Publications (2)

Publication Number Publication Date
CN107248187A CN107248187A (en) 2017-10-13
CN107248187B true CN107248187B (en) 2020-12-08

Family

ID=60017526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710362746.0A Active CN107248187B (en) 2017-05-22 2017-05-22 Method for quickly cutting and recombining three-dimensional model textures

Country Status (1)

Country Link
CN (1) CN107248187B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241304B (en) * 2018-08-16 2021-12-03 广州视源电子科技股份有限公司 Picture processing method, device and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651138A (en) * 2012-04-10 2012-08-29 西安理工大学 JPEG picture mosaicing-based oversize picture synthesis method
CN106022262A (en) * 2016-05-20 2016-10-12 河北工程大学 Remote sensing image identification method and system based on interpolation wavelet

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6850233B2 (en) * 2002-05-01 2005-02-01 Microsoft Corporation Systems and methods for optimizing geometric stretch of a parametrization scheme
US7151545B2 (en) * 2003-08-06 2006-12-19 Landmark Graphics Corporation System and method for applying accurate three-dimensional volume textures to arbitrary triangulated surfaces
US8872839B2 (en) * 2011-09-09 2014-10-28 Microsoft Corporation Real-time atlasing of graphics data
CN104054112A (en) * 2012-01-27 2014-09-17 三菱电机株式会社 Drawing data generation device and image drawing device
CN102663801B (en) * 2012-04-19 2015-07-01 北京天下图数据技术有限公司 Method for improving three-dimensional model rendering performance
JP6227156B2 (en) * 2014-09-22 2017-11-08 三菱電機株式会社 Information display control system and atlas image creation method
CN104318538B (en) * 2014-10-14 2018-01-12 安徽游艺道网络科技有限公司 A kind of two-dimensional sequence frame picture is spliced into the method for big picture and its device used
CN106570922A (en) * 2016-08-25 2017-04-19 浙江科澜信息技术有限公司 Method for improving three-dimensional model rendering performance
CN106446351A (en) * 2016-08-31 2017-02-22 郑州捷安高科股份有限公司 Real-time drawing-oriented large-scale scene organization and scheduling technology and simulation system
CN106384389A (en) * 2016-08-31 2017-02-08 浙江科澜信息技术有限公司 Method for texture combination of model data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651138A (en) * 2012-04-10 2012-08-29 西安理工大学 JPEG picture mosaicing-based oversize picture synthesis method
CN106022262A (en) * 2016-05-20 2016-10-12 河北工程大学 Remote sensing image identification method and system based on interpolation wavelet

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Least Squares Conformal Maps for Automatic Texture Atlas Generation;Bruno Lévy et al.;《ACM transactions on graphics》;20020731;全文 *
基于超面的建筑物纹理优化处理方法;杜志强;《武汉大学学报·信息科学版》;20141231;第39卷(第12期);全文 *

Also Published As

Publication number Publication date
CN107248187A (en) 2017-10-13

Similar Documents

Publication Publication Date Title
US10275942B2 (en) Compression of a three-dimensional modeled object
US10930071B2 (en) Adaptive decimation using 3D video features
US9396530B2 (en) Low memory content aware image modification
WO2019015591A1 (en) Method for rendering game, and method, apparatus and device for generating game resource file
US9507520B2 (en) Touch-based reorganization of page element
CN110647596B (en) Map data processing method and device
CN101809625A (en) Geospatial data system for selectively retrieving and displaying geospatial texture data in successive additive layers of resolution and related methods
US20190141356A1 (en) Method and apparatus for decoding variable-length coded file
CN101802875B (en) Geospatial data system for selectively retrieving and displaying geospatial texture data based upon user-selected point-of-view and related methods
CN116529776A (en) System and method for extracting mesh geometry from a rectilinear skeleton for a chamfer shape
CN107248187B (en) Method for quickly cutting and recombining three-dimensional model textures
CN111161127B (en) Picture resource rendering optimization method
JP2837584B2 (en) How to create terrain data
CN106548501B (en) Image drawing method and device
CN109388716B (en) Relationship graph updating method and device
CN110457030B (en) Mobile adaptive rearrangement method and device for component arrangement
CN112837416A (en) Triangulation-based polygon rendering method and device and storage medium
CN110580274A (en) GIS data rendering method
CN109872280A (en) A kind of denoising of three-dimensional plant blade point cloud and simplified method, apparatus and system
US11182955B1 (en) Utilizing dynamic filtering to adaptively generate control points of a vector object for display in a graphical user interface
US20240161405A1 (en) Modifying two-dimensional images utilizing segmented three-dimensional object meshes of the two-dimensional images
US20240161366A1 (en) Modifying two-dimensional images utilizing three-dimensional meshes of the two-dimensional images
US20240161320A1 (en) Generating adaptive three-dimensional meshes of two-dimensional images
US20240161406A1 (en) Modifying two-dimensional images utilizing iterative three-dimensional meshes of the two-dimensional images
CN111047666B (en) Unified digital content selection system for vector graphics and grid graphics

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A fast method of 3D model texture segmentation and reconstruction

Effective date of registration: 20210610

Granted publication date: 20201208

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: WUHAN INFOEARTH INFORMATION Co.,Ltd.

Registration number: Y2021420000034

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20220812

Granted publication date: 20201208

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: WUHAN INFOEARTH INFORMATION CO.,LTD.

Registration number: Y2021420000034

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method for fast texture cutting and reorganization of 3D model

Effective date of registration: 20220826

Granted publication date: 20201208

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: WUHAN INFOEARTH INFORMATION CO.,LTD.

Registration number: Y2022420000276

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230714

Granted publication date: 20201208

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: WUHAN INFOEARTH INFORMATION CO.,LTD.

Registration number: Y2022420000276

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Fast Method for Texture Cutting and Reorganization of 3D Models

Effective date of registration: 20230718

Granted publication date: 20201208

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: WUHAN INFOEARTH INFORMATION CO.,LTD.

Registration number: Y2023420000306