docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MaterialImporter

    A collection of methods used for importing USD Material data into Unity.

    Inheritance
    object
    MaterialImporter
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Formats.USD
    Assembly: solution.dll
    Syntax
    public static class MaterialImporter

    Fields

    Name Description
    OnResolveTexture

    A callback that allows custom texture resolution logic.

    Methods

    Name Description
    BuildMaterial(Scene, string, MaterialSample, SceneImportOptions)

    Builds a Unity Material from the given USD material sample.

    CombineRoughness(Texture2D, Texture2D, string)

    Copies the roughness texture into the alpha channel fo the rgb texture, inverting it to convert roughness into gloss.

    GetSurfaceShaderPrim(Scene, string)

    Reads and returns the UsdPreviewSurface data for the prim at the given path, if present.

    ImportConnectedTexture<T>(Scene, Connectable<T>, bool, SceneImportOptions, out string)
    ProcessMaterialBindings(Scene, SceneImportOptions)

    Computes the bound material using UsdShade's inherited binding logic. If a material is bound, the request callback is executed to enable the caller to bind the material to the Unity geometry.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)