Search Unity

[BETA RELEASE] Amplify Impostors

Discussion in 'Assets and Asset Store' started by Amplify_Ricardo, Jul 10, 2018.

  1. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    335
    Thanks!
    I've send a email with screenshots to support@Amplify.pt
     
  2. Xefier

    Xefier

    Joined:
    Dec 22, 2012
    Posts:
    70
    Ran into an issue with Hemi Octahedron and billboard meshes without 1:1 aspect ratio.
    From many angles it looks fine, but as you rotate to the front it has major issues.

    Car Settings.PNG Car1.PNG Car2.PNG Car3.PNG
     
  3. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Greetings,

    Thank you for reporting the problem. This type of object shouldn't be an issue, do you get the same artifacts farther away or using a spherical impostor?

    We'll run a few tests but we would really appreciated if you could confirm it.

    Thanks!
     
  4. Xefier

    Xefier

    Joined:
    Dec 22, 2012
    Posts:
    70
    Spherical and Octahedron are both fine, only Hemi - Octahderon has the issue.
    The issue still occurs even if you can barely see the object in the distance.
     
  5. circus3d

    circus3d

    Joined:
    Nov 9, 2016
    Posts:
    3
    I've been testing this asset out and it's results are impressive.

    I'm trying to integrate it into our automated mesh processing pipeline. I need to be able to programatically bake out the imposter resources for hundreds of objects with default settings.

    What I've got is an editor script that creates a AmplifyImposter component on my target game object, creates the AmplifyImposterAsset, and configures mesh renderers / lod groups etc. See below:

    Code (CSharp):
    1. AmplifyImpostor imposterComponent = go.AddComponent<AmplifyImpostor>();
    2. imposterComponent.Renderers = go.GetComponentsInChildren<MeshRenderer>();
    3. string imposterAssetPath = prefabFolder + "/" + parent.name + "_imposter.asset";
    4. AmplifyImpostorAsset imposterAsset = ScriptableObject.CreateInstance<AmplifyImpostorAsset>();
    5. AssetDatabase.CreateAsset(imposterAsset, imposterAssetPath);
    6. imposterComponent.Data = imposterAsset;
    7. imposterComponent.LodGroup = lodGroup;
    The last thing I need to be able to do is trigger the Bake Imposters functionality from my script. I can't quite see where this might be triggered in code (I've tried briefly following the inspector script however it wasn't 100% clear). Rather than spending a bunch more time chasing this up, I figure I should probably ask here first as I'm sure others may also find the response useful.
     
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    I just noticed that your Y axis is not pointing up, since it's an HemiOctahedron we use the Y axis as guide for the bake process. You can use an empty Gameobject to bypass this issue, simply add the car to it and place the Impostor component in the parent Gameobject, this will ensure that the Y axis of the car will not influence the bake.

    We might be able to add an optional direction parameter at a later stage.

    Let me know if you have any questions.
     
  7. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    284
    Uhm, we want to eventually have easy hookups for things like this, specially because there will be some runtime functions that we'll make available for load time and runtime impostors. However none of this is available yet so there isn't a single function call you can make that does everything. I can still point you to the bake entry but you have to keep in mind that these prebaked impostors are still completely tied to the editor, more specifically to the inspector. So while the baking stuff is in the main impostor class it's the inspector job to setup everything correctly for baking, and considering that you are creating your own call it's the inspector script you want to look at.

    Take a look at the "DelayedBake" function in the inspector, which is called with the delegate:
    Code (CSharp):
    1. EditorApplication.delayCall += DelayedBake;
    Now, at the top of the function you see the single entry point for the baking with the function call:
    Code (CSharp):
    1. m_instance.RenderAllDeferredGroups( m_currentData );
    But do keep in mind that the m_instance var refers to the current impostor while the m_currentData, is the setup of that bake, or more specifically the .asset file containing the bake configuration. This is the object the inspector is responsible for, and if you are controlling it outside of the inspector I can't guarantee you it will work flawlessly, at least not yet. We'll change this in the future. An easy way to make it work is to simply focus gameobject with the impostor script and let the custom inspector do it's job. If it becomes too difficult I can try to squeeze something more substantial in the next update to make it easier, no promises tho.
     
  8. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    461
    if source object is lightmaped it will bake impostor with lightmaps? If not. Baking at least indirect co tribution would be fine. Or providing a way to lightmaper compute lightmaps for indirect and direct. I use Bakery. A GPU lightmaper for unity. MAy be you could put in touch with the dev as the mapper is maturing and new features like support for impostors could be added in future closer term update.
     
  9. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    I'm afraid that's not something that we can currently support, only dynamic lighting and probe data.

    Apologies for the inconvenience.
     
  10. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    461
    I see, but you could still bake the indirect lighting into the impostor tile.
     
  11. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    All options on the table as long as they are compatible with the technique, we're definitely going to improve a few things with future updates.
     
  12. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    461
    Ok, allow me an extra question. So, this also works for non static objects? if I've this as lod 1 and the lod is a non static barrel if the barrel/tree/whatever prop is kicked the impostor updates its tile?
     
  13. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Yes, you can transform impostors. Soon you'll also be able to generate them at runtime allowing for swaying vegetation or similar effects.

    Wait for it... ;)



    Quick note, the checkered quads where used for reference only, they don't represent the actual impostor mesh.
     
  14. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    461
    This is bananas, I've already atlased all the stuff, culled layers by distance, computed occlusion and still need to lower the drawcalls, specially for console I need to lighten teh game and I don´t whant to mof the camera clip any closer, This asset definetly seems like delivers, added to purchase queue. the only downside I see is that if they're far they'll get no direct shadows and no lightmap so they may pop a bit... I think I did read they support lightmproves, if so that should fix the issue, still I'm aquiring in close term.
     
  15. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Hope it helps! Be sure to let us know if you run into any issues, we can use all the feedback we can get.
     
  16. chebidoia

    chebidoia

    Joined:
    Dec 5, 2017
    Posts:
    2
    Just a tought. If you record a person on a greenscreen with an array of cameras, could something like this be used for volumetric video instead of real mesh and bad quality seeing in recent projects?
     
  17. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    It's an interesting concept, as with external rendering, the only challenge here would be extracting proper normals and depth that you could then use with our impostor system.

    Thanks!
     
  18. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,478
    Just bought the asset without knowing that this doesn't work with lightmap. Oh well... I do really hope lightmap support is coming.. because normally, you use this kind of tech on static props or background elements and they normally do get the lightmaps. It's such a pitty...
     
    TooManySugar likes this.
  19. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    It could be a bit tricky but we're on the lookout for possible improvements.

    Thanks!
     
  20. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    282
    Finally took the plunge and bought the asset... :D Definitely full of potential.

    I'm wondering why my impostor bakes are all much more fuzzy (blurry) than anything you show in your demos. I've tried increasing the texture size but unless I hit 8192, the albedo is almost unrecognizable.
    - so yes I totally get that impostors are meant to be viewed from a distance, but I'm testing on objects comparable in size to your demo barrels (I'm using simple bushes) and while yours are recognizable as barrels, my bushes are just a blur.

    At that quality I just can't begin to imagine how I would ever get the visual fidelity you show in your main asset store image of the 3D Construction Kit cliffs/boulders.

    Are you setting up things in a certain way to get that kind of quality? I have tried tweaking the Impostor material settings but with no discernible effect.

    A s I say, if I increase bake settings to 8192 things are better, but I'm guessing the texture memory overhead is going to offset any gains I've made by losing the polygons...
    I've found the Bake Preset really useful to minimize this issue (reducing the scale of some of the maps, changing compression, removing some of the maps) but it's still a worry to me. Any advice would be much appreciated. Perhaps also, it would be good if you provided additional presets rather than just the default.

    A few thoughts...
    Would be great if the '+' button 'save asset' remembered the previous file path so that you didn't have to drill down through folders from the root of the project to get back to the same place each time.

    Also could you add a traditional billboard mesh (intersecting quads) as a Bake Type? That's also an impostor, just a more traditional, old school version. Would be a great add-on.
     
  21. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Hey there, thank you for your support!

    Are you using Octahedron impostors? They break down at close range making them look "fuzzy" and distorted. If you want higher-resolution impostors at closer distances you'll have to reduce the number of frames baked as this increases individual view resolution.

    For better results at "closer distances" be sure to use the Spherical Impostors, unlike Octahedron impostors they hold up quite well but do not provide smooth blending between views.

    Can you show us your test object and desired distance? We would be happy to recommend adequate settings.

    Our screenshots use mostly 2k and 4k impostors, we didn't use any special setting other than reducing the number of frames to an acceptable value depending on the type of prop.

    Thank you for the folder tip, it's actually something that we intend to improve soon.

    The intersection quad option is not ideal for this technique, impostors provide an alternative without noticeable intersecting geometry.

    Thanks!
     
    Last edited: Oct 8, 2018
    jeromeWork likes this.
  22. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    282
    Of course, that makes sense. Hadn't thought of reducing the number of frames to increase the available space :rolleyes:

    For anyone reading this, it's also worth mentioning that I'm finding the way that the impostors are displaying in-game is a lot less obviously low-res than I might have made it sound. While working on creating LODs I think you're much more attuned to visual degradation. While testing gameplay I'm actually finding that the transition to the Impostor LODs is sometimes not even noticeable. Initially I had to keep checking my LOD distances to see if it actually was working!
     
    hopeful likes this.
  23. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    No problem, we're actually looking into other possible enhancements(sharpening, etc), be sure to stay tuned.

    Great to know it's working well!
     
  24. barker_s

    barker_s

    Joined:
    Jul 17, 2012
    Posts:
    27
    Hi @Amplify_Ricardo !

    I've just started using Amplify Impostors and I'm loving the results so far. However, I found a bug and I was wondering if anything could be done about it.

    I'm using an orthographic projection camera with your default tree prefabs. Up close (small orthographic size) they look good:



    But when I zoom out further, impostors further from the center of the screen get distorted:



    I guess it's due to the fact that impostors turn to always face the camera, which would be correct in perspective projection. Could you please ask the devs if they could add orthographic support out of the box?
     
    Last edited: Oct 9, 2018
  25. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there, thank you for the kind words and support!

    Orthographic cameras should already be working correctly, so this is an unexpected issue that you've stumbled upon and we apologize for that! Could you please send us a simple sample so that we can run some further tests, as it would greatly speed up our debugging process? Feel free to do so privately through support@amplify.pt, thanks!
     
  26. ruin_spellbook

    ruin_spellbook

    Joined:
    Feb 22, 2016
    Posts:
    4
    Do you have any plans to create a lower hemi octahedron bake type? This would be very useful for large trees that would never be viewed from a top down camera (VR).
     
  27. barker_s

    barker_s

    Joined:
    Jul 17, 2012
    Posts:
    27
    Amplify_Borba likes this.
  28. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    We're actually planning the add a parameter that would allow you to define which hemisphere to bake. I'm not entirely sure if this would be ideal for trees in that specific application but you can test it in the current Amplify Impostors version.

    Since we use the Y axis as guide for the bake process. You can use an empty Gameobject to bypass this fixed limitation, simply add a rotated tree to it and place the Impostor component in the parent Gameobject, this will ensure that the Y axis of the tree will not influence the bake.

    This is not ideal of course, it will be easier to setup in future AI versions.

    Thanks!
     
  29. ruin_spellbook

    ruin_spellbook

    Joined:
    Feb 22, 2016
    Posts:
    4
    test.gif @Amplify_Ricardo The test works. Trees that are at player level and higher than the player can use the hemi octahedron bake type this way. They get the higher precision without distortion when viewed from below. This will be great because the environment is like a crater. The player will see trees that are at player level and elevated around the boarders.
     
    Last edited: Oct 11, 2018
  30. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321

    Good to know, future improvement will definitely help. I recommend using the spherical impostor whenever possible, they don't break at close distances.

    Thanks!
     
  31. Justin_Wingfall

    Justin_Wingfall

    Joined:
    May 15, 2014
    Posts:
    78
    HDRP? any ?news
     
  32. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    We'll be available soon!
     
  33. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    83
    Hi, Do you have any plan for making a 2D version or feature?
    What I'm thinking is 2D perspective scroll game faking 3D(or 2.5D). For example,we provide several angles' 2Dsprite, then combine/bake them into one quad, so that when camera moves the imposter show different result(Like billboarding).
    Is it possible?Thanks.
     
    Last edited: Oct 13, 2018
  34. holdingjason

    holdingjason

    Joined:
    Nov 14, 2012
    Posts:
    89
    Would it be any problem to create island impostors based on our terrain islands that have had trees, shrubs etc populated by veg studio? We basically want to have our islands in a distance be impostors and then swamp them out for the real thing as you get closer. I am guessing this would be possible but was unsure of how it would handle generating the impostors that are being built by something like veg studio.
     
  35. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    I don't think Impostors are ideal for that specific use as the technique involves using baked normals and depth, something typical sprites do not provide. However, there's a similar technique that allows you to use standard sprites, we actually include a similar sample in our ASE package.



    Learn more here: Amplify Shader Editor


    Although I cannot speak for any workflow specifics regarding other packages, you can bake multiple objects into a single impostor. Depending on the amount of meshes/detail in your islands, it might be useful to split up the impostors into specific groups but I can't know for sure without seeing more about your project.

    Thanks!
     
  36. fueldown_

    fueldown_

    Joined:
    Mar 21, 2018
    Posts:
    23
    Hi @Amplify_Ricardo,
    I am working with a VR project that requires me to instantiate large city/ buildings on a virtual table-top. The models are imported at runtime from a server (with Trilib). I was wondering if it is possible to use Amplify Imposters to reduce the amount of tris and draw-calls at runtime. If yes, then this would be like striking gold for me.. :D
     
  37. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321

    Sounds like the perfect job for Amplify Impostors!

    I'm not familiar with Trilib but you can think of impostors just as any other standard object, once it's created it should display its effect without any special requirements. Let us know if you run into any issues, feedback is critical.

    Thanks!
     
  38. fueldown_

    fueldown_

    Joined:
    Mar 21, 2018
    Posts:
    23
    Just one question.. does it work for mobile at runtime? I am developing for oculus go and vive focus.
     
  39. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Do you mean generating Impostors at runtime? If so, not at the moment, but it's something that should available soon on all supported platforms.

    Impostors, baked in-editor, work on all your target platforms.

    Thanks!
     
  40. fueldown_

    fueldown_

    Joined:
    Mar 21, 2018
    Posts:
    23
    Yeah. We need to generate them at runtime. We'll keep a close eye on this thread. Will you be able to speculate on the timeline for it?
     
  41. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Definitely keep an eye out for updates, no official ETA but it shouldn't be too far off.

    Thanks!
     
  42. MattVLSG

    MattVLSG

    Joined:
    Apr 2, 2018
    Posts:
    42
    Hello, purchased this just now and am struggling to just get a consistent output.

    Here's what I did
    1- Install Amplify Imposters
    2- Add Amplify Imposter component to an object
    3- Bake

    We use a lot of custom shaders (forwardbase vert/frag, no deferred, no surface shaders) and AmplifyImposter produces empty textures (100% black). So... I temporarily set our materials to use the Unity Standard shader to get some results...

    Though, if I change Texture Size and rebake, the imposter no longer displays and the baked textures become 100% black.

    Also, if I then try to adjust parameters in the Billboard Mesh options, this error spams the console.

    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. AmplifyImpostors.AmplifyImpostorInspector.OnInspectorGUI () (at Assets/AmplifyImpostors/Plugins/Editor/Inspector/AmplifyImpostorInspector.cs:964)
    3. UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, System.Int32 editorIndex, System.Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1367)
    4. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

    So I guess two questions...
    # Is there something I'm missing with the setup that is causing these bugs?
    # Can we configure the 'baking camera' so it uses forward? Or rather, that it can render just the same as the Game camera see's it.

    Thanks!
     
    Last edited: Oct 24, 2018
  43. MattVLSG

    MattVLSG

    Joined:
    Apr 2, 2018
    Posts:
    42
    Sorry some more questions...

    Cannot get Imposters to look like the objects they are representing. It appears all the lighting information on the original is ignored. As you can see below , the imposter looks nothing (in terms of shading) like the original. Our scene is 100% baked, so we want imposters to represent the static objects they are baked from.

    (Imposter on Left, original on Right)
    2018-10-24 13_34_10.png

    Is there an option to simply "render what we see" and only bake an Albedo? Would be great to have a static Imposter that really looks like the object in the scene and doesn't need to try and work under dynamic situations.

    Albedo only would also help drop 2/3rds texture memory requirements and perhaps allow at least 6 of the 15 tex2DBias samples to be dropped?


    It's grateful you guys have provided all the source code and shaders... but am keen to hear of any plans to address the above before modifying too much locally. Cheers!
     
  44. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Thank you for your purchase, we really appreciate it!

    Unfortunately, only shaders exposing a Deferred path are supported for baking, such as Unity Standard shaders. Custom shader support is currently provided via ASE, which is something we intend to improve in the future.

    The error itself is not expected, any chance you can share a small sample with the issue present for further examination on our side?

    What's your current Unity version?

    Amplify Impostors currently don't take baked lighting information into account, hence the difference; we do plan to offer additional bake options in the future.

    Thanks!
     
  45. MattVLSG

    MattVLSG

    Joined:
    Apr 2, 2018
    Posts:
    42
    Ok, then this feels like it will require us to support/maintain deferred paths of our shaders just for this.

    Is there a technical reason why this isn't supported? With our own RTT imposter work it was simpler to capture the final composited frame regardless of render path, which gives a good representation of how the original asset really looks in the Scene - albeit completely static.

    I completely understand that these sorts of imposters can't rotate and won't respond to dynamic lights... but for large scenes that are 100% baked it works well.

    Imposter on the Right with one of our tests
    2018-10-25 10_09_36.png


    Ok! We might revisit the plugin at that stage! I really like the clean interface and workflow... it's just the flexibility to fit into our pipeline that's blocking us adopting it at the moment. Keep up the good work!
     
  46. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Hello,

    Baking is not supported but the actual runtime shader works in both Deferred and Forward. It's not a technical limitation, more of a design choice, deferred is ideal for what we're doing.

    Indeed, we'll definitely look into it, we received quite a few requests.

    Thanks, I hope you enjoy our upcoming updates!
     
  47. guizmoquutamo

    guizmoquutamo

    Joined:
    Apr 11, 2015
    Posts:
    2
    Hello,
    I'm having some troubles while trying to bake my impostors.
    First of all, using all the default settings, the Emission & Occlusion texture generated is completely white.

    https://gph.is/2AAafo9

    I tweaked that around, and eventually edited the texture manually, swapped some color channels and inverted it.

    https://gph.is/2yGiX33

    This is what I got, and it's still pretty off.
    Any idea what's going on, what am I missing?
     
  48. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    Hey there,

    That's definitely not supposed to happen.

    Are you using Unity 2018.3.b03? If so, I'm afraid we are currently unable to support beta releases, support for 2018.3 will be available at a later stage.

    What's your current Amplify Impostors version? (Window > Amplify Impostors > About)

    Thanks!
     
  49. guizmoquutamo

    guizmoquutamo

    Joined:
    Apr 11, 2015
    Posts:
    2
    Hey, thank you for being so reactive.

    I was using Unity 2018.3.0b5, that was indded the problem.
    Thanks a lot !
     
  50. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,321
    No problem, an update will be made available as soon as possible.

    Thank you for understanding.