Search Unity

Making Progresive CPU baker use all proccessor threads/cores at full speed (100%).

Discussion in 'Global Illumination' started by pappu33, Sep 25, 2019.

  1. pappu33

    pappu33

    Joined:
    Apr 8, 2015
    Posts:
    14
    Hi All, we are trying to bake a rather large scene for personal use app. We have ryzen threadripper, but the thing is it doesn't go at full clock when baking(only uses 25%), as shown in images below. Is there anyway we can make unity use full 100%? We wont be using the system until bake is finished.
    upload_2019-9-25_11-8-7.png
    upload_2019-9-25_11-9-5.png
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Progressive CPU lightmapper should scale across all threads in your CPU. I know that back in 2018.2 we had a bug with multi-threading while baking, but it has been long resolved.

    Would it be possible for you to upgrade to 2019.2 or 2019.3, and test whether you experience the same behavior? Thanks.
     
  3. pappu33

    pappu33

    Joined:
    Apr 8, 2015
    Posts:
    14
    The problem is Unity not utilizing 100% Clock Rate, not all threads. As you can see in image all the threads are running but barely crossing 1GHz. I checked with 2019.2 still same thing.
     
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    We have a 1950X to profile on and it can go to 100% on all cores when baking. Are you by any chance using lightmapped LODs?
     
  5. simonkendrew

    simonkendrew

    Joined:
    Aug 31, 2017
    Posts:
    33
    I'm looking at getting a new Windows desktop PC for Unity development to replace my 4 year old laptop. I'm interested in knowing more tech details of CPU and GPU (preview) progressive lightmap baking performance on newer hardware and also VFX graph performance. I'm currently looking at an RTX 2080 or RTX 2080 Ti for the GPU. Regarding the CPU, will the CPU progressive lightmapper scale to use all cores I have? Even if 10 / 12 cores? Is there any technical docs / details I can read about development hardware / current limitations?
     
  6. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    CPU lightmapper has no scaling issues, it can fully load my 14 core i9 CPU. For the GPU (if you want to use it with the GPU lightmapper), get the Ti because it has more memory than the non-Ti.
     
  7. simonkendrew

    simonkendrew

    Joined:
    Aug 31, 2017
    Posts:
    33
    Thank you :)
     
  8. simonkendrew

    simonkendrew

    Joined:
    Aug 31, 2017
    Posts:
    33
    In what other areas does the Unity Editor benefit from a multi-core CPU? Build publishing? Anything else?
     
  9. DaReign

    DaReign

    Joined:
    Apr 12, 2013
    Posts:
    79
    So basically more cores is always better for light baking ? And how about compiling build for android, still more cores is better for example ryzen 2700 vs 3600 ?
     
  10. JenniferNordwall

    JenniferNordwall

    Unity Technologies

    Joined:
    Sep 19, 2016
    Posts:
    160
    Hi :) Please ask this question in the android section of the forum. Easier for people to find it if they have the same question later on. Thank you!
     
  11. eusebium

    eusebium

    Joined:
    Jul 23, 2016
    Posts:
    84
    I have the same behaviour in Unity 2021.1.27 on i9, Quadro RTX 5000 Max-Q 16 GB, 32 GB RAM. My scene has an imported OBJ file (~455MB from a .nwd file) which represents a building (No LOD Group) - 1 Directional light (as sun) and many lights with an emission texture. The Lighting settings are very low and it still takes ~45-60 minutes to finish the baking (~15-20% CPU use).
    upload_2021-12-5_19-17-15.png

    On what settings should I look?
     
  12. eusebium

    eusebium

    Joined:
    Jul 23, 2016
    Posts:
    84
    I think I found it - I had static batching enabled. Once I disabled it and rebake from scratch, the Editor started to use 100% CPU.
    Edit: Nope, it's not static batching - I only reverted the Lightmapping settings to the default values.
     
    Last edited: Dec 5, 2021
    andreiagmu likes this.