Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Optimal approach to draw millions of camera facing sprites for massive vegetation “billboard clouds”

Discussion in 'General Graphics' started by ElegantMetal, Jul 7, 2021.

  1. ElegantMetal

    ElegantMetal

    Joined:
    Oct 17, 2015
    Posts:
    11
    Some have shown that a great way to render vegetation is with a “billboard cloud”. I want to pursue this idea further to visualize conifer forests on large landscapes. I am trying to figure out a well-optimized approach for implementation in Unity.

    The conifer trees will consist of a simple mesh for the trunk and a surrounding cloud of camera-facing billboards (“leaf cards”) for the canopy. You can draw trees like this in Speedtree 7 and they look quite nice. However, in speedtree, the modelling is done by hand and usually each model is a game object.

    Instead of going tree-by-tree, I want to simply render a whole forest of leaf cards as one big procedural conglomerate. Using some math skills, I can generate a list of locations to instance a tree trunk (as a mesh). I can also generate a list of positions around each tree where I want to instance leaf cards for the canopy. Then, I can concatenate all of the leaf card positions across the forest into one big list.

    This is where I am stuck though. Next, I want to write scripts and a shader which will efficiently draw all of the leaf cards in the list as camera-facing sprites complete with nice shadows (like speedtree has). What is the most efficient way to make the leaf cards face the light source for shadow rendering, then face the camera for the final rendering?


    Speedtree 7 mesh trunk with cloud of camera facing leaf cards



    Academic references to “billboard clouds”. There are many.

    https://kops.uni-konstanz.de/bitstream/handle/123456789/27882/Kratt_278823.pdf;sequence=2

    https://www.academia.edu/858644/Tree_rendering_with_billboard_clouds
     
  2. jtenny

    jtenny

    Joined:
    Aug 9, 2019
    Posts:
    7
    Sounds like an interesting approach. I'm also interested to see what insights people have.