CN109035381A - Cartoon hair rendering method based on UE4 platform, storage medium - Google Patents

Cartoon hair rendering method based on UE4 platform, storage medium Download PDF

Info

Publication number
CN109035381A
CN109035381A CN201710427235.2A CN201710427235A CN109035381A CN 109035381 A CN109035381 A CN 109035381A CN 201710427235 A CN201710427235 A CN 201710427235A CN 109035381 A CN109035381 A CN 109035381A
Authority
CN
China
Prior art keywords
hair
texture
value
tangent line
light source
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
Application number
CN201710427235.2A
Other languages
Chinese (zh)
Other versions
CN109035381B (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.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital 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 Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN201710427235.2A priority Critical patent/CN109035381B/en
Publication of CN109035381A publication Critical patent/CN109035381A/en
Application granted granted Critical
Publication of CN109035381B publication Critical patent/CN109035381B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Abstract

The present invention provides a kind of cartoon hair rendering method based on UE4 platform, storage medium, and method includes: the high light value that hair is calculated according to illumination anisotropy simulation algorithm;The corresponding gray value of hair random grain figure and the corresponding colouring information of hair noise pattern are collected respectively according to the texture information on hair pixel;The hair texture tangent line value in the hair pixel is deflected according to the gray value, obtains the hair texture tangent line of random disorder;Linear interpolation calculating is carried out according to the colouring information and the high light value, obtains the high light value of random noise variation.Not only there is apparent bloom range, apparent high optical disturbance shape to embody hair illumination anisotropy, but also have the performance of good gloss for the cartoon hair rendered through the invention, to lead to picture render style with good.

Description

Cartoon hair rendering method based on UE4 platform, storage medium
Technical field
The present invention relates to image rendering field, particularly relate to a kind of cartoon hair rendering method based on UE4 platform, Storage medium.
Background technique
In real world, due to the geometric properties and stackability of hair, hair shows illumination effect in different directions Fruit can generate difference, also referred to as the illumination anisotropy (Anisotropic) of hair.For Real Hair rendering illumination respectively to The opposite sex is the tangent line number using model that the Hair Rendering and Shading document in GDC 2004 proposes earliest Illumination value is calculated according to the normal data of model is replaced, this method can be very good to simulate the anisotropy of hair illumination.
Existing UE4 (illusory 4 engine) hair rendering solution mostly uses Real Hair rendering scheme, mainly solves Certainly the problem of is in virtual world, based on physical laws simulation reality hair as true as possible in different illumination systems Under, complicated gloss performance.Used colouring algorithm needs to carry out complicated depth detection, illumination calculation and edge virtualization To guarantee the normal drafting of hair.
Compared with Real Hair rendering, the rendering of cartoon hair is to simulate the artistic expression of hair in cartoon as far as possible Effect, in cartoon, hair is abstract often over artistical art and summarizes.The geometry complexity and gloss table of hair Now all there is very big difference with Real Hair, therefore Real Hair Rendering algorithms are not particularly suited for solving cartoon style hair wash with watercolours Dye problem also creates unnecessary rendering computing cost instead.To the Picture Showing of game, performance optimization all produces bad Influence.
In Japanese cartoon, usually using the hand of multistage high light and shade light filling (the effect such as lower right Fig. 1 loop) Method shows the texture and crystalistic sense of hair, and effect is as shown in Figure 1.In Japanese cartoon, usually there is level-one height in role's hair Two kinds of bloom forms of light (see the loop on the left side Fig. 1) and second level bloom (see the loop in the upper right side Fig. 1): level-one bloom has Brightness is high, the small feature of range, is chiefly used in showing hair texture;Second level bloom has brightness lower, the wide feature of range, is mostly used In the volume sense of enhancing hair.Whether level-one bloom or second level bloom, the Phong that game engine industry mainstream uses at present Illumination model can not simulate such luster effect.And the calculated bloom of Phong illumination model is used, allow personage instead Hair generate the thin texture of scraps of paper sense, generating deduction to Picture Showing influences, and effect is as shown in Figure 2.Therefore, at this stage Japanese cartoon style draws the hair gloss performance in rendering, and the mode of artistic creation person's Freehandhand-drawing bloom is mostly used to show.It is this The bloom that mode is drawn is not only stiff, but also hair gloss cannot be interacted with virtual scene, i.e., cannot be according to virtual field The lighting angle of scape adjusts gloss, does not have illumination anisotropy.
Summary of the invention
The technical problems to be solved by the present invention are: providing a kind of cartoon hair rendering method based on UE4 platform, depositing Storage media, hair therefrom not only has illumination anisotropy, but also has good luster effect.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention are as follows:
A kind of cartoon hair rendering method based on UE4 platform, comprising:
The high light value of hair is calculated according to illumination anisotropy simulation algorithm;
The corresponding gray value of hair random grain figure is collected respectively according to the texture information on hair pixel, and The corresponding colouring information of hair noise pattern;
The hair texture tangent line value in the hair pixel is deflected according to the gray value, obtains random disorder Hair texture tangent line;
Linear interpolation calculating is carried out according to the colouring information and the high light value, obtains the bloom of random noise variation Value.
Another technical solution provided by the invention are as follows:
A kind of computer readable storage medium is stored thereon with computer program, real when described program is executed by processor Existing following steps:
The high light value of hair is calculated according to illumination anisotropy simulation algorithm;
The corresponding gray value of hair random grain figure is collected respectively according to the texture information on hair pixel, and The corresponding colouring information of hair noise pattern;
The hair texture tangent line value in the hair pixel is deflected according to the gray value, obtains random disorder Hair texture tangent line;
Linear interpolation calculating is carried out according to the colouring information and the high light value, obtains the bloom of random noise variation Value.
The beneficial effects of the present invention are: the present invention draws cartoon hair according to illumination anisotropy simulation algorithm Bloom performance, makes hair have the anisotropy of hair illumination, can adjust gloss according to the lighting angle of virtual scene;Together When, handle hair texture and Noise texture is overlapped again with the anisotropic hair of illumination, simulation hair and hair it Between Random Effect, enrich hair gloss performance.The cartoon hair rendered through the invention not only has apparent Bloom range, apparent high optical disturbance shape show to embody hair illumination anisotropy with good gloss, To lead to picture render style with good.
Detailed description of the invention
Fig. 1 is the hair effect picture that existing Japanese cartoon has multistage high light and shade light filling gimmick;
Fig. 2 is the existing hair effect picture rendered using Phong illumination model;
Fig. 3 is a kind of flow diagram of the cartoon hair rendering method based on UE4 platform of the present invention;
Fig. 4 is the hair effect picture that existing UE4 engine defaults that render mode is drawn;
Fig. 5 is the hair effect picture drawn using the rendering method of the embodiment of the present invention three.
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: making hair that there is each of hair illumination by illumination anisotropy simulation algorithm Anisotropy, then it is overlapped hair texture and Noise texture processing, enrich the gloss performance of hair.
Explanation of technical terms of the present invention:
Referring to figure 3., the present invention provides a kind of cartoon hair rendering method based on UE4 platform, comprising:
The high light value of hair is calculated according to illumination anisotropy simulation algorithm;
The corresponding gray value of hair random grain figure is collected respectively according to the texture information on hair pixel, and The corresponding colouring information of hair noise pattern;
The hair texture tangent line value in the hair pixel is deflected according to the gray value, obtains random disorder Hair texture tangent line;
Linear interpolation calculating is carried out according to the colouring information and the high light value, obtains the bloom of random noise variation Value.
As can be seen from the above description, the beneficial effects of the present invention are: it is used in present invention reference Real Hair rendering Illumination anisotropy simulation algorithm enriches the performance of bloom in cartoon hair, while using superposition hair texture and Noise texture Method simulation hair and hair between Random Effect, make the equally distributed random disorder of texture tangent line value originally, influence head Shine high shape, makes uniform hair brightness generation random noise variation originally, enriches the gloss performance of hair.The present invention The hair effect of rendering has the obvious range of level-one bloom and second level bloom, it will be apparent that high optical disturbance bodies has showed head The illumination anisotropy of hair makes it have good cartoon fine arts performance.
Further, the high light value that hair is calculated according to illumination anisotropy simulation algorithm, specifically:
Obtain the light source vector of scene locating for hair;
Hair texture tangent line is obtained by fluid figure;
According to the light source vector sum hair texture tangent line, hair is calculated using illumination anisotropy simulation algorithm High light value.
Further, described according to the light source vector sum hair texture tangent line, using illumination anisotropy simulation algorithm The high light value of hair is calculated, specifically:
The light source vector sum hair texture tangent line is substituted into formula: It is calculated, obtains the high light value OutLight of hair;
Wherein, the H is light source detection vector, and the lightVector is light source vector, and the ViewVector is view Feel that vector, the dirAtten are the attenuation coefficient for controlling bloom visual range, the Smoothstep is default interpolated value letter Number, the Power are bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is high light intensity Degree.
Seen from the above description, hair texture tangent line is obtained by fluid figure, it can be different with accurately showing hair Crimpness enriches forming hair;It in combination with the light source of scene locating for hair carries out that the high light value of hair is calculated, realizes hair Different glossiness is embodied with scene illumination angle;Further, the illumination anisotropy in Real Hair rendering is simplified The calculating process of simulation algorithm promotes rendering speed while realizing abundant hair bloom performance.
Further, further includes:
According to formulaIt is calculated Hair shadow color ShadowColor;
Wherein, the shadowRange is hair backlight range, and the lightVector is light source vector, described Pixel Tangent is hair texture tangent line, and the ColorRange is that shade folds color range, the ShadowColorRange For shade Color Range, the Color is that shade folds color color, and the ColorPower is shadow color intensity.
Seen from the above description, by the way of folding color from shade, folded color range is calculated in conjunction with camera position, control is folded Color range enriches hair shade color.
Further, the high light value that hair is calculated using illumination anisotropy simulation algorithm, specifically:
According to formulaIt calculates To the high light value OutLight of hair;
Wherein, the H is light source detection vector, and the LightVector is light source vector, and the ViewVector is view Feel that vector, the dirAtten are the attenuation coefficient for controlling bloom visual range, the Smoothstep is default interpolated value letter Number, the Power are bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is high light intensity Degree;The SpecRange is specification limit, and the ShadowColor is hair shadow color.
Seen from the above description, after to hair shade complementary color, hair bloom is calculated in conjunction with hair shadow color Value realizes that hair bloom is merged with shade naturally, making cartoon hair not only has illumination anisotropy, while gloss being allowed to change More horn of plenty.
Further, further includes:
The top for marking hair texture is the hair tip, and texture bottom is root of hair;
Correct hairline reason is calculated, and hair texture tangent line value is obtained.
Seen from the above description, hair texture tangent line value is calculated by unified grain direction, for some simple Hair treatment has the advantages that high-efficient.
Another technical solution provided by the invention are as follows:
A kind of computer readable storage medium is stored thereon with computer program, real when described program is executed by processor Existing following steps:
The high light value of hair is calculated according to illumination anisotropy simulation algorithm;
The corresponding gray value of hair random grain figure is collected respectively according to the texture information on hair pixel, and The corresponding colouring information of hair noise pattern;
The hair texture tangent line value in the hair pixel is deflected according to the gray value, obtains random disorder Hair texture tangent line;
Linear interpolation calculating is carried out according to the colouring information and the high light value, obtains the bloom of random noise variation Value.
Further, described program realizes the high light value that hair is calculated according to illumination anisotropy simulation algorithm When step, specifically include:
Obtain the light source vector of scene locating for hair;
Hair texture tangent line is obtained by fluid figure;
According to the light source vector sum hair texture tangent line, hair is calculated using illumination anisotropy simulation algorithm High light value.
Further, described program is realized described according to the light source vector sum hair texture tangent line, using illumination respectively to When the high light value step of hair is calculated in anisotropic simulation algorithm, specifically include:
The light source vector sum hair texture tangent line is substituted into formula: It is calculated, obtains the high light value OutLight of hair;
Wherein, the H is light source detection vector, and the lightVector is light source vector, and the ViewVector is view Feel that vector, the dirAtten are the attenuation coefficient for controlling bloom visual range, the Smoothstep is default interpolated value letter Number, the Power are bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is high light intensity Degree.
Further, described program also performs the steps of
According to formulaIt is calculated Hair shadow color ShadowColor;
Wherein, the shadowRange is hair backlight range, and the lightVector is light source vector, described Pixel Tangent is hair texture tangent line, and the ColorRange is that shade folds color range, the ShadowColorRange For shade Color Range, the Color is that shade folds color color, and the ColorPower is shadow color intensity.
Embodiment one
The cartoon hair rendering method based on UE4 platform that the present embodiment provides a kind of, is used in virtual reality world more The rendering of middle personage's (such as game charater) hair, for simulation reality hair as true as possible under different illumination systems, Complicated gloss performance, to realize that there is cartoon hair illumination anisotropy and gloss abundant to change,
The present embodiment may comprise steps of:
S1: the high light value of hair is calculated according to illumination anisotropy simulation algorithm;
Specifically, may include following sub-step:
S11: the light source vector Light Vector of scene locating for hair is obtained;Preferably, pass through material Parameter collection (material parameters acquisition) obtains light source vector, and light source vector is passed through material Collection parameter is passed in material (material).
Since UE4 has carried out corresponding encapsulation to programmable rendering pipeline, in material (material function) It is unable to get light source vector Light Vector parameter under default lit (default illumination) mode, therefore, algorithm passes through creation Light manager actor (light source management class) obtains the light source information in current scene.
S12: hair texture tangent line pixel tangent is obtained by fluid figure flow maps or unified grain direction;
In order to realize the anisotropy of bloom, the data information by hair texture normal pixel normal is needed to be converted to The data information of hair texture tangent line pixel tangent, according to the computer graphics techniques of current mainstream, pixel Tangent data both model UV (texture) data set, therefore to obtain preferable hair fine arts performance, it is necessary to Hair model UV (texture) information handled to obtain hair texture tangent line.
It, can be by using the acquisition of the method rapidly and efficiently rate of unified grain direction for some simple hair systems Hair texture tangent line, method particularly includes: the top of regulation hair texture is the hair tip, and texture bottom is root of hair;Pass through unified texture Direction calculates the texture tangential direction value of hair, and then the set texture tangent line Distribution value of approximate simulation hair.
For the hair system of some high request complexity, more accurate hair can be obtained by fluid figure flow maps Texture tangent line enriches forming hair to preferably show hair difference crimpness.
S13: the high light value OutLight of hair is calculated according to formula 1;
Wherein, the H is light source detection vector, and the lightVector is light source vector, and the ViewVector is view Feel that vector, the dirAtten are the attenuation coefficient for controlling bloom visual range, the Smoothstep is default interpolated value letter Number, the Power are bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is high light intensity Degree.
Specifically, algorithm redefines light source detection vector H in order to allow hair bloom to be shown within sweep of the eye, height is allowed Light appears in the visual field, therefore highlight detection vector H is the half of light source vector LightVector and vision vector ViewVector Angular amount (being needed in program calculating unitization to its);DirAtten attenuation coefficient, for controlling the visual range of bloom; For power parameter for controlling bloom change rate, the value more high rate of change is bigger, and bloom variation is more obvious;Strength parameter is used In control highlight strength.
S2: carrying out the superposition of random grain figure and noise pattern, with abundant hair gloss variation.Specifically, may include with Lower sub-step:
S21: in order to simulate the Random Effect between hair and hair, according to texture (UV) information on hair pixel, Acquire corresponding gray value in random grain figure;By the gray value, to the hair texture tangent line value in the hair pixel into Horizontal deflection makes the random disorder of equally distributed hair texture tangent line value originally, to influence the shape of hair bloom;
S22: for the Hair model of some dryings, according to texture (UV) information on hair pixel, acquisition noise figure In corresponding colouring information, the high light value of hair being calculated by the color value and step S13 carries out linear interpolation, so that former There is uniform hair high brightness to generate random noise variation, enriches the gloss performance of hair.
The present embodiment uses for reference the illumination anisotropy simulation algorithm used in Real Hair rendering, but in turn simplifies tool Body calculates step, guarantees rendering effect while improving rendering efficiency.
The hair effect obtained through the above steps, level-one bloom and second level bloom have apparent range, it will be apparent that High optical disturbance bodies has showed hair illumination anisotropy.
Embodiment two
It further expands, the dash area of hair is handled, it is rich to fold color by shade on the basis of example 1 Rich cartoon hair shade color.
Specifically, before S13, further includes:
SS1: hair shadow color ShadowColor is calculated according to formula 2;
Wherein, the shadowRange is hair backlight range, and the lightVector is light source vector, described Pixel Tangent is hair texture tangent line, and the ColorRange is that shade folds color range, the ShadowColorRange For shade Color Range, the Color is that shade folds color color, and the ColorPower is shadow color intensity.
Embodiment three
On the basis of example 2, the shadow that shade folds color is added in the present embodiment in step S1 high light value calculating process It rings, make bloom and merges nature from shade.
Specifically, referring to Fig. 3, first carrying out step S11 and S12 in the present embodiment, then executing SS1, head is calculated Send out shadow color ShadowColor;Then step S13 is executed, the formula 1 of amendment step S13 is formula 3, and the hair is added This calculating parameter of shadow color ShadowColor, other step contents are constant;The high light value of hair is calculated by formula 3 OutLight。
Wherein, the SpecRange is specification limit, and the ShadowColor is hair shadow color.
Step S2 is continued to execute, after obtaining the high light value of hair and hair shadow color value and using, executes S21 and S22, Obtain final hair effect.
The hair effect rendered using the present embodiment, comparing with existing UE4 engine default rendering mode has significantly Difference.Referring particularly to Fig. 4, the hair bloom effect that rendering mode is drawn is defaulted for existing UE4 engine;And Fig. 5 is using this reality The hair effect picture that the method for applying example is drawn, personage's hair can form corresponding high photosynthetic efficiency according to the direction of illumination of scene Fruit.As it can be seen that there is Fang Zedu abundant using the hair effect that the present embodiment renders, while there is each to different of bloom Property, cartoon better effect.
Example IV
The present embodiment provides a kind of computer readable storage mediums, are stored thereon with computer program, and described program is located Reason device performs the steps of when executing
The high light value of hair is calculated according to illumination anisotropy simulation algorithm;Preferably, the step specifically include with Lower sub-step: the light source vector of scene locating for hair is obtained;Hair line is obtained by the method for fluid figure or unified grain direction Manage tangent line;According to the light source vector sum hair texture tangent line, hair is calculated using illumination anisotropy simulation algorithm High light value.
It is described according to the light source vector sum hair texture tangent line in a specific implementation, using illumination respectively to different When the high light value step of hair is calculated in property simulation algorithm, specifically:
The light source vector sum hair texture tangent line is substituted into formula: It is calculated, obtains the high light value OutLight of hair;
Wherein, the H is light source detection vector, and the lightVector is light source vector, and the ViewVector is view Feel that vector, the dirAtten are the attenuation coefficient for controlling bloom visual range, the Smoothstep is default interpolated value letter Number, the Power are bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is high light intensity Degree.
Continue step:
The corresponding gray value of hair random grain figure is collected respectively according to the texture information on hair pixel, and The corresponding colouring information of hair noise pattern;
The hair texture tangent line value in the hair pixel is deflected according to the gray value, obtains random disorder Hair texture tangent line;
Linear interpolation calculating is carried out according to the colouring information and the high light value, obtains the bloom of random noise variation Value.
In a specific implementation, described program can also be performed the steps of
According to formulaIt calculates To hair shadow color ShadowColor;
Wherein, the shadowRange is hair backlight range, and the lightVector is light source vector, described Pixel Tangent is hair texture tangent line, and the ColorRange is that shade folds color range, the ShadowColorRange For shade Color Range, the Color is that shade folds color color, and the ColorPower is shadow color intensity.
Under the premise of a upper specific implementation, another specific implementation is provided:
The high light value that hair is calculated using illumination anisotropy simulation algorithm, specifically:
According to formulaIt calculates To the high light value OutLight of hair;
Wherein, the H is light source detection vector, and the LightVector is light source vector, and the ViewVector is view Feel that vector, the dirAtten are the attenuation coefficient for controlling bloom visual range, the Smoothstep is default interpolated value letter Number, the Power are bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is high light intensity Degree;The SpecRange is specification limit, and the ShadowColor is hair shadow color.
In conclusion a kind of cartoon hair rendering method based on UE4 platform provided by the invention and a kind of computer Readable storage medium storing program for executing can not only enrich bloom performance in the rendering of cartoon hair, can be adjusted according to the lighting angle of virtual scene Gloss;And the hair gloss effect in rendering is drawn with Japanese cartoon style, further, moreover it is possible to abundant hair shade color Coloured silk has the performance of the good fine arts to have good cartoon render style.
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 cartoon hair rendering method based on UE4 platform characterized by comprising
The high light value of hair is calculated according to illumination anisotropy simulation algorithm;
The corresponding gray value of hair random grain figure and hair are collected respectively according to the texture information on hair pixel The corresponding colouring information of noise pattern;
The hair texture tangent line value in the hair pixel is deflected according to the gray value, obtains the head of random disorder Hairline manages tangent line;
Linear interpolation calculating is carried out according to the colouring information and the high light value, obtains the high light value of random noise variation.
2. a kind of cartoon hair rendering method based on UE4 platform as described in claim 1, which is characterized in that it is described according to The high light value of hair is calculated according to illumination anisotropy simulation algorithm, specifically includes:
Obtain the light source vector of scene locating for hair;
Hair texture tangent line is obtained by fluid figure;
According to the light source vector sum hair texture tangent line, the bloom of hair is calculated using illumination anisotropy simulation algorithm Value.
3. a kind of cartoon hair rendering method based on UE4 platform as claimed in claim 2, which is characterized in that it is described according to According to the light source vector sum hair texture tangent line, the high light value of hair is calculated using illumination anisotropy simulation algorithm, has Body are as follows:
The light source vector sum hair texture tangent line is substituted into formula: It is calculated, obtains the high light value OutLight of hair;
Wherein, the H be light source detection vector, the lightVector be light source vector, the ViewVector be vision to Amount, the dirAtten are the attenuation coefficient for controlling bloom visual range, and the Smoothstep is default interpolation value function, institute Stating Power is bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is highlight strength.
4. a kind of cartoon hair rendering method based on UE4 platform as described in claim 1, which is characterized in that further include:
According to formulaHair is calculated Shadow color ShadowColor;
Wherein, the shadowRange is hair backlight range, and the lightVector is light source vector, the Pixel Tangent is hair texture tangent line, and the ColorRange is that shade folds color range, and the ShadowColorRange is shade Color Range, the Color are that shade folds color color, and the ColorPower is shadow color intensity.
5. a kind of cartoon hair rendering method based on UE4 platform as claimed in claim 4, which is characterized in that described to adopt The high light value of hair is calculated with illumination anisotropy simulation algorithm, specifically:
According to formulaHead is calculated The high light value OutLight of hair;
Wherein, the H be light source detection vector, the LightVector be light source vector, the ViewVector be vision to Amount, the dirAtten are the attenuation coefficient for controlling bloom visual range, and the Smoothstep is default interpolation value function, institute Stating Power is bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is highlight strength;Institute Stating SpecRange is specification limit, and the ShadowColor is hair shadow color.
6. a kind of cartoon hair rendering method based on UE4 platform as described in claim 1, which is characterized in that further include:
The top for marking hair texture is the hair tip, and texture bottom is root of hair;
Correct hairline reason is calculated, and hair texture tangent line value is obtained.
7. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is by processor It is performed the steps of when execution
The high light value of hair is calculated according to illumination anisotropy simulation algorithm;
The corresponding gray value of hair random grain figure and hair are collected respectively according to the texture information on hair pixel The corresponding colouring information of noise pattern;
The hair texture tangent line value in the hair pixel is deflected according to the gray value, obtains the head of random disorder Hairline manages tangent line;
Linear interpolation calculating is carried out according to the colouring information and the high light value, obtains the high light value of random noise variation.
8. a kind of computer readable storage medium as claimed in claim 7, which is characterized in that described program realizes the foundation When the high light value step of hair is calculated in illumination anisotropy simulation algorithm, specifically include:
Obtain the light source vector of scene locating for hair;
Hair texture tangent line is obtained by fluid figure;
According to the light source vector sum hair texture tangent line, the bloom of hair is calculated using illumination anisotropy simulation algorithm Value.
9. a kind of computer readable storage medium as claimed in claim 8, which is characterized in that described program realizes the foundation The high light value step of hair is calculated using illumination anisotropy simulation algorithm for the light source vector sum hair texture tangent line When, it specifically includes:
The light source vector sum hair texture tangent line is substituted into formula: It is calculated, obtains the high light value OutLight of hair;
Wherein, the H be light source detection vector, the lightVector be light source vector, the ViewVector be vision to Amount, the dirAtten are the attenuation coefficient for controlling bloom visual range, and the Smoothstep is default interpolation value function, institute Stating Power is bloom change rate, and the Pixel Tangent is hair texture tangent line, and the strength is highlight strength.
10. a kind of computer readable storage medium as claimed in claim 7, which is characterized in that described program is also realized following Step:
According to formulaHair is calculated Shadow color ShadowColor;
Wherein, the shadowRange is hair backlight range, and the lightVector is light source vector, the Pixel Tangent is hair texture tangent line, and the ColorRange is that shade folds color range, and the ShadowColorRange is shade Color Range, the Color are that shade folds color color, and the ColorPower is shadow color intensity.
CN201710427235.2A 2017-06-08 2017-06-08 Cartoon picture hair rendering method and storage medium based on UE4 platform Active CN109035381B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710427235.2A CN109035381B (en) 2017-06-08 2017-06-08 Cartoon picture hair rendering method and storage medium based on UE4 platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710427235.2A CN109035381B (en) 2017-06-08 2017-06-08 Cartoon picture hair rendering method and storage medium based on UE4 platform

Publications (2)

Publication Number Publication Date
CN109035381A true CN109035381A (en) 2018-12-18
CN109035381B CN109035381B (en) 2021-11-09

Family

ID=64629459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710427235.2A Active CN109035381B (en) 2017-06-08 2017-06-08 Cartoon picture hair rendering method and storage medium based on UE4 platform

Country Status (1)

Country Link
CN (1) CN109035381B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
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
CN110944230A (en) * 2019-11-21 2020-03-31 北京达佳互联信息技术有限公司 Video special effect adding method and device, electronic equipment and storage medium
CN113379885A (en) * 2021-06-22 2021-09-10 网易(杭州)网络有限公司 Virtual hair processing method and device, readable storage medium and electronic equipment
CN113421248A (en) * 2021-06-30 2021-09-21 上海申瑞继保电气有限公司 Transformer substation equipment rotation image numerical value processing method
CN113763526A (en) * 2020-06-01 2021-12-07 上海米哈游天命科技有限公司 Hair highlight rendering method, device, equipment and storage medium
CN113888398A (en) * 2021-10-21 2022-01-04 北京百度网讯科技有限公司 Hair rendering method and device and electronic equipment
CN116206006A (en) * 2023-03-02 2023-06-02 达瓦未来(北京)影像科技有限公司 Card style direct illumination effect rendering method based on UE rendering engine
CN116883567A (en) * 2023-07-07 2023-10-13 上海散爆信息技术有限公司 Fluff rendering method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063890A (en) * 2013-03-22 2014-09-24 中国移动通信集团福建有限公司 Method for cartooning human face and system thereof
EP2852934A1 (en) * 2012-05-23 2015-04-01 Glasses.Com Inc. Systems and methods for rendering virtual try-on products

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2852934A1 (en) * 2012-05-23 2015-04-01 Glasses.Com Inc. Systems and methods for rendering virtual try-on products
CN104063890A (en) * 2013-03-22 2014-09-24 中国移动通信集团福建有限公司 Method for cartooning human face and system thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
THORSTEN SCHEUERMANN: "hair rendering and shading", 《豆丁网》 *

Cited By (14)

* Cited by examiner, † Cited by third party
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
CN110944230A (en) * 2019-11-21 2020-03-31 北京达佳互联信息技术有限公司 Video special effect adding method and device, electronic equipment and storage medium
CN110944230B (en) * 2019-11-21 2021-09-10 北京达佳互联信息技术有限公司 Video special effect adding method and device, electronic equipment and storage medium
CN113763526A (en) * 2020-06-01 2021-12-07 上海米哈游天命科技有限公司 Hair highlight rendering method, device, equipment and storage medium
CN113763526B (en) * 2020-06-01 2023-10-03 上海米哈游天命科技有限公司 Hair highlight rendering method, device, equipment and storage medium
CN113379885B (en) * 2021-06-22 2023-08-22 网易(杭州)网络有限公司 Virtual hair processing method and device, readable storage medium and electronic equipment
CN113379885A (en) * 2021-06-22 2021-09-10 网易(杭州)网络有限公司 Virtual hair processing method and device, readable storage medium and electronic equipment
CN113421248A (en) * 2021-06-30 2021-09-21 上海申瑞继保电气有限公司 Transformer substation equipment rotation image numerical value processing method
CN113421248B (en) * 2021-06-30 2024-02-09 上海申瑞继保电气有限公司 Substation equipment rotating image numerical value processing method
CN113888398A (en) * 2021-10-21 2022-01-04 北京百度网讯科技有限公司 Hair rendering method and device and electronic equipment
CN113888398B (en) * 2021-10-21 2022-06-07 北京百度网讯科技有限公司 Hair rendering method and device and electronic equipment
CN116206006A (en) * 2023-03-02 2023-06-02 达瓦未来(北京)影像科技有限公司 Card style direct illumination effect rendering method based on UE rendering engine
CN116883567A (en) * 2023-07-07 2023-10-13 上海散爆信息技术有限公司 Fluff rendering method and device

Also Published As

Publication number Publication date
CN109035381B (en) 2021-11-09

Similar Documents

Publication Publication Date Title
CN109035381A (en) Cartoon hair rendering method based on UE4 platform, storage medium
CN106127859B (en) A kind of mobile augmented reality type scribble paints the sense of reality generation method of sheet
US9202309B2 (en) Methods and apparatus for digital stereo drawing
Lu et al. Illustrative interactive stipple rendering
Lindemeier et al. Image stylization with a painting machine using semantic hints
Huang et al. Painterly rendering with content-dependent natural paint strokes
Argudo et al. Single-picture reconstruction and rendering of trees for plausible vegetation synthesis
CN103914862A (en) Pencil sketch simulating method based on edge tangent stream
US20200126314A1 (en) Method and system of automated facial morphing for eyebrow hair and face color detection
Todo et al. Lit-sphere extension for artistic rendering
CN110889892B (en) Image processing method and image processing device
Chen et al. Embroidery modeling and rendering
Cui et al. Image‐based embroidery modeling and rendering
CN109308380A (en) Embroidery art style analogy method based on feeling of unreality
Wong et al. Abstracting images into continuous-line artistic styles
CN113763525B (en) Hair highlight rendering method, device, equipment and storage medium
CN105869203B (en) A kind of color lead style processing method of three-dimensional scenic
Shen et al. Illumination-preserving embroidery simulation for non-photorealistic rendering
Lee et al. A multi-level depiction method for painterly rendering based on visual perception cue
Wang et al. A method for ink-wash painting rendering for 3D scenes
Rosin et al. Watercolour rendering of portraits
Chen et al. Importance-driven composition of multiple rendering styles
House et al. Line drawing as a dynamic process
CN114359448A (en) Virtual hair processing method and device, terminal device and readable storage medium
US20210074076A1 (en) Method and system of rendering a 3d image for automated facial morphing

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