Search Unity

Question Advise Needed On Additional Geometry

Discussion in 'General Graphics' started by taloskal, Aug 2, 2020.

  1. taloskal

    taloskal

    Joined:
    May 2, 2020
    Posts:
    10
    I have several different instanced individual meshes, all using the same cube mesh but with different scales. You can think of it as a blocky world.

    I wish to add "studs" similar to a LEGO brick at the top surface of each of these blocks, but I need advise on efficient approaches. Here are some ideas I have in mind:
    • Create one stud as a Mesh Renderer then instance it across each block such that it tiles on the top surface. Each individual stud can also have LOD such that it disappears on far distances.
    • Create a shader that adds the additional stud geometry to the bricks at the Geometry Stage aka a Geometry Shader. An important question to this is also if it will break the GPU instancing...
    Some additional information:
    • My meshes need to be GPU instanced as each brick can change dimensions or position at run-time, so static batching is not an option and dynamic batching does not scale well.
    • My target platforms are computers and high-end laptops, so I can afford a greater polygon count, which is why I would ideally like to use geometry instead of texture / normal maps.

    Any advise or opinion will be greatly appreciated.
     
  2. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    401
    taloskal likes this.
  3. taloskal

    taloskal

    Joined:
    May 2, 2020
    Posts:
    10
    jamespaterson likes this.