Search Unity

Dynamic Occlusion System

Discussion in 'Assets and Asset Store' started by BMadrid, Jul 11, 2015.

  1. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hello everyone, finally was approved Dynamic Occlusion System for short DOS and this is the link at the store: https://www.assetstore.unity3d.com/en/#!/content/37687



    Dynamic Occlusion System:

    Allows you to configure the LODs if your GameObject need, DOS is responsible for automatically manage the components associated with it to enhance the game experience


    Dynamic Quality Changer:
    Highly configurable to maintain the desired quality in the game and maintain an optimal gaming experience, manages the quality of the terrain at runtime so as to control the functions of Dynamic Occlusion System.

    I opened this thread to get better feedback with you and to answer all of your concerns, I also hope your suggestions to improve DOS.

    you can contact directly to e-mail brlme1616@gmail.com, brawny808@hotmail.com, http://brlme1616.wix.com/darkcomtech or https://www.youtube.com/channel/UC9x28bvFhd7IR7s6B8NzQPg

    Release version 1.4.1 (pending for review)
    some bugs are now corrected and improved support for terrains, and some changes to Dynamic LOD
    - Fixed bug hiccup when attaching to the quality of terrain details
    - Fixed bug of the sudden disappearance of large objects in front of the camera
    - Dynamic LOD can now control the details of several objects at once
    - Occlusion of terrains now possible, giving advantage to using Unity 4.5 Free
    - The level of detail of the terrain is now controlled by the proximity of the camera and not by the quality
     
    Last edited: Dec 1, 2015
  2. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    Does it work on Unity 4.6 ?
     
  3. alex_d

    alex_d

    Joined:
    Oct 22, 2012
    Posts:
    4
    How does it handle really small items?
    I have tried to use InstantOC, but since it's raycast-based, i got strange results using really small assets, like small stones.
     
  4. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    hi menfou, I have developed DOS for unity 5, but I can make an adaptation for unity 4.6 soon, the feature is really only using use of unity 5 is a combiner mesh using APIs unity 5. soon makes new updates.
     
  5. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hi Alex, this system also an raycast for MeshRenderers but uses frustum planes for other renderers, I'm looking for an ideal combination between the two, since both have a disadvantage that strengthens the other. I am currently working to achieve that balance. will soon launch an update.
     
  6. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hi everybody, Dynamic Occlusion System has been updated to version 1.1,
    Fixes
    - has improved the way it manages the quality, now avoids unnecessary calculations that generate garbage collector
    - Now the shadows being outside the frustum of the camera are preserved and optional marking the simple checkbox
    - Now you can change your scene without destroying the Game Object containing DOS using DontDestroyOnLoad
    - The lights now work best out of the camera frustum
    - has improved the sacrifice of sound with respect to the distance (only maintain full 3D Spatial Blend)
    Changes
    - I waste some unnecessary things like Cull Layer, basically because the object distance to practically the same.
    - It has set aside the updating of asynchronous variables, because it generates annoying spikes in memory that are seen in the gaming experience.
    - The update has been removed based on the quality of the graphics card manufacturer, because it automatically update the system independently manages the card you have
    - some constant variables have been removed to not use this memory space

    Final note: note that a greater number of components renderer, Audiosources and lights on scene, can generate more garbage collector

    I'm currently working on version 1.2 there are some changes currently being implemented in version 1.2 and now the code is optimized further, and the inclusion of the possibility of texture atlas at runtime of the game.

    if time permits modification makes me DynamicLOD hoping to do at runtime LOD game.

    I am currently testing Dynamic Occlusion to fix bugs in a personal project
     
    Don-Gray likes this.
  7. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    How's that unity 4.6 version coming?
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    FYI none of the dropbox links work. Also I'm not seeing much occlusion happening in the youtube video, just classic culling, which is what unity already does. Do you have performance comparisons? Have you tried Culling Groups in 5.2? might offer an interesting boost as it's threaded.
     
  9. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hello DivergenceOnline promise that the next update (ver.1.4)to add support for unity 4.6, the truth is that even I have not tried in previous versions.
     
  10. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hello hippocoder, the intent of this tool is not to replace Static Occlusion of Umbra, but to be a tool for moving objects occlusion. what I hope is an advantage for those projects that contain procedural scenes or projects done in unity 3 and 4 free version

    although this tool works with moving elements can also do it with elements that are static, simply unchecking static. batching static or off.

    soon makes an update of the videos. in which explain how to use it in various situations.

    regarding statistics is a pending task, I'm still waiting to get a low-end computer where I could put on and remove the video card. Unity delegates more than half of memory video card and this can result in inaccurate measurements.
     
  11. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hello everyone, I have communicated 2 users through email that have the following problem,

    Code (CSharp):
    1. Expanding invalid MinMaxAABB
    2. UnityEngine.Renderer:get_bounds()
    3. <IRLateUpdate>c__Iterator23:MoveNext() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:179)
    4. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    5. DynamicOcclusionSystem:Start() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:85)
    6.  
    7. Converting invalid MinMaxAABB
    8. UnityEngine.Renderer:get_bounds()
    9. <IRLateUpdate>c__Iterator23:MoveNext() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:179)
    10. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    11. DynamicOcclusionSystem:Start() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:85)
    12.  
    13. Invalid AABB aabb
    14. UnityEngine.Renderer:get_bounds()
    15. <IRLateUpdate>c__Iterator23:MoveNext() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:179)
    16. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    17. DynamicOcclusionSystem:Start() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:85)
    18.  
    19. Invalid AABB result
    20. UnityEngine.Renderer:get_bounds()
    21. <IRLateUpdate>c__Iterator23:MoveNext() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:179)
    22. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    23. DynamicOcclusionSystem:Start() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:85)
    24.  
    25. Invalid AABB rkBox
    26. UnityEngine.Bounds:ClosestPoint(Vector3)
    27. ClassExtensions:BoundsIsVisibleFromViewport(Bounds, Camera) (at Assets/DynamicOcclusionSystem/Scripts/ClassExtensions.cs:35)
    28. <IRLateUpdate>c__Iterator23:MoveNext() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:179)
    29. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    30. DynamicOcclusionSystem:Start() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:85)
    31.  
    32. Invalid AABB rkBox
    33. UnityEngine.Bounds:ClosestPoint(Vector3)
    34. ClassExtensions:BoundsIsVisibleFromViewport(Bounds, Camera) (at Assets/DynamicOcclusionSystem/Scripts/ClassExtensions.cs:35)
    35. <IRLateUpdate>c__Iterator23:MoveNext() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:179)
    36.  
    37.  
    38. Invalid AABB rkBox
    39. UnityEngine.Bounds:ClosestPoint(Vector3)
    40. ClassExtensions:BoundsIsVisibleFromViewport(Bounds, Camera) (at Assets/DynamicOcclusionSystem/Scripts/ClassExtensions.cs:35)
    41. <IRLateUpdate>c__Iterator23:MoveNext() (at Assets/DynamicOcclusionSystem/Scripts/DynamicOcclusionSystem.cs:180)

    it was not a problem unique to this version, but it has happened in previous versions as well but can not find a way to reproduce this error if someone knows how to reproduce this error please let me know how to do it step by step to give an effective correction
     
  12. turritom

    turritom

    Joined:
    Mar 22, 2013
    Posts:
    113
    do not work in my unity3d project .. my level is build at the beginning of the scene with a random script using prefabs .. but see self



    :( i am not a programmer i using playmaker to make my projekt ..so i dont know what the problem is.
     
  13. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    turritom Hello, I see that your version is somewhat old, your version is 1.0 and version 1.3 is now available for download. answering your question but perhaps the problem that appears in the console is that you have properly configured the camera. I think in this version was necessary that the camera has the tag of MainCamera then try and tell me if it worked, but better was to update the version.
     
  14. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    An announcement to all. Because labor issues that we're a little short of time, I'm working overtime to 23 December, hope excuse me if this slows a bit more updates and if you're only limited meantime corrections as per limitations do not give me time to try new improvements.

    Thanks to all. I hope this time will serve to send me screenshots or details of any problems that occur, this would help me a lot to know that problems are with the tool. Feedback is always good and helps improve
     
  15. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    where to adjust LOD distance ?
    Only one layer can to cull ?? if not , How ?

    If i just want to keep Culling and i don`t want to use LOD how to close LOD?
    Culling distance how to adjust ?
     
  16. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    hi zmaxz
    Automatically adjusts the distance according to the volume of Mesh and bounds recalculated automatically. I did so to save work to the user, however I would like to know your opinion I'm still in time to implement changes.

    if you do not want to use the LOD do not use this optional, yet the advantages of the LOD are not yet sufficiently impressive.
    - This is practically automatic
    - No conflict with LOD bias to lower the level of quality that has even LOD Unity
    - Fully compatible with StaticBatching
    - Generates less objects in memory
    - Load the LOD meshes in the project and not on scene, preventing them from being loaded into memory.

    The idea for the future is that LOD to work together OR is integral to Dynamic Occlusion and is more automated
     
  17. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Hi BMadrid ~
    Custom always better than automatic,
    because every single one make game is not the same.

    My camera in my game is can`t rotate and always same angle , like "Diablo3",
    To me , Culling is important than LOD .
     
  18. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hello zmax
    you're right, it solution does not work for different people, so I have now modified this script to allow both. likewise I take the opportunity to tell everyone that I have finished the version 1.4 and will soon update this asset in the store
     
  19. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hello everyone, I inform you that have already uploaded the version 1.4 to Store, now pending for review
    I made some minor changes in this version and I corrected some things

    - The main code moving it to a coroutine to have less impact on performance
    - I have withdrawn all raycast for now, make too many calls to the CPU, at least to find a cheaper way to do it
    - now lists the variables are filtered start to delay loops least go through each element, reducing latency
    - Dynamic LOD has been improved with the idea of offering more control zmaxz
    - thanks to the idea of Divergence Online now whole package is compatible with Unity 4.5
    -
     
  20. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Hi BMadrid ~
    If you can change " Layer to cull " become " Layers to cull ",and this asset is to be awsome,
    I will get your asset 5 Stars.
     
  21. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    I will soon, just make some changes. at the moment I am busy with other matters.
    I'm training on design and presentation
     
  22. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    ullReferenceException: Object reference not set to an instance of an object
    DynamicOcclusionSystemEditor.OnInspectorGUI () (at Assets/DynamicOcclusionSystem/Editor/DynamicOcclusionSystemEditor.cs:17)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1231)
    UnityEditor.DockArea:OnGUI()


    i get this error aboive when I attach it to my camera. am I doing somethign wrong?
     
  23. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    any word? it does not allow me to apply anything to my camera. bit frustrated here.
     
  24. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    in fact this specific line of code on line 17 is highlighted as being the source of the error.

    EditorGUILayout.HelpBox("[Current Quality: " + QualitySettings.names[QualitySettings.GetQualityLevel()] + "] [to: " + DOS.FramesPerSec + " FPS]" + "[Latency: " + DOS.ms + " ms]\n" +
     
  25. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    k I fixed it, seems a cs file I was using that had a fps counter on it was interfering with your fps counter.
     
  26. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    now its back to not working again.
     
  27. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    basically it seems sometimes it works sometimes it doesn't. frustrating.
     
  28. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    so now its no longer working.
     
  29. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    seems to work when I press play so maybe its a editor issue??
     
  30. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hi sgtKoolAid
    I want to know how produces the error or if you could show me a video to see how it is produced
    I also want to know if using multiple cameras.

    also I have to report that Dynamic Occlusion now uses a singleton pattern for security reasons
    You can now invoke its variables and methods using Dynamic Occlusion System.Instance or using Singletons.Get <DynamicOcclusionSystem> ();

    For more information, see the documentation of Singletons in the store asset, if you want to use it without using this pattern, use the derivation of the monobehaviour class instead of monosingleton.

    if you have problems with DynamicOclussionEditor.cs, you can delete it.

    I hope this solves the problem, if anything can give me more details, I will be aware
     
  31. Amin-

    Amin-

    Joined:
    Sep 27, 2017
    Posts:
    26
    hello BMadrid ...
    I know you said this point " does not support using this script in separate Cameras " for OC in manual PDF ...
    and I test " Vuforia camera " and nothing happened !

    is there any chance for us to solve problem ?!
    thanks.
     
  32. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Hi, there is an issue with web player in DynamicOcculusionSystem.cs line 116 (Webplayer removed) in unity 2018
     
  33. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    107
    How is this any different then unity's built in frustum culling?
     
  34. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    when version 3.5 of unity existed, the free version did not have the possibility to use frustum culling and Occlusion.

    it is currently used to prevent the sending of unnecessary meshes to the graphic card.

    a particular difference is that while the unity camera creates a solid object using planes with several vertices, DOS uses only the pivot of the mesh and its bounding box. It is faster and consumes much less but is less precise.

    However DOS is used in conjunction with the Static Occlusion Culling of unity, but it is useless in front of the instantiation of meshes from the GPU as it happens with the unity frustum
     
  35. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    107
    Do you have any benchmarks showing the performance differences with and without your occlusion system? Thanks.
     
  36. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Currently I do not have any benchmarks, towards my performance tests at the moment, I only have some captures that I took to the profiler that are in the product description.

    a demo that has the test with the DOS, that if you have knowledge of unity can clone easily, you can also find the demo in the product description. and I have an apk for mobile devices, which you can also easily clone, that could send you by email.

    I currently have version 5.4.1 of unity, so at the moment I can not offer a current benchmark.

    maybe another option is to download a demo and try MSI Afterburner and draw your own conclusions
     
  37. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    Still compatible with 2018.3 multi-terrains? :)
     
  38. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    I currently have version 2018.2.6f and it works perfect.
    Now I do not know how much terrain has changed in version 2018.3, in principle it should work, since the script mainly deactivates the renderer.
     
    MaximilianPs likes this.
  39. GameCodeurStudent

    GameCodeurStudent

    Joined:
    Jan 13, 2018
    Posts:
    9
    Hi recently acquired 2 assets for occlusion.
    In yours a got an error in my version of unity upload_2019-3-31_23-43-22.png
    There is no definition for isWebPlayer
    I simply removed this one but dont know if it's the right way. Will see further if someone else happen when i try to configure this asset.
     
  40. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    Removing just the "Application.isWebPlayer ||" should be sufficient. The Unity Web Player is no longer supported which is why you are getting an error.
     
  41. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
  42. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    @BMadrid
    hi,
    does it support skinned mesh?
     
  43. BMadrid

    BMadrid

    Joined:
    Nov 26, 2013
    Posts:
    26
    Hi @Davood_Kharmanzar ,
    DOS supports all renderers, that includes the skinned mesh renderer