Search Unity

Amplify - Virtual Texturing for Unity Pro [Beta 1.2.1]

Discussion in 'Made With Unity' started by Diogo-Teixeira, Dec 6, 2010.

Thread Status:
Not open for further replies.
  1. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    This product is no longer beta software. We've opened a new thread for the official product release. You can also find more information at the official product page.

    Thank you all for taking the time to provide us with valuable feedback during the beta. Cheers.
     
    Last edited: Jul 11, 2011
  2. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    Hi.

    This is obviously looking extremely interesting, but could you describe the whole thing in more detail?
    I suppose this technology makes it possible to paint all the details in the scene by hand (as done in Rage)?
    I am sure not everyone is familiar with what exactly the words SVT mean.

    thanks,
    Slav
     
  3. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    very nice - looking forward to the release or even a beta tester :)
     
  4. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Hi Slav,

    While this version of the plugin won't support painting, it is planned for a future release.

    Very succinctly, SVT or just Virtual Texturing allows you to have a gigantic texture on disk while only a small visible portion exists in video memory. You just keep adding textures worrying less about texture limits and let the system handle the load.

    For example, the maximum supported size by this system is 524288 x 524288, or around 2 TB of raw uncompressed data. This data is then heavily compressed to a few GB by the system in order to make it viable. However, by default only two 4096 x 4096 textures are allocated by the VT system to render the scene. Of course, you can manually tweak this value depending on your target platform and let the system balance the budget.

    The system will fetch pieces of the larger texture from disk depending on your camera view. Never more than what is actually needed. So, in practice, you'll get more detail using the same amount of texture memory. Plus, you get an automatic, unified texture streaming system.

    I usually show this video to people that are trying to understand how it works and what the advantages are:
    http://www-evasion.imag.fr/Membres/Sylvain.Lefebvre/texprod/video-hgh-res-2.mp4
     
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Looks very interesting. A few questions:

    1. Does it work with Unity's real time shadows? In deferred and forward rendered modes?

    2. Ball park price for indy developers?
     
  6. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    1. Does it work with Unity's real time shadows? In deferred and forward rendered modes?

    Yes, it integrates nicely with dynamic shadows, light maps, and both rendering modes. However, using VT comes with a small shader performance penalty, so deferred mode is advised.

    2. Ball park price for indy developers?

    Certainly yes. :)
     
  7. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    3. does this work with webplayer? ;)
     
  8. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
    Love it, want it, what orifice do I insert my credit card into.
     
  9. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    3. does this work with webplayer?

    Not at the moment. I'm still trying to get around a few technical limitations preventing it. I see it as an important feature to have in the long run, but I'm focusing on standalone for now.

    hans, duke: cheers :)
     
  10. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    98
    This looks pretty awesome - add in some splats and 3D paint and we can give id a run for their money :)
     
  11. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
  12. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    173
    Where do I sign up for the beta? where do I pay ...where do I give my first born?

    Ok, we were planning on making something like this internally ..now you've gone and saved us the time :)
     
  13. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Reapazor, :) I'm glad this is of interest to you. I might end up anticipating the beta sign-up, so very soon.
     
  14. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    173
    We have a few projects that we are working on right now that would greatly benefit from this :)
     
  15. Andrej-Vojtas

    Andrej-Vojtas

    Joined:
    Jan 12, 2009
    Posts:
    67
    This looks very interesting, thanks for the explanatory video as well.

    I understand it's not it's primary use, but could your implementation in Unity be used also for a 2D game, where you have tons of character animation frames, and have a virtual cache set up to hold only the needed frames in the VRAM? (Usually the character frames are stored in bulk in larger textures (atlases), using UV coordinates change to display only the needed frame on a quad (so basically you have an animated texture). If I get it right, with your setup it would be better to store all the character frames in one single huge texture.)
     
  16. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Matthew, will any of them require support for individual textures larger than 16K x 16K? I'm asking this because I've planned support for this for a post-1.0 release, but I could anticipate that if the demand is high. This could be the case for apps based on geographic or urbanistic data.

    Andrej, the thing about 3d is that it is somewhat forgiving when it comes to streaming in textures. Sometimes you notice the textures popping in, but due to the depth, page loading order and the way texture filtering works, you rarely do. Plus, this system pulls pages based on what is visible to the camera. A 2d game, on the other hand, will require immediate access to full quality pages, so no progressive loading. The streaming system would have to be a bit different. Not based on what is visible, but probably based on the player's state.

    In the future, I could extend it to allow more control over the streaming. I hadn't even considered that possibility, so thanks for pointing out.
     
    Last edited: Dec 7, 2010
  17. maxfax2009

    maxfax2009

    Joined:
    Feb 4, 2009
    Posts:
    410
    Hi Diogo

    Great work - :)

    Sign me up for Beta.

    TAKE MY CREDIT CARD :)

    Does it work with the iPhone?
     
    Last edited: Dec 7, 2010
  18. tornadotwins

    tornadotwins

    Joined:
    May 21, 2008
    Posts:
    308
    I need this like... YESTERDAY!

    If any costs are involved, I'd love to purchase. Where do I sign up?

    -TornadoTwins
     
  19. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    maxfax2009, thanks! Based on the info I have, the only limitation preventing this from running on iPhone 3gs and 4g is the lack of RenderTexture support on Unity for iOS. Unfortunately, that's a deal breaker.

    TornadoTwins, I'm doing my best to get this out the door asap. Public beta in January.
     
  20. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
    This would be absolutely brilliant for huge satellite textures mapped on terrain.
     
  21. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    duke, absolutely. I think a lot of 3d apps using high-res captured data could use something like this, not just games.
     
  22. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    that then is no problem, RTs work on Unity 3 iOS Pro as far as I can say, at least if we talk about rendering in them, did already work in beta (grabpass might potentially have problems, unsure, didn't check that)
     
  23. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    dreamora, are Texture.ReadPixels and Graphics.Blit available in Unity iOS Pro? Shaders?
     
  24. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Hi. this technique seems quite interesting. As far as it behaves as automatically as the batching it will be perfect.

    I use as background a 3gb .mrsid image in my cad app and it runs always at full fps. It Loads-unloads the image in memory as you pan arround an also "loads" differents resolution of the image depending on how close you get to it... I think it is a similar technology.
     
  25. chadchat

    chadchat

    Joined:
    Apr 5, 2008
    Posts:
    154
    Super exciting. This fits exactly to what I'm working on. Be happy to help out on a Beta~
     
  26. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
  27. diese440

    diese440

    Joined:
    May 25, 2007
    Posts:
    105
    :D Hi Diogo,

    Very -VERY- nice work !
    +1 Sign me up for Beta. :D
     
  28. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    @duke

    that video is breathtaking!!! gorgeous stuff. I'm downloading the demo.

    Have a look at the professional tab and check for RT vids. The ones that appears forest are awesome!! and they're from 2008!!!

    As you said before, this technique would rock for projecting aerial photos over a dem terrain.
     
  29. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
    Now THAT'S how you light billboards!
     
  30. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Wow, this really does look awesome. I just hope I can afford it. ;)
     
  31. maxfax2009

    maxfax2009

    Joined:
    Feb 4, 2009
    Posts:
    410
    Hi Diogo

    How are you planning to do the painting in future versions?
     
  32. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    pulov, diese, chad: thanks! I'll keep you guys posted regarding the beta.

    bigkahuna: I'm doing my best to ensure that everyone is able to afford it.

    maxfax2009: We'll probably start off with some stamping tools, following the id Tech 5 approach.

    The scene used in our workflow video had a low level of unique detail (tiling all over). As such, I decided to record a another demo, similar to Brad's, to give you a small sample of the level of scale we are able to achieve using this system:


    The virtual texture was set to 32K x 32K and the textures used to build the VT have the following sizes:
    - Sponza total: 8192x8192
    - Terrain: 16384 x 16384
    - Earth: 16384 x 8192
    - Moon: 8192 x 4096
    - Mars: 4096 x 2048
     
    Last edited: Dec 10, 2010
  33. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Looks like you're having issues with the shadows. Is that a Unity issue or an issue with your plugin?
     
  34. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    If you're referring to the resolution being really low inside the building, that's just the result of a really high shadow distance.
     
  35. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Oh, I see. So what looks like flickering shadow artifacts are in fact the shadows of the posts overhead?
     
  36. maxfax2009

    maxfax2009

    Joined:
    Feb 4, 2009
    Posts:
    410
  37. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    I think that would be anice reference that in next captures you could include stats windows to see how the texture memory dances depending on the camera position.

    maxfax>> I believe that the sharpness of the texture will depend in the base texture itself.
     
  38. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    bigkahuna, forgot to tweak the shadow distance, my bad. Definitely not a problem with the VT system.

    maxfax2009, those were the ones I found using google image search. The texture density depends on the input textures. The VT is automatically resized while textures are being added in order to fit all the textures.

    Pulov, I wanted to avoid recording it in high res. The beauty of this system is that it balances the workload based on available texture memory. It tweaks the visual detail to make sure it fits based on how much memory you are willing to allocate to the VT system.

    In both videos, in which the default settings were used, around 130 MB allocated for the VT system. But to show you how flexible it can get, here's the same scene using only around 34 MB. These are all uncompressed formats by the way. If Unity supported runtime compressed texture updates, this number could be as low as 10 MB.





    I'll update the video tomorrow with fixed shadows, higher resolution and stats.
     
    Last edited: Dec 10, 2010
  39. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Hi
    The fact that you can limit the memory for the system and let it play with this margin is simply great. No rush with the vids, was just a proposal :)
     
  40. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
    So the other advantage of this is the reduced draw calls, right? I mean, even if I don't want to use epic texture sizes - this system still compiles them to a single sheet.
     
  41. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    duke, unfortunately not in this case. Maybe in the future, if/when Unity's restrictions preventing it are lifted.
     
  42. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    @duke; you could consider giving a look to Unilod as it does generate texture atlases of selected objets. Dont remember if it was neccesary to stich meshes during this proces. The bad point is that Unilod is discontinued "officially". If you have coding skills you could mess with the code as it is open source.
    Alternativelly if you need to generate texture atlases you could use FlatIron plugin for 3dmax. The same company that creates FlatIron offers a free 3dmax script for texture atlas generation.
     
  43. maxfax2009

    maxfax2009

    Joined:
    Feb 4, 2009
    Posts:
    410
    What are these restrictions?
     
  44. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Nice Job! When do you plan to release this Diogo?
     
  45. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    maxfax2009, not being able to use a custom vertex attribute. That way I could avoid feeding data to the shaders on a per-material basis. However, I do understand why this restriction exists and maybe in the future it won't be that big of an issue.

    For now, creating batches is a good way to get around the issue. I'll make sure this is a priority for one of the post-release revisions.

    elias_t, cheers! I'm pushing towards an early Q2 2011 release.
     
  46. Tinus

    Tinus

    Joined:
    Apr 6, 2009
    Posts:
    437
    Oh my wow! I was breaking my head over how to handle large terrains from high viewing altitudes. This comes as a major relief, as I'm nowhere near capable of building such a system myself. Great work! I'll join the others and offers you no less than three of my vital body parts. Or cash, if you prefer. I'd prefer that.

    Edit: Big-upped the two feature requests in Feedback, hope it helps. :)
     
    Last edited: Dec 11, 2010
  47. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Tinus, thanks. Highly appreciated.
     
  48. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    I upped the feature requests as well, great work so far!
     
  49. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    173
    I'd like this as a Christmas present :)
     
  50. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    zhx, cheers!

    Reapazor, :)

    I've updated the scale video with a new version: HD resolution, visible stats and fixed shadows.

     
Thread Status:
Not open for further replies.