Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question User uploaded albedo map

Discussion in 'Editor & General Support' started by RENDER777, Sep 25, 2020.

  1. RENDER777

    RENDER777

    Joined:
    Feb 1, 2019
    Posts:
    7
    Hi all,

    Hopefully this is the correct forum for this, if not please help direct me to where I need to look.
    I'm interested in having a web based app that can take an image from a users local machine and use it to replace the albedo map in a material. I've checked previous posts / google / youtube, and haven't really found anything that seems to be what I'm looking for. Any help is appreciated.

    TYIA
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,724
    Break down your problem into pieces:
    • Figure out how to present a file browser and choose a file
    • Figure out how to read an image file into a Texture2D
    • Figure out how to assign a Texture2D to a material in a script.
    You should be able to find online resources for each of these pieces individually.

    Then put them all together!
     
  3. RENDER777

    RENDER777

    Joined:
    Feb 1, 2019
    Posts:
    7
    yes this is a good strategy, thank you - does anyone have direct experience with available assets that can accomplish any of these items? Particularly the file browser...I purchased one in the asset store but it pops up it's own UI that is not native Microsoft / MacOS file browser.
     
  4. RENDER777

    RENDER777

    Joined:
    Feb 1, 2019
    Posts:
    7
    I have this working successfully locally, but as it turns out the file browser does not seem to work via web. Is there a way to present a file browser from a web based app?