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

What is the most Efficient method for making a mesh and rendering it?

Discussion in 'World Building' started by Rickmc3280, Aug 3, 2020.

  1. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    187
    Options:

    Mesh with Vert3s
    Mesh with Ints?

    Mesh will not have triangles, it will only be represented by points (think point cloud).

    Is it possible to create a mesh of ints? I was thinking that it would be possible to create meshes of very specific dimensions based on metric scales. For instance int 8 will give me 255 values, I can ignore 5 values for a total of 250. Therefore, I could break a game object into meshes of 4x4x4.

    This would give me 50% memory savings, however... the question really is... What is the most efficient way to get data to the GPU? Does it only take Vector3? If it did take Int8/int16, is it more or less efficient? Any performance gurus out there that know the answer to this?
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,840
    The GPU only takes Vector3s. Moreover, the only way to get a mesh to the GPU is to use the Mesh class provided by Unity; you can't just make up your own.
     
  3. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    546
    Rickmc3280 and JoeStrout like this.
  4. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    187
  5. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    187
    Will Unity ever build out options that are more practical for other applications?

    Example Meshes with "other" parameters? It is simple math... between the CPU and GPU it would be possible to efficiently do. Maybe release some experimental packages for impractical situations? (situations that are not common, but yet frequent enough to allow advanced adaptations)
     
  6. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    187
    why not... its just code...