Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. We are looking for your feedback about Templates! Tell us about your experiences by taking our survey.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

【Optimizers】- Easy to use and functional components to optimize any other components!

Discussion in 'Assets and Asset Store' started by FimpossibleCreations, Jan 28, 2020.

  1. AtomsInTheVoid

    AtomsInTheVoid

    Joined:
    Jul 27, 2015
    Posts:
    197
    Your code worked flawlessly! THANKS!

    By the way, after poking around deep inside your code for several hours I must say you're obviously some sort of mad genius!
     
  2. AtomsInTheVoid

    AtomsInTheVoid

    Joined:
    Jul 27, 2015
    Posts:
    197
    Btw, everything works nicely... except.. the STRANGEST thing.. there must be some method that I need to call to "refresh" because if I set the LODLevels = 6 (default is 2?) it can work, but only if I JUST do that. If I set it to 6, then start adding to the array, then it doesn't take - it still thinks it's 2... I need to have my script run in isolation.. first set the component and the lod levels... scipt stops, it takes.. then set the LOD Meshes... it takes.. but put that into one method call and it won't take... very frustrating, hoping to have this as one big automated script that is just a single button press. I wonder what I'm not doing right?
     
  3. AtomsInTheVoid

    AtomsInTheVoid

    Joined:
    Jul 27, 2015
    Posts:
    197
    Also some bizzare behavior here, it doesn't seem to switch out the terrain into the Mesh. You can see that I do have the mesh replacement assigned, but between LOD 1 and LOD 2, the Mesh remains (i offsetted the Mesh on the Y so that you can see the Terrain enable/disable below it -- looks a little funny)... so it seems the Terrain LOD works, but the Mesh Replacement isn't actually LODing... thoughts?

    https://i.imgur.com/9ne9hWK.mp4
     
  4. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    Yeah there was many nights of work :confused: especially when it came to integration with new prefab workflow.
    (not shared settings)

    You probably need to call "OnValidate()" for optimizer to refresh LOD counts for all LOD sets.
    I will need to check it for more details.

    Mesh replacement was created with one mesh as last LOD in mind.
    When using different meshes it seems to lost correct behaviour.
    I will fix it in new version.
     
  5. AtomsInTheVoid

    AtomsInTheVoid

    Joined:
    Jul 27, 2015
    Posts:
    197
    Ah yes, perhaps I'm doing something unconventional by having multiple mesh LODs, but hey, why not? It's actually the biggest reason I took the dive into your asset, might be a game changer. I'm developing for VR so I want my up close terrain to be highly detailed and then tightly controlled as it goes off.

    In the meantime while I wait for an update I'll try just mesh at the last lod and play with the pixel error for now.

    One reason I'd want this is because I might have an extremely low mesh for distant mountains but a higher poly mesh for near mountains, and perhaps pixel errored terrains up to that.

    Anyway, I'll try OnValidate and let you know! Thanks again for the help.
     
  6. AtomsInTheVoid

    AtomsInTheVoid

    Joined:
    Jul 27, 2015
    Posts:
    197
    Ok..something weird is officially going on. I now have the Mesh Replacement as the last LOD but it still displays no matter what LOD level I'm in

    https://imgur.com/HNC9BJF

    This is me going from 4 (Unity Terrain with high pixel error) to the Mesh (again, slightly raised on the Y so you can see both are always there). If you notice on the left, i have my hierarchy open and it doesn't show the terrain or mesh under the Parent being deactivated.

    Hmmm...
     
  7. AtomsInTheVoid

    AtomsInTheVoid

    Joined:
    Jul 27, 2015
    Posts:
    197
    For good measure I manually created a Terrain Opt and put all the details in by hand, just in case some script voodoo is happening.. but same thing.. it simply won't swap in/out the terrain

    If you'd like I'd be happy to help you test a solution to this!
     
  8. AtomsInTheVoid

    AtomsInTheVoid

    Joined:
    Jul 27, 2015
    Posts:
    197
    Something is very wrong. It doesn't even seem to be affecting the pixel error on the terrain.. I imagine I would be able to see it changing on the child terrain object it's referencing as I move in and out a LOD range? But the PE stays at 1 no matter how far away I move
     
  9. AtomsInTheVoid

    AtomsInTheVoid

    Joined:
    Jul 27, 2015
    Posts:
    197
    After studying your demo scene with terrains, I notice you put the Component on the actual terrain object? Does that matter? Because the component also references the terrain and will automatically detect the right terrain when I add the component to a parent of it, so I assume it doesn't matter...?
     
  10. alex_1302

    alex_1302

    Joined:
    Aug 20, 2019
    Posts:
    26
    Hi. i want to make a question.
    I want to detect when a enemy is not visible and then, disable its animator component. For me, an enemy is not visible if some of the next conditions are true:
    1. the enemy is out of the camera viewing frustrum. (for example the enemy is behind of the camera or outside of its viewing frustrum).
    2. the enemy is in front of the camera, but too far.
    3. the enemy is in front of the camera, inside the camera frustrum (inside of the max distance), but behind of some object. (culled)

    i want to detect if any of the above conditions are true (the enemy is not visible) and then disable its animator, else i want to enable its animator. how can i do that ?. ps: i did try to drag the animator component to wall detection, but it dont appears on the lod component list. Do you expose some property(s) or method(s) to detect that ?
    Thanks in advance.
     
    Last edited: Jun 23, 2020
  11. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    Hey Alex, there you can watch how 'Obstacle Detection' component is working:

    According to your questions:

    1. You must have enabled 'Cull if not see', new LOD level will appear ("Looking Away / Hidden") where you can adjust what should be disabled / enabled when object is not visible in camera view frustum but near camera
    (must uncheck "Cull if not see" inside LOD settings for this level)

    2. This you can adjust in LOD levels, you can have just one LOD level (just for visible object) if you want
    3. This option is available in "Obstacle Detection" component, probably in future it will be built in default optimizer component

    You can download this small extension: https://drive.google.com/file/d/1qcazFsqzmtV84ppM9xxcJf-Ni5hoL-4c/view?usp=sharing
    With this any unity component will be detected in "To Optimize" list when you drag & drop objects onto box inside "To Optimize" and "Assign new components tab", so with this Animator component should be detected.
    You can try disabling skinned mesh renderer in LOD settings also instead of just animator, optimization effect should be better.
     
    combatsheep likes this.
  12. alex_1302

    alex_1302

    Joined:
    Aug 20, 2019
    Posts:
    26
    Hi. Thanks for the very fast reply.
    In the end i got the desired behavior. in this way:
    - The idea here is try to disable animations of every npc that is not visible to the player, so we will get some speed optimization.
    - try to disable the animator (with enable=false) seems to be a very bad idea, because the animator component loose its state every time is disabled, making the animator to 'freeze'. But the animator has a culling mode. setting it to cull completely has the effect that when the renderers of the character are not visible, the animator stop, and when the renderers comes to be visible again the animator resumes its execution. So, in the end the best seems to be let the wall detection component enable and disable the renderers of every npc (when is visible or hidden), and let the animator detect that sistuation automatically, stopping and resuming its work. i test this idea and it works very well on unity 2018.2.8.
    Thanks for your help. and i want to do a last question:
    The optimizer components works very good, but my question is:
    - when i change an scene (when the player finish a level and pass to the next level), is necessary to call some method in the optimizer, in order to 'clear' references to gameobjects of the level being unloaded ?.

    Thanks again and i hope you have a nice day. :)
     
    Last edited: Jun 25, 2020
  13. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    122
    Hi.

    I saw at Optimizers on Youtube and PDF document and got interested in Optimizers.

    I have a few of questions.
    I've learned to attach and use an Optimizer on a component of GameObjects.

    1) Is it possible to simultaneously optimize static and dynamic GameObjects in the same scene?
    For example, it is supposed to be used for static GameObjects such as buildings (100 pieces), a large number of electric poles, signs, guardrails, and benches, and Prefabs for moving cars (100) and NPC people (100).

    2)Is it possible to optimize by attaching the Optimizer to the Prefab component spawned with Instantiate?
    (I plan to use it for Prefabs on cars that follow waypoints)

    Thanks.
     
  14. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    298
    My experience:

    So far I have only used the terrain optimizer.
    I have divided a terrain into 256 512x512 modules
    To each module I have put the script "FOptimizer_terrain"
    The values "max distance" and others, have been set automatically: 783.1875
    The values of each LOD, equally.
    The comparative result.
    - With the scene on a single terrain, render at an average of 90 FPS.
    - With the "multiple" terrain scene, render at an average of 80 FPS.
    The real difference is in the RAM consumption. The "multiple" terrain scene requires 500Mb less than the single terrain scene.
    Could you guide me if this data is acceptable or am I doing something wrong?
    Unity version 2019.4 LTS
    Thank you.
     
  15. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    Hi Combatsheep,

    1: yes you can use Optimizers on static objects (I suggest 'Static' optimizing method with them, then there will not be calculated any calculations in Unity's Update loop for this objects) and for NPCs Optimizer with "Effective" method.
    You can try using "Dynamic" method for box shaped visibility detection, but I suggest Static / Effective spheres anyway.
    2: Yes it works with dynamically instatiated objects, example scenes are working with that.

    Where is your camera when you testing fps count and how many foliage, trees etc. are on your terrains?
    Biggest difference should come when you standing on one terrain and looking around.
    With one terrain you calculate a lot of culling stuff, computing render for invisible things, but with multiple terrains you avoid this by disabling big chunks of terrain completely or dividing details with LOD levels.
    I am sure in Unity 2019.4 terrains are upgraded but dividing still will give benefits when creating big worlds.
     
    combatsheep likes this.
  16. alex_1302

    alex_1302

    Joined:
    Aug 20, 2019
    Posts:
    26
    Hi. i am using obstacle detecttion with effective culling method. I had some problems when i did pause my game, i have resolved it, but i had to made some changes to the optimizer code. based on my experience i want to suggest some changes in order to make the optimizer easier to use:
    - in my game when the user make a pause i change the active camera (the player avatar has the camera used when playing), but there is other camera (called menu camera), used when the user pause the game (tho show the pause menu). For some strange reason. the optimizers don get the current active camera when the player make a pause and then did return to the game, in this case the optimizers stay with menus camera, when they must get the avatars camera. because of that when the player is playing (after he made a pause) the npc using the obstacle detection component begun to disapear. analizing in your code i made this changes:
    - your code is using in many methods Camera.main to get the active camera. I think that the best way is use the manager's TargetCamera variable.
    - in the manager add a combo with two options: 1. get the active camera automatically, 2. let the user set the camera
    with the first option you get the camera with Camera.main and with the second will be the user's responsability to set the camera to use (for better control).
    - every time the camera to use is changed reflect that fact in the manager's TargetCamera, so the programmer will can watch it in the inspector, and could be debug in better way.
    - i did change the optimizer according to the above ideas and it is working very well.

    I think your asset is very good, but i recommend to do these changes to make it still better.
     
  17. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    122
    Hi FimpossibleCreations,

    Thank you for replying!
    I purchase it without waiting for your reply.:)
    I was able to try it on my project and experience the answers to my questions.
    It's really easy to use, and great effective the optimization for my game.

    I'm trying to attach Optimizers to anything that can be optimized.:D
    But, I'm worried that performance will suffer if I attach too many Optimizers to every object.
     
    dsilverthorn likes this.
  18. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    597
    Is it best for performance to put Optimizer on single objects and have tons of them in a scene?

    Or

    Put Optimizer on parent objects and reference the children?

    Such as in a town- put it on each building, or parent then town and only use one optimizer?
     
  19. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    If your optimizer instances have same LOD count and same Max Distance value then you can use above 100k of objects like that and performance cost will be unnoticable. All of this optimizers will be attached to one CullingContainer - it can handle a lot of optimizers without performance cost.

    If you have different prefabs with optimizer which have different LOD counts and different Max Distance then each set of this two parameters will create new CullingContainer.

    More culling containers then more performance, but even with > 10k culling containers performance still is very effective.
    In next updates I will add debug info in Optimizers Manager inspector window to preview CullingContainers state.


    If you would like to hide whole town when it's very far away then ok, but I not recommending this.
    It's better to put optimizer on complicated game object built from multiple meshes.
    Also better hide objects from inside city individually, like small props - hide quicker, large buildings - hide when very far away etc.


    Thanks for suggestions, soon I will sit back to optimizers and upgrade camera controll indeed :)
    Also there is method FIMSpace.FOptimizing.FOptimizers_Manager.SetNewMainCamera(yourCamera);
    to help Optimizers use right camera when changing them.
     
    combatsheep and dsilverthorn like this.
  20. alex_1302

    alex_1302

    Joined:
    Aug 20, 2019
    Posts:
    26
    Thanks for your reply.
    Yes, in a previous post you tell me about SetNewMainCamera, and i did use it every time my game was changing cameras, but for some strange reason some times the optimizers keep working with a previous active camera,
    although i did try to force them to use another one camera (with SetNewMainCamera). i check this many times and it seems the problem was inside optimizers, because of that i did change the optimizers code according to the suggestions. I Hope you have a nice day. :)
     
  21. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    122
    Hi FimpossibleCreations,

    Thank you for replying.
    I understand your detailed explanation.
    I'm satisfied with the good performance of Optimizers, but thanks for considering the update!;)
     
  22. NathanielAH

    NathanielAH

    Joined:
    Jul 22, 2013
    Posts:
    54
    @FimpossibleCreations just wanted to give a heads up, when loading the asset Optimizers under Unity 2019.4.1f1 I get the error below:

    A tree couldn't be loaded because the prefab is missing.​

    Is that part of normal operation or as it attempts to load assets pre-existing in the project?

    Sincerely,
    Nathaniel
     
  23. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    I tried many things to avoid this message but I couldn't o_O
    Trees on example terrain model are low poly meshes and Unity have some unknown trouble with them.
    It is harmless anyway.
     
    combatsheep and NathanielAH like this.
  24. NathanielAH

    NathanielAH

    Joined:
    Jul 22, 2013
    Posts:
    54
    Understood. Thanks for the follow-up and clarity!

    Sincerely,
    Nathaniel
     
  25. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    155
    @FimpossibleCreations
    Why can't I get culling based on obstacles to work? Your video seems to have you just add the component and that's it. But look at this:
    upload_2020-7-20_4-17-4.png

    The top you see the light in the middle of the scene view and it's still on. But looking at the game window down the bottom, you see I placed a big cube to block all vision. It does cull based on the camera looking away from the light, but the obstacle part is not working. I've tried changing the 'Coverage Mask' from default, to Nothing, to Everything (since I don't know if it's include or exclude list), but none of these changes work.
     
  26. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    155
    Actually I've just opened a blank project and it works there. Doing exactly the same thing (just adding the component).
    The issue seems to be related to the fact these green ray lines aren't in my actual game project:
    upload_2020-7-20_4-31-27.png
    upload_2020-7-20_4-41-16.png
     
  27. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    Please check this video, obstacle detection is there explained on simple examples:


    Sphere is not used for vision blocking raycasts are used for it.
    Layers for object you want to be obstacles must be selected in "Coverage Mask".

    Reason why you don't have this green lines can be lack of camera, after entering game they should be visible.
    You create camera dynamically during playmode or so?
    If yes try using FIMSpace.FOptimizing.FOptimizers_Manager.SetNewMainCamera(yourCamera);
    when setting new game camera.
     
    combatsheep likes this.
  28. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    155
    Sorry you have misunderstood my situation. I know the sphere is to be seen by the rays. In my first image you can see in the game view the camera can only see a big white cube, and so behind it (and behind more walls too) is a Point Light which has the obstacle component, but is only culling based on camera rotation, not based on being behind walls.

    The camera is not generated in runtime. It's already in the scene. I have used the manager component to specify the actual camera I want to use but it's still not working. I also placed a new camera in the scene, specified it in the manager, still not working (see the last image I showed with the space background). The image above it has the green lines, but that is in another blank project I used to test. It's how I know something is going wrong with my scene.

    And about the coverage mask, it's not that because the big white cube blocking vision is in the default layer, plus I also tried it on Everything and that didn't work either.
     
  29. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    155
    OK I found a way to fix the problem. Though removing all camera in the scene, placing in a new one, and setting it in the manager didn't work, it did work to make a new scene and add a camera there, then drag it back into my original scene. Makes no sense but OK.

    Now I'm trying to configure it to work properly in the spaces (halls, doorways, rooms with obstacles) and am having a little difficulty. It would be good if there was an override so if you are in a particular trigger area, then the lights remain on no matter your look direction or obstacles. Is this possible? I'm having issues like a shelf blocking LOS to a light so being able to see it's turning off, especially with bloom on. Also with lights shining on the sides of door frames visibly turning on and off from the hall, even when I set their detection distance up higher (like setting 6 on a 4 distance light) and with 5 rays.

    It would be helpful if you could add extra rules like if you are in a trigger area never cull, or if in a trigger area to defer to the rotation cull only and not obstacle, and so on.
     
    Last edited: Jul 20, 2020
  30. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    For now you can try using different settings with "Hidden LOD" settings.
    When you select culled bar, uncheck "Same as culling" choose from which distance this LOD should be triggered instead of culling LOD and conifgure its settings.

    Maybe fade when turning off would work nice there (not yet possible for culling but in task list)

    Soon I going back to work on optimizers and this are nice suggestions.
    For now there was no much focus on tunnel/interior like optimization.
     
  31. rocksquarethunder

    rocksquarethunder

    Joined:
    Mar 4, 2020
    Posts:
    6
    Have you maybe tested this with Playmaker FSMs? I'd love to deactivate some playmaker logic with it, but I keep getting an error: Not found field with name eventHandlerComponentsAdded in PlayMakerFSM of
     
    Last edited: Jul 30, 2020
  32. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    I am not very familiar with playmaker, but I know it's variables are not accessible to use in optimizers, you can use custom unity events on LOD levels to call what you need instead:

    upload_2020-7-30_18-1-36.png
     
  33. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    770
    I'm interested in this asset but I want to make sure it would help me in my project. I am dynamically generating a landscape with very small meshes (20x20 to 60x60) and I dynamically place objects on these meshes (trees, building, etc.) I really want to speed up the tree and foliage rendering especially since the foliage and grass is made up of meshes (since the game is for VR.) Based on this information, would your asset work for procedurally generated levels like this and, if so, do you think your asset would help give a noticeable boost to performance?
     
  34. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    Optimizing just meshes with Optimizers will not give noticeable improvements, I suggest waiting for implementation of custom occlusion culling with jobs system (but unfortunately I can't give approximate date of adding it to optimizers)

    To second question: yes, optimizers are working with dynamically added objects to scene, but you must have optimizer added to prefabs of objects you will create.
    If you are generating new meshes procedurally and you want to tweak optimizer for this mesh then It may be possible but there are no tested tools for such purpose yet.
     
    combatsheep and StevenPicard like this.
  35. yomanx

    yomanx

    Joined:
    Dec 5, 2016
    Posts:
    38
    Hey, Will it increase fps in 2d games?
     
  36. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    Yes it can, if you're using many particle effects on your scene, scripted objects etc. but optimizing single sprites will not give noticeable difference.
     
  37. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    397
    Can this be used in conjunction with Vegetation Studio Pro (which uses DOTS for instanced / indirect rendering)?

    Can this be used to prevent or reduce overdraw of trees in a dense forest?
     
  38. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    No, at least not for current version, I can consider checking this out after I finish some important updates for the package ;)
     
    combatsheep likes this.
  39. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    122
    Hi FimpossibleCreations,

    I want to update ver1.0.3 included in the Unity project to ver1.0.4.
    Is there anything I should be careful about?

    Should I just import ver1.0.4 by overwriting ver1.0.3?

    Thanks.
     
  40. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    You can update to V1.0.4 just by importing package and doing nothing more.
    Soon there will be update to V1.1.0 which will need some things to do for update but this will be in next few weeks.
     
    combatsheep likes this.
  41. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    Hello by mistake i bought 3 times your asset when i only need 1 for me. can you do refund please.
     
  42. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    Mail me with invoice no. and we will work on that ;)
     
  43. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    122
    Thank you!

    I'm looking forward to ver1.1.0!;)
     
  44. ScaniX

    ScaniX

    Joined:
    Apr 10, 2016
    Posts:
    31
    Hi!

    Just got your asset and the usage is quite nice. Adding it to lights and particles didn't increase FPS yet, but I am still trying. :)

    I just have two problems:
    1) where can I disable the icons that are drawn into the hierarchy? Is there a settings window? I could not find the preferences for this.

    2) it throws quite a bit of exceptions:

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <437ba245d8404784b9fbab9b439ac908>:0
    at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0
    at FIMSpace.FOptimizing.FComponentLODsController.GetCurrentLOD () [0x00016] in <c513110849494c8585d965a704dc9214>:0
    at FIMSpace.FOptimizing.FOptimizer_Base.ChangeLODLevelTo (System.Int32 lodLevel) [0x00047] in <c513110849494c8585d965a704dc9214>:0
    at FIMSpace.FOptimizing.FOptimizer_Base.RefreshVisibilityState (System.Int32 targetLODLevel) [0x000ce] in <c513110849494c8585d965a704dc9214>:0
    at FIMSpace.FOptimizing.FOptimizer_Base.CullingGroupStateChanged (UnityEngine.CullingGroupEvent cullingEvent) [0x0012d] in <c513110849494c8585d965a704dc9214>:0
    at FIMSpace.FOptimizing.FOptimizers_CullingContainer.CullingGroupStateChanged (UnityEngine.CullingGroupEvent cullingEvent) [0x00023] in <c513110849494c8585d965a704dc9214>:0
    at UnityEngine.CullingGroup.SendEvents (UnityEngine.CullingGroup cullingGroup, System.IntPtr eventsPtr, System.Int32 count) [0x0001c] in <0618f269b594493b97c56ba78f03373a>:0


    Would be great if you could help me here! Thanks!
     
  45. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    You may use not enought lights/particle systems to notice difference, but with optimizers you can allow to put them more on scene without hurting cpu ;)

    It's inside code, you can open for example FOptimizer.cs file and remove following lines:

    upload_2020-9-17_10-15-29.png



    Right now I am working on update for optimizers, I will have to rebuild some code and solve some issues with newest versions of unity, this error may be caused because of one issue with prefabing.
    If there is more errors like that, please write on my e-mail.
     
  46. ScaniX

    ScaniX

    Joined:
    Apr 10, 2016
    Posts:
    31
    Ok, thank you! Could you consider adding this as a preference in the future? Because code changes are overwritten with each update. Probably turn the icons off per default as there are lots of useful hierarchy add-ons that are adding icons with more functionality than just a marker.

    BTW: My Unity Version is 2019.3.4f1
     
  47. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    I implemented it right after your message ;)
    So in new version you will disable it with simple switch button.

     
    combatsheep and ScaniX like this.
  48. ScaniX

    ScaniX

    Joined:
    Apr 10, 2016
    Posts:
    31
    Great work! :)
    Thanks! :)
     
  49. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    343
    OPTIMIZERS V2.0.0 RELEASED

    !!! IMPORTANT INFO FOR USERS OF VERSION 1 !!!

    All optimizers from version 1 need to be converted to version 2 with converter UI which is available under included "Optimizers Converter V1 to V2.unitypackage"

    Unfortunately all previous scriptable files can't be converted from previous optimizers to new and need to be created from scratch if you was using this feature.
    After converting to V2 settings are setted by compoennts' Auto Setting feature, settings parameters are not copied, so if you did some custom tweaking, you need to do it again after converting.

    Optimizers system in new version is more flexible for coding, it needed many changes in base structure of classes which caused break connection with Optimizers V1 system.
    I marked this update as version 2 to underline it needs extra effort when upgrading from V1.

    Now there is default "Essential Optimizer" to work with.
    Previously optimizers was using scriptable files, now this option is dedicated for advanced users since there must be put extra care to not cause some problems when using them.
    Essential Optimizer is serializing LOD settings inside component so it's not creating any extra files anywhere.
    It can be used very easily and comfortable by anyone.
    One flaw from essential optimizer is that it can't implement new custom scriptable types for optimization.

    Complex Shape and Obstacle Detection components are not needed anymore.
    This features are switchable inside "Additional Modules" tab of "Scriptable Optimizer" or "Essential Optimizer"

    New manual file updated with many important informations, I encourage to check it.


    - New GUI Inspector window
    - New "Suggest" button and "Auto" parameter for automatic max distance settings
    - Camera buttons over LOD ranges - by clicking on the scene view camera moves to selected distance range to check how will look object when switching to new LOD / culling
    - The components "Obstacle detection" and "Multi Shape" are removed and features are put into one component "Essential Optimizer" or "Scriptable Optimizer"
    - Essential Optimizer will work with nested prefabs without any files to save
    - NEW "ESSENTIAL OPTIMIZER" which can't be expanded with scriptable objects but works very stable with prefabing and is recommended to use
    - New "Scriptable Optimizer" which is the same like previous "Simple Optimizer" but implements switchable Obstacle detection / Multi shapes
    - Multi Shapes working with culling containers (need to be tested more)
    - Language support for inspector titles for 5 languages (English, Polish, Russian (translated), Chinese (t), Japanese (t), Korean (t))
    - Updated Manual PDF
    - Culling Containers browser tab in Optimizers Manager for debugging generated Culling Groups
    - Multiple smaller fixes
    - Demo scenes packed into unitypackage


    Now I will focus on some upgrades to the whole system, fixing issues if encounter any (please mail me if you find sure one) and I'll be working on implementation of DOTS for obstacle detection.
     
    ScaniX and combatsheep like this.
  50. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    41
    Should we delete the existing FImpossible folder before installing this update? I noticed that there are a lot of new files... thanks!
     
    combatsheep likes this.
unityunity