A method, system, device, medium and product for generating fluff effect

By mapping the growth direction of the fuzz as color values ​​and writing it into the properties of the attachment point, the problem of designers switching frequently between the editor and the renderer is solved, and the efficiency of fuzz effect generation is improved.

CN113989395BActive Publication Date: 2025-01-07DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111277364.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-01-07
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

When designing fleece effects, designers need to frequently switch between the editor and the renderer, which increases the operation complexity and reduces the efficiency of fleece generation.

Method used

By obtaining the growth direction of the velvet, mapping it to color values ​​and writing it into the color properties of the attachment point, it avoids rendering in the renderer to obtain the growth direction of the velvet, and simplifies the designer's operation process.

Benefits of technology

It simplifies the designer's operation steps, improves the efficiency of generating fluff effects, reduces frequent switching between the editor and the renderer, and directly obtains the ideal fluff growth direction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989395B_ABST
    Figure CN113989395B_ABST
Patent Text Reader

Abstract

The present application provides a method, system, device, medium and product for generating a fluff effect, the method comprising: an electronic device acquires at least one piece of fluff, wherein the fluff is represented by a point set, the point set comprising a first point which is an attachment point of the fluff and a second point on the fluff other than the attachment point, determining the direction from the first point to the second point as the growth direction of the fluff, and then mapping the growth direction of the fluff to a color value, and writing the color value into the color attribute of the first point, and adding the color attribute of the first point to the attachment to save the growth direction of the fluff in the attachment, so that the growth direction of the fluff can be directly acquired, which simplifies the complexity of the designer's operation and improves the growth efficiency of the fluff.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, system, device, computer-readable storage medium, and computer program product for generating a fluff effect. Background Art

[0002] In order to increase user engagement, many applications will provide users with some props. For example, game applications and short video applications based on augmented reality (AR) can usually provide users with props such as headgear, gloves, and clothes. These props can have a fluffy effect. By adding a fluffy effect, users can increase their preference for props.

[0003] At present, when designers design the fluff effect of props, they usually go to a specific renderer (such as a game engine) to check the growth direction of the fluff, and edit the growth direction of the fluff in an editor such as a photo store (Photoshop, PS) or MAYA. When editing the growth direction, designers usually edit based on experience. Then, the designer imports the edited resources into the renderer to check the growth direction of the fluff, so that the user can continue to adjust the growth direction of the fluff in the editor based on the viewing results. The above process needs to be repeated many times, which increases the complexity of user operations and reduces the efficiency of generating the fluff effect. Moreover, the need to render through the renderer further reduces the efficiency of generating the fluff effect. Summary of the invention

[0004] The purpose of the present disclosure is to provide a method, system, device, computer-readable storage medium, and computer program product for generating a fluff effect, which can simplify the operation complexity of designers and improve the efficiency of generating fluff.

[0005] In a first aspect, the present disclosure provides a method for generating a fluff effect, the method comprising:

[0006] Acquire at least one fluff, the fluff is represented by a point set, the point set includes a first point and a second point, the first point is an attachment point of the fluff, and the second point is a point on the fluff other than the attachment point;

[0007] Determining a direction from the first point to the second point as a growth direction of the villi;

[0008] Mapping the growth direction of the villi into a color value, and writing the color value into the color attribute of the first point;

[0009] The color attribute of the first point is added to the attachment to save the growth direction of the villi.

[0010] In a second aspect, the present disclosure provides a fluff effect generation system, the system comprising:

[0011] An acquisition module, used for acquiring at least one fluff, wherein the fluff is represented by a point set, wherein the point set includes a first point and a second point, wherein the first point is an attachment point of the fluff, and the second point is a point on the fluff other than the attachment point;

[0012] A determination module, configured to determine a direction from the first point to the second point as a growth direction of the villi;

[0013] A mapping module, used for mapping the growth direction of the villi into a color value, and writing the color value into the color attribute of the first point;

[0014] The adding module is used to add the color attribute of the first point to the attachment to save the growth direction of the villi.

[0015] In a third aspect, the present disclosure provides an electronic device, including:

[0016] a storage device having a computer program stored thereon;

[0017] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of the first aspect or the second aspect of the present disclosure.

[0018] In a fourth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in any one of the first aspect or the second aspect of the present disclosure.

[0019] In a fifth aspect, the present disclosure provides a computer program product comprising instructions, which, when executed on a device, enables the device to execute the method described in any one of the implementations of the first or second aspect.

[0020] It can be seen from the above technical solutions that the present disclosure has at least the following advantages:

[0021] Through the above technical solution, the electronic device obtains at least one hair, determines the direction from the attachment point of the hair to any point on the hair as the growth direction of the hair, and then maps the growth direction of the hair to a color value, writes it into the color attribute of the corresponding attachment point, and saves the growth direction of the hair through the color of the attachment. In this way, the ideal growth direction of the hair can be directly obtained by restoring the color of the attachment, without rendering in the renderer to obtain the growth direction of the hair. This avoids the designer from frequently switching between the editor and the renderer in order to obtain the growth direction of the hair that meets the requirements, simplifies the designer's operation complexity, and improves the efficiency of hair generation.

[0022] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings required for use in the embodiments are briefly introduced below.

[0024] Figure 1 A flow chart of a method for generating a fluff effect provided in an embodiment of the present application;

[0025] Figure 2 A design interface diagram for model design provided in an embodiment of the present application;

[0026] Figure 3 A schematic diagram of a point set of fluff in a design model provided in an embodiment of the present application;

[0027] Figure 4 A schematic diagram of a point set of fluff in another design model provided in an embodiment of the present application;

[0028] Figure 5 A schematic diagram of a first point and a vertex of an attachment provided in an embodiment of the present application;

[0029] Figure 6 A flow chart of a method for generating a fluff effect of a headgear provided in an embodiment of the present application;

[0030] Figure 7 A schematic diagram of a design model provided for an embodiment of the present application;

[0031] Figure 8 A schematic diagram of the fluff in a design model provided in an embodiment of the present application;

[0032] Fig. 9 A schematic diagram of an attachment vertex in a design model provided in an embodiment of the present application;

[0033] Fig.10 A schematic diagram of an attachment in a design model provided in an embodiment of the present application;

[0034] Fig.11 A schematic diagram of the structure of a fluff effect generation system provided by an embodiment of the present disclosure;

[0035] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0037] First, some technical terms involved in the embodiments of the present application are introduced.

[0038] The fluff effect is to make an object appear to have fluff growing at specific points in the drawing of 3D images. In order to restore the shape of an object in an augmented reality scene, a fluff effect can be added to the object. In some cases, a furry object can increase the user's preference for the object. For example, in a game, a furry animal will be more popular with users than a smooth animal.

[0039] Normally, designers can determine the growth direction of the fluff at the attachment point by mapping it. Different colors in the map correspond to different growth directions, and the renderer determines the corresponding growth direction based on the color of the map at the attachment point. However, this method of determining the growth direction of the point by mapping is largely dependent on the designer's experience, because the correspondence between color and direction in the renderer is not intuitive. Even experienced designers need to change the color of the attachment point several times in the editor when determining the direction of the fluff, and then check the corresponding direction in the renderer until the designer obtains the growth direction they want. Repeatedly switching between the editor and the renderer increases the complexity of the designer's operation and affects the efficiency of the growth of the fluff effect.

[0040] In view of this, the present application provides a method for generating fluff effects with simple operation, which is applied to electronic devices. An electronic device refers to a device with data processing capabilities, which can be a server or a terminal. Among them, the terminal includes but is not limited to a smart phone, a tablet computer, a laptop computer, a personal digital assistant (PDA) or a smart wearable device. The server can be a cloud server, such as a central server in a central cloud computing cluster, or an edge server in an edge cloud computing cluster. Of course, the server can also be a server in a local data center. A local data center refers to a data center directly controlled by a user.

[0041] Specifically, the electronic device obtains at least one piece of fluff, which is represented by a point set. The growth direction of the fluff is the direction from the attachment point of the fluff to other points. The electronic device maps the growth direction of the fluff to a color value, and writes the color value into the color attribute of the attachment point of the fluff, thereby saving the growth direction of the fluff by saving the color attribute of the attachment point. Because the electronic device converts the ideal growth direction of the fluff into the color attribute of the fluff attachment point, the color attribute of the fluff attachment point can be restored to the growth direction of the fluff according to the same corresponding relationship. In this way, the electronic device can obtain the ideal growth direction of the fluff in the renderer according to the color attribute of the attachment point, which meets the needs of designers, thereby effectively simplifying the complexity of the designer's operation and improving the efficiency of the growth of the fluff effect.

[0042] In the present invention, the color attribute of the fluff attachment point is determined according to the growth direction of the fluff, so the color of the fluff attachment point corresponds to the growth direction of the fluff, and the color of the attachment point corresponds to the ideal growth direction of the fluff. In this way, the required growth direction of the fluff set in advance by the designer can be obtained according to the color correspondence of the attachment point, so that the required direction of the fluff effect can be directly obtained, avoiding frequent switching between the editor and the renderer, saving operation steps, and improving efficiency.

[0043] In order to make the technical solution of the present application clearer and easier to understand, the steps of the method for generating a fluff effect provided in the embodiment of the present application are introduced below with reference to the accompanying drawings, taking application in a terminal as an example.

[0044] See also Figure 1 The flowchart of the fluff effect generation method shown in FIG. 1 comprises:

[0045] S102: The terminal obtains at least one hair.

[0046] In some possible implementations, the terminal may obtain the fluff from the design model. The design model refers to a model that meets the designer's ideal fluff effect, and may be a model including the fluff effect designed by the designer, including fluff and fluff attachments. The fluff is used to produce the fluff effect, and the fluff attachment is an object to which the fluff is attached. For example, the part of the headgear that does not include the fluff is the fluff attachment, the hair in the headgear is the fluff, the body of the plush animal is the fluff attachment, and the hair is the fluff.

[0047] Designers can use Figure 2(A) shows the interface for model design. For example, the xGen, nHair, yeti and other tools in MAYA are used to create a fluff effect on the attachment, and the design model in a general 3D file format including the fluff and the attachment required by the designer is obtained. For example, the design model can be in FBX (FilmBoX) format. The design model designed by the designer can be as follows Figure 2 (B) shown.

[0048] Because a line segment is composed of a point set, the fluff in the design model can be represented by a point set. Specifically, all the fluff in the design model can be represented by a point set, and any fluff can be represented by a sub-point set in the point set. The sub-point set of any fluff includes a first point and a second point, wherein the first point is the attachment point of the fluff, and the second point is a point on the fluff other than the first point. In some possible implementations, the fluff point set in the design model can be a finite number of points, and the fluff in the design model is formed by connecting lines between the finite number of points. Any fluff in the design model can also be a line segment, and the terminal can divide the fluff line segment into multiple segments according to the length of the line segment to obtain a finite number of points on the fluff. For example, any fluff in the design model can be represented as a point set of 10 points, wherein the intervals between consecutive points in any two fluffs of different lengths are different. When any fluff in the design model is a line segment, the terminal can also divide the fluff into a point set consisting of multiple points according to a preset length. For example, any hair in the design model can be divided into multiple points with a certain length as a unit, wherein the intervals between the consecutive points in any two hairs of different lengths are the same.

[0049] like Figure 3 As shown, the point set of the hair A includes point 1, point 2, point 3, ..., point 10, where point 1, point 2, point 3, ..., point 10 are arranged outward from the attachment point of the hair. Point 1 is the first attachment point of the hair, and any point among point 2, point 3, ..., point 10 can be the second point.

[0050] S104: The terminal determines that the direction from the first point to the second point is the growth direction of the villi.

[0051] Fluff is usually short hair, used to represent the short hair of small animals, short hair in headgear, hair in clothing, etc., and usually has a small degree of curvature. Figure 4 As shown, the second point can be any point of the villi A except point 1. The direction from the first point to the second point can be any direction from point 1 to point 2, point 1 to point 3, or point 1 to point 4.

[0052] In some possible implementations, the second point may be a point in the fuzz point set that is adjacent to the first point, such as Figure 4As shown, the second point may be point 2, and correspondingly, the direction from the first point to the second point is the direction from point 1 to point 2. The direction from point 1 to point 2 is the growth direction of the villi A. Generally, the direction vector from the first point to the point adjacent to the first point can accurately represent the growth direction of the villi. Similarly, Figure 4 As shown, the direction vector from point 1 in villi B to point 2 is the direction of villi B.

[0053] In this way, the terminal can obtain the growth direction of all the hairs in the design model, and the growth direction of each hair can be recorded as the direction vector of the hair.

[0054] S106: The terminal maps the growth direction of the fluff into a color value, and writes the color value into the color attribute of the first point.

[0055] The terminal can map the growth direction of the villi to a color value according to the linear relationship between the direction and the color. Specifically, the growth direction of the villi can be converted into a value between -1 and 1 by normalizing the growth direction of the villi. Normalization refers to converting data of different dimensions and different orders of magnitude into comparable data of the same dimension and the same order of magnitude that can perform mathematical operations on each other, which can be achieved by means of linear function method, logarithmic function method, inverse cotangent function method, etc. For example, the growth direction pointing to the left end parallel to the horizontal plane can be defined as -1, and the growth direction pointing to the right end can be defined as 1. Then the growth direction of the villi (direct) is converted to the color (color) of the villi attachment point. Among them, the corresponding relationship between direction and color can be color=direct*0.5+0.5. Since the value corresponding to the growth direction of the villi is in the interval [-1, 1], the value corresponding to the color is a value between [0, 1]. Among them, the corresponding relationship between direction and color is consistent with the corresponding relationship between direction and color in the renderer.

[0056] The terminal writes the color value obtained by the linear processing into the color attribute of the first point. In some possible implementations, the color attribute of the first point can be presented by rendering the point as a corresponding color. The color presented by the first point can be a red-green-blue color mode (RGB color mode) corresponding to the color value, or a hue-saturation-brightness color mode (HSB color made).

[0057] The terminal may write the color of each hair into the color attribute of the hair attachment point for multiple times, or may write the colors of multiple hairs into the color attributes of the attachment points corresponding to the multiple hairs at one time.

[0058] S108: The terminal adds the color attribute of the first point to the attachment to save the growth direction of the villi.

[0059] The terminal adds the color attribute of the first point to the color attribute of the vertex of the attachment, which can also be expressed as the terminal baking the attachment according to the color attribute of the first point. Baking refers to converting parameter information into three-dimensional model information. In the present disclosure, baking refers to converting the color attribute of the first point into the growth direction of the fluff on the attachment. The terminal bakes the attachment according to the color attribute of the first point, that is, the terminal writes the color attribute of the first point into the color attribute of the attachment, such as Figure 5 As shown, the color of point 1 is written into the color of point A in the attachment. Specifically, the terminal can take the first point (point 1) as the center of the circle and the preset length as the radius, search for the vertices near the first point on the attachment, and write the color value of the first point into the color attribute of the vertex (point A) near the first point. Among them, the first point is a point on the fluff in the design model, and the vertex is a point on the attachment. In some possible implementations, the vertex can be a predetermined point on the attachment in the design model. When the attachment is a small animal, its vertex can be the growth point of the animal's hair, which can usually be evenly distributed. In some possible implementations, the density of the vertex on the attachment is determined according to the design model. When the density of the vertices of the attachment in the design model is high or low, the terminal can increase or decrease the density as required. For example, when the vertex density of the attachment in the design model is high, and the server performance limit causes the inability to render or the rendering is slow, the terminal can lower the density of the vertices in the attachment according to the performance of the server. When the density of vertices of the attachments in the design model is low and affects the user experience, the terminal may increase the density of vertices in the attachments.

[0060] In some possible implementations, the preset length may be too large, resulting in the possibility that multiple vertices near the first point are found on the attachment with the first point as the center and the preset length as the radius, such as Figure 5 As shown, it includes point A, point B and point C, so the vertex point A closest to the first point among the multiple vertices can be determined as the corresponding point of the first point on the attachment, and the color value of the first point is written into the color attribute of the point.

[0061] In this way, the color attribute of the vertex in the attachment can correspond to the growth direction of the fluff at that point in the design model.

[0062] The terminal can obtain the color attributes corresponding to the growth directions of all the hairs in the design model by repeating the above steps for multiple times. The terminal can also obtain the point set of all the hairs from the design model in S102, and correspondingly obtain the color attributes corresponding to all the hair directions. The above steps can be performed once to obtain the growth directions of all the hairs in the design model.

[0063] Furthermore, since the growth directions of the fluff at points that are close to each other are usually less different, the terminal can obtain part of the fluff from the design model by sampling, and then obtain the color attributes corresponding to the growth directions of part of the fluff, and obtain the colors of other fluff vertices that have not been sampled by color rendering to reduce the file size.

[0064] In this way, the terminal can obtain the color attributes of all vertices on the attachment, and the color attributes of the vertex include the growth direction of the hair growing from the point.

[0065] In some possible implementations, the terminal can render the entire attachment according to the color of the vertices in the attachment to obtain a colored attachment. The attachment is imported into a renderer, and the color of the vertices of the attachment can be converted into the direction of the hair according to the correspondence between color and direction, so as to obtain the same growth direction of the hair as in the design model and in accordance with the needs of the designer.

[0066] Through the description of the above content, this embodiment provides a method for generating a fluff effect, which obtains at least one piece of fluff, determines the growth direction of the fluff through the attachment point of the fluff and any point on the fluff, and then maps the growth direction of the fluff into a color value and writes it into the color attribute of the attachment point of the fluff, thereby obtaining an attachment including the direction information of the attachment point. Since the color value in the color attribute of the attachment is determined according to the growth direction of the fluff at that point in the design model, the terminal can directly obtain the direction of the fluff corresponding to the design model by restoring the color of the attachment in the renderer, and obtain the direction of the fluff corresponding to the design model that meets the designer's needs, thereby reducing the designer's frequent switching between the editor and the renderer, simplifying the designer's operation steps for designing fluff effects, and improving efficiency.

[0067] In some possible implementations, the fluff effect generation method provided by the present disclosure can be applied to the generation of fluffy headgear in games. The fluffy headgear can produce a visual effect that is more similar to that of small animals. Players can realize the user's need to play small animals in the game by dressing up with the fluffy headgear, which increases the user's preference. The fluff effect generation method in the present disclosure is described below using a fluffy bear headgear as an example.

[0068] See also Figure 6 The flowchart of the fluff effect generation method shown in FIG. 1 comprises:

[0069] S602: The terminal obtains at least one hair from the design model.

[0070] The design interface model drawn by the designer through MAYA or other drawing software is as follows Figure 2 As shown in (B), the terminal extracts the design model in the drawing interface to obtain the design model including the fluff and the attachments.

[0071] Design model such as Figure 7 As shown, the design model includes fluff 702 and attachments 704. The design model can be drawn by the designer in the interface, or drawn in other drawing software and imported into the terminal, which is not limited in this embodiment. The terminal separates the fluff 702 from the attachments 704 in the design model, and obtains the fluff part in the design model, such as Figure 8 shown.

[0072] The attachment 704 in the design model can be a prop in the game such as a headgear, gloves, clothes, etc., or a furry animal such as a bear cub or a kitten. In the augmented reality technology, adding a furry effect to headgear, gloves, animals, etc. can increase the user's preference for the props and improve the user's experience.

[0073] S604: The terminal determines that the direction from the first point to the second point is the growth direction of the villi.

[0074] Generally, the growth direction of a hair is associated with the growth direction of the hairs around it, so the terminal can determine the growth direction of each hair in the design model, or sample the hairs in the design model to obtain the growth direction of some hairs in the design model. The growth direction of the hairs obtained by the terminal can be represented by a direction vector.

[0075] S606: The terminal maps the growth direction of the hair into a color value, and writes the color value into the color attribute of the first point.

[0076] In some possible implementations, the terminal can obtain the corresponding linear correspondence for converting the direction into the color value based on the linear correspondence for converting the color value into the direction in the renderer. Specifically, the growth direction of the villi can be normalized to obtain the direction value in the range of [-1,1], and then the direction value can be converted into the color value based on the linear correspondence. For example, the correspondence for converting the color into the direction in the renderer is direct=2*color-1, and correspondingly, the correspondence for converting the direction into the color can be obtained as color=direct*0.5+0.5. Convert the direction value in the range of [-1,1] into the color value in the range of [0,1].

[0077] The terminal writes the color value of the attachment point obtained according to the direction of the hair into the color attribute of the attachment point. Further, if the terminal performs sampling processing on the acquisition of the hair direction in the attachment point, the color values ​​of other attachment points that have not been sampled can be obtained by averaging the color values ​​of adjacent sampling points or according to the distance relationship ratio, and written into the color attribute of the attachment point.

[0078] In this way, the terminal obtains the fluff part 702 that only retains the attachment points of the fluff in the design model, such as Fig. 9 As shown, the attachment points of the villi all have colors, and the color of each point can be restored to the direction of the villi growing at the point through a corresponding relationship.

[0079] S608: The terminal bakes the attachment according to the color attribute of the first point to preserve the growth direction of the fluff.

[0080] The terminal bakes the attachment 704 according to the color attribute of the first point, bakes the attachment 704 according to the color of the attachment point of the fluff obtained in S706, and writes the color of the attachment point into the color of the vertex in the attachment 704. Fig.11 As shown, the colors of the vertices in attachment 704 correspond to the colors of the attachment points.

[0081] The terminal writes the color value of the attachment point of the fluff 702 into the color attribute of the vertex of the attachment 704 closest to the point. Usually, the attachment point of the fluff 702 and the vertex of the attachment 704 in the same design model coincide.

[0082] In some possible implementations, the designer can set a villi template image with a fixed villi growth direction, for example, the villi direction in the villi template image can spread outward with any point as the center of the circle. The villi template image can be applied to a variety of attachments. In this case, the vertices near the first point in the villi template image can be searched on the attachment with a preset length as the radius, and the color value of the first point is written into the color attribute of the vertices near the first point.

[0083] In summary, the terminal can obtain the fluff 702 from the design model, determine the growth direction of the fluff through the attachment point of each fluff and any point on the fluff, and then map the growth direction of the fluff to a color value and write it into the color attribute of the attachment point of the fluff, bake the attachment 704 according to the color attribute, and obtain the attachment 704 including the direction information of the attachment point. Since the color value in the color attribute of the attachment 704 is determined according to the growth direction of the fluff at the point in the design model, the terminal can directly obtain the direction of the fluff designed by the designer in the design model by restoring the color of the attachment 704 in the renderer, which reduces the frequent switching of the designer between the editor and the renderer, simplifies the operation steps of the designer in designing the fluff effect, and improves efficiency.

[0084] Fig.11 is a schematic diagram of a fluff effect generation system 1100 according to an exemplary disclosed embodiment. Fig.11 As shown, the fluff effect generation system 1100 includes:

[0085] An acquisition module 1102 is used to acquire at least one hair, wherein the hair is represented by a point set, wherein the point set includes a first point and a second point, wherein the first point is an attachment point of the hair, and the second point is a point on the hair other than the attachment point;

[0086] A determination module 1104 is used to determine the direction from the first point to the second point as the growth direction of the villi;

[0087] A mapping module 1106, configured to map the growth direction of the villi into a color value, and write the color value into the color attribute of the first point;

[0088] The adding module 1108 is used to add the color attribute of the first point to the attachment to save the growth direction of the villi.

[0089] Optionally, the adding module 1108 can be used to:

[0090] With the first point as the center and the preset length as the radius, vertices near the first point are searched on the attachment, and the color value of the first point is written into the color attribute of the vertices near the first point.

[0091] Optionally, there are multiple vertices near the first point, and the mapping module 1106 may be configured to:

[0092] The color value of the first point is written into the color attribute of the vertex closest to the first point.

[0093] Optionally, the mapping module 1106 may be configured to:

[0094] According to the linear relationship, the growth direction of the villi is mapped to a color value.

[0095] Optionally, the second point is a point in the point set of the fluff that is adjacent to the first point.

[0096] Optionally, the acquisition module 1102 may be used to:

[0097] At least one hair is separated from the attachment in the design model.

[0098] Optionally, the attachment includes any one or more of a headgear, gloves, and clothes.

[0099] The functions of the above modules have been described in detail in the method steps in the previous embodiment and will not be repeated here.

[0100] Reference below Fig.12 , which shows a schematic diagram of the structure of an electronic device 1200 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0101] like Fig.12 As shown, the electronic device 1200 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage device 1208 to a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the electronic device 1200 are also stored. The processing device 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0102] Typically, the following devices may be connected to the I / O interface 1205: an input device 1206 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1208 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1209. The communication device 1209 may allow the electronic device 1200 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.12The electronic device 1200 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0103] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1209, or installed from the storage device 1208, or installed from the ROM 1202. When the computer program is executed by the processing device 1201, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0104] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0105] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0106] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0107] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains at least one hair, the hair is characterized by a point set, the point set includes a first point and a second point, the first point is the attachment point of the hair, and the second point is a point located on the hair other than the attachment point; determines the direction from the first point to the second point as the growth direction of the hair; maps the growth direction of the hair to a color value, writes the color value into the color attribute of the first point; adds the color attribute of the first point to the attachment to save the growth direction of the hair. The computer program code for performing the operation of the present disclosure can be written in one or more programming languages ​​or a combination thereof, the programming languages ​​include but are not limited to object-oriented programming languages ​​such as Java, Smalltalk, C++, and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0108] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0109] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0110] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0111] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] According to one or more embodiments of the present disclosure, Example 1 provides a method for generating a fluff effect, the method comprising: obtaining at least one piece of fluff, the fluff being represented by a point set, the point set comprising a first point and a second point, the first point being an attachment point of the fluff, and the second point being a point on the fluff other than the attachment point; determining the direction from the first point to the second point as the growth direction of the fluff; mapping the growth direction of the fluff to a color value, and writing the color value into the color attribute of the first point; adding the color attribute of the first point to the attachment to save the growth direction of the fluff.

[0113] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, which adds the color attribute of the first point to the attachment, including: taking the first point as the center of the circle and a preset length as the radius, searching for vertices near the first point on the attachment, and writing the color value of the first point into the color attribute of the vertices near the first point.

[0114] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein there are multiple vertices near the first point, and writing the color value of the first point into the color attribute of the vertices near the first point includes: writing the color value of the first point into the color attribute of the vertex closest to the first point.

[0115] According to one or more embodiments of the present disclosure, Example 4 provides the method of any one of Examples 1 to 3, wherein mapping the growth direction of the fluff to a color value comprises: mapping the growth direction of the fluff to a color value according to a linear relationship.

[0116] According to one or more embodiments of the present disclosure, Example 5 provides the method of any one of Examples 1 to 3, wherein the second point is a point in the point set of the fluff that is adjacent to the first point.

[0117] According to one or more embodiments of the present disclosure, Example 6 provides the method of any one of Examples 1 to 3, wherein obtaining at least one fluff comprises: separating at least one fluff from an attachment in the design model.

[0118] According to one or more embodiments of the present disclosure, Example 7 provides the method of any one of Examples 1 to 3, wherein the attachment includes any one or more of a headgear, gloves, and clothes.

[0119] According to one or more embodiments of the present disclosure, Example 8 provides a fluff effect generating system, the system comprising: an acquisition module, used to acquire at least one piece of fluff, the fluff being represented by a point set, the point set comprising a first point and a second point, the first point being an attachment point of the fluff, and the second point being a point located on the fluff other than the attachment point; a determination module, used to determine the direction from the first point to the second point as the growth direction of the fluff; a mapping module, used to map the growth direction of the fluff into a color value, and write the color value into the color attribute of the first point; an adding module, used to add the color attribute of the first point to the attachment to save the growth direction of the fluff.

[0120] According to one or more embodiments of the present disclosure, Example 9 provides the system of Example 8, and the adding module can be used to: use the first point as the center of the circle and a preset length as the radius, search for vertices near the first point on the attachment, and write the color value of the first point into the color attributes of the vertices near the first point.

[0121] According to one or more embodiments of the present disclosure, Example 10 provides the system of Example 9, wherein the first point includes multiple vertices near the first point, and the mapping module can be used to: write the color value of the first point into the color attribute of the vertex closest to the first point.

[0122] According to one or more embodiments of the present disclosure, Example 11 provides any system of Examples 8 to 10, and the mapping module can be used to: map the growth direction of the villi to a color value according to a linear relationship.

[0123] According to one or more embodiments of the present disclosure, Example 12 provides the system of any of Examples 8 to 10, wherein the second point is a point in the point set of the fluff that is adjacent to the first point.

[0124] According to one or more embodiments of the present disclosure, Example 13 provides the system of any one of Examples 8 to 10, wherein the acquisition module can be used to separate at least one fluff from an attachment in the design model.

[0125] According to one or more embodiments of the present disclosure, Example 14 provides any system of Examples 8 to 10, wherein the attachment includes any one or more of a headgear, gloves, and clothes.

[0126] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0127] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0128] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for generating a fluff effect, characterized in that: The method comprises: Obtain at least one fluff, wherein the fluff is obtained by separating from an attachment, the fluff is used to produce a fluff effect that meets the designer's needs, and the attachment is an object to which the fluff is attached; the fluff is represented by a point set, the point set includes a first point and a second point, the first point is the attachment point of the fluff, and the second point is a point on the fluff other than the attachment point; Determining a direction from the first point to the second point as a growth direction of the villi; Mapping the growth direction of the villi into a color value, and writing the color value into the color attribute of the first point; The attachment is baked according to the color attribute of the first point so that the color attribute of the first point is written into the color attribute of the attachment; wherein the attachment is imported into a renderer, and the growth direction of the villi is determined according to the color attribute of the attachment.

2. The method according to claim 1, characterized in that The step of baking the attachment according to the color attribute of the first point so that the color attribute of the first point is written into the color attribute of the attachment includes: With the first point as the center and the preset length as the radius, vertices near the first point are searched on the attachment, and the color value of the first point is written into the color attribute of the vertices near the first point.

3. The method according to claim 2, characterized in that There are multiple vertices near the first point, and writing the color value of the first point into the color attribute of the vertices near the first point includes: The color value of the first point is written into the color attribute of the vertex closest to the first point.

4. The method according to any one of claims 1 to 3, characterized in that: Mapping the growth direction of the hair into a color value includes: According to the linear relationship, the growth direction of the villi is mapped to a color value.

5. The method according to any one of claims 1 to 3, characterized in that: The second point is a point in the point concentration of the fluff that is adjacent to the first point.

6. The method according to any one of claims 1 to 3, characterized in that: The attachment includes any one or more of a headgear, gloves, and clothes.

7. A fluff effect generation system, characterized in that: The system comprises: An acquisition module, used for acquiring at least one fluff, wherein the fluff is obtained by separating from an attachment, the fluff is used to produce a fluff effect that meets the designer's needs, and the attachment is an object to which the fluff is attached; the fluff is represented by a point set, the point set includes a first point and a second point, the first point is the attachment point of the fluff, and the second point is a point on the fluff other than the attachment point; A determination module, configured to determine a direction from the first point to the second point as a growth direction of the villi; A mapping module, used for mapping the growth direction of the villi into a color value, and writing the color value into the color attribute of the first point; An adding module is used to bake the attachment according to the color attribute of the first point so that the color attribute of the first point is written into the color attribute of the attachment; wherein the attachment is imported into a renderer, and the growth direction of the villi is determined according to the color attribute of the attachment.

8. A device, characterized in that The device comprises a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the device performs the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The method comprises instructions for instructing a device to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image processing method and device and electronic equipment

    CN111524171A

  • Baking model AO mapping method, device, computer equipment and storage medium

    CN112419459A