ABI: Automatic 3D Billboard Imposters [RELEASED]

Discussion in 'Assets and Asset Store' started by cwkx, Oct 10, 2013.

  1. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    Hello everyone, ABI has just been released!

    $gI5x4tC.png

    What is it?

    Automatic 3D Billboard Imposters (ABI) is an automatic level of detail (LOD) solution that bring unparalleled performance to your games.

    ABI is quick to integrate and allows you to efficiently render thousands of objects with minimal geometry and draw calls. In short, ABI smoothly replaces distant models with simple 2D textures giving a massive performance boost. Unlike traditional billboard and imposter systems, ABI uses a very small amount of texture memory and allows for easy batching with both Unity Free Unity Pro. The generated output also supports smooth LOD transitions with stippling, and works on mobile!



    Features:

    •Smooth runtime imposter transitions.
    •Export imposters to OBJ files.
    •Export prefabs that automatically fade to imposters at runtime according to the camera.
    •Lightning fast imposter generation for large numbers of objects.
    •Control over imposter y-plane position.
    •Control over texture size.
    •Automatically layout models for previewing.
    •Imposter proportions match input models.
    •Intelligent priority updates.
    •Three optimized stippling shaders to choose.
    •Lightweight optimized C# scripts.

    Link to the Asset Store
    Last edited: Oct 11, 2013
  2. kurylo3d

    kurylo3d

    Member

    Joined:
    Nov 7, 2009
    Messages:
    665
    very awesome, question though.. do all of the imposter objects batch? Even imposter objects from different objects.. as some sort of atlassed material. Because that would be huge.
  3. I am da bawss

    I am da bawss

    Member

    Joined:
    Jun 2, 2011
    Messages:
    2,304
    Looks good! Bookmarked and added to shopping list.
  4. LordSoth30

    LordSoth30

    New Member

    Joined:
    Aug 9, 2013
    Messages:
    14
    So if I insert an FBX into Unity could I drag that into the billboard?
  5. I am da bawss

    I am da bawss

    Member

    Joined:
    Jun 2, 2011
    Messages:
    2,304
    A suggestion - can you make it one button GROUP CONVERT - specify the directory where the models are, and it automatically convert all the models inside to imposters by reading in the original names and adding a suffix "-imp" in file nameS. Eg. Motorbike.fbx becomes --> Motorbike-imp.fbx and Motorbike-imp.jpg.

    That would make this a truely wonderful and productive tool.
  6. I am da bawss

    I am da bawss

    Member

    Joined:
    Jun 2, 2011
    Messages:
    2,304
    Also, could you add an option to only generate imposter for ONE axis only? eg. an option to toggle which axis(es) to render.

    Another suggestion I just thought of...maybe support Normal Map generation for those generated sprite?
  7. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    I just added priority updates to version 1.5 which greatly increases performances when you have about 10,000 imposters visible. This update should be available to the asset store shortly.

    Yep, drag the FBX from Unity Project explorer into the Imposter Editor script, click Play Generate Export - this'll create an OBJ of the imposter, and a Prefab which connects the imposter to the original FBX model. It's recommended to change the shaders on the FBX materials to one of the provided ones to get two-sided stippling blending (although this is not mandatory).

    Originally I had something similar - the problem is that you lose control over specifying the Y-axis step tile sizes (see screenshots); in practice its always good to tune these for each model anyway in the Imposter Editor (as tress should have higher planes than buildings etc).

    In our large project, which uses hundreds of models from many model packages, it made it easier to maintain and regenerate imposters using the current system; as you can save the imposter scene to save the per-imposter settings stored in the editor script (this is especially useful if your updating models/textures and want to keep the settings).

    Good question! Stippling (smooth LODs) needs to set the shader params per model (which typically invalidates all batching) -however to address this problem I use a method for switching shared/instanced materials after the stippling region which enables batching per-model; adding one large atlas with stippling would likely decrease this approach because of this.

    If people give this good reviews and the sales pick up, I can keep looking into this area, however at the moment (in practice) it doesn't seem to be too important as 60 objects = 60 draw calls of 10,000 instances batched can still render at 60fps (which is quite a lot of scene diversity)! Also you can create imposters for groups of objects easily in the pipeline.
    Last edited: Oct 11, 2013
  8. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    Choosing one plane with the current system creates undesirable popping artifacts. You'd need to support a more traditional imposter approach (as shown in the manual) which also has undesirable popping between the image swapping- even stippling between the tile images with a traditional approach gives lots of fuzzy stippling artifacts (best kept minimum) unless you add lots of view images into the atlas - but this greatly increases texture memory to the extent that you can only have a few imposters of low image resolution - which is one of the main things that I have tried so hard to cut down. I'd like this system to aim at creating imposters for lots of objects instead of just trees in a forest.

    Normal maps is something i'd like to add if it gets good ratings and the sales pick up; its not an easy addition with Unity Free as you need to replace input model shaders for capturing world-space normals (tangent normals would look too ugly with the simplified geometry - and you can't use render to texture fullscreen shader to make this easier). Although the current imposters already support lighting which doesn't look too bad. Let me know if you any thoughts on this.

    Thanks for your suggestions!
    Last edited: Oct 11, 2013
  9. imtrobin

    imtrobin

    Member

    Joined:
    Nov 30, 2009
    Messages:
    1,066
    Have u tested mobile performance? It seems you are using transparent shader, so that amount of overdraw on mobile is not good for performance. It would be better if the vertex is to fit the model so it can use non transparent shader.
  10. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    I had mentioned something on the lines to this in Manual.pdf - its best to assign the "Mobile/Particles/VertexLit Blended" to the generated imposters (which is very easy to do) as discard and clip calls are expensive on mobile hardware. Polygonizing the shape outline would require lots of tessellation on high-frequency features, otherwise it wouldn't look good.
    Last edited: Oct 11, 2013
  11. p6r

    p6r

    Member

    Joined:
    Nov 6, 2010
    Messages:
    887
    Very clever and nice !!!
    Not for Unity 3.5 ???

    6R
  12. kenlem

    kenlem

    Member

    Joined:
    Oct 16, 2008
    Messages:
    1,420
    I'm not sure I agree. The tessellation could be done on a lower rez version of the texture and you could event drop points that are too close. I bet it would help tremendously compared to having all the extra transparency. Some of the low end Android devices really struggle with transparency.
  13. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    Alright, I can look into this for improving the mobile performance on older hardware when I have some time or if the sales go well. Thanks both for your suggestions.
  14. kurylo3d

    kurylo3d

    Member

    Joined:
    Nov 7, 2009
    Messages:
    665
    Thanks for the reply,

    I honestly prefer the less draw calls the better vs transparency since i develop heavily on mobile. Transparency in general hurts mobile.. even tegra 3... overdraw sucks, but aside form that draw calls are just as bad.. id rather have 1 or 2 draw calls rather then 60. Either way I love your approach and ill probably pick up your tool just so i can tinker with it and make my own items to batch.
  15. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Messages:
    10,340
    On my machine, the impostors look dramatically different from the objects. I'm wondering if it's a mac issue, or what. I don't find it a compelling demo at the moment. If you want to expand on this middleware, perhaps include a way to refresh the impostors, for example have a 1024x1024 render texture and draw impostor updates to it - an atlas for impostors. Or expand on this system in some way to improve it.
    Last edited: Oct 13, 2013
  16. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    It should look like the youtube? You can also set the lod scalar which changes the projected size (screen-space error) for when the model changes to the imposter. I'd like to add optional runtime render to texture updates, but it requires Pro which I don't have can't afford at the moment.

    Thanks, that'd be great. I'd like to work on mobile performance as the next thing, with some good suggestions in the previous posts and the option to atlas without stippling would be an easy addition. At the moment this has only got a couple of sales and no good reviews; hopefully this can pick up soon and give me more motivation/time for this.
  17. SOULSSAGA

    SOULSSAGA

    Member

    Joined:
    May 6, 2012
    Messages:
    69
    Hi ! I Just got 2 days ago your Extension !
    Loved The Concept ! There is Nothing Like this in unity !
    Is very cool Idea COngrats !
    ______


    I have Some QUestions And some Features talks About your product

    - Can your Extension Work In Conjuction with With Unity pro Lods ?
    - Can your Extension Work With Instant Oclusion From french faso. ? I just recently got it also ...

    - Is it possible to have a Severall Lods And Load at Runtime From Disck FEatures ?
    - Is also Possible to paint instances Or Scatter Them After Setup ?​

    Imagine a Whole Forest Much like CryENgine level of Quality tipe of work in UNITY.
    WITH YOUR PLUGIN

    From your Plugin features :

    - As far as i see - It needs Severall Lods Levels before turning into Bilboard. "Not just 2" on geometry Bilboard ..
    - As far as i See, the amount of Trees and Grass And Rocks and all everything there must be at such a Massive amount of detail that also needs a way to go Over Unity 32Bits 3gb Limit ...
    - - And for that Needs a way to Scatter Those, But in Editor make them bilboards points or nulls. ( Using the bilboards just in Editor For performance )
    - - But in Runtime Load the actual Geometry ... That in order to Overcome the Unity Not beying 64Bits limit ...

    I would like to Help you Making your plugin Reach another degree ...

    i WIll be TEsting it this next month and will Trow Some Tests and ideas And will Debug Your product Features Not for Mobile / but for Next gen "CryEngine Like Results" ... And i will go posting Here the Results if you dont mind.

    Im a Customer Also from InstancOC And would like to Integrate both Solutions ...
    You can See here me Talking about my project ... If you Wounder of what the Souls Project is going At !

    http://forum.unity3d.com/threads/16...sion-culling-LOD/page20?p=1374631#post1374631

    THANKS SO MUCH !

    Last edited: Oct 29, 2013
  18. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    Hi SoulSaga,

    Thanks for your kind words and support in purchasing this!

    - The imposters are naturally exported to OBJ files (as well as linked prefabs). You can use these OBJ's for Unity pro Lods or for other frameworks (InstantOC) - however stippling will not work by default as parameters need to be set with the ImposterLOD.cs script (please see explanation below)

    - ImposterLOD.cs creates a copy of the imposter with a shared material for automatic batching, handles (in version 1.5) smart lazy updates (to stop too much processing with 10,000+ objects), uses optimized squared distances, and sets the stippling parameters. This script is very small (83 lines) and should make sense after a bit of studying. You are free to replace (Ctrl+H in MonoDevelop) "Lod_1" and "Lod_2" with other names (such as "Lod_4" and "Lod_5" in both the ImposterEditor.cs and ImposterLOD.cs script and it should be compatible with other scripts, LODs, and culling solutions.

    - These imposters are already intended for very far view distances and don't use much memory; I use 128^3 each by default and will later add atlas to pack these in a later update. I haven't bought SmartLOD but wouldn't all that extra disk overhead generate page faults and impact performance for this kind of far imposter data? (Although it makes sense for nearby LODs).
    - You can instantiate the imposter prefabs like any other objects (recommended to use an InstancePool). I already populate planets this way for a large-scale voxel system i'm working on.

    That's a good suggestion - i'll see about improving Unity Editor performance for the next update (after 1.5). Users can email me chris<dot>willcocks<at>gmail.com if you don't want to wait for the asset store update and want more personalized support.

    - I'd love to see your results and hear your feedback of integrating this with the InstantOC framework. I "think" I already do something "similar" with the large scale voxel planet system i'm developing (it changes the voxel chunk LODs based on heuristic of the uniform distribution of rays from the camera giving implicit occlusion culling for other object chunks and allowing for some other interresting effects procedural placement options of ray intersections)

    Goodluck with your project!
  19. MoHoe

    MoHoe

    New Member

    Joined:
    Nov 5, 2012
    Messages:
    478
    Nice asset cwkx

    Bookmarked and will probably buy today :)
  20. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    Thanks!
  21. PrimeDerektive

    PrimeDerektive

    Member

    Joined:
    Dec 13, 2009
    Messages:
    2,959
    Do the impostors take lighting into account during generation?
  22. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    Yes and no. The way I tackled this is by having a lighting parent GameObject that you drag into the script - this gets disabled and re-enabled from generation. Generation sets the ambient light to 1f (as the imposter shaders themselves support lighting).

    So basically any lighting you place as a child of this GameObject gets disabled, and any lighting you place outside of this lighting object gets baked into the imposter. Its sometimes useful to bake lighting into the imposters if you want to add some diversity (e.g. for foliage) - although I haven't done this in any of the demos. But having the choice is important.
  23. PrimeDerektive

    PrimeDerektive

    Member

    Joined:
    Dec 13, 2009
    Messages:
    2,959
    Thanks for the quick response. One more thing: does the system require me to change the shaders I use on my models?
  24. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    Stippling (smooth LOD transitions) works by fading out the model while fading in the imposter (and vice versa) according to a noise texture; so yes if you want 2-sided stippling you need a custom shader. It'll still work fine if you don't replace the shaders, but just won't look as good. I provided three stippling shaders which you can look at - its very easy to extract the stippling part and stick it in custom shaders, and if you struggle with this feel free to send them to my email and i'll take a look. The only thing is i'm not sure how easy it'd be to support with fixed function shaders (but supports unity surface and cg shaders - and the examples cover these two types).
  25. cwkx

    cwkx

    New Member

    Joined:
    Nov 18, 2012
    Messages:
    11
    ABI 1.5 is now in the asset store! Main changes are new priority updates giving substantial performance improvement when many imposters are visible.
  26. JanderITM

    JanderITM

    New Member

    Joined:
    Oct 20, 2013
    Messages:
    1
    This asset is fantastic, it does exactly what it says, it autocreates billboard LODS for your 3D models saving fps's, it's perfect for mobile devices, very easy to use, the transitions between LODs are smooth thanks to the Stippling shader... a totally recomended asset.
  27. I am da bawss

    I am da bawss

    Member

    Joined:
    Jun 2, 2011
    Messages:
    2,304


    Automatic polygonization (instead of transparency) on sprite -
    I would love to see this feature in the future as well.



    Something like 2D ColliderGen:

    [​IMG]
    [​IMG]
    [​IMG]
    http://forum.unity3d.com/threads/17...Precise-Polygon-Colliders-For-Your-2D-Sprites


    This feature would be a tremendous boost on mobile performance.
  28. Jum

    Jum

    Member

    Joined:
    Aug 20, 2011
    Messages:
    61
    yeah automatic mesh generation would be perfect
  29. gecko

    gecko

    Member

    Joined:
    Aug 10, 2006
    Messages:
    514
    Does this really enable a scene with 10,000 objects to run smoothly on a mobile device like ipad 2? Has anyone tested that?
  30. ValrikRobot

    ValrikRobot

    New Member

    Joined:
    Jun 26, 2013
    Messages:
    122
    very interested in using this. I will send a private message
  31. Chariots

    Chariots

    Member

    Joined:
    Sep 29, 2013
    Messages:
    312
    Looks like a really good asset. I have one question though, does this work with Unity Tree Creator made trees?
  32. Chariots

    Chariots

    Member

    Joined:
    Sep 29, 2013
    Messages:
    312
    I trusted the tree creator standard asset pics and bought it. Unfortunately, it doesn't play nice with trees created inside Unity. The texture it creates alphas out most of the trunk. Using the slider setting doesn't work either, because at the point that you start to see the actual trunk, a colored outline appears around the leaves.

    Overall, rather useless for anything that has somewhat bright textures.
  33. imtrobin

    imtrobin

    Member

    Joined:
    Nov 30, 2009
    Messages:
    1,066
    I have a question. You bake the lighting into the texture directly, then if I rotate the model, then the lighting will look wrong. I'm thinking of a huge forest of trees, but every tree is a prefab instance but with different rotation. Does it bake the lighting on a separate texture like lightmap or can I use Beast on it?