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

Question Progressive GPU Error : Failed to add geometry for mesh 'stud'; mesh is missing required attribute(s

Discussion in 'Global Illumination' started by WilliBoelke, Sep 24, 2020.

  1. WilliBoelke

    WilliBoelke

    Joined:
    Jul 30, 2020
    Posts:
    2
    Hell everyone,

    I have some problems with the Progressive GPU lightmapping:

    When I start to generate lighting with Progressive GPU the error

    OpenCL Error. Falling back to CPU lightmapper. Error callback from context: CL_INVALID_PRO

    occurs several times and the lightmapper in the Lighting settings changes to Progressive CPU.
    When I then switch it back to the GPU lighmapper and click on generate lighting I get the following error message and the lighmapping stops at "preparing bake".

    [PathTracer] Failed to add geometry for mesh 'Cylinder'; mesh is missing required attribute(s). Please make sure the mesh contains at least positions, normals and texcoord0.

    I tried several things to solve the problem:

    1.) Find the "Clyinder" in my Scene. Because there was nothing wrong with it, I deleted it from the scene and tried baking the light again. Still the same error message.

    2.) I opened another scene from my Project and tried it there. Stil with the same result.

    3.) Started a completely new Project, ( from the Unity hdrp template ) and still i got those errors. But this time it is 'stud' instead of 'Cylinder'.

    4.) Uninstalled and updated unity

    here some further informations:

    I use the HDRP.
    Progressive CPU seems to work fine.
    The version of unity was 2019..4.6f1 and i updated to 2020.1.6f1.
    I use a Nvidia 1070 GPU, with the laest river installed.

    Some days ago Progessive GPU just worked fine.

    I hope i gave all necessary information.

    Thanks for your Help
     
  2. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    Hey there,

    Does this only reproduce on HDRP, or does the issue also occur with the other render pipelines?

    Does it reproduce using older versions of Unity, for instance the 2019.4.6f1 version you mentioned?

    A bug report would be much appreciated :)
     
  3. WilliBoelke

    WilliBoelke

    Joined:
    Jul 30, 2020
    Posts:
    2
    I have this problem with both versions 2019.4.6f1 and 2020.1.6f1
    But on 2019.4.6f1 it worked fine till yesterday.
    I just reproduced the issue using the Universal Render Pipeline (2020.1.6f1)

    Okay I will file a bug report after I made sure that it is an actual bug and not something that happens due to me doing something wrong.
     
  4. CGDever

    CGDever

    Joined:
    Dec 17, 2014
    Posts:
    154
    Have the same
     
  5. ADufay

    ADufay

    Unity Technologies

    Joined:
    Jan 2, 2020
    Posts:
    30
    Hello @CGAleksey, can you provide a little bit more details on what is the issue you are facing?
    What GPU are you using? What is the error message you got on first fallback ?

    Cheers
     
  6. CGDever

    CGDever

    Joined:
    Dec 17, 2014
    Posts:
    154
    Hello @ADufay, thanks for answer!
    If I will be able to reproduce this error, I'll post more details here
     
  7. CGDever

    CGDever

    Joined:
    Dec 17, 2014
    Posts:
    154
    I got just this error: [PathTracer] Failed to add geometry for mesh '1_MD_LOW_0'; mesh contains non-finite values.
    Unity 2020.2.3f1.

    Still no idea how to reproduce this error
     
  8. Gillissie

    Gillissie

    Joined:
    May 16, 2011
    Posts:
    294
    Unity 2020.2 is killing me with these lighting bugs. I'm also getting this, and a spamming of other errors when trying to bake a particular scene, which baked just fine in 2018.

    In addition to:
    [PathTracer] Failed to add geometry for mesh 'Bowl of Lemons'; mesh contains non-finite values.

    These four errors spam forever over and over.
    Line 215 in Verify - Geometry geom 0bbf78ae58547087ca378406dcd837eb: Index 0 has value 0 that reads non-finite value nan in channel 5, element 0
    Line 229 in Verify - Geometry geom 0bbf78ae58547087ca378406dcd837eb: 3480 components out of 17400 total are non-finite
    Line 215 in Verify - Geometry geom 90af17aaab61d5caa8cb756606acbed7: Index 0 has value 0 that reads non-finite value nan in channel 5, element 0
    Line 229 in Verify - Geometry geom 90af17aaab61d5caa8cb756606acbed7: 960 components out of 4800 total are non-finite
     
  9. Gillissie

    Gillissie

    Joined:
    May 16, 2011
    Posts:
    294
    Reported my bug... case #1318450
     
    KEngelstoft and Pema-Malling like this.
  10. Calvin2274

    Calvin2274

    Joined:
    Sep 11, 2014
    Posts:
    17
    Same here.

    using 2019.4.23f1, trying to bake lightmap and keep showing errors like this

     
  11. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    Hey,
    This should be fixed in 2021.2.0a9. Backports for have 2019.4 have been requested, too.
     
    viesc123 likes this.
  12. eduroam

    eduroam

    Joined:
    Jul 2, 2015
    Posts:
    48
    And backport for Unity 2020.3.2f1 LTS version? In my case I'm using URP
     
    RoyBarina likes this.
  13. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    Yes
     
    RoyBarina likes this.
  14. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    179
    We had the same issue and found out that our created mesh (pro builder) had some strange uv coords (NAN). So we added a short fix and we got rid of the error above. Just use the following editor script to fix the issue (make a backup of your mesh first) and select the gameObject with the mesh in question and execute the following command(s):

    Code (CSharp):
    1. [MenuItem("ProBuilderHelper/Check and fix mesh")]
    2. private static void CheckAndFixMesh()
    3. {
    4.    //Fix uv issues so that lightmapper can work!
    5.    MeshFilter mf = Selection.activeGameObject.GetComponent<MeshFilter>();
    6.    Vector2[] verts = mf.mesh.uv;
    7.    bool assignBack = false;
    8.    for (int i = 0; i < verts.Length; i++) {
    9.        if ((float.IsNaN(verts[i].x)) ||
    10.            (float.IsNaN(verts[i].y)))
    11.        {
    12.            assignBack = true;
    13.            Debug.LogError("Float error:" + i  + " v:" + verts[i].ToString("F4"));
    14.            verts[i] = Vector2.zero;
    15.        }          
    16.    }
    17.    if (assignBack) {
    18.        Debug.Log("Fix mesh!");
    19.        mf.mesh.uv = verts;
    20.    } else {
    21.        Debug.Log("Mesh is ok!");
    22.    }
    23. }
    Enjoy ;)
     
    Last edited: May 3, 2021
  15. kankeus

    kankeus

    Joined:
    Dec 3, 2013
    Posts:
    12


    Just amazing. This fixed my problems. Thank you! :)
     
  16. Nicokam

    Nicokam

    Joined:
    May 28, 2020
    Posts:
    64
    Hello everyone.

    I am having the same issue but I have a lot of GameObjects in my scene and from the error, I don't know how to identify which one it is in order to apply your code, @Zapan15 .

    Does anyone have any suggestions on how to find it? @Pema-Malling @ADufay

    [EDIT]

    These are the errors:

    Line 215 in Verify - Geometry geom f81e1dc919d514b7041e588d39cbb9a6: Index 0 has value 0 that reads non-finite value nan in channel 4, element 0

    Line 229 in Verify - Geometry geom f81e1dc919d514b7041e588d39cbb9a6: 1044 components out of 63660 total are non-finite

    [PathTracer] Failed to add geometry for mesh 'pb_Mesh99780'; mesh contains non-finite values.

    [EDIT 2]

    Fixed it by doing what is suggested in both of this posts:

    https://stackoverflow.com/questions...brighter-after-upgrading-to-unity-2018-2-18f1

    https://forum.unity.com/threads/mesh-error-when-baking-lights.1061249/

    Unticking contribute to global ilumination and the other steps.
     
    Last edited: May 20, 2021
  17. eumarciogd

    eumarciogd

    Joined:
    Jul 23, 2015
    Posts:
    4
    I had the same problem, you can solve it by checking this option. I hope I helped you.
     

    Attached Files:

    HoshimiyaSio likes this.
  18. DragonmoN

    DragonmoN

    Joined:
    Nov 27, 2016
    Posts:
    26
    If this happens with Probuilder Objects, selecting all Faces on the faulty Mesh and "Rest UVs" via the UV Editor worked at least for me. Migrated a old Project and rund in the same error on CPU and GPU Baking.
     
    Nate27624 likes this.
  19. AqueuseAkaLLO

    AqueuseAkaLLO

    Joined:
    Aug 18, 2021
    Posts:
    7
    Saved me, thx !
     
  20. Abdullah130

    Abdullah130

    Joined:
    Sep 8, 2020
    Posts:
    3
    Thanks so much.
     
  21. Mashimaro7

    Mashimaro7

    Joined:
    Apr 10, 2020
    Posts:
    723
    Sorry to necro, but I'm on 2021.3.23f1 and getting this error... Unity's lightbaking is atrocious, so many issues...
     
  22. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    Hmm.. It might be a different issue with the same symptom. I'm afraid I can't really give better advice than to file a bug report if this is blocking you.
     
  23. Mashimaro7

    Mashimaro7

    Joined:
    Apr 10, 2020
    Posts:
    723
    Alright, ill file one. I actually used to be able to bake on "Enlighten" but now i'm completely unable to bake no matter what setting i choose. I tried the above solution of turning "Generate Lightmap UV" to every model and it did nothing

    upload_2023-9-21_13-46-14.png

    Ill file a report, but here's the errors i'm getting if you have any insight. Baking does not move forward no matter how long i wait, this is after i had it baking for maybe a minute.
     
  24. HoshimiyaSio

    HoshimiyaSio

    Joined:
    Apr 20, 2023
    Posts:
    1
    I followed and it works, thank you