docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method BakeMaps

    BakeMaps(OccurrenceList, OccurrenceList, BakeMapList, int, int, int, bool, string, CustomBakeMapList, double, BakingMethod, double, bool, double, getPixelValueList, bool, ImageList, bool)

    Bake texture maps on meshes from self or other meshes

    Declaration
    public ImageList BakeMaps(OccurrenceList destinationOccurrences, OccurrenceList sourceOccurrences, BakeMapList mapsToBake, int channel = 0, int resolution = 1024, int padding = 1, bool shareMaps = true, string mapSuffix = "", CustomBakeMapList additionalCustomMaps = null, double tolerance = -1, BakingMethod method = BakingMethod.RayOnly, double opacityThreshold = 0.1, bool useCurrentPosition = false, double offset = 0, getPixelValueList callbackList = null, bool oneToOne = false, ImageList reuseMaps = null, bool outputUsedMap = false)
    Parameters
    Type Name Description
    OccurrenceList destinationOccurrences

    Occurrences of the meshes where to store the baked map

    OccurrenceList sourceOccurrences

    Occurrences of components from which to bake maps (if empty use destination)

    BakeMapList mapsToBake

    List of map to generate (Normal, Diffuse, ...)

    int channel

    UV channel of destOccurrence to use for the map generation

    int resolution

    Map resolution

    int padding

    Add padding to the map. A negative value means that the texture will be filled, and the padding for uv island is the absolute value

    bool shareMaps

    If true, all the destinationOccurrences will share the same maps

    string mapSuffix

    Add a suffix to the map names

    CustomBakeMapList additionalCustomMaps

    Additional custom maps to bake

    double tolerance

    Tolerance of projection for baking from source to destination

    BakingMethod method

    Method to find source color if source occurrences are different than destination occurrences (Prefer ProjOnly for point clouds and RayOnly for meshes)

    double opacityThreshold

    If the opacity is under this threshold, considers as fully transparent and store the color behind the intersection

    bool useCurrentPosition

    Use the current position instead of the T-Pose of the input occurrence

    double offset

    Offset from mesh

    getPixelValueList callbackList

    Callbacks that returns a color

    bool oneToOne

    If true, each occurrence in sourceOccurrences will be baked to the occurrence in destinationOccurrences at the same index

    ImageList reuseMaps

    Allow to use existing image instead of creating new ones (override shareMaps=true) the maps must be in the same order than mapsToBake+additionalCustomMaps+callbackList + usedMap (see: outputUsedMap)

    bool outputUsedMap

    If True, an extra maps contained used pixels is output at the end of bakedMaps. It can be used by reuseMaps

    Returns
    Type Description
    ImageList
    In This Article
    Back to top
    Copyright © 2024 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)