Search Unity

Discussion Ideas for implementing Billboards/Imposters in HDRP

Discussion in 'High Definition Render Pipeline' started by AndyMorrin, Mar 14, 2023.

  1. AndyMorrin

    AndyMorrin

    Joined:
    Aug 2, 2017
    Posts:
    5
    In the built-in render pipeline, you can use the Billboard Renderer component with a Billboard Asset and it works great (assuming you've figured out how to bake a Billboard Asset and create a material with a suitable shader i.e. SpeedTree Billboard Shader - see this thread). I have done this and tested it, and it works fine.

    Unity says here that the Billboard Renderer component works in URP (I've tried, it doesn't), and in HDRP "only with VFX graph". One problem is I can't find any resources on how to implement the Billboard Renderer with the VFX graph (so any help here would be great), and another problem is that since I can't get it to work in URP, I'm worried it won't work in HDRP either despite what the above link says.

    I even tried to workaround the Billboard Renderer - I found some threads about making billboards with Shader Graph (here, here) as well as other resources such as here. I went even further than that and filtered through GitHub repositories to no avail. None of the solutions I have found work properly in HDRP (though some work in URP).

    Now for some context: I am attempting to develop some tools that will enable developers to make huge open world games (will soon begin community building if you're interested), and I have created an algorithm derived from the QuadTree data structure that breaks the game world into nodes (scenes) of different sizes, levels of detail, etc. and streams nodes based on the distance from the player camera. Long story short, distant parts of the world are large scenes consisting of imposters only, while nearby parts are smaller scenes with more detail. Without a proper way to render billboards/imposters in HDRP, this algorithm is almost pointless. Besides that, why would Unity expect any game to not use billboards/imposters for distant objects? It's just a waste of resources.

    To summarise, I have scoured the internet for days and have yet to find any method to implement imposters (like the Billboard Renderer does it) that works in HDRP or even URP (not including paid assets). There must be someone out there, even someone from Unity, that knows how to implement imposters/billboards in HDRP - or even URP?

    If you have any ideas, please share them here!
     
  2. ElevenGame

    ElevenGame

    Joined:
    Jun 13, 2016
    Posts:
    146
    I don't know much about Unity's official solution to that, but I've been using Amplify Imposters in older versions of HDRP and it worked fine.. (using their included HDRP package)
     
  3. mgeorgedeveloper

    mgeorgedeveloper

    Joined:
    Jul 10, 2012
    Posts:
    329
    We use Amplify Imposters

    After moving to U2022.2 there was a while when things were broken, but today I installed the latest ASE + Amplify Imposters and so far it is all holding up. Pay close attention also to the "shader packages" included, where you can unpack an additional package for the correct shaders, e.g. for HDRP 14.
     
  4. OBiwer

    OBiwer

    Joined:
    Aug 2, 2022
    Posts:
    61
    In my opinion there is a clear separation between imposters and billboards. just saying.

    As others said: Amplify Imposters is for imposters basically the go-to soution. (honorable mention: xraxra/IMP: billboard imposter baking for Unity (github.com) does not work in HDRP, but since it's open source, you could convert it)

    For billboards on the other hand... you should be able to write a simple shader that orients the plane towards the camera (as billboards do).

    this could be a starting point:
    upload_2023-3-29_12-39-52.png

    note that this shader does not work for static-batched objects. but that should be no problem for your use case.


    just leaving this here: Foliage Optimization in Unity (gamedeveloper.com). Was an intresting read for me and might be related.
     
    Reanimate_L, Ruchir and ElevenGame like this.