Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I swear I am raging at Unity!

Discussion in 'Global Illumination' started by FirstTimeCreator, Mar 8, 2018.

  1. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    I just re did part of a model after i got the lighting working on one ship.

    I go to bake the damn thing which i have baked 100 times literally and now it is getting stuck on light transport with no explained reason, no errors on VERY LOW default resolution.

    Systems and uv charts are correct. I have no way to see what enlighten is actually doing and "where" it is getting stuck or why.

    I am really REALLY getting sick of it and and am about ready to dump unity entirely and start developing with a different engine.

    The Realtime GI system is a piss poor system with limited to no debugging capability. One example is when a mesh component exceeds atlas size, It does not tell you in the console or even in the GUI unless you "click" on it and then it pops in only after you click on the Object.

    I finally got lighting working on another model and im using the same settings and setup and yet it gets stuck on something so simple.

    And.. how the hell can I disable UV Chart controls via script??? That S*** is selected by default on thousands of components and the GI wont work without massive artifacts everywhere unless i disable it.

    You think I can manage 1000 components manually unity??!!!? Where is the documentation for updating UV chart control settings via script?
     
    Last edited: Mar 8, 2018
  2. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Enlighten delivers very good results - when your scene contains a plane and a box.
    By adding more geometry baking times start to explode.

    So, after a few but intensive testings I decided not to work with enlighten at all (unless baking times significantly improves).
     
  3. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    I just got it to work. The problem is this:

    When enlighten has trouble with a component within a model there is no way to know "exactly" which component it is. Sometimes it will get stuck on one if the scale is to high even though it fits within the atlas.

    Really want i want to see is better debugging tools. I want to see how long each chart took to bake, i want to see where it hangs and what charts are taking the longest to bake. I also want to be able to access UV chart controls via script. It's not just a "want" it is necessary for me to build the editor tools to manage the models quickly.

    If you are getting artifacts disable the UV Optimization. Whatever it is doing, it is causing artifacts on anything that basically isnt a flat plane and it is checked by default when you import a model which is retarded.

    I have tried adjusting the angle, hell i tried for almost 2 weeks and got no different results regarding artifacts.

    Disabling it entirely cleared up all dark spot artifacts. The only thing im dealing with now is light bleeding around corners where walls meet floors.

    Also increase pack margin, there seems to be a big issue with pack margin on UV by default (4) basically being to small.
     
  4. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    Ive also watched countless hours of tutorials and lectures on the lighting and really they dont go into "detail" about the how and why of artifacts or how to clear them up "completely". I understand how it works but still enlighten is a pain in the **** especially without any way to debug it or see what it is doing during the bake process.
     
    Last edited: Mar 8, 2018
  5. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768

    And you know ive spent 2 years mastering Unity to be able to build a game, or at least the full prototype to launch a kickstarter with 15 years prior programming experience.

    I dont want to give up on unity but if it prevents me from building a game with good lighting It will be time to move on to UnREal.
     
  6. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768

    Also when there are bleed issues around corners my theory is that it is the resolution. The errrrr problem with fixing it is it drastically increases bake times.

    Even with my i7 4770, 32 gig ram, can take all night to bake it at a high enough res to get rid of light bleed issues. Literraly have to let it run when i goto sleep.

    Now if it could make use of my Titan 1080, it probably would take 30 minutes or less.
     
  7. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768

    Here is a good example:





    If there is any overhang around an edge the cluster wont line up to the edge and the lighting on the cluster wont be accurate. So around floors and wall corners they need to line up if you want to bake at any reasonable time frame with a lower resolution that will work.

    You can see in sketchup i cut the floor out that was overhang into an area the player wont be in which caused this issue. I'm about to rebake it and im willing to bet it fixes it.

    Im just stoked to get this done and finally post my video of my 3d Collision Avoidance Pathfinding system which i spent hundreds of hours building from scratch, but i don't want to post it until the ship interior has decent lighting and this has been holding me up way to long.
     
  8. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768


    Check it out ;) My theory was correct. Any kind of overhang off an edge causes a problem unless your at a super high resolution and even then its "iffy".

    Man you know what is causing some of my other issues i thought was lightmap related?

    I have 3 different directional lights in the scene, 1 for the players ship, 1 for planets and enviroment and an additional one.

    One is culled not to hit the ship layer and yet IT IS HITTING THE SHIP LAYER NO MATTER HOW I CULL IT WTF UNITY.

    Why wont this ******** directional light not cull properly!
     
  9. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768


    Check it out ;) I have it going now. takes about 45 mins on my i7 8K radiance to bake the bridge, upper command bridge, airlock corridor and a main corridor behind it.

    Still have a directional light that will not cull... must be a bug in unity.. it's just stupid.
     
  10. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    Will someone from unity please get on here and explain how to access UV chart control on mesh renderer via C#.

    Please..... It is created alot of additional work for me to not be able to create an editor extension to modify them all on an imported model.

    OR

    how to disable optimize UV from being enabled by default on import.
     
  11. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768


    ;) Oh yes real time GI !! Working with all artifacts gone! WOOT WOOT.

    If you haven't noticed im using a sketchup model. The Blockade Runner from 3d warehouse. It was quite a bit of work to setup this model correctly. All normals facing player.. no backface mats and formatted for realtime GI.

    Sorry about my rant from earlier, I have been beating my head against the wall with this lightmap stuff for about 2 weeks. I suppose im "finally" getting it and also learning the "quirks" of enlighten.. what will fly and what won't as far as clustering and why the artifacts occur and more importantly how to fix them.

    I've also optimized the model with solid components (where possible). A happy balance between Solids and what is needed to not mess up the GI and keep charts as minimal as possible which also speeds up baking and raw clustering. Need to keep the draw calls to a minimum. One thing ive noticed is that the draw calls are basically one of the biggest performance hits.. alot more so than the volume of verts.

    Basically i can make any sketchup model awsome in unity now. Just need a good UV unwrap extension for sketchup.

    Any texture artists out there want to texture this model for me ;)... for now it just has plain color mats on it. I'm going to be too busy programming the transition controllers, manual ship piloting controllers.. interior animations.. it goes on and on.. it's an ambitious project.. but hey.. I have no life.. but thats ok.. because I'm doing what I love! ;)
     
    Last edited: Mar 8, 2018
  12. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    Now that I have enlighten working properly, I have to disagree with this statement. Enlighten will work on complex geometry, you just have to set up your model and cluster charts properly.

    The quality is dependent on the cluster resolution which effects the bake time. I have it working on both high and low resolution now. For now im baking at low res but when I make a video here pretty soon ill bake at a high res and you will see that it is actually pretty good and the performance is not to bad either since im getting over 150FPS on my Titan with alot of charts.



    Low Resolution:
     
    Last edited: Mar 9, 2018
  13. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,910
    As you say, you'll want clean clusters that don't go between rooms, and the same for your UV's too.

    See this post - https://forum.unity.com/threads/does-light-baking-need-an-update.519499/#post-3407614

    This should help even thin walls to stop bleeding light through.
     
  14. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    I have everything working now with no artifacts on corners, basically you need corners to square up with no lip or overhang where the verts meet. For me this fixed the issue above.

    I'm about to double down on this because im tired of waiting on bake times on my i74770. It's taking forever for light transport even on low res 1/.5 cluster 4K radiance.

    AMD-Ryzen-1800X


    https://www.amazon.com/AMD-Ryzen-18...=2025&creative=165953&creativeASIN=B06W9JXK4G

    OR

    Intel Core i7-7820X Skylake-X 8-Core

    https://www.newegg.com/Product/Prod...19117794&cm_sp=&AID=11892368&PID=7828656&SID=