EP-4160547-B1 - SYSTEM AND METHOD OF GENERATING GRAFT SURFACE FILES AND GRAFT GROOM FILES AND FITTING THE SAME ONTO A TARGET SURFACE TO PROVIDE AN IMPROVED WAY OF GENERATING AND CUSTOMIZING GROOMS
Inventors
- KHADIYEV, MARSEL
Dates
- Publication Date
- 20260506
- Application Date
- 20220929
Claims (15)
- An improved method of fitting a graft surface (402) onto a target surface (501) for processing a graft groom (410) corresponding with the graft surface (402) on the target surface (402) into hair models, the method using a computer processor and an interactive graphic user interface (GUI) (400) to perform the processes characterized in that the processes including: creating at least one graft surface file from a pre-modeled surface model (201, 302) by calculating a topology hash (406) of the pre-modeled surface model (201, 302) and defining at least first and second fit handles (503, 510) of the surface model to create a graft surface (402) and storing the graft surface (402) together with a graft surface description (413) in the at least one graft surface file within a graft surface library to be selected from the graft surface library; creating at least one graft groom (410) corresponding with each created graft surface (402) by generating a groom model using a set of operators configured to generate and modify a hair model from the corresponding created graft surface (402) and storing the groom model, calculated topology hash (406) of the graft surface (402) and a description (413) of the graft groom (410) in a graft groom file within a graft groom library to be selected from the graft groom library; selecting a target surface (501) to generate a hair model thereon and aligning the created graft surface (402) over the target surface (501) on the GUI (400); specifying a first surface coordinate on the target surface (501) below the first fit handle (503) on the graft surface (402) to define a first fit handle (503) on the target surface (501) and specifying a second surface coordinate on the target surface (501) below the second fit handle (510) on the graft surface (402) to define a second fit handle (510) on the target surface (501), generating a graft surface coordinate transformation matrix Mg; generating a target surface (501) coordinate transformation matrix Mt; generating a scaling factor between the graft surface (402) and the target surface (501); multiplying the graft surface coordinate transformation matrix Mg by the scaling factor; generating a graft to target transformation matrix Mgt by multiplying the inverse of the target surface coordinate transformation matrix Mt by the result of the multiplication of the graft surface coordinate transform matrix Mg and the scaling factor; multiplying geometric coordinates of the graft surface (402) by the graft to target transform matrix Mgt to convert the graft surface geometric coordinates to target surface geometric coordinates; projecting the target surface geometric coordinates onto the target surface (501); and selecting from the graft groom library at least one of the created graft grooms (410) corresponding with the selected graft surface (402) to be processed on the target surface (501).
- The method according to claim 1, wherein: the generating a graft surface coordinate matrix Mg comprises: calculating right Rg, forward Fg and up Ug vectors for the first fit handle (503) of the graft surface (402), calculating a point vector Pg for the first fit handle (503) of the graft surface (402) using 3D cartesian coordinates of the first fit handle (503) and applying normalized components of the right Rg, forward Fg and up Ug vectors and the 3D cartesian coordinates of the point vector Pg of the first fit handle (503) of the graft surface (402) into a matrix Mg; the generating a target surface coordinate transformation matrix Mt comprises: calculating right Rt, forward Ft and up Ut vectors for the first fit handle (503) of the target surface (501), calculating a point vector Pt for the first fit handle (503) of the target surface (501) using 3D cartesian coordinates of the first fit handle (503) and applying normalized components of the right Rt, forward Ft and up Ut vectors and the 3D cartesian coordinates of the point vector Pt of the first fit handle (503) of the target surface (501) into a matrix Mt; and the generating a scaling factor comprises: dividing a length of the right vector Rg by a length of the right vector Rt.
- The method of claim 1, wherein the defining at least first and second fit handles on the corresponding surface model comprises selecting a first surface coordinate on the surface model as a first fit handle (503) and selecting a second surface coordinate on the surface model as a second fit handle (510).
- The method of claim 1, wherein the creating at least one graft surface file from a corresponding basic surface model includes creating a plurality of graft surfaces (402) and storing the plurality of graft surfaces (402) into the graft surface library displayable on the GUI (400) for selection of one of the stored graft surfaces (402) to be fitted and transformed onto a target surface (501).
- The method of claim 4, wherein the creating at least one graft groom (410) corresponding with each created graft surface (402) includes creating a plurality of graft grooms (410) corresponding with a created graft surface (402) and storing the plurality of graft grooms (410) into the graft groom library displayable on the GUI (400) for selection therefrom to be processed on the target surface (501) in which the corresponding graft surface (402) is fitted and transformed thereon.
- The method of claim 1, wherein the topology hash (406) of the pre-modeled surface model is calculated by combining vertices of polygons forming the surface model into an array of integer numbers and converting the array into a single 64-bit integer using a hash algorithm.
- The method of claim 1, wherein the calculating right, forward and up vectors for the first fit handle (503) of the graft surface (402) and calculating a point vector for the first fit handle (503) of the graft surface (402) is performed by: Subtracting the geometric points of the surface coordinates of the two fit handles (503, 510) on the graft surface (402) to obtain the right vector Rg; obtaining a graft surface normal vector at each of the two fit handle (503, 510) coordinates and averaging the two graft surface normal vectors to obtain the forward vector Fg; multiplying the right vector and the forward vector to obtain the up vector Ug; and using the 3D cartesian surface coordinates of the first fit handle (503) to obtain the point vector Pg.
- The method of claim 7, wherein the graft surface coordinate transformation matrix Mg is generated by setting the normalized right vector coordinates to be a first row of a matrix, setting the normalized forward vector coordinates to be a second row of the matrix, setting the normalized up vector coordinates to be a third row of the matrix and setting the coordinates of the point vector to be a fourth row of the matrix.
- The method of claim 8, wherein the calculating right, forward and up vectors for the first fit handle (503) of the target surface (501) and calculating a point vector for the first fit handle (503) of the target surface (501) is performed by: subtracting the geometric points of the target coordinates of the two fit handles (503, 510) on the target surface (501) to obtain the right vector Rt; obtaining a target surface normal vector at each of the two fit handle coordinates and averaging the two target surface normal vectors to obtain the forward vector Ft; multiplying the right vector Rt and the forward vector Ft to obtain the up vector Ut; and using the 3D cartesian surface coordinates of the first fit handle (503, 510) to obtain the point vector Pt.
- The method of claim 9, wherein the target surface coordinate transformation matrix Mt is generated by setting the normalized right vector Rt coordinates to be a first row of a matrix, setting the normalized forward vector Ft coordinates to be a second row of the matrix, setting the normalized up vector Ut coordinates to be a third row of the matrix and setting the coordinates of the point vector Pt to be a fourth row of the matrix.
- The method of claim 1, wherein a graft groom library of the created graft grooms (410) corresponding with the selected graft surface (402) is displayed on the GUI (400) after the selected graft surface (402) is transformed onto the target surface (501) for selecting a desired graft groom (410) to be processed on the target surface (501).
- A system for fitting a graft surface (402) onto a target surface (501) and processing a graft groom (410) corresponding with the graft surface (402) on the target surface (501) into hair models, the system comprising a computer processor and GUI (400) configured to perform the following processes: importing a pre-modeled surface model into a computer processor operating system configured to display, generate and modify hair models on target surfaces (501) of digital characters, as well as display and process other digital character graphics; creating at least one graft surface file from the imported pre-modeled surface model by automatically calculating a topology hash (406) of the pre-modeled surface model and defining at least first and second fit handles (503, 510) of the surface model displayed on a GUI (400) using an interactive pointing device, combing the topology hash (406) and fit handles to create a graft surface (402), and storing the graft surface (402) together with a corresponding graft surface description (413) as a graft surface file in a memory within a graft surface library to be selected therefrom; creating at least one graft groom (410) corresponding with each created graft surface (402) by generating a groom model using a set of operators configured to generate and modify a hair model from the corresponding created graft surface (402) and storing the groom model, calculated topology hash (406) of the graft surface (402) and a description (413) of the graft groom (410) in a graft groom file within a graft groom library to be selected therefrom; selecting a target surface (501) to generate a hair model thereon and aligning the created graft surface (402) over the target surface (501) on the GUI (400) using the pointing device; specifying a first surface coordinate on the target surface (501) below the first fit handle (503) on the graft surface (402) to define a first fit handle (503) on the target surface (501) and specifying a second surface coordinate on the target surface (501) below the second fit handle (510) on the graft surface (402) to define a second fit handle (510) on the target surface (501); generating a graft surface coordinate transformation matrix Mg; generating a target surface coordinate transformation matrix Mt; generating a scaling factor between the graft surface (402) and the target surface (501); multiplying the graft surface coordinate transformation matrix Mg by the scaling factor; generating a graft to target transformation matrix Mgt by multiplying the inverse of the target surface coordinate transformation matrix Mt by the result of the multiplication of the graft surface coordinate transform matrix Mg and the scaling factor; multiplying geometric coordinates of the graft surface (402) by the graft to target transform matrix Mgt to convert the graft surface geometric coordinates to target surface geometric coordinates; projecting the target surface geometric coordinates onto the target surface; and selecting at least one of the created graft grooms (410) corresponding with the selected graft surface (402) to be processed on the target surface (501).
- The system according to claim 12, wherein: the generating a graft surface coordinate transformation matrix Mg comprises calculating right Rg, forward Fg and up Ug vectors for the first fit handle (503) of the graft surface (402), calculating a point vector Pg for the first fit handle (503) of the graft surface (402) using 3D cartesian coordinates of the first fit handle and applying the normalized components of the Rg, Fg and Ug vectors and the 3D cartesian coordinates of the Pg vector of the first fit handle (503) of the graft surface (402) to a matrix Mg; the generating a target surface coordinate transformation matrix Mt comprises calculating right Rt, forward Ft and up Ut vectors for the first fit handle (503) of the target surface (501), calculating a point vector Pt for the first fit handle (503) of the target surface (501) using 3D cartesian coordinates of the first fit handle (503) and applying the normalized components of the Rt, Ft and Ut vectors and the 3D cartesian coordinates of the Pt vector of the first fit handle (503) of the target surface (501) to a matrix Mt; and the generating a scaling factor comprises dividing a length of the right vector Rg of the graft surface (402) by a length of the right vector Rt of the target surface (501).
- The system of claim 12, wherein the process of defining at least first and second fit handles (503, 510) on the corresponding surface model comprises displaying the surface model on the GUI (400) and selecting a first surface coordinate on the surface model with the pointing device as a first fit handle (503) and selecting a second surface coordinate on the surface model with the pointing device as a second fit handle (510).
- The system of claim 12, wherein the creating at least one graft surface file from a corresponding basic surface model includes creating a plurality of graft surfaces (402) and storing the plurality of graft surfaces (402) into the graft surface library displayable on the GUI (400) for selection of one of the stored graft surfaces (402) to be fitted and transformed onto a target surface (501).
Description
BACKGROUND OF THE INVENTIVE CONCEPT 1. Field of the Invention The present inventive concept relates generally to the art of computer graphics generation, and more particularly to the art of computer graphics generation of graft groom files and an improved process of fitting the generated graft groom files onto a target surface which provides a faster and more versatile customization thereof. 2. Description of the Related Art Hair in computer graphics is usually added on top of a surface representing a character's skin (i.e., a base surface), which is often a small portion of a character such as, for example, the character's scalp, eyebrow area, or chin. This base surface can be represented as a mesh of connected vertices [9] or a parametric curve surface such as a Non-uniform Rational B-spline (NURBS) [10] or a Bezier surface [11]. Each type of base surface representation has a way to uniquely identify a surface point (surface coordinate) independent of the surface's geometric representation [12,13,14]. Hair strands representation is generally comprised of a set of root points (roots) derived from the base surface using surface coordinates (a hair model surface). During evaluation of a hair's shape from the hair model surface, surface coordinates are used in tandem with the base surface to derive information from the base surface, such as the three-dimensional (3d) cartesian positions of the hair strand roots, texture coordinates of each strand, and the surface normal vectors at each strand's root. The hair strand shapes are then defined starting at each root point and following one or more strand points. An example of this process is provided at U.S. Patent No.: 6,720,962, titled: "Hair generation and other natural phenomena with surface derived control volumes in computer graphics and animation." There are then many ways to subsequently calculate the strand shapes, such as using a set of volumes (see for example, Canadian Patent No.: CA 2,772,530, titled "Hair meshes"), or using vector maps (see, for example: "FurGuides Painter:" https://www.kinematiclab.com/products/furguides-painter; and "Surface Comb operator, Ornatrix;"https://ephere.com/plugins/autodesk/maya/ornatrix/docs/3/Surface_Comb_Oper ator.html), or by direct artistic input (see, for example, "Edit Guides operator, Ornatrix:" (https://ephere.com/plugins/autodesk/maya/ornatrix/docs/3/Edit_Guides_Operator.html), and using procedural algorithms (see, for example, "GROOMING AND RENDERING REALISTIC HAIR:" https://www.sidefx.com/tutorials/grooming-and-rendering-realistic-hair/, and "Houdini hair generator operator:" https://www.sidefx.com/docs/houdini/nodes/obj/hairgen.html). Generally, all methods for generating and storing a digital character hair model can be condensed down to the aforementioned steps of root point placement on a base surface and strand shape generation from those roots. It is worth to mention US patent US2021/158591 "COMPUTER GENERATED HAIR GROOM TRANSFER TOOL" in the name of MAGIC LEAP INC (US) that describes a computer generated (CG) hair groom for a virtual character can include strand-based (also referred to as instanced) hair in which many thousands of digital strands represent real human hair strands. Embodiments of systems and methods for transferring CG hair groom data from a first (or source) virtual character to a second (or target) virtual character are provided. Some embodiments can factor in a difference between a hairline of the first virtual character and a hairline of the second virtual character to improve the overall appearance or fit of the hair groom on the second virtual character. The methods used for creating roots on a base surface usually involve a user painting a two-dimensional (2d) density texture map which corresponds to texture coordinates on the base surface. The 2d density texture map is used as a probability distribution function to determine where to generate roots and the spatial frequency of the generated roots. Examples of this procedure can be found at: "Density Maps" (https://hairrendering.wordpress. com/tag/density-map/) and "VRayFur" (https://docs.chaosgroup.com/display/VMAX/VRayFur). For the hair model to remain procedural (i.e., to not explicitly store all roots after their creation) such density texture maps need to be stored together with the model. Other maps may be required to control various other aspects of generated hair, such as the hair's length, shape, and thickness. See "Controlling Maya's XGen Primitives with a Texture Map:" (https://lesterbanks.com/2014/02/controlling-mayas-xgen-primitives-texture-map/). Each map has to be specifically tailored for its respective base surface and is usually created by an artist separately for each character. The methods used for defining the shape of the hair are typically also specific to each base surface. For example, a method of using surface-based directional sinks (see, for example, "Surface Comb operator, Ornatrix:" (https://ephere.c