Home Quixel Megascans

Answered: Unity Export - Metallic, Legacy not including correct textures

Belome
polycounter lvl 5
Offline / Send Message
Belome polycounter lvl 5

Hi,

I just signed up for the Indie Game subscription today. I'm really excited to use the megascan assets I bought, but I am unable to export them to Unity with textures set up for metallic/smoothness (the default Standard shader variant) and an AO texture.

Here are my export settings:



Here are my Unity importer settings and the resulting textures:



It seems to be a HDRP Mask map, even though I have set Legacy and Metallic. So there is no separate AO texture included, but if I look in the download folder of the asset (opened via Bridge), I can see the AO map!


Any advice on how I can get Legacy and Metallic to work? I really need a Metallic/Smoothness instead of Spec/Gloss or HDRP mask. I can drag over the AO texture from the download folder to my Unity project, but I'd rather the AO texture was correctly included and added to the material since I will be importing many assets.

I'm on OSX and using Unity 2018.2.10f1.

Thanks!

Replies

  • Synaesthesia
    Offline / Send Message
    Synaesthesia polycounter
    I just checked in with our developers. It looks like Unity reads AO from the green channel only, since Bridge is exporting channel-packed textures. All other channels are ignored so that's why the algorithm has channel packing set to Metalness in R, AO in Green, and Gloss in the alpha channel of your mask texture. 

    Let me know if this helps!
  • Belome
    Offline / Send Message
    Belome polycounter lvl 5
    Hi, thank you for your reply! If I understand you correctly, you are saying that Bridge only exports the single Masks texture even for Legacy, since it is channel packed for Metallic/Smoothness and AO. So the Masks texture should work as both the Metallic/Smoothness and AO texture inputs. But when I try to use the Masks texture as the AO input, it is not the same as using the AO texture included in the asset's download folder.

    Here is a video demonstrating this: https://drive.google.com/file/d/1h1XCBuM3w5ZKpJ8L1TlCnxFSzo8mBy8T/view?usp=sharing

    Thanks for your help!
  • Synaesthesia
    Offline / Send Message
    Synaesthesia polycounter
    http://www.filedropper.com/megascansimporter

    Try this file - our Unity dev just wrote it up for you as a fix for this issue.

    "Now the user needs to go to Assets>Quixel>Scripts>BridgeImporter> and delete the MegascansImporter.cs file and copy this one into that folder.
    What is it doing?
    Well it is essentially checking if it packed the texture or not depending on that it will either set the material's AO property to packed texture (Mask) or import the AO map and then set the material's AO property to the newly imported AO texture."
  • Belome
    Offline / Send Message
    Belome polycounter lvl 5
    Thanks so much for your help! When I download that script, it seems to be incomplete and cuts off at:

                    for (int j = 0; j < g.transform.childCount; ++j)
                    {
                        Renderer[] r = new Renderer[1];
                        r[0] = g.transform.GetChild(j)....
  • Synaesthesia
    Offline / Send Message
    Synaesthesia polycounter
    Try this. Change .TXT to .CS.
  • Belome
    Offline / Send Message
    Belome polycounter lvl 5
    Thanks! That new script compiles correctly. But when importing from Bridge with this script, the importer now links the Masks texture to the AO input, but the Masks texture does not have the proper AO data like the actual AO texture. Anyways, if this is hard to fix, I can just add the AO textures myself, since I was doing that before even posting this thread. I just wanted to report this bug in case there are any other Unity users using the Legacy pipeline! And on another note, I was having some issues where the importer was sometimes not importing NormalBump maps, but they could be import manually from the download source.
  • Synaesthesia
    Offline / Send Message
    Synaesthesia polycounter
    I just heard back from our Unity dev: The importer links the Masks texture to the AO input because AO is packed inside the Masks texture.

    In regards to NormalBump maps, we're looking into that. It appears that the script (and Unity itself) should be using the Normal LOD textures instead.
Sign In or Register to comment.