docs.unity3d.com

    USD Schemas

    The Wig ecosystem in USD involves several USD prim types:

    • the main Fur Node prim.
    • optional Dependency prims that affect the geometry of the strands:
      • skin mesh (aka furGeo): controls the root position of the strands
      • deformers: bend the strands according to a set of guide geometries (curves, surfaces, cages).
      • intersectors: clip the tip of the strands if they intersect with a surface (for example, a piece of cloth).

    WigFurNode

    The WigFurNode schema is the equivalent of the Maya wmWigFurNode and contains similar attributes. It is the main prim and serves as an entry point to the execution of the Wig procedural.

    The attributes of the WigFurNode schema describe the geometry of the strands in their rest pose (i.e., undeformed). They are grouped into different namespaces:

    Attribute Type Description
    wigFur
    wigFur:groomFilePath asset The path to the groom file. It defines the rest pose (a.k.a. groom pose) of the strands.
    wigFur:furGeo relationship Optional relationship that could point to the skin surface (mesh prim). If the furGeo points to a valid mesh, the strands are automatically rerooted onto it according to the animation:deformationMode at render time.
    wigFur:skinningNodes relationship Optional relationship that could point to a set of skinning nodes. If the skinningNodes points to a valid set of skinning prims, the strands follow the deformation of those prims according to their bindings at render time.
    wigFur:intersectors relationship Optional relationship that could point to any number of intersector meshes. If present, the strands are clipped against the geometry of the intersectors at render time.
    strands global controls for the strands shape (radius, tip scale, etc.)
    strands:width float The base width of the strands.
    strands:tipScale float The scaling applied to the strand tips width.
    strands:tipScaleOffset float Position on the strand where the width starts scaling down.
    strands:rootExtension:length float The length of the root extensions: 0 means the extensions are disabled.
    rootExtension:minSurfaceAngle float By default the root extensions grow i the direction of the follicle tangent. This setting ensures that the angle between the grow direction and the surface normal does not exceed a given value.
    drawing coloring of the strands
    drawing:rootColor color3f The root color of the strands.
    drawing:tipColor color3f The tip color of the strands.
    drawing:displayProperty color3f The groom property to be displayed, which overrides root/tip colors.
    animation deformation settings
    animation:deformationMode token How strands should be animated when the skin surface is deformed:
    - rigid: Each strand is rigidly transformed so that its root keeps the same position on the skin.
    - wrap: Each strand is bent in order to follow the local curvature of the surface.
    visibility controls for the visibility of the individual strands
    ibility:densityScale strands to be displayed.
    vis float The proportion of
    visibility:zappedStrands int[] Optional list of strand IDs that should not be rendered.
    reduction dynamic reduction of the output geometry
    vertexRatio float Uniform reduction of the number of output vertices. E.g. a ratio of 0.5 reduces the number of spans of the output curves by a factor of 2.
    widthCompensation float How the width of a strand is updated when the density scale is changed:: 0 no compensation, the width remains the same.: 1 optimal compensation, should preserve the overall look of the groom.: >1 over compensation, strands appear much thicker in low-density regions.
    backFaceCulling:densityScale float Reduce the density of strands that are rooted on back faces.
    backFaceCulling:minFaceAngle float The minimal angle between the normal of a back face and the view vector.
    frustum Culling:densityScale float Reduce the density of strands that are outside the viewing frustum.
    frustumCulling:planeOffset float The view frustum is expanded uniformly by the planeOffset value before strands are tested against it.
    render settings for the generation of certain primvars
    render:localDensity:radius float The radius used in the computation of the local densities. A larger radius gives smoother densities but also increases computation times.
    fractionOfStrands float The fraction of strands to use when computing the local densities.

    WigClumpRegionAPI

    The WigClumpRegionAPI is a multiple-apply API schema that describes a clump region. It must be applied on a WigFurNode.

    A clump region assigns a clumpID value to each strand and is identified by its instance name. Clump regions are used by skinning nodes in order to bind strands to their guide prims.

    Attribute Type Description
    clumpIDs int[] The clumpID for each strand.

    WigSkinning API schemas

    There is no direct equivalent to the wmWigGCDeformer/wmWigSkinning nodes in USD. Instead, a deformer is represented by a point-based prim that corresponds to the geometry of the guides. There are several reasons for this:

    • USD has built-in packed curves representations: meaning groups of curves can already be efficiently handled.
    • DCCs such as Houdini offer many ways to interact with the USD point-based prims, which could make it easier to edit/update the the geometry of guides (e.g. by using SOP networks in Houdini).

    A deformer can be attached to a Fur node through the wigFur:skinningNodes relationship on the Fur node. To use a set of curves or a mesh as a guide deformer, one must first apply the corresponding skinning API schema on that prim. Currently there are 3 skinning API schemas:

    WigSkinningCurvesAPI

    This is the skinning API schema to be used when using curves as guide primitives. It must be applied on a curves (basis/NURBS) prim. Each curve controls a single clump of hair.

    WigSkinningSurfacesAPI

    This is the skinning API schema to be used when using meshes as guide primitives. It must be applied on a mesh (basis/NURBS) prim. Several surfaces can be packed together in a single mesh: each controlling a single clump of hair.

    WigSkinningCagesAPI

    Similar to the WigSkinningSurfacesAPI, this schema also uses meshes to deform the strands. However the cage deformer considers the local volume deformations of the meshes rather than their surface deformations. This means strands within the volume of a cage react properly to compression and dilation.

    WigSkinningNodeAPI

    All the 3 API schemas ( WigSkinningCurvesAPI, WigSkinningSurfacesAPI, and WigSkinningCagesAPI ) share a common interface: the WigSkinningNodeAPI schema. It basically contain the attributes for binding the guides to the strands:

    Attribute Type Description
    Bindings binding attributes
    bindings:bindPosePoints point3f[] The positions of the parent point-based prim in their bind-pose.
    bindings:guidePrimClumpIds int[] The clump ID of the strands that each guide primitive (e.g. curve) deforms.
    bindings:clumpRegion token The name of the clump region on the target WigFurNode that defines the clumpID of each strand
    bindings:degree int The degree controls the smoothness of the deformation. This is specific to the Wig SkinningCurvesAPI.
    bindings:guidePrimFaceCounts int[] The number of faces of each guide mesh, in case several guide meshes are combined (i.e. packed) together. This is specific to the WigSkinning SurfacesAPI/WigSkinningCagesAPI.
    Controls Settings that affect the strength of the deformation
    controls:envelope float The deformer's envelope, i.e. the global strength of the deformation.
    controls:profile float3[] The profile is a ramp attribute that controls how much deformation is applied along the strands.
    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX.