Search Unity

[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. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Looks amazing, do you have an updated link to the trial version? Id love to try this before I buy.

    Also "You cant use image effects on 'imposterCamera' otherwise you will have incorrect atlas rendering. " - does that mean unity's own postprocessing effects wont work?
     
  2. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    I bought this on the sale and must say it works pretty good. I also bought Amplify Impostors and was much happier with this asset. Hope publisher keeps up Updates :)
     
  3. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEditor;
    5. using ImposterSystem;
    6.  
    7. [ExecuteInEditMode]
    8. //Notes: this will build out a scene while in edit mode as soon as you click on the "setupImposters" or "removeImposters" boxes.
    9. //Notes: MultiSelect all prefabs and add your "tagToUpdate", tag to them all.
    10. //Notes: only the parent Gameobject with a Mesh renderer should have the tagtoUpdate, Child objects that are LODs should not.
    11. //Notes: this can permanently destroy aspects of your scene, always copy your project before testing.  This is ment for simple Setups so complex parenting of objects will like cause unwanted destruction in the scene
    12. //Notes: Create an Empty Gameobject and add the ImposterController to it, Save as a prefab and link that to prefabImposter here. this should have any setups that you perfer already set.
    13. //Notes: Add this to ImpostersHandler in the Scene.
    14. //Notes: Remove or disable this after scene is setup.
    15.  
    16.  
    17. public class JBR_ImposterSetup : MonoBehaviour {
    18.     [Tooltip("Check this button to Setup all imposters in the scene")]
    19.     public bool setupImposters = false;
    20.     [Tooltip("Check this button to Remove all imposters in the scene")]
    21.     public bool removeImposters = false;
    22.  
    23.  
    24.     [Tooltip("The Tag that an object needs, if we add imposters")]
    25.     public string tagtoUpdate = "Building";
    26.     [Tooltip("Array of all Imposter Gameobjects created, reference only")]
    27.     public GameObject[] objectsToAddImposters;
    28.     [Tooltip("A prefab with ImposterController already added, this should already have the individual specs setup")]
    29.     public GameObject prefabImposter;
    30.  
    31.     //The New Imposter Gameobject that is being setup
    32.     private GameObject imposterSetup;
    33.     //ref to ImposterController script
    34.     private ImposterController imposterControl;
    35.     //not currently used, will be for more complex Lods
    36.     private GameObject[] childObjects;
    37.  
    38.  
    39.  
    40.     private void Update()
    41.     {
    42.         if (setupImposters)
    43.         {
    44.             objectsToAddImposters = new GameObject[0];
    45.             setupImposters = false;
    46.             SetupImposters();
    47.         }
    48.  
    49.         if (removeImposters)
    50.         {
    51.             objectsToAddImposters = new GameObject[0];
    52.             removeImposters = false;
    53.             RemoveImposters();
    54.         }
    55.     }
    56.     // Use this for initialization
    57.     void Start()
    58.     {
    59.    
    60.     }
    61.     public void SetupImposters()
    62.     {
    63.         //FInd all objects with tag
    64.         objectsToAddImposters = GameObject.FindGameObjectsWithTag(tagtoUpdate);
    65.         //loop through all objects found
    66.         for (int i = 0; i < objectsToAddImposters.Length; i++)
    67.         {
    68.             Debug.Log("CHecking " + objectsToAddImposters[i] + "For ImposterController");
    69.             //dont do anything is this gameobject has Imposter scripts on them already
    70.             if (!objectsToAddImposters[i].GetComponent<OriginalGOController>() && !objectsToAddImposters[i].GetComponent<ImposterController>())
    71.             {
    72.                 //make sure object has a mesh renderer
    73.                 if (objectsToAddImposters[i].GetComponent<MeshRenderer>())
    74.                 {
    75.                     //TO DO : add child objects with a mesh renderer
    76.  
    77.                     //add prefab to scene, in same position and rotation as object to imposter
    78.                     imposterSetup = Instantiate(prefabImposter, objectsToAddImposters[i].transform.position, objectsToAddImposters[i].transform.rotation) as GameObject;
    79.                     //parent object to ImposterController
    80.                     objectsToAddImposters[i].transform.parent = imposterSetup.transform;
    81.                     //rename imposter parent
    82.                     imposterSetup.name = (objectsToAddImposters[i].name + "_ImposterLOD");
    83.                     //reference imposter Controller
    84.                     imposterControl = imposterSetup.GetComponent<ImposterController>();
    85.                     //add originalGOController to object
    86.                     objectsToAddImposters[i].AddComponent<OriginalGOController>();
    87.  
    88.                     //add object to LOD0, Note this only works for one LOD object currently
    89.                     imposterControl.m_LODs[0].renderers = new OriginalGOController[1];
    90.                     imposterControl.m_LODs[0].renderers[0] = objectsToAddImposters[i].GetComponent<OriginalGOController>();
    91.                     //add object to LOD1, Note this only works for one LOD object currently
    92.                     imposterControl.m_LODs[1].renderers = new OriginalGOController[1];
    93.                     imposterControl.m_LODs[1].renderers[0] = objectsToAddImposters[i].GetComponent<OriginalGOController>();
    94.                     //make this second LOD the imposter
    95.                     imposterControl.m_LODs[1].isImposter = true;
    96.                     Debug.Log("Imposter Setup Finished on -" + objectsToAddImposters[i]);
    97.                 }
    98.                 else
    99.                 {
    100.                     Debug.Log(objectsToAddImposters[i] + " Did not have a mesh renderer so it was skipped");
    101.                 }
    102.             }
    103.             else
    104.             {
    105.                 Debug.Log(objectsToAddImposters[i] + "-has Imposter Controller");
    106.             }
    107.         }
    108.     }
    109.  
    110.     public void RemoveImposters()
    111.     {
    112.         //FInd all objects with tag
    113.         objectsToAddImposters = GameObject.FindGameObjectsWithTag(tagtoUpdate);
    114.         //loop through all objects found
    115.         for (int i = 0; i < objectsToAddImposters.Length; i++)
    116.         {
    117.  
    118.             if (objectsToAddImposters[i].GetComponent<OriginalGOController>())
    119.             {
    120.                 //remove OriginalGOController
    121.                 DestroyImmediate(objectsToAddImposters[i].GetComponent<OriginalGOController>(),true);
    122.  
    123.                 Transform main = objectsToAddImposters[i].transform.parent;
    124.                 objectsToAddImposters[i].transform.parent = null;
    125.                 if (main != null)
    126.                 {
    127.                     if (!main.GetComponent<MeshRenderer>())
    128.                     {
    129.                         DestroyImmediate(main.gameObject, true);
    130.                     }
    131.                
    132.                 }
    133.            
    134.             }
    135.  
    136.             if (objectsToAddImposters[i].GetComponent<ImposterController>())
    137.             {
    138.                 if (objectsToAddImposters[i].GetComponent<MeshRenderer>())
    139.                 {
    140.                     //remove ImposterController
    141.                     DestroyImmediate(objectsToAddImposters[i].GetComponent<ImposterController>(), true);
    142.                 }
    143.                 else
    144.                 {
    145.                     //loop through all childern
    146.                     foreach(Transform child in objectsToAddImposters[i].transform)
    147.                     {
    148.                         //un-child all childern before destroying
    149.                         child.transform.parent = null;
    150.                     }
    151.                     DestroyImmediate(objectsToAddImposters[i], true);
    152.                 }
    153.             }
    154.  
    155.  
    156.         }
    157.     }
    158. }
    159.  
    For anyone that wants a quick way to setup a prebuilt scene. Note it does have a few limitations like only 1 lod level,& only 1 MeshRenderer per group. This could potentially break a scene so always test on a backup first.
     
    Last edited: Dec 8, 2018
  4. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Just curious:

    Without asking why I would do that :p, would this work on 2D sprites (quads) and particle systems (shuriken) as well?
    What about VR single pass and custom shaders?
    Does it support custom rendering pipelines or dynamic rendering resolution change?

    I do own the asset, but I'm just asking if they're officially supported. I haven't delved into the details of its implementation.
     
    JBR-games likes this.
  5. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Just been looking at the amplify one, what was wrong with it ? I wish these people did free trial versions.
     
  6. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Hi

    I don't have any standalone VR helmet like Oculus, so can't test and proof that Imposter System works for VR.
    I had customers that wanted to use my asset with VR, but with no luck. We faced bugs with rendering to RenderTextures in VR-mode. Maybe in future, when I will have more time, I will buy VR helmet and test Imposter System with it.
     
  7. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Imposter system would work with 2D sprites (quads).
    With particles it's a bit complicated. First of all particles have dynamic bounds, that's why they may be outside of imposter texture. Also, particle's shaders don't write to z buffer, so ImposterSystem's shader can't draw them.
    Here is color channel of imposter texture with particle system:
    upload_2018-12-13_20-17-52.png
    Alpha channel of the same texture:
    upload_2018-12-13_20-18-13.png
    Final result:
    upload_2018-12-13_20-18-29.png
    But if you have experience in writing shader, you can change ImposterSystem's shader to the way you want.

    Can't say anything about VR:(
    Imposter System using standard forward rendering, so custom shaders must work with forward rendering and write to z-buffer.
     
    NeatWolf likes this.
  8. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    No, now there is no trial version. But you can buy asset, and if it doesn't work I will refund you money.

    Yes, unity's own postprocessing effects won't work on 'imposterCamera'(camera, that used to render imposter textures, it's not your game camera).
    Also, you don't want image effects on this camera:) Imposter texture must look just like original object, without any changes in color or shape, because this breaks the 'effect' of imposter.
     
  9. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Hope you happier with my asset:D
    Yes, updates will be soon... Or later if I will decide to rewrite the whole system from scratch.

    Hmmm, need to add similar fast scene setup in future updates.
     
    Last edited: Dec 13, 2018
    AthrunVLokiz and JBR-games like this.
  10. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
  11. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Can you confirm, that you using forward rendering path?
    Is imposter-texture dark or exactly rendered imposter?
     
    JBR-games likes this.
  12. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    The Imposter is several Shades Darker then the actual building, it still looks good but there's an obvious popping of color when it transitions.

    Unfortunately I've been very busy at work getting caught up before the holidays but as soon as I get a chance I will find out if I was in the wrong rendering get back to you .
    thank you
     
    Last edited: Dec 21, 2018
    MUGIK likes this.
  13. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    It seems this project is dead! What a pitty! Such system would revolutionize far-rendering scenarios! :(
     
  14. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Dead why so ? Publisher just replied to a question had a month ago.. It actually works really well..
     
    MUGIK and hopeful like this.
  15. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    Maybe, but did you tested the plugin with the latest Unity 2018.3.x ? Cause, the publisher had his last update on jul 9th, 2018! And a almost seven month old release is nothing I would buy! Sorry, if I have reacted in a prejudicial way. But the publisher could do a simple update, just to confirm that his plugin works on newer versions.
     
    NeatWolf likes this.
  16. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    I have not tested in 2018.3, i did test in 2018.2f20. Yes hopefully @MUGIK checks and possibly updates soon..

    Youve been around for a while and should know that unity's newest version always seems to have issues with either breaking assets or issues in unity itself. So I dont like being an early adopter.
     
  17. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Hi!
    I 100% understand your position.
    Please, don't buy this asset until I make a new version. It will not be just an update.
     
    NeatWolf, JBR-games and AthrunVLokiz like this.
  18. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Do you have a rough eta on the new system ?
     
  19. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    No.
    But I can say that in new version/iteration of my project I would use ECS and multithreading techniques that will heavily reduce load on CPU.
    Main functionality will stay the same.
     
    JBR-games likes this.
  20. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    Any further news on this, and whether it will work in deferred/forward, and with GI/dynamic lighting/global fog?
     
    JBR-games and NeatWolf like this.
  21. Milanis

    Milanis

    Joined:
    Apr 6, 2018
    Posts:
    55
    Would love to hear about as well. Any news and a little question on top: Usable for HDRP?
     
    JBR-games and dozhwal like this.
  22. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    Based on the fact that the current version is not compatible with 2018.3 and that you recommend we wait until the next version I'll follow your advice. However, you did indicate you did not know when the new version would be available. Unfortunately, I can't wait too long. Is there any general estimate such as whether it would be weeks or months? If you really don't know then I'll just look for another option.
     
  23. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Who said current version is not compatible with 2018.3? It works fine if don't use HDRP and LWRP.

    HDRP and LWRP will be supported only for unity 2019.x
     
  24. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Sorry for late response.
    For now, I diving into HDRP. Already I can say, that HDRP will be supported only for unity 2019.x
     
    Milanis likes this.
  25. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    Oh, I must have misunderstood. Well, I think that's good news then. Will version 2 be a free update or will there be a reasonable upgrade path? I would hate to buy it now and then have it deprecated a short time after with a new version out.
     
  26. xsasoftware

    xsasoftware

    Joined:
    Sep 6, 2017
    Posts:
    24
    Hello. I have a problem on mobile. It render the imposter with a black background. Screenshot_20190414-125107_Advance New Car Parking Game City Multistorey.jpg
     
  27. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Hi!
    Make sure that 'Use 32-bit Display Buffer' in player settings is enabled.
    upload_2019-4-15_12-0-25.png
     
    JBR-games likes this.
  28. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Old version will not be deprecated after update. Current system has almost all you need.
    New version will be in beta until HDRP and DOTS are in the final stage.
     
    JBR-games likes this.
  29. xsasoftware

    xsasoftware

    Joined:
    Sep 6, 2017
    Posts:
    24
    Hello,even with 32-bit display I have the same problem. Also, sometimes this problem occurs on editor too.
     
  30. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Weird... Please, tell your unity version, ImpostersHandler's settings and Player's settings
     
  31. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Does this work when using baked lightmaps for mobile using the Lighting mode called Shadowmask?
     
  32. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Hi,

    I had a few questions (I have not purchased the asset yet by the way).

    My understanding is that at runtime (so when scene loads) your asset will "convert" the 3D objects "marked" as impostors into 2d billboards. If that is the case is this a lengthy process? I'm working in mobile so this is important information for me.

    Also once the scene is loaded (assuming above is true) my camera moves at a very specific y-axis only. So I don't think I need to have camera facing option enabled. So basically I would use this to setup my 3d background at start of scene level and not touch it throughout the game. What is the performance of the asset in this scenario. I mean, does it still do any work or is it dormant.

    Thanks.
     
  33. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    From my tests it seems to work good on mobile.
    It updates based of what you set as angle difference from last imposter drawn to current camera angle vs your object.. So an angle of say .1 degee will update rather often compared to say 5 degees, but will be a very noticable change when it happens. You can also set how many bilboards update per frame to keep performance better.
    I tested this with cscape and was impressed at how many buildings could be replaced (at rather close distances) to keep a seemingly large city with only 25k tris vs oringinal 250k tris.

    In general the real advantage of this asset vs editor baked imposters (like amplfy imposters )is the quality of the imposter. This asset keeps the objects looking good at impressively close distances at the expense of a bit of runtime performance.
     
    MUGIK likes this.
  34. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Thanks for getting back and answers.
     
    JBR-games likes this.
  35. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Yes, converting happens at runtime, but in general case only when camera sees object. If you want to create all imposters right after scene is loaded, you can do this with
    ImpostersHandler.Instance.UpdateAllImpostersImmediately();


    If I understand your case right, then you want to update all imposters at once. So you need to know how many objects can be converted at a short time. About 1000 imposters per second. But this value depends on computational power of target device.

    You have descrived the best scenerio I can imagine. Yes, system will stop processing objects every frame and you will get only fast drawing mesh. To do so you need to populate all imposters you want and disable imposters updating.
    ImpostersHandler.Instance.disableImpostersUpdating = true;
     
  36. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Thank You for the information.
     
  37. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Hi everyone!

    Recently I tested and played around with new Unity's Job Systems.
    From my tests, Jobs itself doesn't give much performance boost. But...
    Burst compiler makes some kind of magic. In my tests, I got more than 100x performance increase!

    Of course, I have tried to implement Imposter System using Jobs and Burst compiler. Unfortunately, I was not able to implement the whole system, but only a mathematical part. The way it works is to calculate all needed variables in jobs and then copy them to the old system. And here is the main problem. Copying a lot of data from the array of structs to the array of classes takes a lot of time. So, the end result is even worse than the old system.

    Currently, I trying to find a way to implement the whole system using Jobs, Burst and only structs. It is a difficult task because the system needs to include all old features like multiple camera support, shadow casting, mesh combining, fading and others. This creates a lot of variations that are easy to solve in OOP paradigma, but not in data-oriented paradigma. And I start to think if all these features are needed? Does anyone use them? Can I remove some functionality to offer an insane performance boost?

    That is why I asking for your feedback about Imposter System.
    1. How do you use it? (I would love to see your projects:))
    2. How many imposters in your scene?
    3. Do you use multiple cameras?
    4. Do you use imposter shadow casting?
    5. Do you use imposter's fading?
    6. Do you use 'Mesh Renderer' render type? (ImposterHandler.impostersRenderType)
    7. How many imposters('Render as imposter') do you have in LOD settings in ImposterController component?
    8. Do you have performance issues when moving the camera?

    I didn't make a poll in google forms just because I want to be able to identify who is answering and maybe continue the discussion.
    Sorry, for wasting your time, but these questions are really important for me and for the future of Imposter System.

    Thanks! Have a nice day!;)

    P.S.
    Yes, today is a day off, so I do not ask for an instant reply.:)
     
    Last edited: Jun 8, 2019
    JBR-games and AthrunVLokiz like this.
  38. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Ill work on getting better answers for you soon but..
    1. Large city , currently testing with Cscape.
    2. 1000 buildings ,although many are occcluded.
    3. 1 camera (currently)
    4. Maybe
    5. Maybe
    6. Most performance render type
    7. I actually modified your code a bit to make extra lod i think. (Closer faster updated, farther slow updating). Would likely perfer 3 lod levels for just the imposters..
    8. Depending on the view, how many imposters are visible, and update speed. Yes it drops FPS below 10 for a second. Mostly only when camera is moving fast and alot have to update constantly. Like a fast moving airplane over a city..

    Note: im only testing to see how large i can make a map on mobile platform .. Has already made a big difference from about 10 fps to around 30-40..
     
    MUGIK likes this.
  39. dozhwal

    dozhwal

    Joined:
    Aug 21, 2014
    Posts:
    59
    Hi,

    now, i just began to use it with an oculus go (VR) project and it seems to works great. (but the camera is oculus go is static)
    I like this asset but didn't try it a lot for now so my feedback is not very useful, but i encourage you to continue to work on it :)

    I would like to have a "baking" option like amplify imposter, to avoid runtime calculation.
     
    JBR-games and MUGIK like this.
  40. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Just curious, this would work fine with synty nature models?
     
  41. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    I don't know what is special about synty nature models, but it works fine with speed trees.
     
  42. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Hi guys, we bought your asset but we are having some issues.
    This ugly effect happens when we move the camera:

    Is it possible to minimize or avoid this?
    Can you give us some tips to avoid it?
    Thanks in advance
     
  43. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Hi again, we are trying to optimize the system by using the Imposter system whenever we detect movement by the player or not.
    So far we have tested with this instructions:
    OnMovementDetected() we tried the following:
    impostershandler.enabled(false) ---->. works well but when we turn it on again game freezes for 1/2 sec
    impostershandler.disableImpostersUpdating(true) -> whenever we move there are some trees that we just can see the shadow, not the model or the imposter
    impostershandler.ignoreimpostersystem(true) -> gives this expeption:

    [Exception] NullReferenceException: Object reference not set to an instance of an object
    ImposterController.ShadowWillRendered() Assets/ImposterSystem/Scripts/ImposterController.cs:225
    223: else // need that else
    224: {
    -->225: if (_currentLODIndex == -1 || !m_LODs[_currentLODIndex].isImposter || !_curImposter.isGenerated)
    226: {
    227: if (_shadowCaster != null)

    ImpostersHandler.ProcessCamera() Assets/ImposterSystem/Scripts/ImpostersHandler.cs:698
    696: }
    697: if ((shadowCastingEnabled || (shadowsEnabledOnLight && !isVisible)) && _curRenderable.nowDistance < shadowDistance)
    -->698: _curRenderable.ShadowWillRendered();
    699: }
    700: }

    ImpostersHandler.OnPreCullForCamera() Assets/ImposterSystem/Scripts/ImpostersHandler.cs:623
    621: {
    622: if (needProcess)
    -->623: ProcessCamera(camDetector);
    624: }

    Camera.FireOnPreCull() /Users/builduser/buildslave/unity/build/Runtime/Export/Camera/Camera.bindings.cs:347
     
  44. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Hi! Thank you for purchase!
    Imposter System works really bad with fast-moving cameras, which is the cost of performance.
    I think there is no way to avoid such behavior because your camera changes view angle very fast.

    I can suggest you try Amplify Impostors, which perfectly works when there are many identical objects.

    Contact me at PM with your invoice number, if you want a refund.
     
  45. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    You need to try CameraDetector.ignoreImposterSystem.
    If you did so and got this error then let me know, because I do not have such error.
     
  46. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Thats the error I'm getting when using CameraDetector.ignoreImposterSystem.
    Im using Unity 2019.1.8f1 on macOSX and iOS build

    EDIT: I just realized if I disable the Shadow casting from the Handler the error doesn't appear
     
  47. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    here is where the exeption is being thrown:
     

    Attached Files:

  48. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Hi

    To prevent such ugly update effect you can try to set 'ImposterController.updateBehavior' to
    'Show3DObject_WaitForUpdate'.
    upload_2019-7-31_10-27-33.png
    With this setting enabled objects will be showing as 3d objects until imposter texture is not created. This will cause performance drop when camera moving really fast(zooming effect), but when camera is not moving you will get pretty good results.
     
    JBR-games likes this.
  49. hoyoyo80

    hoyoyo80

    Joined:
    Jan 31, 2018
    Posts:
    58
    Hi..just purchase it yesterday.I follow the tutorial and it works as describe:D

    But one thing i want to ask, doest it work with lightmap on LOD0?
    One more thing, i have a low end device that run just fine with real meshes(with lightmap and occlusion) with outdoor scenery with lot of trees. So i replace most of trees mostly unreachable one with imposters but the performance is getting worst. Any tips on performance?
     
  50. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Hi!
    Yes. it works with lightmaps. If in your case it doesn't, then share more details.
    How fast your camera moves?
    How many trees you have?
    Did you try to decrease the 'Error camera angle' on ImposterController? So imposters will less often require update.
    Also, you can try to decrease the 'Max Updates Per Frame' on ImpostersHandler.

    The main performance problem is how often impostors update. The more often the more performance spikes.
     
Thread Status:
Not open for further replies.