Search Unity

Transparent material glitch [FIXED]

Discussion in 'FPS.Sample Game' started by MarxParx, Feb 3, 2019.

  1. MarxParx

    MarxParx

    Joined:
    Feb 3, 2019
    Posts:
    3
    This glitch shows up as black artifacts. This affects the lighting prefabs that have these materials and prefabs that have particle systems resulting in giant black clouds. Unityglitch.png
    Pictured is the Factory furnace which during run time causes hefty fps drops.
    I have used 4 different versions of unity from the original 2018.3.0b6 to the now 2019.1b all of them have this problem.

    While I can just disable the transparency on these objects to stop the visual glitch. It's not how the the project is meant to be.

    THE FIX :

    For material Lamp_Wall_Small_Scifi_A_Glass with the shader HDRenderPipeline/Lit
    and any other transparent materials including particles

    Surface Options > Pre Refraction Pass checked
    Transparency Inputs > Distortion unchecked
    OR
    > Distortion checked > Blend Mode Multiply (What I'm using)
     
    Last edited: Feb 5, 2019
  2. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    61
    Did you try to reimport the shaders and particles?
     
  3. MarxParx

    MarxParx

    Joined:
    Feb 3, 2019
    Posts:
    3
    Yes I did reimport shaders and particles. Did not work. I also recloned the entire project and even that didn't work.
    I reimported all assets and models several times as said in the readme file.

    I'm sure it's one setting in HDR pipeline that's causing this as its only transparent materials that are victim to this.
     
  4. MarxParx

    MarxParx

    Joined:
    Feb 3, 2019
    Posts:
    3
    FOUND FIX : While I'm not sure if this is correct and I would be grateful if someone could check on their own project and confirm these are the correct settings.

    For material Lamp_Wall_Small_Scifi_A_Glass with the shader HDRenderPipeline/Lit
    and any other transparent materials including particles

    Surface Options > Pre Refraction Pass checked
    Transparency Inputs > Distortion unchecked
    OR
    > Distortion checked > Blend Mode Multiply

    These 2 settings appear to have fixed the problem on the lamps and the particles as the black clouds are gone but I cant be sure as I don't have a reference. In the picture below is that how it is suppose to look? Any help is appreciated.
    fixglitch.png
     
    Last edited: Feb 5, 2019
  5. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    181
    blk-brd-2.PNG
    black-board-indeed.PNG
    after thinking more about what @jrumps is saying, I wonder if the fog we see on the menu is the same as what is showing up black squares on level_01 if it shows fine on Menu the answer seems to be what jrumps describes a careful placement based on what the user options can handle for their particular hardware setup. Because it may be we are hitting a threshold of transparent peaks per batch or something.
    [1]

    I have ran into this myself, esp. the ground vfx graph effect and the spaceship jet stream vfx both only show black squares. I did try messing with the VFX graph but felt like I was just going in circles. I had thankfully started a manual merge between previous version and 0.3.0 and I might of found something close to where the problem lives.

    Assets\Shaders\Shuriken\Editor\LitParticleUI.cs(8,35): error CS0122: 'LitGUI' is inaccessible due to its protection level
    Assets\Shaders\Shuriken\Editor\LitParticleUI.cs(15,33): error CS0115: 'LitParticleGUI.FindBaseMaterialProperties(MaterialProperty[])': no suitable method found to override
    Assets\Shaders\Shuriken\Editor\LitParticleUI.cs(22,33): error CS0115: 'LitParticleGUI.BaseMaterialPropertiesGUI()': no suitable method found to override
    Assets\Shaders\Shuriken\Editor\LitParticleUI.cs(29,33): error CS0115: 'LitParticleGUI.SetupMaterialKeywordsAndPassInternal(Material)': no suitable method found to override
    Assets\Shaders\Shuriken\Editor\LitParticleUI.cs(36,33): error CS0115: 'LitParticleGUI.VertexAnimationPropertiesGUI()': no suitable method found to override



    In the update we upgrade our Shader Graph, HDRP and Core RP to 4.6.0-preview. There is tiny problem here that only shows up when trying to bring the old vfx (code based ones not graph based) over.

    LitGUI / BaseLitGUI / BaseUnlitGUI / ExpandableAreaMaterial all loose their public accessibility. Even though internal ShaderGUI remains public.

    https://github.com/Unity-Technologi....high-definition/Editor/Material/Lit/LitUI.cs ... etc. I will be amazed if manually changing these back to being public visible fixes the problem. But I think the VFX graphs showing up as only black rectangles after trying several different builds and import methods leads me to believe a oversight between the two code bases like this public to private is the culprit.

    [1]Ref: credit to parker-dean for the lovely pic. https://github.com/Unity-Technologies/FPSSample/issues/9
     
    Last edited: Mar 5, 2019
    jrumps likes this.