CN108961373A - A kind of method and terminal of fur rendering - Google Patents
A kind of method and terminal of fur rendering Download PDFInfo
- Publication number
- CN108961373A CN108961373A CN201810500761.1A CN201810500761A CN108961373A CN 108961373 A CN108961373 A CN 108961373A CN 201810500761 A CN201810500761 A CN 201810500761A CN 108961373 A CN108961373 A CN 108961373A
- Authority
- CN
- China
- Prior art keywords
- hair
- thickness
- information
- refraction
- normal information
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
The method and terminal of a kind of fur rendering provided by the invention, by the way that the thickness information of hair is stored as thickness textures, the normal information of hair is stored as subnormal figure, and by the normal information of the depended on object of hair copy in the subnormal figure, therefore, modeling teacher can show the thickness change and variations in detail of hair on a piece of hair dough sheet, face need not be taken in three dimensions or draws line transect, and for modeling teacher, it is much more simpler than taking face or picture line transect in three dimensions to make two-dimensional thickness textures, to simplify the production process of model, shorten fabrication cycle, improve rendering efficiency, and hair luster is adjusted by thickness textures, so that hair luster variation is more abundant, hair shade is calculated using subnormal figure, it can avoid hair circumstances mask to lose shape.
Description
Technical field
The present invention relates to the Real-time Rendering Technology in computer graphic image field, in particular to a kind of method of fur rendering
And terminal.
Background technique
Real-time sense of reality fur rendering is always the difficult point in computer graphics, now the real-time sense of reality hair of mainstream
Rendering is based primarily upon two kinds of algorithms of Kajiya-Kay algorithm and Marschner algorithm, but both has apparent defect.
Although Kajiya-Kay algorithm can correctly show hair Specular Highlight, and algorithm expense is small, for the three of hair
Tie up the small advantage of modeling demand, but the algorithm is not based on true physical model, but a kind of empirical algorithms, therefore in spy
Determine under illumination condition, which can not simulate hair luster performance well, and the algorithm can not simulate hair in backlight
The refraction optical phenomenon formed under environment, sense of reality performance have certain limitation.Therefore the algorithm is widely used in hair
Realistic Rendering is sent out to require in less high game.
Marschner algorithm is the Rendering algorithms shone based on physical light, therefore the fine simulation hair of energy is in different illumination
Under the conditions of three main optical paths variation, they are R reflected light path, TT refraction-refractive light paths, TRT refraction-reflected light path respectively.
The algorithm rendering effect is outstanding, but there are expenses big, disadvantage demanding for the three-dimensional modeling of hair.The algorithm is only applied to
In the game high to rendering requirements.
In addition, rendering hair using Marschner algorithm, it is desirable that the hair of hair threedimensional model height reduction reality, because
This generally requires the modeling of modeling Shi Caiyong line transect or hair piece takes face modeling pattern to construct hair.
Line transect modeling creates hair dough sheet using line transect, and a line transect represents a hair or a branch of hair, builds
Mould teacher designs line transect and walks to change into the tri patch that GPU can be rendered again backward, in order to obtain smooth hair, it usually needs right
Line transect changes into triangular facet again after being finely divided, this modeling pattern usually will cause the dough sheet data volume of magnanimity, is not suitable for real
When render.It is suitble to rendering requirement of real time low, but the scene that required precision is high (such as Disney animation is all made of this modeling pattern).
It takes face modeling pattern and cluster hair is represented using three-dimensional dough sheet, model teacher and move towards by adjusting dough sheet shape to hair
Moulding is carried out, in order to enrich the level of hair, modeling teacher generally requires laying hair dough sheet in layer, although reducing hair
Fermentation the piece number, but modeling its location information of teacher's manual modification, rotation information and scalability information are required per a piece of hair dough sheet.And
And the denser place of hair needs the dough sheet that spreads also more, therefore this modeling pattern is also fairly time consuming laborious.
Summary of the invention
The technical problems to be solved by the present invention are: providing, a kind of fur rendering is high-efficient and gloss fur rendering abundant
Method and terminal.
In order to solve the above-mentioned technical problem, a kind of technical solution that the present invention uses are as follows:
A kind of method of fur rendering, comprising steps of
S1, creation hair model, and the thickness information that the hair model pre-rendered obtains is stored as thickness textures;
S2, the normal information for the hair that the hair model pre-rendered obtains is stored as to subnormal figure, then by hair institute
The normal information for depending on object copies in the subnormal figure;
S3, in real-time rendering, read in the thickness information and the subnormal figure in the thickness textures normal letter
Breath, the normal information depends on the normal information of object by the normal information and hair of hair, according to the thickness information with
Normal information carries out fur rendering to the hair model.
In order to solve the above-mentioned technical problem, the another technical solution that the present invention uses are as follows:
A kind of terminal of fur rendering, including memory, processor and storage can transport on a memory and on a processor
Capable computer program, the processor perform the steps of when executing described program
S1, creation hair model, and the thickness information that the hair model pre-rendered obtains is stored as thickness textures;
S2, the normal information for the hair that the hair model pre-rendered obtains is stored as to subnormal figure, then by hair institute
The normal information for depending on object copies in the subnormal figure;
S3, in real-time rendering, read in the thickness information and the subnormal figure in the thickness textures normal letter
Breath, the normal information depends on the normal information of object by the normal information and hair of hair, according to the thickness information with
Normal information carries out fur rendering to the hair model.
The beneficial effects of the present invention are: by the way that the thickness information of hair is stored as thickness textures, by the normal of hair
Information is stored as subnormal figure, and by the normal information of the depended on object of hair copy in the subnormal figure, therefore,
Modeling teacher can show the thickness change and variations in detail of hair on a piece of hair dough sheet, it is not necessary to take face in three dimensions
Or draw line transect, and for modeling teacher for, make two-dimensional thickness textures much than take in three dimensions face or
It is simpler to draw line transect, to simplify the production process of model, shortens fabrication cycle, improves rendering efficiency, and
Hair luster is adjusted by thickness textures, so that hair luster variation is more abundant, hair shade is calculated using subnormal figure, it can
Hair circumstances mask is avoided to lose shape.
Detailed description of the invention
Fig. 1 is the method flow diagram of the fur rendering of the embodiment of the present invention;
Fig. 2 is the structural schematic diagram of the terminal of the fur rendering of the embodiment of the present invention;
Label declaration:
1, the terminal of fur rendering;2, memory;3, processor.
Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached
Figure is explained.
The most critical design of the present invention is: by by the normal information of thickness information, hair and the depended on object of hair
The normal information of body is integrated in existing Marschner algorithm, to improve rendering efficiency, adjusts hair by thickness textures
Shine pool, so that hair luster variation is more abundant, calculates hair shade by normal information, can avoid hair circumstances mask and walk
Sample.
Please refer to Fig. 1, a kind of method of fur rendering, comprising steps of
S1, creation hair model, and the thickness information that the hair model pre-rendered obtains is stored as thickness textures;
S2, the normal information for the hair that the hair model pre-rendered obtains is stored as to subnormal figure, then by hair institute
The normal information for depending on object copies in the subnormal figure;
S3, in real-time rendering, read in the thickness information and the subnormal figure in the thickness textures normal letter
Breath, the normal information depends on the normal information of object by the normal information and hair of hair, according to the thickness information with
Normal information carries out fur rendering to the hair model.
As can be seen from the above description, the beneficial effects of the present invention are: by the way that the thickness information of hair is stored as thickness patch
The normal information of hair is stored as subnormal figure by figure, and by the normal information of the depended on object of hair copy by described
In subnormal figure, therefore, modeling teacher can show the thickness change and variations in detail of hair on a piece of hair dough sheet, it is not necessary to
Face is taken in three dimensions or draws line transect, and for modeling teacher, makes two-dimensional thickness textures much than three
Face is taken in dimension space or picture line transect is simpler, to simplify the production process of model, is shortened fabrication cycle, is improved
Rendering efficiency, and hair luster is adjusted by thickness textures, so that hair luster variation is more abundant, using subnormal figure
Hair shade is calculated, hair circumstances mask is can avoid and loses shape.
Further, hair is carried out to the hair model according to the thickness information and normal information described in step S3
Hair rendering specifically:
S31, the gloss value that hair is calculated according to the thickness information in the thickness textures;
S32, the volume shade that hair is calculated according to the normal information in the subnormal figure;
S33, the final color that hair is calculated according to the gloss value and volume shade;
S34, fur rendering is carried out to the hair model according to the final color.
Seen from the above description, by the way that the thickness information in thickness textures to be calculated to the gloss value of hair, so that hair light
Pool variation more horn of plenty, and by the volume shade of the normal information calculating hair in subnormal figure, to solve hair circumstances
Mask loses shape problem, the final color of hair is calculated according to the gloss value and volume shade, according to the final color to institute
It states hair model and carries out fur rendering, thickness information and normal information are integrated to existing Marschner algorithm to realize
In, improve rendering efficiency.
Further, the gloss value S calculation formula is as follows:
Wherein p={ R, TT, TRT }, R are reflected light path, and TT is refraction-refractive light paths, TRT
For refraction-reflected light path, MρFor gauss of distribution function, F is hair Fresnel Functions, and F (v, n2)=F0+(1-F0)(1-v-n2
)5, v is observation vector, n2For the normal information of hair, F0For constant, TρFor bloom decay formula, andρpFor the refraction number of optical path, ξ (C) is hair color changing value,γDrift angle is shaken for optical path,
θdFor the angle of emergence after hair reflects or reflects, wherein NpValue beOrOr
K is thickness information, φhFor light scattering angle, σRFor the gloss width of hair reflected light path, θdFor by hair reflection or
The angle of emergence after refraction, σTTFor hair refraction-refractive light paths gloss width, l (φh;π,s(θd)σTT) it is refraction-refraction light
The Logistic curvilinear function on road, s (θd) it is refraction-refractive light paths gloss value, βTRTFor making by oneself for refraction reflected refraction optical path
Adopted parameter, for controlling refraction reflected refraction optical path intensity,For refraction reflection
Refractive light paths gloss intensity, bdFor decaying weight, d is optical path distance.
Seen from the above description, by the way that thickness information is stored as two-dimensional thickness textures, and pass through in thickness textures two
The data texturing of dimension substitutes the three-dimensional vertex data in existing vertex rendering, to reduce rendering expense.
Further, the calculation formula of the volume shade V is as follows:
V=(1-k) n2·l+k·n1L, wherein n2For the normal information of hair, n1The method of object is depended on by hair
Line information, l are light source direction vector, and k is thickness information.
Seen from the above description, by the way that the normal information of hair is calculated volume shade, to solve hair circumstances screening
Cover problem of losing shape.
Further, the calculation formula of the final color FinalColor is as follows:
FinalColor=k ξ (C) Vshadow+ (1-k) S, wherein ξ (C) is hair color changing value,
Shadow is preset value, and k is thickness information, and V is the volume shade of hair, and S is the gloss value of hair.
Seen from the above description, by the gloss value of the volume shade of hair and hair be combined calculating to final face
Thickness information and normal information are integrated in existing Marschner algorithm by color to realize, improve rendering efficiency, are reduced
Rendering expense.
Referring to figure 2., a kind of terminal of fur rendering, including memory, processor and storage are on a memory and can be
The computer program run on processor, the processor perform the steps of when executing described program
S1, creation hair model, and the thickness information that the hair model pre-rendered obtains is stored as thickness textures;
S2, the normal information for the hair that the hair model pre-rendered obtains is stored as to subnormal figure, then by hair institute
The normal information for depending on object copies in the subnormal figure;
S3, in real-time rendering, read in the thickness information and the subnormal figure in the thickness textures normal letter
Breath, the normal information depends on the normal information of object by the normal information and hair of hair, according to the thickness information with
Normal information carries out fur rendering to the hair model.
As can be seen from the above description, the beneficial effects of the present invention are: by the way that the thickness information of hair is stored as thickness patch
The normal information of hair is stored as subnormal figure by figure, and by the normal information of the depended on object of hair copy by described
In subnormal figure, therefore, modeling teacher can show the thickness change and variations in detail of hair on a piece of hair dough sheet, it is not necessary to
Face is taken in three dimensions or draws line transect, and for modeling teacher, makes two-dimensional thickness textures much than three
Face is taken in dimension space or picture line transect is simpler, to simplify the production process of model, is shortened fabrication cycle, is improved
Rendering efficiency, and hair luster is adjusted by thickness textures, so that hair luster variation is more abundant, using subnormal figure
Hair shade is calculated, hair circumstances mask is can avoid and loses shape.
Further, hair is carried out to the hair model according to the thickness information and normal information described in step S3
Hair rendering specifically:
S31, the gloss value that hair is calculated according to the thickness information in the thickness textures;
S32, the volume shade that hair is calculated according to the normal information in the subnormal figure;
S33, the final color that hair is calculated according to the gloss value and volume shade;
S34, fur rendering is carried out to the hair model according to the final color.
Seen from the above description, by the way that the thickness information in thickness textures to be calculated to the gloss value of hair, so that hair light
Pool variation more horn of plenty, and by the volume shade of the normal information calculating hair in subnormal figure, to solve hair circumstances
Mask loses shape problem, the final color of hair is calculated according to the gloss value and volume shade, according to the final color to institute
It states hair model and carries out fur rendering, thickness information and normal information are integrated to existing Marschner algorithm to realize
In, improve rendering efficiency.
Further, the gloss value S calculation formula is as follows:
Wherein p={ R, TT, TRT }, R are reflected light path, and TT is refraction-refractive light paths, TRT
For refraction-reflected light path, MρFor gauss of distribution function, F is hair Fresnel Functions, and F (v, n2)=F0+(1-F0)(1-v-n2
)5, v is observation vector, n2For the normal information of hair, F0For constant, TρFor bloom decay formula, andρpFor the refraction number of optical path, ξ (C) is hair color changing value,γDrift angle is shaken for optical path,
θdFor the angle of emergence after hair reflects or reflects, wherein NpValue be
OrOr
K is thickness information, φhFor light scattering angle, σRFor the gloss width of hair reflected light path, θdFor by hair reflection or
The angle of emergence after refraction, σTTFor hair refraction-refractive light paths gloss width, l (φh;π,s(θd)σTT) it is refraction-refraction light
The Logistic curvilinear function on road, s (θd) it is refraction-refractive light paths gloss value, βTRTFor making by oneself for refraction reflected refraction optical path
Adopted parameter, for controlling refraction reflected refraction optical path intensity,For refraction reflection
Refractive light paths gloss intensity, bdFor decaying weight, d is optical path distance.
Seen from the above description, by the way that thickness information is stored as two-dimensional thickness textures, and pass through in thickness textures two
The data texturing of dimension substitutes the three-dimensional vertex data in existing vertex rendering, to reduce rendering expense.
Further, the calculation formula of the volume shade V is as follows:
V=(1-k) n2·l+k·n1L, wherein n2For the normal information of hair, n1The method of object is depended on by hair
Line information, l are light source direction vector, and k is thickness information.
Seen from the above description, by the way that the normal information of hair is calculated volume shade, to solve hair circumstances screening
Cover problem of losing shape.
Further, the calculation formula of the final color FinalColor is as follows:
FinalColor=k ξ (C) Vshadow+ (1-k) S, wherein ξ (C) is hair color changing value,
Shadow is preset value, and k is thickness information, and V is the volume shade of hair, and S is the gloss value of hair.
Seen from the above description, by the gloss value of the volume shade of hair and hair be combined calculating to final face
Thickness information and normal information are integrated in existing Marschner algorithm by color to realize, improve rendering efficiency, are reduced
Rendering expense.
Embodiment one
Please refer to Fig. 1, a kind of method of fur rendering, comprising steps of
S1, creation hair model, and the thickness information that the hair model pre-rendered obtains is stored as thickness textures;
S2, the normal information for the hair that the hair model pre-rendered obtains is stored as to subnormal figure, then by hair institute
The normal information for depending on object copies in the subnormal figure;
S3, in real-time rendering, read in the thickness information and the subnormal figure in the thickness textures normal letter
Breath, the normal information depends on the normal information of object by the normal information and hair of hair, according to the thickness information with
Normal information carries out fur rendering to the hair model;
Fur rendering tool is carried out to the hair model according to the thickness information and normal information described in step S3
Body are as follows:
S31, the gloss value that hair is calculated according to the thickness information in the thickness textures;
The gloss value S calculation formula is as follows:
Wherein p={ R, TT, TRT }, R are reflected light path, and TT is refraction-refractive light paths, TRT
For refraction-reflected light path, MρFor gauss of distribution function, F is hair Fresnel Functions, and F (v, n2)=F0+(1-F0)(1-v-n2
)5, v is observation vector, n2For the normal information of hair, F0For constant, TρFor bloom decay formula, andρpFor the refraction number of optical path, ξ (C) is hair color changing value,γDrift angle is shaken for optical path,
θdFor the angle of emergence after hair reflects or reflects, wherein NpValue be
OrOr
K is thickness information, φhFor light scattering angle, σRFor the gloss width of hair reflected light path, θdFor by hair reflection or
The angle of emergence after refraction, σTTFor hair refraction-refractive light paths gloss width, l (φh;π,s(θd)σTT) it is refraction-refraction light
The Logistic curvilinear function on road, s (θd) it is refraction-refractive light paths gloss value, βTRTFor making by oneself for refraction reflected refraction optical path
Adopted parameter, for controlling refraction reflected refraction optical path intensity,For refraction reflection
Refractive light paths gloss intensity, bdFor decaying weight, d is optical path distance;
S32, the volume shade that hair is calculated according to the normal information in the subnormal figure;
The calculation formula of the volume shade V is as follows:
V=(1-k) n2·l+k·n1L, wherein n2For the normal information of hair, n1The method of object is depended on by hair
Line information, l are light source direction vector, and k is thickness information;
S33, the final color that hair is calculated according to the gloss value and volume shade;
The calculation formula of the final color FinalColor is as follows:
FinalColor=k ξ (C) Vshadow+ (1-k) S, wherein ξ (C) is that shadow is preset value, and k is
Thickness information, V are the volume shade of hair, and S is the gloss value of hair;
S34, fur rendering is carried out to the hair model according to the final color.
Embodiment two
The present embodiment will be in conjunction with specific application scenarios, and further how a kind of above-mentioned method of fur rendering of the present invention is
It realizes:
1, hair model is created, and the thickness information that the hair model pre-rendered obtains is stored as thickness textures;
Due to the hair of different-thickness, gloss value it is different, and thickness information is introduced existing
In Marschner algorithm, and by way of pre-rendered, the thickness information for rendering hair is stored as the pixel on thickness textures
Information, thus it is convenient in real-time rendering, the Pixel Information on thickness textures is read to change the gloss variation of hair;
2, hair model normal map is rendered, specifically deposits the normal information for the hair that the hair model pre-rendered obtains
Storage is subnormal figure, then the normal information of the depended on object of hair is copied in the subnormal figure;
Since hair model is not standard topology model, there is certain particularity from shade, can substantially be divided into
" main body from shade " and " details from shade ", the geometry of " main body from shade " main performance depended on object of hair, " details
From shade " raw wool hair normal information is stored as " secondary by the geometry that mainly shows microcosmic hair when rendering hair shade
In normal map ", then the normal information of the depended on object of hair copied on hair solid normal;
When rendering shadow, the vertex data stream format that setting CPU is transferred to GPU is location information, normal information, texture
Coordinate information and vertex tangent information, wherein normal information includes the normal information of the depended on object of hair, is deposited in variable n1
In and hair normal information, be deposited in variable n2In, then hair in the texture coordinate information reading thickness textures on root vertex
Thickness value, be deposited in variable k;
By real-life experience it is found that thicker hair more has whole uniformity, i.e., more embody the geometry letter of accole
Breath, therefore design formula V=(1-k) n2·l+k·n1L, wherein V is volume shade, and l is light source direction vector, works as thickness
Value is bigger, i.e. k value is bigger, n1Shade is formed by with global illumination vector l to be more obvious, on the contrary n2With global illumination vector l institute shape
At shade be more obvious;
3, in real-time rendering, the normal letter in the thickness information and the subnormal figure in the thickness textures is read
Breath, the normal information depends on the normal information of object by the normal information and hair of hair, according to the thickness information with
Normal information carries out fur rendering to the hair model;
Described carries out fur rendering to the hair model according to the thickness information and normal information specifically:
S31, the gloss value that hair is calculated according to the thickness information in the thickness textures;
The gloss value S calculation formula is as follows:
Wherein p={ R, TT, TRT }, R are reflected light path, and TT is refraction-refractive light paths, and TRT is refraction-reflected light path, pDWhen
When D uses Skew Logistic curvilinear function, use
When D uses monomial functional simulation, using formulaWherein σlAnd σrLeft margin respectively
Width and right margin width, value arrive ∞, μ, σ for 0lAnd σrFor formal parameter, φhFor light scattering angle, s is empirical parameter,
For adjusting the gloss value of hair, value is 0 to 1;
MρFor gauss of distribution function, for simulating the luminous flux of hair longitudinal direction bloom, and Mρ(θ|ωr, β) and=l (θh;αρ,
λρ),And l (θh;αρ,λρ) it is l (θ;μ, σ) in parameter θ=θh, μ=αρ, σ=λρ,
Middle θ is longitudinal incidence angle, and μ, σ are formal parameter, ωrFor hair bloom vertical misalignment amount, β is hair bloom longitudinal direction wide cut value;
F is hair Fresnel Functions, and F (v, n2)=F0+(1-F0)(1-v-n2)5, v is observation vector, n2For hair
Normal information, i.e. normal line vector, F0It is empirical value for constant, it is anti-come represented object Fresnel by modifying the size of the parameter
The power penetrated;
TρFor bloom decay formula, andρpFor the refraction number of optical path, value range is
{ 0, -1, -2 }, wherein 0 indicates that refraction number is 0 time, -1 indicates that refraction number is 1 time, and -2 indicate that refraction number is 2 times, and ρR
=0, ρTT=-1, ρTRT=-2, θ is longitudinal incidence angle, and ξ (C) is hair color changing value,γDrift angle, θ are shaken for optical pathdFor warp
The angle of emergence after hair is reflected or reflected is crossed, wherein NpValue beOrOr
K is thickness information, φhFor light scattering angle, σRFor the gloss width of hair reflected light path, θdFor by hair reflection or
The angle of emergence after refraction, σTTFor hair refraction-refractive light paths gloss width, l (φh;π,s(θd)σTT) it is s (θd) it is NTTLight
Flux APPROXIMATE DISTRIBUTION function, especially by formulaIt calculates
It arrives, wherein η is refractive index constant, and a is oval eccentricity, θdFor the angle of emergence after hair reflects or reflects, βTRTFor folding
The custom parameter of reflected refraction optical path is penetrated, can be defined according to actual needs by user, for controlling refraction reflected refraction
Optical path intensity,To reflect reflected refraction optical path gloss intensity, bdFor decaying power
Weight, d is optical path distance;
It is approximately bottom surface for elliptical cylindrical body by hair, a is oval eccentricity, then the variations in refractive index of hair can use public affairs
Formula η*(φh) indicate0.85 < a < 1/0.85 η=1.55, φhThe light of expression
Line scattering angle;
S32, the volume shade that hair is calculated according to the normal information in the subnormal figure;
The calculation formula of the volume shade V is as follows:
V=(1-k) n2·l+k·n1L, wherein n2For the normal information of hair, n1The method of object is depended on by hair
Line information, l are light source direction vector, and k is thickness information;
S33, the final color that hair is calculated according to the gloss value and volume shade;
The calculation formula of the final color FinalColor is as follows:
FinalColor=k ξ (C) Vshadow+ (1-k) S, wherein ξ (C) is hair color changing value,
Shadow is preset value, and k is thickness information, and V is the volume shade of hair, and S is the gloss value of hair;
S34, fur rendering is carried out to the hair model according to the final color.
Embodiment three
Referring to figure 2., the terminal 1 of a kind of fur rendering, including memory 2, processor 3 and be stored on memory 2 simultaneously
The computer program that can be run on processor 3, the processor 3 realize each step in embodiment one when executing described program
Suddenly.
In conclusion the method and terminal of a kind of fur rendering provided by the invention, by the way that the thickness information of hair is deposited
Storage is thickness textures, and the normal information of hair is stored as subnormal figure, and by the normal information of the depended on object of the hair
Copy is in the subnormal figure, and therefore, modeling teacher can show the thickness change of hair and thin on a piece of hair dough sheet
Section variation, it is not necessary to take face in three dimensions or draw line transect, and for modeling teacher, make two-dimensional thickness textures
It is much more simpler than taking face or picture line transect in three dimensions, to simplify the production process of model, shorten system
Make the period, improves rendering efficiency, and adjust hair luster by thickness textures, so that hair luster variation is more abundant,
Hair shade is calculated using subnormal figure, hair circumstances mask is can avoid and loses shape, pass through the volume shade of hair and the light of hair
Damp value be combined calculating to final color, thus realization thickness information and normal information are integrated to it is existing
In Marschner algorithm, rendering efficiency is improved, rendering expense is reduced.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in relevant technical field, similarly include
In scope of patent protection of the invention.
Claims (10)
1. a kind of method of fur rendering, which is characterized in that comprising steps of
S1, creation hair model, and the thickness information that the hair model pre-rendered obtains is stored as thickness textures;
S2, the normal information for the hair that the hair model pre-rendered obtains is stored as subnormal figure, then hair is depended on
The normal information of object copies in the subnormal figure;
S3, in real-time rendering, read the normal information in the thickness information and the subnormal figure in the thickness textures, institute
The normal information that normal information is depended on object by the normal information and hair of hair is stated, is believed according to the thickness information and normal
Breath carries out fur rendering to the hair model.
2. the method for fur rendering according to claim 1, which is characterized in that according to the thickness described in step S3
Information and normal information carry out fur rendering to the hair model specifically:
S31, the gloss value that hair is calculated according to the thickness information in the thickness textures;
S32, the volume shade that hair is calculated according to the normal information in the subnormal figure;
S33, the final color that hair is calculated according to the gloss value and volume shade;
S34, fur rendering is carried out to the hair model according to the final color.
3. the method for fur rendering according to claim 2, which is characterized in that the gloss value S calculation formula is as follows:
Wherein p={ R, TT, TRT }, R are reflected light path, and TT is refraction-refractive light paths, and TRT is refraction-
Reflected light path, MρFor gauss of distribution function, F is hair Fresnel Functions, and F (v, n2)=F0+(1-F0)(1-v-n2)5, v is observation
Vector, n2For the normal information of hair, F0For constant, TρFor bloom decay formula, andρpFor optical path
Refraction number, ξ (C) be hair color changing value, γ be optical path shake drift angle, θdFor going out after hair reflects or reflects
Firing angle, wherein NpValue beOrOrK is thickness information, φhFor light angle of scattering
Degree, σRFor the gloss width of hair reflected light path, θdFor the angle of emergence after hair reflects or reflects, σTTFor hair folding
Penetrate-gloss the width of refractive light paths, l (φh;π,s(θd)σTT) it is refraction-refractive light paths Logistic curvilinear function, s (θd)
For refraction-refractive light paths gloss value, βTRTFor the custom parameter for reflecting reflected refraction optical path, folding is reflected for controlling refraction
Optical path intensity is penetrated,To reflect reflected refraction optical path gloss intensity, bdFor decaying
Weight, d are optical path distance.
4. the method for fur rendering according to claim 2, which is characterized in that the calculation formula of the volume shade V is such as
Under:
V=(1-k) n2·l+k·n1L, wherein n2For the normal information of hair, n1The normal letter of object is depended on by hair
Breath, l are light source direction vector, and k is thickness information.
5. the method for fur rendering according to claim 2, which is characterized in that the meter of the final color FinalColor
It is as follows to calculate formula:
FinalColor=k ξ (C) Vshadow+ (1-k) S, wherein ξ (C) is hair color changing value, and shadow is
Preset value, k are thickness information, and V is the volume shade of hair, and S is the gloss value of hair.
6. a kind of terminal of fur rendering, including memory, processor and storage can be run on a memory and on a processor
Computer program, which is characterized in that the processor performs the steps of when executing described program
S1, creation hair model, and the thickness information that the hair model pre-rendered obtains is stored as thickness textures;
S2, the normal information for the hair that the hair model pre-rendered obtains is stored as subnormal figure, then hair is depended on
The normal information of object copies in the subnormal figure;
S3, in real-time rendering, read the normal information in the thickness information and the subnormal figure in the thickness textures, institute
The normal information that normal information is depended on object by the normal information and hair of hair is stated, is believed according to the thickness information and normal
Breath carries out fur rendering to the hair model.
7. the terminal of fur rendering according to claim 6, which is characterized in that according to the thickness described in step S3
Information and normal information carry out fur rendering to the hair model specifically:
S31, the gloss value that hair is calculated according to the thickness information in the thickness textures;
S32, the volume shade that hair is calculated according to the normal information in the subnormal figure;
S33, the final color that hair is calculated according to the gloss value and volume shade;
S34, fur rendering is carried out to the hair model according to the final color.
8. the terminal of fur rendering according to claim 7, which is characterized in that the gloss value S calculation formula is as follows:
Wherein p={ R, TT, TRT }, R are reflected light path, and TT is refraction-refractive light paths, and TRT is refraction-
Reflected light path, MρFor gauss of distribution function, F is hair Fresnel Functions, and F (v, n2)=F0+(1-F0)(1-v-n2)5, v is observation
Vector, n2For the normal information of hair, F0For constant, TρFor bloom decay formula, andρpFor optical path
Refraction number, ξ (C) be hair color changing value, γ be optical path shake drift angle, θdFor going out after hair reflects or reflects
Firing angle, wherein NpValue beOr
OrK is thickness information, φhFor light scattering angle,
σRFor the gloss width of hair reflected light path, θdFor the angle of emergence after hair reflects or reflects, σTTFor hair refraction-folding
Penetrate the gloss width of optical path, l (φh;π,s(θd)σTT) it is refraction-refractive light paths Logistic curvilinear function, s (θd) it is folding
Penetrate-the gloss value of refractive light paths, βTRTFor the custom parameter for reflecting reflected refraction optical path, reflected refraction light is reflected for controlling
Road intensity,To reflect reflected refraction optical path gloss intensity, bdFor decaying weight,
D is optical path distance.
9. the terminal of fur rendering according to claim 7, which is characterized in that the calculation formula of the volume shade V is such as
Under:
V=(1-k) n2·l+k·n1L, wherein n2For the normal information of hair, n1The normal letter of object is depended on by hair
Breath, l are light source direction vector, and k is thickness information.
10. the terminal of fur rendering according to claim 7, which is characterized in that the final color FinalColor's
Calculation formula is as follows:
FinalColor=k ξ (C) Vshadow+ (1-k) S, wherein ξ (C) is hair color changing value, and shadow is
Preset value, k are thickness information, and V is the volume shade of hair, and S is the gloss value of hair.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810500761.1A CN108961373B (en) | 2018-05-23 | 2018-05-23 | Hair rendering method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810500761.1A CN108961373B (en) | 2018-05-23 | 2018-05-23 | Hair rendering method and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108961373A true CN108961373A (en) | 2018-12-07 |
CN108961373B CN108961373B (en) | 2022-06-07 |
Family
ID=64499502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810500761.1A Active CN108961373B (en) | 2018-05-23 | 2018-05-23 | Hair rendering method and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108961373B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109685876A (en) * | 2018-12-21 | 2019-04-26 | 北京达佳互联信息技术有限公司 | Fur rendering method, apparatus, electronic equipment and storage medium |
CN111462313A (en) * | 2020-04-02 | 2020-07-28 | 网易(杭州)网络有限公司 | Implementation method, device and terminal of fluff effect |
CN112381915A (en) * | 2020-10-27 | 2021-02-19 | 杭州电魂网络科技股份有限公司 | Physical principle-based ambient light reflection simulation method, device and storage medium |
CN112907715A (en) * | 2021-03-19 | 2021-06-04 | 网易(杭州)网络有限公司 | Hair model making method and device, storage medium and computer equipment |
CN113713387A (en) * | 2021-08-27 | 2021-11-30 | 网易(杭州)网络有限公司 | Virtual curling model rendering method, device, equipment and storage medium |
CN113763525A (en) * | 2020-06-01 | 2021-12-07 | 上海米哈游天命科技有限公司 | Hair highlight rendering method, device, equipment and storage medium |
CN113822981A (en) * | 2020-06-19 | 2021-12-21 | 北京达佳互联信息技术有限公司 | Image rendering method and device, electronic equipment and storage medium |
CN113888398A (en) * | 2021-10-21 | 2022-01-04 | 北京百度网讯科技有限公司 | Hair rendering method and device and electronic equipment |
CN115082611A (en) * | 2022-08-18 | 2022-09-20 | 腾讯科技(深圳)有限公司 | Illumination rendering method, apparatus, device and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090195545A1 (en) * | 2008-01-31 | 2009-08-06 | University Fo Southern California | Facial Performance Synthesis Using Deformation Driven Polynomial Displacement Maps |
CN102915559A (en) * | 2012-08-22 | 2013-02-06 | 北京航空航天大学 | Real-time transparent object GPU (graphic processing unit) parallel generating method based on three-dimensional point cloud |
CN106600712A (en) * | 2016-12-20 | 2017-04-26 | 南京大学 | Texture replacing method based on two dimension image |
CN106815883A (en) * | 2016-12-07 | 2017-06-09 | 珠海金山网络游戏科技有限公司 | The hair treating method and system of a kind of game role |
CN106952327A (en) * | 2017-02-10 | 2017-07-14 | 珠海金山网络游戏科技有限公司 | The system and method that a kind of virtual role simulates true Hair model |
US9905045B1 (en) * | 2014-03-27 | 2018-02-27 | Pixar | Statistical hair scattering model |
-
2018
- 2018-05-23 CN CN201810500761.1A patent/CN108961373B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090195545A1 (en) * | 2008-01-31 | 2009-08-06 | University Fo Southern California | Facial Performance Synthesis Using Deformation Driven Polynomial Displacement Maps |
CN102915559A (en) * | 2012-08-22 | 2013-02-06 | 北京航空航天大学 | Real-time transparent object GPU (graphic processing unit) parallel generating method based on three-dimensional point cloud |
US9905045B1 (en) * | 2014-03-27 | 2018-02-27 | Pixar | Statistical hair scattering model |
CN106815883A (en) * | 2016-12-07 | 2017-06-09 | 珠海金山网络游戏科技有限公司 | The hair treating method and system of a kind of game role |
CN106600712A (en) * | 2016-12-20 | 2017-04-26 | 南京大学 | Texture replacing method based on two dimension image |
CN106952327A (en) * | 2017-02-10 | 2017-07-14 | 珠海金山网络游戏科技有限公司 | The system and method that a kind of virtual role simulates true Hair model |
Non-Patent Citations (2)
Title |
---|
KHUNGURN等: "Azimuthal Scattering from Elliptical Hair Fibers", 《ACM TRANSACTIONS ON GRAPHICS》 * |
张钰粮等: "利用Vray渲染器模拟产品表面海量毛绒、镶嵌物及凹凸形态", 《电脑知识与技术》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109685876A (en) * | 2018-12-21 | 2019-04-26 | 北京达佳互联信息技术有限公司 | Fur rendering method, apparatus, electronic equipment and storage medium |
US11393154B2 (en) | 2018-12-21 | 2022-07-19 | Beijing Dajia Internet Information Technology Co., Ltd | Hair rendering method, device, electronic apparatus, and storage medium |
CN111462313A (en) * | 2020-04-02 | 2020-07-28 | 网易(杭州)网络有限公司 | Implementation method, device and terminal of fluff effect |
CN111462313B (en) * | 2020-04-02 | 2024-03-01 | 网易(杭州)网络有限公司 | Method, device and terminal for realizing fluff effect |
CN113763525B (en) * | 2020-06-01 | 2024-03-12 | 上海米哈游天命科技有限公司 | Hair highlight rendering method, device, equipment and storage medium |
CN113763525A (en) * | 2020-06-01 | 2021-12-07 | 上海米哈游天命科技有限公司 | Hair highlight rendering method, device, equipment and storage medium |
CN113822981B (en) * | 2020-06-19 | 2023-12-12 | 北京达佳互联信息技术有限公司 | Image rendering method and device, electronic equipment and storage medium |
CN113822981A (en) * | 2020-06-19 | 2021-12-21 | 北京达佳互联信息技术有限公司 | Image rendering method and device, electronic equipment and storage medium |
CN112381915A (en) * | 2020-10-27 | 2021-02-19 | 杭州电魂网络科技股份有限公司 | Physical principle-based ambient light reflection simulation method, device and storage medium |
CN112907715A (en) * | 2021-03-19 | 2021-06-04 | 网易(杭州)网络有限公司 | Hair model making method and device, storage medium and computer equipment |
CN112907715B (en) * | 2021-03-19 | 2024-04-12 | 网易(杭州)网络有限公司 | Hair model making method, device, storage medium and computer equipment |
CN113713387A (en) * | 2021-08-27 | 2021-11-30 | 网易(杭州)网络有限公司 | Virtual curling model rendering method, device, equipment and storage medium |
CN113888398A (en) * | 2021-10-21 | 2022-01-04 | 北京百度网讯科技有限公司 | Hair rendering method and device and electronic equipment |
CN115082611A (en) * | 2022-08-18 | 2022-09-20 | 腾讯科技(深圳)有限公司 | Illumination rendering method, apparatus, device and medium |
Also Published As
Publication number | Publication date |
---|---|
CN108961373B (en) | 2022-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108961373A (en) | A kind of method and terminal of fur rendering | |
CN104484896B (en) | It is a kind of that the physical method of figure skin Subsurface Scattering is simulated based on Environment | |
CN106910236A (en) | Rendering indication method and device in a kind of three-dimensional virtual environment | |
CN102915559A (en) | Real-time transparent object GPU (graphic processing unit) parallel generating method based on three-dimensional point cloud | |
CN106910240A (en) | The generation method and device of a kind of real-time shadow | |
JP4782583B2 (en) | Program, information storage medium, and image generation system | |
Lappa | Photorealistic Texturing for Modern Video Games | |
Bezerra et al. | An image-based shading pipeline for 2d animation | |
Gupta et al. | Scattering-based interactive hair rendering | |
CN117058301B (en) | Knitted fabric real-time rendering method based on delayed coloring | |
Li | Research and Analysis of 3D games | |
CN117351130B (en) | Real-time rendering method for intelligent workshop three-dimensional scene | |
Potter et al. | Resolution Independent NPR‐Style 3D Line Textures | |
Hikmah et al. | Visualization of Real-World 3D Reconstructed Objects with Real-Time Ray Tracing on Ampere Architecture Graphic Processing Unit | |
Geist et al. | A lighting model for fast rendering of forest ecosystems | |
Wang | Graphics Technologies and Next-Generation Games in the Last 10 Years | |
Gao et al. | Application Study of Virtual Simulation Technology Based on Lumion in Landscape Design | |
Jaspe Villanueva | Scalable exploration of 3D massive models | |
Yutong et al. | Study of water surface scattering model based on Unity3D Shader | |
Li | Islandpaint: Digital painting floating island design | |
Schofield | Nonphotorealistic Rendering | |
Emerson | Visual effects at LAIKA, a crossroads of art and technology. | |
CN117036573A (en) | Method and device for rendering virtual model, storage medium and electronic equipment | |
Liu et al. | Building a Real-Time System on GPUs for Simulation and Rendering of Realistic 3D Liquid in Video Games | |
Qiaozi | Aesthetic Research of Dynamic Ink Contour Stylized Material Based on Movable Camera in 3D Game and Their Real-time Rendering Method Taking the OKAMI HD Game for Example |
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 |