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

[RELEASED] Imposter System OPTIMIZATION

Discussion in 'Assets and Asset Store' started by MUGIK, Aug 18, 2016.

?

Are you interested in this project?

  1. Yes.

    168 vote(s)
    92.8%
  2. Maybe.

    11 vote(s)
    6.1%
  3. No.

    2 vote(s)
    1.1%
Thread Status:
Not open for further replies.
  1. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Can you send me this tree model, please?
     
    Last edited: Aug 20, 2017
  2. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    181
    it's nothing special, classic tree made using unity tree creator. I could upload this on mega and send you in private message
     
  3. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Unity Tree Creator is deprecated system. There is a bug(or feature) in Leaf shader that there is no Z writing. The only way to fix it is to use custom material, for example with Unlit/TransparentCutout shader upload_2017-8-20_21-32-39.png
     

    Attached Files:

  4. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    181
    How did you use custom material in Unity Tree ?
     
  5. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Simply create material in project files, and set it instead of Optimized Leaf Material with transparent shader
    upload_2017-8-20_22-20-16.png
     
  6. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    181
    Yes that's what i did, but this break the WindZone Effect for me :/. Maybe it's ill be possible to rewrite an shader using Z writing and compatible with Tree Creator i ill look that :)
     
    MUGIK likes this.
  7. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Very cool. The speedtree test is incredible. Any idea about price and release date?

    Very good work!
     
  8. ranaUK

    ranaUK

    Joined:
    Mar 1, 2017
    Posts:
    166
    Some errors running test version:

    1) while running, if I click on any of the billboarded item (like the house in demo scene), I get following error:

    MissingFieldException: Field 'UnityEditor.PreviewRenderUtility.camera' not found.
    BillboardSystem.BillboardControllerEditor.OnPreviewGUI (Rect r, UnityEngine.GUIStyle background) (at C:/Projects/Unity/RealtimeBillboardSystem/CODING RelatimeBillboardSystem/Assets/RealTime_BillboardSystem v0.3/Scripts/BillboardSystem/Editor/BillboardControllerEditor.cs:1169)........

    After running and stopping it, if I move my view in editor, I get the following error (not all the time though)

    Matrix stack full depth reached
    UnityEditor.PreviewRenderUtility:BeginPreview(Rect, GUIStyle)
    BillboardSystem.BillboardControllerEditor:OnPreviewGUI(Rect, GUIStyle) (at C:/Projects/Unity/RealtimeBillboardSystem/CODING RelatimeBillboardSystem/Assets/RealTime_BillboardSystem v0.3/Scripts/BillboardSystem/Editor/BillboardControllerEditor.cs:1168)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Question: Is there any info showing how many billboards running (ie. how do I know if it's working)?

    Further question: so is this not ideal for large structures? I have part of a stadium, and root object has many children where some children have lod groups (custom based on distance). When I add billboard to parent, I have to setup renderer by dragging the item into it - at that point, I think billboard is picking up all the child meshes.

    With this setup, when billboard mode is active, all my seats are gone from the podium.
     
    Last edited: Aug 27, 2017
    MUGIK likes this.
  9. macube

    macube

    Joined:
    Jul 16, 2017
    Posts:
    37
    I can't view the example and get this error: (I have Unity 2017)

    You must set the 'billboardRender' layer in unity editor before use BillboardSystem in builds!!!
    UnityEngine.Debug:LogError(Object)
    BillboardSystem.BillboardsHandler:get_layerForRender()
    BillboardSystem.BillboardsHandler:BillboardCameraSettings(Camera)
    BillboardSystem.BillboardsHandler:InitBillboardsHandler()
    BillboardSystem.BillboardsHandler:Awake()
    UnityEngine.Component:SendMessage(String, SendMessageOptions)
    BillboardSystem.Singleton`1:get_Instance()
    BillboardSystem.CameraDetector:OnEnable()
     
  10. ranaUK

    ranaUK

    Joined:
    Mar 1, 2017
    Posts:
    166
    Just create a new layer with the name billboardRender
    That's it.
     
  11. macube

    macube

    Joined:
    Jul 16, 2017
    Posts:
    37
    Thank you :)
     
  12. macube

    macube

    Joined:
    Jul 16, 2017
    Posts:
    37
    problem_001.jpg
    Ok, next problem. I don't know why the billboards do not look correct.. (see the screenshot)
    I can see only the tree trunk?!
     
  13. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
  14. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    BillboardSystem is now avaliable on Asset Store!​
    What's new in Billboard System v0.4:
    • Water reflection optimized with Billboard System
    • VR support and additional VR optimization
    • Dynamic light support
    • Dynamic objects support
    • New fast shader with internal mesh combining
    • Bug fixes
     
    Last edited: Sep 11, 2017
    blitzvb and Teila like this.
  15. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Hi~
    How to fix this ?
    Bs01.jpg
    Billboard System v0.4
    Unity 5.6.3p3( ColorSpace:Linear , RenderingPath Deferred , Fog:Global fog , HBAO )
     
  16. Fairennuff

    Fairennuff

    Joined:
    Aug 19, 2016
    Posts:
    88
    Noticed you have "VR doesnt work with native VR integration like in Unity5.6 an later due to limitation of changing fieldOfView on cameras." listed in the forum - Does it work with the SteamVR and Oculus camera rigs? if so this would be an incredible asset for any VR dev.
     
  17. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    I dont able to test BillboardSystem with oculus and steam vr. If Steam and oculus use camera rig as Cardboard SDK, then BillboardSystem must work.
     
  18. Fairennuff

    Fairennuff

    Joined:
    Aug 19, 2016
    Posts:
    88
    I don't have the asset yet but if I buy it I'll test it and let you know
     
    MUGIK likes this.
  19. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Thanks for pointing this problem.
    I tried a lot of things, but I still cant solve this problem, for now. There is the problem with ZWriting to _CameraDepthTexture, If you know unlit cutout fragment shader, that works with Global Fog, then let me know.
     
  20. ranaUK

    ranaUK

    Joined:
    Mar 1, 2017
    Posts:
    166
    I tried v3 demo with SteamVR and there were some issues. I thought I posted some of those errors.
     
  21. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Hi! I managed to solve this issue. Just replace old shaders in 'Shaders' folder with new.
     

    Attached Files:

  22. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    It works !! Thx
     
  23. Truthveyor

    Truthveyor

    Joined:
    Mar 5, 2017
    Posts:
    9
    Questions:

    1. I see the note, "VR doesnt work with native VR integration like in Unity5.6 and later due to limitation of changing fieldOfView on cameras." What if I don't change fieldOfView on the camera and leave it at the default value of 60, then will this asset work for native VR integration?

    2. I see the note that it can work with non-static objects in realtime. Does that mean this asset can change billboards based on angles of viewing very fast? And does the billboard system work for all angles of viewing? For example, let's say I use this asset on a spaceship, and the camera is located on another spaceship, will the spaceship look correct in a dogfight?
     
    Last edited: Oct 15, 2017
  24. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    1. BillboardSystem internally use changing camera fov, so for now asset doesnt work with native VR integration. Its true for GoogleVR, dont know what with other SDKs.

    2. On medium graphic cards billboard system can calculate over 20 billboards per frame with more then 60 FPS. Yes, it works for any angles. For any situation it need to be tested on practice, all depends on count of billboards and speed relative to camera position.
     
  25. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Billboards FADING

    New feature of Billboard System - billboards fading will be available in upcoming release.

    This video is just a simplified demonstration of differences between old and new version.
     
    Last edited: Oct 21, 2017
    blitzvb, Teila and siliwangi like this.
  26. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    340
    Hi,your plugin is great.
    But could you please decrease the minimum "time interval" in "use update by time"?
    currently it is "0.5".please make it like 0.05.
    i know it will hit the perfermance problem,but there are always sometimes someone will need this.

    also, billboard object feels rotate too much when you walk around it and it update to new frame.

    i think the problem is the textures are rendered after x frames but the billboard are facing the camera in realtime.
    could you please give a option make the billboard only rotate when the texture updated?

    Thank you very much!
     
    Last edited: Oct 22, 2017
    MUGIK likes this.
  27. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    340
    Thank you for the new update 1.0.
    The "Always look at camera" is usefull.
    But the minimum "time interval" in "use update by time" is still 0.5.
    This means we can only get only two frames per seconds for some "camera fixed" object.
    We want use it for some skined character,2fps is too little even for a lod.
    please,decrease it at least to 0.1(ten frames per seconds),so we can use it for far distance skined character.
     
  28. Rainking

    Rainking

    Joined:
    Jun 10, 2013
    Posts:
    41
    Hi,

    great tool! I have some questions before I buy the asset:
    1. is it possible to use your billboard controller together with the unity LOD Group System?
    2. if not is your controller able to handle also 3d Objects, let's say for the first 2 LOD Levels and then use a billboard?
    3. How do you suggest a solution using several levels of detail in 3d and at last using a billboard?

    Kind regards,
    Tino


    Ah sorry read that afterwards:
    https://drive.google.com/file/d/0B6zwY_V7zTGvRzhLVEQtOW9TMVk/view

    Seems to do what I need ;) thanks!
     
  29. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Sorry, forgot about that... Write me on doterpoter@gmail.com with invoice and I will send you fixed version
     
  30. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    340
    Sent a email with my invoice to you.
    Thanks a lot for help.
     
  31. gregop2

    gregop2

    Joined:
    Nov 21, 2015
    Posts:
    4
    Has anyone found a good solution to work with speed tree, putting down the trees, since the Unity standard tree placement brush does not work with this asset. Any help out there is greatly appreciated. This looks like it will be a great solution, if I can just find a way to place them, I will be in business.
     
  32. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    VIC20 and blitzvb like this.
  33. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Has this been tested using 5.6.4 in single pass rendering with the forward renderer in VR?
     
  34. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Billboard System doesnt work with native VR integration like in Unity5.6 an later due to limitation of changing fieldOfView on cameras.
     
  35. Akshara

    Akshara

    Joined:
    Apr 9, 2014
    Posts:
    100
    Hello and thank you, I am a potential customer, just trying to understand; and this statement on VR support is admittedly confusing... would you be willing to explain this in more detail?
     
    Last edited: Nov 29, 2017
  36. Akshara

    Akshara

    Joined:
    Apr 9, 2014
    Posts:
    100
    Okay, I think I understand.

    Unfortunately, the approach that the Cardboard SDK used in 2016 is not really supported by the major VR/MR hardware manufacturers anymore, including Google. The four main VR SDKs (Steam, Oculus, Google, Windows) need Unity's native XR support to work; as do most third party assets, Unity's Postprocessing Effects, Editor XR, Single Pass rendering, Octane integration, etc. And the manufacturers have specific platform requirements which make it difficult to stay on an outdated SDK - everything in VR kind of demands that one keep abreast of the most recent versions, just to participate.

    Rolling one's own VR SDK is possible, just very difficult without custom hardware or exceptional skill - and then the result might be rejected by Oculus, Google or Microsoft on their stores.

    For most intents and purposes, Billboard System does not support VR in the sense that I feel most of us here consider VR support in Unity - what it does support are custom multi-camera systems; Google Cardboard, if one is willing to run their project on an unsupported SDK; and other headsets through a custom SDK.
     
    Last edited: Nov 29, 2017
  37. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Not just simple multi-camera system, I made some optimization specifically for VR: camera rig works like one camera, that allows 2 time more objects in scene.

    But unfortunately, Billboard System doesnt support unity native VR integration, because I didnt find the way to change cameraFieldOfView when using native VR support.

    If someone know how to dodge this limitation, please let me know!

    I know that Billboard System is perfectly fit VR needs: camera moves rarely and using few draw calls for large count of objects. But what can I do?:(
     
  38. Akshara

    Akshara

    Joined:
    Apr 9, 2014
    Posts:
    100
    :oops: I wish I knew the answer and could help, as your system looks brilliant.

    One idea is that Unity recently fixed billboard trees in VR for Unity Tree Creator trees in the 2017.3 beta and that one of the devs on the team might know an answer to the cameraFieldOfView issue in VR, like @ mikesf (added a space after the @ as I don't want to tag or ping him here, as he's probably busy).

    And then @ LennartJohansen of Vegetation Studio seems very open to collaborating with other devs and has a solution for how to make mesh trees billboard in single pass VR. Maybe send him a message and just ask him and see what he says? We are all in this together after all, even when we are competing with each other.

    Billboard System is just fine as it is and doesn't need native VR support, unless you want it to; and my response here arises from trying to understand what you mean by it supporting VR in the description. Yet both you and Lennart are so very close, far closer than anyone else, to creating a mesh billboard system which could change VR development for everybody in a kind of profound way.

    I hope you consider this, and if so, that it is helpful; and wish you success, whichever path you choose. :)
     
  39. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Thanks for your response!

    I checked his product, and it very impressive. But his billboard system works with prerendered textures, thats why this system works in VR, all calculation occurs in editor. My billboard system is most likely IMPOSTER system:), because textures are created at runtime.

    Thanks for this contact, I will write to him
     
    Akshara likes this.
  40. Pode

    Pode

    Joined:
    Nov 13, 2013
    Posts:
    145
    @MUGIK : it's true you can't override the FOV with the latest version of the SDK, but I was thinking about doing it another way. Since you can generate QR Codes for the Cardboard app, where you specify the FOV of your camera (https://vr.google.com/cardboard/viewerprofilegenerator/), isn't there a possibility to use it at your avantage ?
    I still don't know how you can use it, but if those informations are written inside the code, and if the viewer provide those informations to the Cardboard system, there must be some kind of function calls to set the FOV.

    It would only work for android/GVR, but by writing a native plugin placing that call, you will have the possibility to change the FOV of the VR camera. The tricky part is how to not mess the "normal" render view, however...
     
  41. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    If you want an extra camera in VR with a custom FOV you can set

    https://docs.unity3d.com/ScriptReference/StereoTargetEyeMask.html to None on the camera. This should allow you to control the camera as a normal camera.
     
    Akshara and blitzvb like this.
  42. chris54321

    chris54321

    Joined:
    Nov 5, 2013
    Posts:
    11
    I bought it today but it doesn't seem to work with Unity 2017.1. The example project looks like this:
    upload_2017-12-5_18-0-23.png
    Whereas the trial was working with 2017.1. Did anybody get it running with 2017.1?

    EDIT: I tried in 5.6.3f1 and it looks better but there is a strange behaviour like this
    upload_2017-12-5_18-33-22.png
    (the house in the front seems to show the 3D model and the billboard at the same time...but somehow rotated)
    Will there be an update fixing those problems?
     
    Last edited: Dec 5, 2017
  43. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Hi!
    Try to set 'isStatic' on BillboardController component to false. If it help, then this is bug of Unity 2017.1
     
  44. chris54321

    chris54321

    Joined:
    Nov 5, 2013
    Posts:
    11
    I tried with setting isStatic on the four houses to false but it still shows wrong. Did you try it with 2017.1 and it worked for you?
     
  45. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    In unity 2017.1.0f3 all works fine, but in unity 2017.2.0f3 I have the same result as you. Did you use patch release of unity 2017.1?
    Anyway, I fixed this issue by set 'isStatic' to false and apply prefabs. There is bug with unity instantiate: https://issuetracker.unity3d.com/issues/game-object-transform-dot-position-is-incorrect-after-object-dot-instantiate-after-awake-function-call
     
  46. chris54321

    chris54321

    Joined:
    Nov 5, 2013
    Posts:
    11
    I am using 2017.1.2. I forgot to hit 'Apply'...hitting 'Apply' fixed it. Thank you!
     
    MUGIK likes this.
  47. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Looks great, can this system automatically create billboards of distant geometry, or do I need to apply the script to every single item that I want billboarded? Lets say I have my world split into "districts" can I put this on the parent gameobject, so that the entire district is billboarded? I just want really distant geometry to be a billboard because I have slow down and it really doesnt need to be 3d at such a distance.

    Also I am using Automatic LOD, is there a way to use the billboarded version as an lod level in automatic lod?
     
  48. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    Yes, you need to apply the script to every single ROOT object that you want to be billboard. It works like LODGroup.

    Yes. Are your districts created at runtime?

    BillboardSystem works with renderers, so I dont know what to expect with AutomaticLOD
     
  49. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    Hello MUGIK
    I bought this for many hours And I try it. It's work well for Unity Editor However, in build(window platform) it does not work. see the video. I use 2017.2.0f3.

    I just setting BillboardHandler and BillboardController in example scene on new project (and I follow Setup in document)

    link:


    thank you
     
  50. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    476
    So there is a bug in unity 2017.2 (and some patches of 2017.1) with Instantiate() method. Simplest workaround is to set isStatic to false on every object and hit 'Apply'. And I missed up some unnecessary objects in 'House_1' gameobject, please delete them. Here is image to make it clear:
    upload_2018-1-3_21-0-18.png
     
    blitzvb likes this.
Thread Status:
Not open for further replies.