docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PreviewSurfaceSample

    The following is based on the Pixar specification found here: https://graphics.pixar.com/usd/docs/UsdPreviewSurface-Proposal.html

    Inheritance
    object
    ShaderSample
    PreviewSurfaceSample
    Inherited Members
    ShaderSample.id
    ShaderSample.GetInputParameters()
    ShaderSample.GetInputTextures()
    Namespace: USD.NET.Unity
    Assembly: solution.dll
    Syntax
    [Serializable]
    public class PreviewSurfaceSample : ShaderSample

    Constructors

    Name Description
    PreviewSurfaceSample()

    Fields

    Name Description
    clearcoat

    Second specular lobe amount. The color is white.

    clearcoatRoughness

    Roughness for the second specular lobe.

    diffuseColor

    When using metallic workflow this is interpreted as albedo.

    displacement

    Displacement in the direction of the normal.

    emissiveColor

    Emissive component.

    ior

    Index of Refraction to be used for translucent objects.

    metallic

    Use 1 for metallic surfaces and 0 for non-metallic.

    • If metallic is 1.0, then F0(reflectivity at 0 degree incidence) will be derived from ior( (1-ior)/(1+ior) )^2, then multiplied by Albedo; while edge F90 reflectivity will simply be the Albedo. (As an option, you can set ior to 0 such that F0 becomes equal to F90 and thus the Albedo).

    • If metallic is 0.0, then Albedo is ignored; F0 is derived from ior and F90 is white. In between, we interpolate.

    normal

    Expects normal in tangent space [(-1,-1,-1), (1,1,1)] This means your texture reader implementation should provide data to this node that is properly scaled and ready to be consumed as a tangent space normal.

    occlusion

    Extra information about the occlusion of different parts of the mesh that this material is applied to. Occlusion only makes sense as a surface-varying signal, and pathtracers will likely choose to ignore it. An occlusion value of 0.0 means the surface point is fully occluded by other parts of the surface, and a value of 1.0 means the surface point is completely unoccluded by other parts of the surface.

    opacity

    When opacity is 1.0 then the prim is fully opaque, if it is smaller than 1.0 then the prim is translucent, when it is 0 the prim is transparent.

    opacityThreshold

    The opacityThreshold input is useful for creating geometric cut-outs based on the opacity input.

    outputs
    roughness

    Roughness for the specular lobe. The value ranges from 0 to 1, which goes from a perfectly specular surface at 0.0 to maximum roughness of the specular lobe. This value is usually squared before use with a GGX or Beckmann lobe.

    specularColor

    Specular color to be used. This is the color at 0 incidence. Edge color is assumed white. Transition between the two colors according to Schlick fresnel approximation.

    useSpecularWorkflow

    This node can fundamentally operate in two modes : Specular workflow where you provide a texture/value to the "specularColor" input. Or, Metallic workflow where you provide a texture/value to the "metallic" input. Depending on the 0 or 1 value of this parameter, the following parameters are conditionally enabled.

    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)