Search Unity

[RELEASED] Billboard Generator

Discussion in 'Assets and Asset Store' started by WinterboltGames, Jun 30, 2020.

  1. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Billboard Generator is a tool used to generate billboards for any object in Unity in the editor and at run-time!

    Here's a video showing it in action →



    And here's a getting started video →



    The plugin is currently available on the Asset Store.

    Features:
    1. Generate any number of billboards for any object!
    2. Works in the editor with a simple-to-use GUI
    3. Works at run-time exactly as it works inside the editor.
    4. Easy to use! Just import the asset, open the window, fill out the requirements and press 'Generate'
    5. No external dependencies! Pure Unity C#.
    6. No need to have cameras in your scene in order for the plugin to work! Everything is automated and 'silent'.
    7. Full source code included!
    8. Includes components for rendering & batching huge numbers of billboards!
    9. Can generate billboard texture atlases.
     
    Last edited: Dec 25, 2021
    Ali_V_Quest likes this.
  2. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Doing a giveaway, the first reply on the thread after this one will get a free Billboard Generator voucher!
     
  3. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    I'd definitely like to give this a try!
     
    WinterboltGames and vertexx like this.
  4. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    379
    Boo! You beat me to it. Looks a good asset too!
    Price is right. Might have to open the wallet. Disturb those moths?
     
    WinterboltGames likes this.
  5. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    An update is in the works and it will include the following features:

    - Better editor GUI.
    - Support for different settings per object.
    - Multi-threading to avoid freezing the editor.

    NOTE: Greyed-out features are NOT a guarantee but rather a possibility.
     
    StevenPicard likes this.
  6. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Here's a screenshot showing the new GUI...



    - Much more compact and straight forward.
    - Ability to copy and past settings.
    - Supports dragging-and-dropping multiple objects at once now.
     
    StevenPicard likes this.
  7. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    The new update is in review now and should be out soon!
     
    StevenPicard likes this.
  8. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Apologies for the month long delay on the latest release, life got in the way. Today I have submitted v2.0 for review and it should (for real this time!) be out soon!
     
  9. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Version 2 is live on the asset store!

    The following features have been added:

    - Copy & paste settings between multiple objects.

    - Orthographic and Perspective camera modes supported.

    - Adjustable Orthographic Size and Field of View.

    - Source code is now included (to hell dll!)

    - Output preview window with adjustable speed.

    - And more!

    Get it here -> https://assetstore.unity.com/packages/tools/utilities/billboard-generator-174195
     
  10. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Next update is going to focus on the following:

    - Improving the documentation.
    - Adding persistence to the tool window.
     
  11. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    An update will be submitted today and it will include a new Billboard script, check out the video demonstration below!

     
  12. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    The 2.5.0 update is live on the Asset Store!
     
  13. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    The next update (coming very soon) is going to add the following features:

    - Texture atlas generation!
    - Add settings assets which allows reusing the same settings for multiple objects.

    Also, there'll be improvements like:

    - Renaming the scripts to avoid conflicts and improve organization.
    - Removal of some unused code.
     
    StevenPicard likes this.
  14. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Update 3.0.0 is very close to release (this or next week*) and it is going to have many new features and improvements like:
    • New Runtime Billboard Renderer (using
      Graphics.DrawMesh
      ).
    • New atlas generation option (which allows the usage of Runtime Billboard Renderer).
    • Removing redundant callbacks from generation functions (except
      Action<Texture> progress
      )
    The new Runtime Billboard Renderer allows rendering hundreds of billboards without the overhead of managing MeshFilters and MeshRenderers also, if you use Unity 2019 LTS or higher you'll be able to draw even more with no performance impact.
     
    StevenPicard and f1chris like this.
  15. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Here's a video showing the upcoming Billboard Renderer in-action:
     
    StevenPicard likes this.
  16. vlastan

    vlastan

    Joined:
    Nov 15, 2015
    Posts:
    49
    Nice. Will those billboard be able to cast shadows like the speedtree billboards do?
     
    WinterboltGames likes this.
  17. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    If you use a cutout shader (My plugin doesn't require any special shaders mind you) then yes, they will.
     
  18. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Will this billboard generator work for assets that use custom shaders, like AZURE Nature?
     
    WinterboltGames likes this.
  19. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Sure, I have tested it with multiple assets (like toon shader) and it renders custom shaders just fine!

    If anything gets in your way though you can contact me via email or forum conversation and I will be sure to help you out.
     
  20. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I will wait for the latest release and then give it a try.
     
    WinterboltGames likes this.
  21. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Version 3.0.0 has been submitted for review today! It includes the following (and much more) new features, improvements, and fixes!

    - Generator settings is now an asset that can be created and stored in the project! This allows reusing settings between different objects.

    - Added new atlas generation feature.

    - New "Runtime Billboard Renderer" that replaces the old "Billboard" script.

    - Removed unused/useless callbacks (begin, finish, error).

    - Now you can choose where to save the resulting billboards atlases/textures.

    - A step-by-step walkthrough ODP (Open Document Presentation) file is now included to help make it easier to understand how to use the asset.

    - Some code improvements.
     
    StevenPicard likes this.
  22. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    The new update 3.0.0 is live on the asset store!
     
    StevenPicard likes this.
  23. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    A little cool feature would be to automatically adjust the camera based on the selected object. Like auto-centering !!
     
    WinterboltGames likes this.
  24. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Already working on multiple auto centering modes (transform, mesh, colliders, bounds)
     
    f1chris and StevenPicard like this.
  25. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    upload_2020-10-2_20-42-51.png

    Last part of your quick setup is empty/broken.
     
    WinterboltGames likes this.
  26. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Can you make a video on how to use this and how it works? I followed the Quick Setup steps up to the last one (which I can't see) and I'm not sure this is what the material should look like. Using Unity 2020.1.7f1 with URP 8.2.0

    upload_2020-10-2_20-47-8.png
     
    WinterboltGames likes this.
  27. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Going to fix this soon and publish the fixed version here.
     
  28. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    You're using a transparent material which is correct, did you set your texture "alpha is transparency" to true?
     
  29. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I did, yes.
     
    WinterboltGames likes this.
  30. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Okay, I'm going to investigate this immediately and get back to you ASAP! Can you please tell me which version of URP and Unity are you using?
     
  31. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    @Exeneva also, did you click, "Generate" or "Generate Atlas"?
     
  32. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    @Exeneva just tested using Unity 2020.1.6f1 and URP 8.2.0 and both the generated texture and the material are generated and rendered correctly.


     
  33. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I clicked Generate Atlas. Not sure how to use the Generate button since the last step of the Quick Setup is missing.

    Unity 2020.1.7f1, URP 8.2.0

    upload_2020-10-3_1-42-4.png
     
    WinterboltGames likes this.
  34. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    I have just noticed, your generated atlas size is extremely small, you should increase the size a little bit and see if it looks better. (Increase both the 'texture width' and 'texture height' in the generator settings)

    EDIT: Also, can you please share a screenshot of the generator settings asset you're using?
     
  35. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    upload_2020-10-3_2-46-10.png

    Interesting that the width is only 128 even though I set it to 256.
     
  36. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Okay, I see what's wrong now...

    1 - The "Texture Width" & "Texture Height" are per-texture not the total size of the atlas, the atlas size is automatically calculated for you.

    2 - The 128px atlas width is because in the resulting texture you set the "Max Size" to 256px which scales the texture down on BOTH axis, you should set that to a higher value and your atlas should be WAY bigger and of much higher quality.

    3 - You didn't check any of the Rotate On X, Y, or Z axis toggles so, the billboard rendering camera doesn't rotate around the object and simply stays in the same position and does nothing.

    4 - The camera offset is at (0, 0, 0) which makes the billboard camera say "inside" the object you're trying to render. You must change that value so that the camera is a little far away from the object you're trying to render.
     
  37. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Ah, this makes sense. Now I see how this asset works (could use greater explanation in a doc or a video).

    What are common settings you use for trees?
     
  38. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    - Docs yeah, the next update is not going to focus on features (except for the auto-centering stuff) but rather docs and videos explaining the asset, don't worry.

    - Depends on the size of the tree, you can experiment and see what works for you.

    EDIT:

    - You could generate an atlas of 72 directions at 512x512 to achieve a good-looking billboard when used at runtime.
     
  39. vlastan

    vlastan

    Joined:
    Nov 15, 2015
    Posts:
    49
    I've generated the atlas, but now i have no idea how to use the runtime billboard component.
     
    WinterboltGames likes this.
  40. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    - Create a new empty GameObject.

    - Attach a 'Runtime Billboard Renderer' script to it.

    - Fill the required fields (except for the 'Mesh' field)

    - Hit play and volia!
     
  41. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I really want this to work, but I can't seem to get a good billboard atlas.

    upload_2020-10-3_20-25-26.png

    upload_2020-10-3_20-23-53.png
     
    WinterboltGames likes this.
  42. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
  43. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    An update will be released soon and will include an option that allows you to use an exact copy of the main camera in the current scene to generate your billboards (should be useful when using post-processing or scriptable render pipelines).
     
    Last edited: Oct 5, 2020
  44. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Update 3.5.0 was submitted for review and should be live soon!
     
    f1chris likes this.
  45. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    What is in this version?
     
    WinterboltGames likes this.
  46. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    - 'Use Main Camera' toggle added to
    GeneratorSettingsAsset
    to use a copy of the main camera to generate billboards instead of creating one from scratch.

    - "Use Alternative Workflow" added to
    RuntimeBillboardRenderer
    to use a
    MeshFilter
    & a
    MeshRenderer
    instead of
    Graphics.DrawMesh
    . (Useful when using the LOD System)
     
  47. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Is there any automatic scaling for the created billboard, or do we have to manually scale the billboard for each mesh to match the size of the original object? I think that is one of the issues from our screenshare sessions we have done - having to manually resize the billboard to fit into an object's existing LOD group so it is not super small.
     
    WinterboltGames likes this.
  48. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Automatic Scaling turned out to be a tough feature to implement and will take me some time to implement. Currently I'm prototyping ideas and trying multiple different approaches to ensure that it's a universal solutions that will work for any scenario. Rest assured, it's a very high priority feature and I'm working daily trying to implement it.
     
    Exeneva likes this.
  49. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    For people looking for real-time support and/or a quick way to ask questions and get answers, join my discord server via this link: https://discord.gg/GnYHK98
     
    Exeneva likes this.
  50. WinterboltGames

    WinterboltGames

    Joined:
    Jul 27, 2016
    Posts:
    259
    Update 3.5.0 is now live on the asset store!