Search Unity

Rendering Extremely Large Meshes

Discussion in 'General Graphics' started by kevin63857, Sep 5, 2017.

  1. kevin63857

    kevin63857

    Joined:
    Aug 24, 2017
    Posts:
    1
    I currently have the need to render meshes with 5-25 million triangles in them. These meshes are calculated at runtime and I want the ability to load the VBO to the graphics card and store it there between frames. I currently render them using the GL library, but that has the disadvantage of clearing the VBO every frame (and it takes around 1300ms to load my 5 million triangles, so clearing every frame is not an option). Does unity have the ability to support extremely large meshes? If not, how should I go about rendering this.
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Unity 2017.3 supports it. You will have to wait for that (beta or otherwise). https://unity3d.com/unity/roadmap 32 bit mesh index buffers.

    Otherwise you'll have to chunk it.
     
    tonialatalo, npatch and Martin_H like this.
  3. tonialatalo

    tonialatalo

    Joined:
    Apr 23, 2015
    Posts:
    60
    any chances there'll be a beta or preview of 32bit mesh index soon now?
     
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    2017.3 beta starts probably in October, that's 2-4 weeks I guess.
     
    richardkettlewell likes this.
  5. philc_uk

    philc_uk

    Joined:
    Jun 17, 2015
    Posts:
    90
    25Mil triangles.. unless its a console game you could well kill alot of machines asking it to do that plus all the other stuff.
    Dont forget its impossible to actually see that much detail in one frame. Perhaps its best to chunk it, as parts get further away, lower the LOD.
     
  6. pumlandmg

    pumlandmg

    Joined:
    Oct 16, 2017
    Posts:
    1
    I am a beginner, I am creating a basic FPS game using a terrain. When I painted the 3d grass on you can only see it when your really close. How do I make it so that from the FPS controller you can see the grass from far so that it doesn't look bare?
     
  7. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    So you painted grass as geometry right on the terrain mesh? Not sure what you do there but you should consider to use Unity terrain or at least you have to use some kind of LOD system for your scene. Splitting up big meshes is always a good idea as it can be culled. Especially Grass is something you don't want to be vissible (in full detail) when you are further away. And this is what the Unity terrain can help with.

    Edit: The 32-bit Mesh buffer is already available for 2017.3 Beta. I just imported a mesh with 2 million triangles!
     
    Last edited: Oct 17, 2017
  8. philc_uk

    philc_uk

    Joined:
    Jun 17, 2015
    Posts:
    90
    Set the detail distance in the terrain settings. If you want to increase it further than the inspector editor allows - set it in code. (You can set it in Debug inspector mode but it will jump back if you ever set it back to Normal - Right click on the Inspector tab name)