Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Imposter Rendering (Webplayer Demo)

Discussion in 'Works In Progress - Archive' started by FraunhoferIGD, Jul 3, 2015.

  1. FraunhoferIGD

    FraunhoferIGD

    Joined:
    Dec 10, 2014
    Posts:
    6
    Hi,

    i´ve been working on implementing Imposter Rendering in Unity lately. Please have a look:



    Its real Imposter Rendering (see: http://www.gamasutra.com/view/feature/130911/dynamic_2d_imposters_a_simple_.php) with dynamicly updated Textures based on the Camera position. No precalculations needed! I´m currently working on the caching and preloading of the Imposters. You can check the current Version here: https://dl.dropboxusercontent.com/u/40550065/Imposter/Web.html (Webplayer Demo). I´ve been thinking about releasing it on the Asset Store - what do you think?
     
    Last edited: Jul 8, 2015
  2. Stubbs

    Stubbs

    Joined:
    Apr 7, 2013
    Posts:
    2
    That's fantastic! Well done :)
     
  3. inko

    inko

    Joined:
    Nov 29, 2013
    Posts:
    143
    This is incredible! I get a 2000% fps increase on my work pc! From 4fps to 80fps on the highest object count. Really impressive. Good job!
     
  4. Brian-Ryer

    Brian-Ryer

    Joined:
    Mar 5, 2013
    Posts:
    43
    I have been wanting a easy solution for imposters for a while, they are a great way to kill two birds with one stone,
    Give the illusion of a fuller scene with great draw distance and deliver fantastic performance.

    If you do release on the asset store this is a instant buy from me.
     
  5. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    This type of system will probably be mandatory in some of my personal projects at some point. I'm looking forward to seeing how this develops :)
     
  6. Darkays

    Darkays

    Joined:
    Mar 31, 2013
    Posts:
    176
    VERY impressive! The savings are phenomenal. Nice work.
     
  7. Hynopsis

    Hynopsis

    Joined:
    Oct 25, 2012
    Posts:
    54
    I agree this is amazing...please release this!
     
  8. dirtybassett

    dirtybassett

    Joined:
    Oct 3, 2012
    Posts:
    59
    Agreed this would be a great addition to unity. Would buy no hesitation.
     
  9. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    The problems are when to regenerate, how to re-use the same render texture, and avoid stalls when updating it.
    But the idea is great!
    As for asset store, well, it would probably sell if you make sure the mentioned items are properly handled.
    My guess is between 50-100$. While that might sound much, most buyers will be artists who can't/don't want to spend time on it, or people who need/want the optimization and feel that the hours it would take to re-create it is more then what they pay for the asset.
     
  10. Haagndaaz

    Haagndaaz

    Joined:
    Feb 20, 2013
    Posts:
    232
    Would buy in a hearbeat! Looks great!
     
  11. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Fantastic, a great plugin for complex scenes that will save lot of frame rate.

    The price is a bit too much i think above 50$, i will stay with simple LOD that will also do a great job when your farther LOD is as simple as some cubes.
     
  12. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
  13. FraunhoferIGD

    FraunhoferIGD

    Joined:
    Dec 10, 2014
    Posts:
    6
    @Zicandar i own your solution but it didn´t exactly fit my needs so i decided to build my own. I'm planning to release it in the Asset Store soon. Just finishing up the documentation. I think i will sell it for ~40$
     
  14. FraunhoferIGD

    FraunhoferIGD

    Joined:
    Dec 10, 2014
    Posts:
    6
    @Zicandar the biggest problem for me was supporting dynamic shadows & handling the Z-Occlusion right (prevent the imposter from penetrating the ground). A System for Texture reuse was indeed crucial. I also implemented Texture batching (use a large texture for several small render targets) but it didn´t help a lot.
     
  15. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Any update?
     
  16. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Some thoughts:

    1. 5.2 culling groups functionality should be able to improve the state affairs quite a bit especially with distance bands and querying visibility.

    2. It's not really viable or good for a lot of objects like in the demo scene. Ideally with distance bands you'd be able to cluster several separate objects into one imposter if necessary.

    3. It's probably a much better fit for rendering mountains and large polygonal areas as it will take a while to get there, and rotation artefacts are minimal.

    4. Not sure on changing lighting conditions but this is an overall problem with open world.

    One of the issues in the demo would be when you rotate too quickly, this can cause framerate to tank, so it's probably best to lazy update or put a cap on updating.... other than this it's a great start and may very well be great for characters as well, for example an army...
     
  17. sakati

    sakati

    Joined:
    Jan 5, 2013
    Posts:
    36
    @hippocoder
    1. yeah - that would propably improve the performance
    2. why exactly do you think its not good for a lot of objects like in the demo? It improves the performance up to 2000%...
    3. that probably would´t work since you would have to sepearate the mountains from the rest of the scene
    4. you would have to update the imposter under diffrent lighting conditions. But when they are changing slowly that wouldn´t be a problem.
     
  18. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Regarding point 2: the performance gains can vary on a modern GPU, it can be that there's a loss of performance due to the overhead of say 1,000 objects being managed (specially when turning) vs just having low poly lods which don't require rendering to texture.

    In isolation, it's clear there's performance benefits from imposters but lots of imposters may be slower than just effective lod management and not having to render to texture / burn ram.... when compared to a correctly set up scene with LODs.

    But imposters can really save the day when it comes to distant rendering of terrain as seen in far cry 2, 3 and 4, where they impostor most of the terrain in the far view.

    Essentially it's currently better than not doing anything at all, but it's not wise to use it for a lot of objects unless it's situational and they have to animate. One good example is you render a few soldiers in various angles while they animate and can then approximate an army that's animated for low cost.

    Another issue with imposters vs just having a low poly representation is that there's no depth and lighting can quickly become incorrect. You will also have issues for example if another object passes behind or inside a distant imposter vs just having say, a 100 poly mesh which likely costs exactly the same as the imposter to render.

    If your system is using dynamic batching, then this is also solvable with LODs if groups are clusterable. I'm not knocking the system, I'm just saying that it's a great addition not replacement for the benefit of any readers.

    Finally, I was assuming that your approach uses one texture for several objects, by that I mean it's atlased within.
     
    Last edited: Jul 7, 2015
    moure likes this.
  19. FraunhoferIGD

    FraunhoferIGD

    Joined:
    Dec 10, 2014
    Posts:
    6
    @hippocoder I'm not sure if i get your point. Yes, if you have a cost effective way to reduce your highpoly objects (25.000 tris in the demo) to only 100 Polygons while using just a single texture and without sacrificing visual quality when having a object screensize of 256x256 pixel, you should obviously do it instead of using imposters.
    But IMO most Indies can´t do this and will benefit from a solution where they just need to drop a script on the Gameobject and be done.
    I also don´t think the system burns RAM - 48x48 objects active need 50mb RAM on runtime (no preprocessing required). This isn´t even a problem on mobile.
    But i totally agree with yout point that every LOD System has its own benefits and i would never claim that imposters are allways better suited than mesh based lod algorithms. After all i spend most of my academic life developing mesh based LOD systems.
     
    Last edited: Jul 7, 2015
  20. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Nice job!

    I haven't met until now such a good implementation of imposters for unity.

    Instant buy from me.
     
  21. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
  22. sakati

    sakati

    Joined:
    Jan 5, 2013
    Posts:
    36

    a video of the setup procedure. Unfortunatly its a little bit choppy because of the screen recording.
    @jimmikaelkael i will test it
     
    Last edited: Jul 8, 2015
  23. sakati

    sakati

    Joined:
    Jan 5, 2013
    Posts:
    36
    small update: i submitted the asset to the asset store yesterday.
     
    Venryx likes this.
  24. Brian-Ryer

    Brian-Ryer

    Joined:
    Mar 5, 2013
    Posts:
    43
    can't wait to get this, did you come up with a final price?
     
  25. Uli_Okm

    Uli_Okm

    Joined:
    Jul 10, 2012
    Posts:
    94
    Any news about this one?
     
  26. sakati

    sakati

    Joined:
    Jan 5, 2013
    Posts:
    36