docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Generate material with a prompt

    Use Material Generator to generate a new material using a text-based prompt and refine it using reference images and material properties.

    To generate a new material, follow these steps:

    1. Right-click an empty area in the Project window.

    2. Select Create > Rendering > Generate Material.

      The New Material window opens.

    3. Select Change to open the Select Model window and choose a model.

    4. Enter a text description of the material you want to create in the Prompt field.

      For example, Wooden floor with natural grain.

    5. Enter elements you want to exclude from the generated material in the Negative Prompt field.

      For example, No scratches or dirt.

      For more information on negative prompts, refer to Remove unwanted elements with negative prompts.

    6. Use the Materials slider to set the number of variations of the material to generate.

    7. Enable Custom Seed to generate consistent results.

    8. Enter a seed number or let the tool generate one automatically.

      For more information on custom seed, refer to Use custom seed to generate consistent sprites.

    9. (Optional) In the Pattern Reference field, do the following:

      1. Select the browse icon to open the Select Texture 2D window.

      2. Select a reference image to guide the pattern or control net.

        Note

        For best results, use the provided pattern_## textures, which are optimized for seamless tiling and enhance material quality.

    10. Select Generate to create the material.

    The generated material appears in the Generations panel. Hover over a material to view details like the model used and prompt settings.

    Note

    To generate and assign assets directly, refer to Generate and assign assets with the Object Picker.

    Note

    Material Generator stores the generated material maps in the /GeneratedAssets folder located at the root of your project. These assets remain in that folder until you remove them manually.

    Work with generated material

    The generated material appears in the Inspector window. The preview sphere and cube provide a live update as you modify textures, patterns, and settings.

    • The sphere helps visualize how the material behaves on curved surfaces.
    • The cube helps to evaluate for tiling and seamlessness, especially for patterns and structured materials.

    The generated material includes a base map, which acts as a simple foundation. Use the PBR tab to achieve advanced material properties for an extra layer of realism.

    You can apply the material to your objects in the Scene view.

    Additional resources

    • Use the PBR tab
    • Use the Upscale tab
    • Use custom seed to generate consistent sprites
    • Generate and assign assets with the Object Picker
    In This Article
    Back to top
    Copyright © 2025 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)