Search Unity

Unity Enlighten deprecation and replacement solution

Discussion in 'Global Illumination' started by Jesper-Mortensen, Jun 19, 2019.

  1. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    638
    Is it possible to adopt Unreal's lighting build? Unreal is open source. Maybe Unity can use similar lighting pipelines.


    I think what Unity needs is to unify lighting, both LWRP and HDRP under one pipeline.

    If user needs switch between, every data except HDRP high processes would be interchangeable.


    I think the first step toward any possibility for GI is to unify lighting.
     
    Last edited: Jul 19, 2019
    Lars-Steenhoff likes this.
  2. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    52
    Unreal is no Open Source. Unreal is proprietary software with private source code access.
    As exemple from the EULA:
     
    keeponshading likes this.
  3. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,190
    Light used to be unified, they felt the need to break it up because of the wide fragmentation of machine (IMHO) going from low end open gl 2.0 to high end state of the art. Though many of the tools (lightprobe for example) are kinda unified only core shader/render pipeline differ because of different assumption, hardware and optimization needed, which also prevent shader compilation permutation.

    But if you want unified lighting that's the built in render.
     
  4. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    318
    fyi
    Here an better and cleaner proposal, with less emotion, based on todays possibilities and knowledge (see link).

    https://forum.unity.com/threads/fee...n-render-pipeline.560653/page-17#post-4765037

    Also an very detailed benchmark (hope some valuable information, was quite some work) in the sublink to provide an more solid base for better understanding taking all current GPUs into account i could find.

    Please skip all this when you prefer to wait on new Unicorn GI created in marketing departments.

    Some fun. Was a hard week.
    Realtime GI proposals who fullfill todays expected render quality without precalculation (Enlighten needed precalc too, RIP) will be accepted by showing an screnshot with framerate on average and top hardware when all precalculated GI is deleted. According to actual replacement plans they shouldn t also need UV authoring.


    Cheers.
     
    Last edited: Jul 19, 2019
  5. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,190
    Seen the progress of that post in bakery's thread:
    - It's not real time, it's baked,
    - You just stream different map/probe, you trade memory for compute
    - It doesn't work with procedural generation nor dynamic objects
    - It doesn't work with dynamic scene

    Also unicorn GI is actually catching up to dev having done similar things, Godot engine has a dynamic GI. It's basically SEGI but to lightprobes, so framerate and resolution independant.
     
  6. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    318
    - It's not real time, it's baked,

    Thats pretty standard today. Most games who look nice and sell are baked.

    - You just stream different map/probe, you trade memory for compute

    Nope. Not the RAM or VRAM Unicorn UI uses nor the compute power Unicorn GI needs for low quality realtime approximation.

    The heavy stuff is precalculated and you have far more compute power to do interactive , mixed lighting stuff, nice shadows and advanced Directional stuff or additional future DXR replacements.

    Have a look on texture streaming.
    Hundreds of 4K PBR Sets and and 4K Lightmaps in 64k virtual textures are streamed from your SSD or HardDrive where is lots of space.
    Thats pretty standard today in AAA.

    So Unicorn GI use far more compute power and memory for low quality output what could and should be precalculated.

    Therefore Unicorn GI is not a standard today nor in near future.


    - It doesn' work with procedural generation nor dynamic objects

    Most of todays games, Fontainebleau or FPS Sample would be pretty boring. Dynamic object are greatly lit through Probes.

    Probes can be very correct when you do it right and they are baked after lightmaps in special by taking visibility into account.

    Procedural world content is an argument. But the quality of the MegaCity should be ok for this use case.

    StarCitizen looks great too.
    The playable FPS and ships are baked too. The procedural flyover areas and space. Don t know.

    Procedural game charakters or smaller stuff could be HQ lit through perfect probes.

    - It doesn't work with dynamic scene

    So you have most of current and future games complete in RAM and VRAM?
    Did not understand this.

    Why most of AAA games have render farms and calculation times up to 3 month with hundreds of GPU and CPU clusters.

    Why Cyberpunk 2077 doesn t use Unicorn GI
    Could be save lots of money instead of baking several years with lots of iterations the complete game down.
    They could be 2 years earlier to market by having Unicorn GI.

    They simpy have not the knowlegde and the budget to develop an Unicorn GI.

    But probably they only want generate the best visual quality who runs on average hardware to sell the experience.

    Weekend is calling. Have fun.
    I wrote Unicorn GI so often because i like Unicorns.) But they are hard to met.

    Unity 2021.1.f1 Pro comes with Unicorn GI, an free rainbow Theme plus this little cutie
    0591a57f4f917d99b0cc7588144e3858.jpg
     
    Last edited: Jul 20, 2019
  7. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,190
    Unicorn GI is fun lingo sure, but it's also factually wrong to say AAA use only baked solution:
    - Enlighten real time GI has been in many game, from mirror edge to Hellblade, there surely a list somewhere
    - Quantum break tried really hard to simulate GI with probe placement.
    - the division use a surfel based method that accumulate light into probe
    - Metro exodus and Battlefield V use state of hart hardware rendering GI
    - Control is coming out with strong GI implementation
    - You don't know that for Cyberpunk, it's not out yet ...

    The thing is the technique is always progressing, and there is pressure like bandwidth problem, storage space already tight for the amount of data we have, and you perfectly identified the problem of costly renderfarm. AAA has always been chasing GI as a way to reduce the problem cited above and improve production and workflow. As game become bigger and more dynamic, not having to wait on renderfarm and filling open world size probe baking on game that already exceed the storage limit they are diffused on, is something they want.

    There is a place for a solution like you mention, but a real time GI solution will simplified people life, and technique has been improving that's why everybody is actually enthusiastic.

    There is just no silver bullet.

    Anyway, raytracing is additive, not opposite to a baking solution. You can actually use both.
     
    keeponshading and SamOld like this.
  8. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    318
    In case of Cyberpunk there are several hours of gameplay online with several tiny probe and lightmap glitches.Probably i am wrong. We will see. Would be unfair when they already have Unicorn GI sinces more than 1 year and dont tell us.

    I rendered movies with realtime raytracing sytems on cpu (300 to 600 nodes)and gpu systems for years and the need for an own renderfarm for baking like common at bigger studios is not existing anymore.

    Sure when you think based on PLM or Enlighten possibilities today. There is no way.

    It all depends on delegating jobs to multi gpu compute devices and the use of denoising. With Blender already possible, Bakery needs some tweaks but even without it is is fast enough.

    I described it here, you probably have seen it. Sorry for repost.
    https://forum.unity.com/threads/bakery-gpu-lightmapper-v1-6-released.536008/page-65#post-4763765

    and todays possibilities explained on same scenario for really low cost.

    https://forum.unity.com/threads/bakery-gpu-lightmapper-v1-6-released.536008/page-65#post-4785281

    So potentially Bakery and Blender with DNoise and OIDN
    give you the possibility to rethink perfect precalculated multi lit scenarios with lightmaps and probes.

    I share the same enthusiasm like you about every new method who helps to solve this. But simple math is not easy to redefine here.

    A physical precalculated base with this speed and cost will give you lots of budget back to enable eg. DXR reflection or DXR AO by holding highest framerates and visualisation quality....
    And i don t refer to full bakes alone like the ArchViz example i used for benchmarking gpu s.. There are more bake modes and directional modes available plus L1 probes and Non linear SH.
    e.g simply using shadowmask and one additional directional light and setting chairs to non static gives you much more freedom.


    Btw. it was some marketing who praised Enlighten as Realtime GI some years before by ignoring to show the precalculate button. That makes the complete situation even funnier.

    One additional question.
    When the UV free authoring is so important why we never got
    access to the Enlighten function to calculate and project Lightmap from simple proxys back to the geometry and lods like shown here nor is it in the roadmap from PLM?
    https://www.ea.com/frostbite/news/precomputed-global-illumination-in-frostbite
    Cannot get this?

    You mentioned
    There is just no silver bullet.

    but actually lighting situation remebers me on Monty Pythons Black Knight scene.
    Based on what we know today.
    You are in competition.)
    You know how the scene ends.

    left arm. we deprecate enlighten without options as middleware and further improvements like our competition.

    right arm. we fully ignore actual moves to free best in class open source solutions. see competition ....
    https://www.blender.org/press/epic-...r-foundation-with-1-2-million-epic-megagrant/
    https://www.blender.org/press/ubisoft-joins-blender-development-fund/
    nor recommend , build up on or push an great Asset who outperforms own solution factor 20+ today since one year

    left leg. we leave Enlighten as it today ,announce feature parity from PLM from GPU to CPU and announce an UV authoring free solution

    right leg. we commit for something 2021
    The scene also lacks on Unicorns.

    maxresdefault.jpg
     
    Last edited: Jul 26, 2019
  9. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,190
    I think you are confusing a lot of things.

    RTGI isn't about being as good as baked GI, it's about being good enough artistically and flexible, baked GI being the best quality possible but absolutely NOT flexible, hence problematic for real time. Enlighten is a baking solution sure, but it's still based on harsh (geometric) approximation, which mean that comparatively other RTGI solution achieve better cost benefit ratio, without the baking cost. But the idea of showing all these AAA was to demonstrate that they had perfect solution, it was to show they are actively chasing it, and they have mix various technique and hacks to get to that level of RTGI whenever possible, baked solutions where never enough, that's why you have supplemental technique like SSR and SSAO.

    https://www.nvidia.com/en-us/geforce/news/cyberpunk-2077-nvidia-partnership-ray-tracing/

    I googled as soon as I posted my answer last time, but didn't bother to update, so now you know ...
     
    keeponshading likes this.
  10. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    318
    I only try to explain that precalculation who is comparable to ground truth path tracing is an good start for everything else.

    I can recommend this Blog and BakeLab.
    You can bake all kinds of SH s, SG s, even Enlighten Directional since 3 months and compare to GroundTruth path traced results.


    https://www.google.com/amp/s/myname...-lightmap-baking-and-spherical-gaussians/amp/

    Press Release...
    Sure they add some DXR features..) and NVidia must pay some fees for this press release to position RTX accelerated DXR.

    It s clearly stated that it add s another layer of depth... to already...) (love this quote, what i translate too. ok we do this press release but we write the text)

    "Ray tracing allows us to realistically portray how light behaves in a crowded urban environment," said Adam Badowski, Head of Studio, CD PROJEKT RED. "Thanks to this technology, we can add another layer of depth and verticality to the already impressive megacity the game takes place in."

    There is also mentioned that there is next gen hardware needed to allow 60frames + gameplay.

    But even next gen can not handle 60fps+ gamplay if full DXR feature set is running. (± RT indirect illumination)
    Probably an DXR station can handle it. But they sell not so good at the moment for 140K+. They also forgot the RT Cores for now.

    Red Engine 3 they started CP 2077 and did Witcher 3 is plastered with precalculated Light and Reflection probes.
    They started 7 years before. CP 2077 was completly playable 1 year before.

    Here the complete rest .. nice read
    https://astralcode.blogspot.com/2018/11/reverse-engineering-rendering-of.html?m=1
    in special the GBuffer
    https://astralcode.blogspot.com/2018/12/reverse-engineering-rendering-of_28.html?m=1


    But probably they delete all precalculation now.))
    and use only some RT Reflections and RT Shadows and commit fully to RT indirect illumination. 3 bounces around 0.5 fps.
    There is an extra option in Unitys Experimental DXR. Try it.
     
    Last edited: Jul 28, 2019
  11. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    638
    If Unity changes the name in Unicorn and accompanies GI solution, there will finally happen Unicorn GI. :cool::D
     
  12. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    318
    There was Unicorn Bake in 2018.2.
    1.5 years ago.



    Think I missed this special release.
    Probably i should go back to this release.
    Where can i download the scene?
     
    Last edited: Jul 28, 2019
  13. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    534

    This isn't a special release. This is the Progressive GPU lightmapper (It's still baking just faster than the CPU Version) it's in every version of Unity since 2018.3
    https://blogs.unity3d.com/2019/05/20/gpu-lightmapper-a-technical-deep-dive/

    The scene is on the asset store. It's the Blacksmith Environment by Unity.
    https://assetstore.unity.com/packages/essentials/asset-packs/the-blacksmith-environments-39948
     
    SamOld likes this.
  14. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    318
    I tried to rebake the Blacksmith environment (asset dowload is different to the one shown in the video) , later Fontainebleau , Book of Dead and FPS Sample in PLM.
    Tried PLM GPU bake on broad range of GPU s but it was mostly crashing and then waitet on CPU to finish several hours.
    I never could reach similar performance and interactivity like shown in the video.
    So wich Unity release, which GPU and wich Asset mod i need to get similar interactivity and speed.
     
  15. Werti100

    Werti100

    Joined:
    Aug 3, 2018
    Posts:
    6
    I'm mostly just looking forward to a better light probe workflow, it's currently almost un-usable for large scale maps, it's janky to work with, you need to place them manually which is an extremely lengthy and grueling task. I'm excited in seeing how good the GPU light mapper becomes, I tried it out even though it's in preview, the baking time was extremely quick but the baked GI results where pretty bad.
     
    OCASM likes this.
  16. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    318
    Unity is working on Lightprobe placement since 2012.
    Slide 45 and 46.
    https://twvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming Track/Cupisz_Robert_Light_Probe_Interpolation.pdf

    So should be finished soon.

    Meanwhile you can use this ones
    https://github.com/laurenth-unity/LightProbesPlacement
    also as package available
    https://github.com/laurenth-unity/LightingTools.LightProbesVolumes

    Also useful. A Post Processor for Meshes with "LPG_" prefix. Assigns a Light Probe Group to the object and generates a lightprobe per vertice.
    https://github.com/Unity-Technologies/FPSSample/tree/master/Assets/Tools/LightProbeGenerator

    There is also an Asset.
    https://assetstore.unity.com/packages/tools/level-design/lightprobe-generator-96395

    additionally you can bake L1 probes with Bakery when you want consistent nonleaking ones.

    Currently i am testing L1, L2 and SG probes in different variants
    There are some big aaaahs and ooohs.
    probe_basis_comparison (1).png

    https://mynameismjp.wordpress.com/2016/10/09/sg-series-part-6-step-into-the-baking-lab/
     
    Last edited: Jul 30, 2019
    Zergling103 and OCASM like this.
  17. Werti100

    Werti100

    Joined:
    Aug 3, 2018
    Posts:
    6
    Thank you for these! I will look into it.
     
    konsic likes this.
  18. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    638
    Is there any other 3rd party solution like Enlighten ?
     
  19. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,190
    Maybe soon, who knows
     
  20. Zergling103

    Zergling103

    Joined:
    Aug 16, 2011
    Posts:
    278
    While I'm sure you've guys done a great job with trying to get lighting completely realtime without baking, I have some concerns about this change.

    Let's recap: Enlighten works by precomputing visibility between surfaces, which is where most of the difficult work for realtime lighting lies. With this precomputation you are free to place, move and change lights as you desire, and light realistically bounces and propigates according to the precomputed visibility graphs.

    Perhaps Enlighten could have moved more of the propigation process onto the GPU. Perhaps they could have precomputed based on incoming light direction for specular reflections. Perhaps they could have internally represented this propigation data as volumes so that dynamic objects could directly benefit as well. But the point remains that this precomputation of visibility is valuable for some projects. Without visibility precomputation this work will have to be done in realtime instead, basically amounting to wasted processing in games with largely static geometry.

    From what I gathered, when Enlighten is removed, the only two options provided by default would be:
    1. Dynamic lights don't participate in global illumination. Only static lights have realistic propigation. Basically, bake everything, like how it was in the early 2000's.
    2. Realtime all the things. Make that GPU burn up. People will upgrade their hardware rite guys?
    I'm hoping that there is an inbetween similar to Enlighten, even if it isn't Enlighten itself.
     
    Last edited: Aug 3, 2019
    id0 and keeponshading like this.
  21. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,190
  22. Zergling103

    Zergling103

    Joined:
    Aug 16, 2011
    Posts:
    278
  23. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    288
    Lightmaps it's ancient technics, and unity call it "progressive" and we have to buy it.. Ok, unity.

    Enlighten was not ideal, but it was works, and now I'm must bake all lights, and can't even turn it on or off, because if it's realtime it looks wrong, and if it's baked it'a even worst. Ah, yes, there is RTX, but it's still unusable, and not much people has this videocards yet. So we are have no choice now, there what it is.
     
  24. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    638
    I think that one universal renderer should be priority (LWRP to become subset of HDRP) and then implement one lighting solution like in Unreal.
     
    Rich_A likes this.
  25. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    588
    This probably won't happen anytime soon. Consider that universality was identified as the reason that made it impossible for the legacy renderer to be made either performant or graphically cutting edge.
     
    OCASM likes this.