CN102298791B - Gradient volumetric texture synthesis method - Google Patents

Gradient volumetric texture synthesis method Download PDF

Info

Publication number
CN102298791B
CN102298791B CN 201110289079 CN201110289079A CN102298791B CN 102298791 B CN102298791 B CN 102298791B CN 201110289079 CN201110289079 CN 201110289079 CN 201110289079 A CN201110289079 A CN 201110289079A CN 102298791 B CN102298791 B CN 102298791B
Authority
CN
China
Prior art keywords
color
gradient
grid
texture
synthesis 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
CN 201110289079
Other languages
Chinese (zh)
Other versions
CN102298791A (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.)
Tsinghua University
Original Assignee
Tsinghua 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 Tsinghua University filed Critical Tsinghua University
Priority to CN 201110289079 priority Critical patent/CN102298791B/en
Publication of CN102298791A publication Critical patent/CN102298791A/en
Application granted granted Critical
Publication of CN102298791B publication Critical patent/CN102298791B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a gradient volumetric texture synthesis method, which relates to the technical field of texture synthesis. The method comprises the following steps of: S1: building a three-dimensional space uniform grid structure, setting color and color gradient for a vertex point of the grid according to a 2D (Two-Dimensional) texture image input in advance; S2: selecting at least one sampling point from each lattice of the grid, selecting at least two sampling planes at each sampling point, obtaining the color of any point on the sampling planes by executing interpolation for three times on the color and the color gradient of the vertex point of the lattice where the sampling point is; S3: finding out a texture block nearest to the sampling planes from the 2D texture image, and copying the pixels of the texture block into corresponding lattices; S4: updating the color and the color gradient of the vertex point of the grid according to the pixels in each lattice of the grid; S5: repeating the processes of the steps from S2 to S4 for many times to synthesize the gradient volumetric texture. Synthesizing the texture by the method provided by the invention, the gradient volumetric texture can be quickly synthesized, and data quantity and storage cost of the volumetric texture are both reduced.

Description

Gradient volumetric texture synthesis method
Technical field
The present invention relates to the ﹠ Future Opportunities of Texture Synthesis field, particularly a kind of gradient volumetric texture synthesis method.
Background technology
In the synthetic field of body texture, an individual texture represents with 3-D view usually, and its base unit is pixel.The advantage of this expression is simple, is the simple popularization of two dimensional image.But the shortcoming of this method is that data volume is large, for example 1024 3The body texture be equivalent to 1024 1024 2Picture, it is synthetic and process very difficult.
In recent years, the body texture obtains a wide range of applications.With respect to the face texture, the body texture can represent the inside of object, and for some application that object model need to be cut (for example game), the body texture is requisite often.But said as the front, the synthetic and storage overhead of body texture is very large, to such an extent as to everybody often only uses 128 3Texture block, it repeated to pile up obtain complicated effect.The shortcoming of this method is that the data volume of texture is large, multiplicity is very high, can observe the template of repetition in a lot of examples, makes visual effect have a greatly reduced quality, thereby synthetic difficulty, and storage overhead is large.
Summary of the invention
The technical matters that (one) will solve
The technical problem to be solved in the present invention is: how to reduce the data volume of body texture, thereby reduce storage overhead, it is synthetic easier to make.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of gradient volumetric texture synthesis method, comprise the following steps:
S1: set up three dimensions uniform grid structure, the summit that is described grid according to the 2D texture maps of prior input arranges color and color gradient;
S2: select at least one sampled point in each grid of described grid, select at least two sample plane in each sample point, on sample plane, the color of any point is drawn by cubic interpolation by color and the color gradient on the summit of described sampled point place grid;
S3: find the texture block the most close with described sample plane in described 2D texture maps, and the pixel of described texture block is copied in corresponding grid, the color of the pixel of two texture block correspondence positions is subtracted each other, calculate afterwards L1 or L2 norm, less two texture block of norm value are more approaching;
S4: the color and the color gradient that upgrade grid vertex according to the pixel in each grid of described grid;
S5: repeat the process several times of S2 ~ S4, with composition gradient body texture.
Wherein, in described step S1, color of random selection is as the color on the summit of this grid from the 2D texture maps of described input.
Wherein, in described step S1, color gradient is set to random number between 0 ~ 1.
Wherein, also comprise the step of input vector field before selecting described sample plane, the direction of described sample plane is consistent with the direction of described vector field.
Wherein, the mode of upgrading in described step S4 is: the pixel in each grid is carried out linear fit according to its position at the place, summit of grid, obtain color value and the color gradient at this place, summit.
Wherein, before linear fit, the pixel in grid is carried out cluster, the pixel of selecting during match to comprise in the maximum class of pixel carries out match.
Wherein, also comprise the step of storing described body texture after step S5, color value and color gradient value to described grid vertex place during storage quantize, and only store color and the color gradient on the summit of described gradient body texture.
Wherein, the corresponding d of each grid of described grid 3Pixel, d is the integer greater than 1.
Wherein, described d equals 4.
Wherein, the method further comprises the step of utilizing described gradient body texture to play up:
A1: the point in three-dimensional model to be rendered is corresponded in the grid of described gradient body texture;
A2: according to color value and the color gradient that the summit of described grid is located, obtain the color of each point in three-dimensional model by cubic interpolation.
(3) beneficial effect
Method of the present invention is by setting up three-dimensional uniform grid, select the sampled point of the total pixel number of grid to calculate the color on grid summit and color gradient with the compound body texture in each grid of grid, due to sampled point number corresponding pixel number and only store color and the color gradient on summit in the grid, therefore composition gradient body texture rapidly, and reduced data volume and the storage overhead of body texture.
Description of drawings
Fig. 1 is a kind of gradient volumetric texture synthesis method process flow diagram of the embodiment of the present invention;
Fig. 2 is the result schematic diagram that adopts the gradient body texture that in Fig. 1, method is synthesized.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for explanation the present invention, but are not used for limiting the scope of the invention.
As shown in Figure 1, gradient volumetric texture synthesis method of the present invention comprises:
Step S101 sets up three dimensions uniform grid structure, and the summit that is grid according to the 2D texture maps of prior input arranges color and color gradient, and painted to the point in grid.The corresponding d of each grid of uniform grid 3Pixel, d is the integer greater than 1, preferred d=4.After setting up network, need to be to one, the summit initial value of grid.In the present embodiment, for each grid vertex, color of random selection as the color on the summit of this grid, may go out to serve strange color because gradient is excessive, so the color gradient on the summit of this grid is set to a random number between 0~1 from the 2D texture maps of input.
Step S102 selects at least 3 sampled points at random in each grid of the grid of above-mentioned foundation, selects at least 2 sample plane in each sample point.Wherein, the size of sample plane is generally 11 * 11 block of pixels.For the three-D grain that synthesizes can be consistent with former 2D texture maps on 2~3 tangent planes, effect is better, preferably, the prior input vector of user field, the normal direction of sample plane is consistent with this vector field.On sample plane, the color at each some place provides by cubic interpolation according to color value and the color gradient on grid summit, sampled point place, and the summit of a grid is 8, specifically adopts three-dimensional Hermite interpolation.The position of sampled point is sparse, is randomly dispersed in uniform grid, far fewer than the number of grid institute corresponding pixel points, has therefore accelerated aggregate velocity.
Step S 103, find the texture block the most close with sample plane in former 2D texture maps, and the pixel of this texture block is copied in corresponding grid.The color of the pixel of two texture block correspondence positions is subtracted each other, then calculate L1 or L2 norm, less two texture block of norm value are more approaching.
Step S 104, upgrade color and the color gradient of grid vertex according to the pixel in each grid of grid.Renewal process is as follows:
Pixel in each grid is carried out linear fit according to its position at the place, summit of grid, obtain color value and the color gradient at this place, summit, and color value and the color gradient at place, storage summit.If near the pixel lattice point is a lot, in order to prevent over-fitting, need to these pixels carry out cluster (as: mean shift clustering method or simply by color with pixel be put into n the bucket in, then maximum that of capture vegetarian refreshments bucket), select a maximum class to carry out match, and abandon other pixel, by this method, can prevent that color is too average.After the color and gradient that obtain the place, summit, these pixels just can abandon, to save the memory headroom in building-up process.
Repeating step is carried out S102 ~ S104 several times, and in general, number of times repeats more, and the effect of the gradient body texture of acquisition is better, but speed also can be slowly.Preferably, need to repeat 2 ~ 3 times and get final product, obtaining good effect, and speed can be not slow yet.When storage gradient body texture, color and the color gradient at place, save mesh summit, and color and color gradient value to the grid vertex place quantize, for example: color gamut is between 0 ~ 1, just express with the number of 0 ~ 255, j represents i/255.0, and 0≤i≤255 expressions are to reduce taking of video memory.
Fig. 2 is the result schematic diagram that adopts the gradient body texture that in Fig. 1, method is synthesized, and the left side is the texture maps of input, and the right is the gradient body texture of output.
The present invention also provides the method that above-mentioned gradient body texture is played up of using.After obtaining gradient body texture, can use it for and play up.For example to play up a three-dimensional model, point in three-dimensional model to be rendered is corresponded in the grid of gradient body texture, specifically this three-dimensional model is put into three dimensions corresponding to gradient body texture, the point in three-dimensional model will be distributed in each grid of gradient body texture so.According to color value and the color gradient that the summit of described grid is located, obtain the color of each point in three-dimensional model by three-dimensional Hermite interpolation.
Above embodiment only is used for explanation the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (10)

1. a gradient volumetric texture synthesis method, is characterized in that, comprises the following steps:
S1: set up three dimensions uniform grid structure, the summit that is described grid according to the 2D texture maps of prior input arranges color and color gradient;
S2: select at least one sampled point in each grid of described grid, select at least two sample plane in each sample point, on sample plane, the color of any point is drawn by cubic interpolation by color and the color gradient on the summit of described sampled point place grid;
S3: find the texture block the most close with described sample plane in described 2D texture maps, and the pixel of described texture block is copied in corresponding grid, the color of the pixel of two texture block correspondence positions is subtracted each other, calculate afterwards L1 or L2 norm, less two texture block of norm value are more approaching;
S4: the color and the color gradient that upgrade grid vertex according to the pixel in each grid of described grid;
S5: repeat the process several times of S2 ~ S4, with composition gradient body texture.
2. gradient volumetric texture synthesis method as claimed in claim 1, is characterized in that, in described step S1, color of random selection is as the color on the summit of this grid from the 2D texture maps of described input.
3. gradient volumetric texture synthesis method as claimed in claim 1, is characterized in that, in described step S1, color gradient is set to the random number between 0 ~ 1.
4. gradient volumetric texture synthesis method as claimed in claim 1, is characterized in that, also comprises the step of input vector field before selecting described sample plane, and the direction of described sample plane is consistent with the direction of described vector field.
5. gradient volumetric texture synthesis method as claimed in claim 1, it is characterized in that, the mode of upgrading in described step S4 is: the pixel in each grid is carried out linear fit according to its position at the place, summit of grid, obtain color value and the color gradient at this place, summit.
6. gradient volumetric texture synthesis method as claimed in claim 5, is characterized in that, before linear fit, the pixel in grid carried out cluster, and the pixel of selecting during match to comprise in the maximum class of pixel carries out match.
7. gradient volumetric texture synthesis method as claimed in claim 1, it is characterized in that, also comprise the step of storing described body texture after step S5, color value and color gradient value to described grid vertex place during storage quantize, and only store color and the color gradient on the summit of described gradient body texture.
8. gradient volumetric texture synthesis method as claimed in claim 7, is characterized in that, the corresponding d of each grid of described grid 3Pixel, d is the integer greater than 1.
9. gradient volumetric texture synthesis method as claimed in claim 8, is characterized in that, described d equals 4.
10. gradient volumetric texture synthesis method as described in any one in claim 1~9, is characterized in that, the method further comprises the step of utilizing described gradient body texture to play up:
A1: the point in three-dimensional model to be rendered is corresponded in the grid of described gradient body texture;
A2: according to color value and the color gradient that the summit of described grid is located, obtain the color of each point in three-dimensional model by cubic interpolation.
CN 201110289079 2011-09-26 2011-09-26 Gradient volumetric texture synthesis method Active CN102298791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110289079 CN102298791B (en) 2011-09-26 2011-09-26 Gradient volumetric texture synthesis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110289079 CN102298791B (en) 2011-09-26 2011-09-26 Gradient volumetric texture synthesis method

Publications (2)

Publication Number Publication Date
CN102298791A CN102298791A (en) 2011-12-28
CN102298791B true CN102298791B (en) 2013-05-08

Family

ID=45359184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110289079 Active CN102298791B (en) 2011-09-26 2011-09-26 Gradient volumetric texture synthesis method

Country Status (1)

Country Link
CN (1) CN102298791B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103839271B (en) * 2014-03-25 2016-08-17 天津理工大学 A kind of image texture synthetic method based on optimal coupling
CN103955925B (en) * 2014-04-22 2017-03-29 湖南大学 The improvement probability Hough transformation curve detection method of minimum sampling is fixed based on piecemeal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441775A (en) * 2008-12-09 2009-05-27 中国科学院软件研究所 Texture synthesis method based on matching compatibility
CN101655992A (en) * 2009-09-15 2010-02-24 中国科学院软件研究所 Reconstruction method of triangular mesh model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7800627B2 (en) * 2007-06-08 2010-09-21 Microsoft Corporation Mesh quilting for geometric texture synthesis

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441775A (en) * 2008-12-09 2009-05-27 中国科学院软件研究所 Texture synthesis method based on matching compatibility
CN101655992A (en) * 2009-09-15 2010-02-24 中国科学院软件研究所 Reconstruction method of triangular mesh model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Nico Pietroni等.Solid-Texture Synthesis:A Survey.《Computer Graphics and Applications》.2010,第30卷(第4期),74-89. *
严志程等.基于二维纹理样本的方向场引导的体纹理合成.《计算机辅助设计与图形学学报》.2008,第20卷(第9期),1104-1109. *

Also Published As

Publication number Publication date
CN102298791A (en) 2011-12-28

Similar Documents

Publication Publication Date Title
CN101950365B (en) Multi-task super-resolution image reconstruction method based on KSVD dictionary learning
CN106683189B (en) A method of the rendering type in three-dimensional scenic
CN1741066A (en) Subdividing geometry images in graphics hardware
CN104463954B (en) A kind of analogy method and system of 3-D view surface details
CN103679627A (en) Tile based computer graphics
CN106204735A (en) Unity3D terrain data using method in Direct3D 11 environment
CN112862942B (en) Physical special effect simulation method, device, electronic equipment and storage medium
CN102117491B (en) Texture data drawing method and device in three-dimensional modeling
KR20130079819A (en) Method for editing terrain data created by procedural terrain method
CN103077552A (en) Three-dimensional displaying method based on multi-view video
Kang et al. Terrain rendering with unlimited detail and resolution
Wald et al. Ray tracing structured AMR data using ExaBricks
CN102298791B (en) Gradient volumetric texture synthesis method
Battiato et al. A Survey of Digital Mosaic Techniques.
CN114373058A (en) Sea surface mesh dynamic division and height field generation method based on illusion engine
CN104463937A (en) Animation generation method and device based on irregular object
CN103646428B (en) The synthetic method of a kind of 3D fluid scene
CN103208130B (en) Large-scale group performance animation synthetic method and equipment
CN101795410A (en) Texture compression and synthesis method with fine granularity and high compression rate
CN108921920B (en) Method for manufacturing three-dimensional animation of hydroelectric engineering
CN111028349A (en) Hierarchical construction method suitable for rapid visualization of massive three-dimensional live-action data
Wang et al. An improving algorithm for generating real sense terrain and parameter analysis based on fractal
CN101937576B (en) Dynamic texture waterfall modeling method combined with multiple physical attributes
CN108604394A (en) Method and apparatus for calculating 3D density maps associated with 3D scenes
CN115035231A (en) Shadow baking method, shadow baking device, electronic apparatus, and storage medium

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