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. Dismiss Notice

Particle rendering problem after latest patch (5.3.4p2) using 2 cameras

Discussion in 'General Graphics' started by Tallek, Apr 8, 2016.

  1. Tallek

    Tallek

    Joined:
    Apr 21, 2014
    Posts:
    34
    Just upgraded to 5.3.4p2 from 5.3.4p1 and now when looking at some particle systems from certain angles, we get some very strange results. It looks like it might be related to the particle system falling between the overlapping clip planes of our near camera and our far camera. The image below shows the issue I'm seeing (along with what it should look like below that). The strange rendering pops around between a bunch of different colors as the camera moves.

    UnityShenanigans.jpg
    UnityShenanigans_correct.jpg
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    Looks like a shader issue. Can you file a bug report with the project or a simplified one so we can take a look?
     
  3. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    got something like this also. Check this. I cant properly repeat this in clear project, so cant post bug with reproduce. This apear only in 5.4.3p2


    Rendering 5.4.3p2


    Rendering 5.4.3
     
    Last edited: Apr 12, 2016
  4. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    296
    - Try render tab setting sorting anything but "none"...like 'front first'; does that stop it?
     
  5. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    No. Setting particle system rendering to "older" or "younger" or "distance" not helping.
     
  6. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    Seems i got reproduce of this bug in clear project. Can anybody test it plz before i will submit bug report?

    Setup is multiply cameras + culling by layers and particle systems on different layers

    1) Download project from this post "bugParts"
    2) Open project (only in 5.3.4p2 unity)
    3) Open scene "Assets/PartTest"
    4) Run scene
    5) Sometimes you will see flickering lines, stretched:

    But it should be like this:
     

    Attached Files:

  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    Yeah its giving me issues.
    Can you file the bug so its on the record :)
     
  8. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    bug 788023
     
  9. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    Any ETA on this? Its time for making trailer, but we cant do it with such particle problem :(
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    No eta at the moment. I'll chase it tomorrow.
     
    DenisM likes this.
  11. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    Hi. We believe we have fixed the issue. I can give you a temporary workaround.
    Our batching system checks the world to camera matrix to determine if it is the same camera or not when using multiple cameras. If you have 2 cameras at the exact same position then it will cause the issue. A simple fix is to move one of the cameras off ever so slightly, like 0.00001 on pos.
    For example i moved one of the cameras in the example project from -10 to -10.000001 and it fixed the issue.
    We will make a proper fix for this which will come out into a 5.3 patch but for now this should help you get your trailer released.
     
  12. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    Im getting this issue only in scene with standard unity water with reflection+refraction cameras. Changing their positions not helping. Maybe because of this:

    reflectionCamera.worldToCameraMatrix = cam.worldToCameraMatrix * reflection;


    if i delete this line there is no broken particles. Changing matrix values by low amout not helping.

    Changing camera position in example project work. But seems in real scene with manual setting worldToCameraMatrix it not helping. How can i change matrix to avoid bug, but leave camera near the same?
     
    Last edited: Apr 25, 2016
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    Can you create an example of this project and submit it as a bug report or include it with the existing? I'll take a look and see how to workaround it.
     
  14. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    So i need to open new bug? Or i just can add build here?

    1) Download project from this post "bugParts2"
    2) Open project (only in 5.3.4p2 or later unity)
    3) Open scene "Assets/PartTest"
    4) Run scene
    5) Sometimes you will see flickering lines, stretched:
     

    Attached Files:

  15. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    Try this:

    Change line 118 in Water.cs:

    from
    Code (csharp):
    1. refractionCamera.worldToCameraMatrix = cam.worldToCameraMatrix;
    to:
    Code (csharp):
    1. refractionCamera.worldToCameraMatrix = Matrix4x4.TRS(new Vector3(0, 0, 0.00001f), Quaternion.identity, Vector3.one ) * cam.worldToCameraMatrix;
     
  16. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    Not helping in real scene and not helping in "bugparts2" project. :(

     
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    Looks like something else is going on with 5.3(I was using 5.5 to test).
    I'll take a look tomorrow.
     
    DenisM likes this.
  18. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    So it looks like you are suffering from 2 bugs. The duplicate camera issue and also this one which unfortunately has no workaround. I have both fixes on the way to 5.3 and they should(with a little luck) be in next weeks patch.
     
    DenisM likes this.
  19. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    Great!;)
     
  20. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    There is 5.3.4p5 patch. Is this fix included in p5?
     
  21. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    No its in the next patch 5.3.4p6
     
    DenisM likes this.
  22. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    Karl, thank you. Just tried 5.3.4p6 and all ok!
     
    karl_jones likes this.
  23. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    Yesterday i made a build for mac. Near the same graphical bugs appear when particles are drawn. Im not sure but Seems some part of this bugs stay on mac. Did you test this on mac? I cant investigate it now but will do this later when i will got mac on my work place.
     
  24. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,793
    The fix should be platform independent. Does the issue happen in the original reproduction project you sent?