Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GPU lightmapper preview

Discussion in '2018.3 Beta' started by KEngelstoft, Sep 26, 2018.

  1. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    How large is your scene? I believe I currently have 12-15 512x512 terrains lined up.
     
  2. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,910
    Is there a reason for lightmapping 15 terrains?
     
  3. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    I’m using gaia and it requires a square terrain. The game I’m making is a rail shooter similar to starfox so I had to line them up.
     
  4. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    hello
    i have not tried the beta 6 since unity 2018.3 b3 ... myQ is did you guys fixed the cpu fall back issue.
     
  5. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    Large city map, currently around 2 million polys, will probably be a lot more once finished (AAA game).

    Really not looking forward to have a PC locked up baking this for a week whereas if Unity gets this GPU baker sorted I could have it done in a day easy.

    Tried real-time lighting but it's just too basic.
     
  6. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @KEngelstoft it seems gpu lightmapper stalling when Shader Graph are opened, it stuck at "0/2 Ambient Probes | 1 Jobs".
    and if i close shader graph it continues
     
  7. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    We will try this on our end, thanks for reporting it!
     
  8. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    Seems GPU baker still can't handle large scenes in Beta 10.
     
  9. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    hello , am i the only one who cant make gpu baker to work, it cant detect my gtx 1050 ti. and just stuck between falling back to cpu, i have the same issue with other opencl 3d apps. i am using the latest driver. Edit: In gpuz opencl is enabled.

    Console spam with:
    OpenCL Error. Falling back to CPU lightmapper. Error callback from context: CL_INVALID_PROGRAM

    Red warning:
    Failed to find a suitable OpenCL device, falling back to CPU lightmapper.

    Edit2: When i reverted back to NV driver version 399.24 Unity gpu baker and all other opencl apps are workin just fine. i hope Nv guys fix the issue with latest drivers.
     
    Last edited: Nov 20, 2018
  10. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    Do you also have an internal (intel) graphics card?
     
  11. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    The problems was latest nvidia drivers have issue with opencl, i have my intel gpu disabled in bios. the old nvidia driver works fine. i hope that nvidia is not trying to kill opencl :(
     
  12. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    Tried downgrading?
     
  13. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    Yes, to version 399.24 and it worked fine. maybe gpu baker must be updated to what ever nvidia did for its opencl.
     
  14. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    Edit: problem fixed with latest driver by removing the opencl shipped with unity, thus using opencl version from system32.
     
  15. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    I ended up buying Bakery (gpu lightmap baker asset), it just works, even with massive scenes, it's on sale at the moment.
     
    Prodigga, Ostwind and sendspace like this.
  16. Thall33

    Thall33

    Joined:
    Sep 18, 2013
    Posts:
    134
    You don't have to roll back that far. I narrowed down to 411.63
     
  17. Thall33

    Thall33

    Joined:
    Sep 18, 2013
    Posts:
    134
    I've been doing testing of the GPU vs CPU progressive light mapper since its preview release, besides sharing the bugs that everyone else has its been really impressive, but I wanted to bring up a quality comparison.

    Every test from each .13 beta release and 2019 alpha release has given me the same results as in the example below.

    Each comparison bake was used using the exact same settings.

    Cpu: Excellent results, a pretty clean finish (19min bake)



    GPU: Excellent bake time (14 seconds!), but the result is pretty blotchy and not clean.



    So my real question is, can we expect better, and consistent quality in the future? I understand this is preview, I just haven't seen anyone else mention this before and I think its an important topic as this is a major feature for reduced studio production time. I would really appreciate a response from a Unity developer on this, Thank you for your time :)
     
  18. as87dgs6asg0a

    as87dgs6asg0a

    Joined:
    Sep 2, 2013
    Posts:
    10
    I'm also getting the "Loaded programs and built CL kernels in ..." error. I'm on a GTX1080, drivers version is 416.81. The weird part is that there are two options "Progressive CPU" and "Progressive GPU" and both do the same and show the same error:

    OpenCL Error. Falling back to CPU lightmapper. Error callback from context: CL_INVALID_PROGRAM
     
  19. Thall33

    Thall33

    Joined:
    Sep 18, 2013
    Posts:
    134
    If you read the solutions above, download nvidia driver 411.63, last/recent working one I could find. This is the way it is until patches are out for betas/alphas.
     
  20. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    The CPU is slightly noisy as well I think. Just bump the indirect samples (like 1024 should be more than enough I think).
     
  21. fguinier

    fguinier

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    146
    Hi Thall33,

    The goal is to have the GPU and CPU version at a similar quality level when the GPU version will be out of preview :).
    By the way: We continue to improve the CPU lightmapper while doing the GPU one, so quality will be raised in general.

    Florent
     
    Lars-Steenhoff likes this.
  22. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,114
    Hi @fguinier, is there any plan to add graphics card selection UI at Lighting Window anytime soon?
     
    Lars-Steenhoff likes this.
  23. fguinier

    fguinier

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    146
    We will soon select automatically the main graphics card (ie the one used for unity editor rendering) for baking automatically. Meantime https://forum.unity.com/threads/gpu-lightmapper-preview.561103/ explain how to select the right device.
     
    optimise likes this.
  24. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    Looks like many ignored my solution for opencl issue;
    Just remove OpenCL.dll in editor folder and you are good to go with latest driver.
     
    Exbleative likes this.
  25. Thall33

    Thall33

    Joined:
    Sep 18, 2013
    Posts:
    134
    Thanks, I'll try this out!
     
    sendspace likes this.
  26. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Is this always the best card? I'm planning to use my MacBook Pro with an external video card. ( eGPU enclosure)
    The MacBook Pro has 2 cards inside
    Radeon Pro 460 4096 MB
    Intel HD Graphics 530 1536 MB

    I would normally use the Radeon Pro 460 for the unity editor. and external Nvidia RTX card for rendering light maps. ( external card with no monitor attached )
     
  27. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    If the eGPU is listed as an available device in the editor log (look for -- Listing OpenCL platforms(s) -- in the log) it can be used for baking.