Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Amplify - Virtual Texturing for Unity Pro, RELEASED! Starting at $99

Discussion in 'Made With Unity' started by Diogo-Teixeira, Jul 11, 2011.

  1. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Yes. I will test and make sure those are compatible.
     
  2. schala

    schala

    Joined:
    Jul 24, 2012
    Posts:
    21
    Great! I wasn't able to buy it before, but now that I have the resources, I am just waiting for Amplify upgrade in order to upgrade to Unity 4 as well (my project depends completely on Amplify since I use many 16k x16k textures :) ). Please keep us updated Diogo.
     
  3. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    End of this week has passed. Any update on this?
     
  4. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    Hi there,

    Is it possible to apply Virtual texturing on Unity Terrain ? Or only in meshes ?
    The idea is to make the terrain more diverse, like detail maps.

    thanks !
     
  5. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Unity4 and DX11+Tesselation support is already submitted and waiting for approval. The Pro version is also going through the first approval round as we speak. I was waiting for both to be available before announcing it.

    Not yet. Only meshes for now. However, starting in 4.0 it is finally possible to have custom materials and I plan to support virtualization for stuff like splat, detail and displacement maps very soon.
     
    Last edited: Dec 3, 2012
  6. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    This is great news thanks :) can't wait to buy!
     
  7. bngames

    bngames

    Joined:
    Jul 3, 2012
    Posts:
    67
    Hi Diogo

    How does DX11+Tesselation work with Amplify if Unity4 does not support it?

    What maps(textures) are needed?

    Plus thought you added support for Unity4 not removed it (Unity 4.0 Required. Update now.)
     
    Last edited: Dec 8, 2012
  8. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Simply enable D3D11 and use one of the Amplify/Tessellation shaders. D3D9 and GL are still supported but the tessellation shaders will revert back to regular Amplify shaders.

    You will only need an extra map if you pick the displacement shader.

    I added support for Unity4 _and_ D3D11. So the current supported platforms are Unity 3.5.6 + GL or D3D9, and Unity 4.0 + GL, D3D9 or D3D11

    However, there seems to be a bug introduced in U4 where a package exported is crashing U3 on import. The packages are also way larger than they should be. Another issue I'm having is related to Mono threading in U4 when building the VT causing hangs and crashes... and finally... shader compatibility issues prevent me from including the tesselation shaders in the package, otherwise it'll generate errors either in U3 or U4 depending on how I attempt to solve it.

    I'm looking into all this right now and will release an update soon. I really hope I don't have to go through all this again with Unity 5...

    Sorry for any inconvenience
     
  9. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Purchasing pro version as i type this :)
     
  10. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Thanks for your support, Ronan! I'm planning to extend Pro specific features related to VT builds, e.g. native code optimizations and network builds.

    Please be aware of the issues I mentioned above. It might take me until tuesday, wednesday at most, to track and fix all these issues.
     
  11. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,051
    Are you discussing this issue with Unity? If not I would suggest you do, as the versioning aspect is an issue that has been around for a while, which they really need to address. I have brought it up a few times, but having obvious examples of why an asset in the store requires more than one version such as this would be highly useful to illustrate the point.
     
    Last edited: Dec 8, 2012
  12. bngames

    bngames

    Joined:
    Jul 3, 2012
    Posts:
    67
    From the Unity Store inside Unity its say "Needs Unity upgrade to version 4.0.0"

    $Screen Shot 2012-12-08 at 19.43.48.png
     
  13. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    I think about buying this soon. Was the FileUtils override fixed? When I tried the free version that override was breaking some of my code and tools, I so had to delete Amplify from project.
    Now on Unity 4 this tool is great addon.

    Note: For what I know asset packages from Unity 4 can't be imported in Unity 3, I've read that somewhere. File format is a bit different on 4.
     
    Last edited: Dec 8, 2012
  14. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Not at the moment. To be honest, I usually avoid it. My plan is simply to re-submit the package to the Store from Unity 3.5.6 thus ensuring that the package works on both versions. Since you brought it up already I might submit a bug report too, just in case.

    That was some kind of mistake. It happened to my other plugins too and I corrected it by resubmitting the package from Unity 3.5.6 and adding a note explaining that the plugin is cross compatible. I'll fix this along with all the other issues this week.

    I believe this was fixed. Please let me know if the problem remains and I'll get on it.

    Some work, some don't. To be safe, I'll be submitting from U3 from now.
     
  15. schala

    schala

    Joined:
    Jul 24, 2012
    Posts:
    21
    Great! I'm getting Amplify new version right now. :)
     
  16. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    All the feedback links are dead since the unified unity community upgrade. Can you fix them in your OP?
     
  17. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Thanks for the support! Please let us know about your experience.

    Just finished updating them. As far as I can tell, some were lost during the switch to the new system. I also removed some that were already implemented and left only the most important.
     
  18. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    In the case of amplify, what do you need the DB asset notifications for? I see you mention create delete and modify, i'm not sure for modify in which way things change for unity (not sure where import settings etc are stored for exemple), but since files seem to map 1:1 to the filesystem for create delete you could use a FileSystemWatcher on the asset folder and have that work today.

    http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx
     
  19. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    I need some kind of notification whenever a material property is changed manually or several of them automatically, or when a material is added or removed. Also when a texture property is changed. This kind of event-based api is highly useful for editor extensions. Meta files are useless, for this case, because they don't get updated as often as their descriptor counterparts in memory, probably only on scene/project save.

    Right now, what I do is iterate through all the materials an textures, periodically, to check for changes. This introduces an insane and unnecessary overhead, and lag, when a large number of materials (4K+) is used.
     
    Last edited: Dec 10, 2012
  20. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    After wasting too much time attempting to pinpoint the threading crashes and ending up in the darkest depths of Unity reverse-engineering I found out that the issue is likely caused by a U4 memory management error related to native module calls on user threads.

    The most sensible option, right now, is to anticipate switch to native VT building code so I can have more control over stability in the long run; hopefully avoid issues with future versions of Unity and dramatically reduce building times. I expect this change will set push back the release a few days, likely until the end of the week. I promise it'll be worth the wait.

    This improvement will be available across all licenses.
     
  21. bngames

    bngames

    Joined:
    Jul 3, 2012
    Posts:
    67
    Still says "Needs Unity upgrade to version 4.0.0" and does NOT displays a "Buy" button :(
     
  22. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    That's because I haven't updated the package yet. Work is in progress, it's much more stable now but it's gonna take me a couple more days to finish. Sorry for any inconvenience.

    Have you purchased it already? I believe the Buy button disappears after you purchase it. Do you see an "Import" instead?
     
  23. bngames

    bngames

    Joined:
    Jul 3, 2012
    Posts:
    67
    No not purchased it

    its because I don't have 4 - it removes the Buy button and replaces it with "Needs Unity upgrade to version 4.0.0"
     
  24. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Which is such a bad thing IMHO, would be so much better to have a simple red warning saying "probably not compatible with your version, go through anyway?"
     
  25. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    I had no idea it was completely blocked for non-4.0 users. In that case I'll resubmit the current build _today_ using U3, until I finish fixing porting the VT building code to native.

    I guess that since there's no trial system, they just play it safe to avoid refunds.
     
  26. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Status: both Amplify and Amplify Pro 1.5.8 are now available.

    Changes include cross U3/U4 support and temporary (just a few days long) removal of multithreaded VT builds to ensure stability in U4. Also, the tesselation shaders were removed from the package due to incompatiblity issues with U3 but are still available for download as an external package.

    Please update only if you're having stability problems.
     
    Last edited: Dec 20, 2012
  27. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I purchased the pro version of amplify from the asset store but only now got around to using it.
    It's working well (crashes unity often when rebuilding, but the runtime tech is working fine which is what matters to me), however i can't seem to figure out how to use multiple textures in the same shader, my textures share UV so regardless of what i pass in to VTComputeVirtualCoord i will always get data from the first texture.
    Could you provide a minimalistic shader sample?
    Something like this would be perfect :
    - Takes 2 textures as parameter
    - Only uses first texture UV
    - Blends the 2 half way between each color
    I want to rewrite a complex shader in amplify and i really need a lot more than 1 texture.
    Thanks!
     
  28. Diogo-Teixeira

    Diogo-Teixeira

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

    For now, Amplify will only virtualize 1 diffuse, 1 normal and soon 1 displacement. You cannot sample non-virtualized textures using Amplify utility functions. Any additional textures have to be sampled the regular way, using the default texturing system, for example:

    Code (csharp):
    1.  
    2. void surf (Input IN, inout SurfaceOutput o) {
    3.     VirtualCoord vcoord = VTComputeVirtualCoord( IN.uv_MainTex.xy );
    4.  
    5.     // sampled from diffuse channels of virtual/amplify texture
    6.     float4 base = VTSampleBase( vcoord );
    7.  
    8.     // sampled from a regular texture
    9.     float4 second = texture2D( _SecondTex, IN.uv_MainTex.xy );
    10.    
    11.     float4 mixed = lerp( base, second, base.a );
    12.    
    13.     half4 c = mixed * _Color;
    14.     o.Albedo = c.rgb;
    15.     o.Alpha = c.a;
    16. }
    17.  
     
  29. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Would it be possible for it to virtualize an arbitraty amount of textures? And is so would that be with a (near) linear cost?
    Actually your solution above kinda fits my exact problem so more of worried for other issues that may arise later (i'll keep my complex terrain shader non virtualized for now, and only virtualize the base colormap).
    Are there any limits to how high a single texture should go? I find i'm getting no performance issue with a 16K tex for exemple, but before i work on generating 128K+ textures from world machine i'd like to know if it's going to work at all.
     
  30. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    That's a yes on the linearity. However, the current cost is so high that streaming more than two textures (6-8 channels) is prohibitively expensive. I have a few potential solutions to choose from and I plan to eventually support virtualization of a variable amount of textures later this year.

    There's no runtime performance impact. There is, however, a small system memory impact (virtual translation table) as you increase the VT size, to a maximum of 96 MB at 512K.

    Only one problem, though. Unity will not import/recognize textures above 8K on Mac and 16K on Windows. I'm planning a workaround for this to be released on the next update.

    BTW, I'm finally done moving the VT building code to native and will submit ASAP. After the update you will get a respectable increase in both build performance and editor stability.
     
    Last edited: Jan 22, 2013
  31. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    #1 I understand the cost is high, but the current solution i use (non virtualized 3D texture to go above 16 sampler limit) is pretty expensive too, so it may still be a win
    #2 Any eta on the >16K texture workaround on windows? I could really use much much much larger than 16K since i can generate textures of arbitrary size, 96MB is nothing and i'd be very happy to have a 128K+ base color map really.
    Thanks for your work!
     
  32. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Once I get this update submitted, I'll have to work on Easyflow for a couple of weeks. After that, I'll be returning to Amplify until I get all the scalability issues sorted out, so probably not before the end of February.
     
  33. Diogo-Teixeira

    Diogo-Teixeira

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

    We've just released Amplify and Amplify Pro 1.5.9 to the Asset Store.

    Improvements
    • Added Deploy Optimize warning when disabled; recommended for final builds
    • Added warnings to report presence of deprecated modules (FreeImage, FreeImageNET, AmplifyNative)
    • Ported virtual texture build code to native for a 2.5x speed-up on a single thread
    • Enabled multi-threaded builds again; now stable thanks to native port
    • Optimized binary size and removed bloat
    • Open up internal shaders into Resources folder
    • Fixed disabling the AmplifyManager owner object not disabling incremental builder
    • Fixed BuildHistogram index out-of-bounds exception

    What's next? (top first)
    • Very large texture support; over 8K on Mac and 16K on Win
    • Terrain support
    • Displacement map virtualization
    • Introduce Amplify Material to solve scalability issues; including tools to convert back and forth
    • Static draw call batching, based on the atlas created for the virtual texture
    • Support for remaining platforms, including Linux and Mobile

    Please let us know of any issues you encounter with this version and we'll fix them with the highest priority.
     
  34. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Thanks for the update, do you have an ETA for the very large support? Also will it be arbitraly large or will it just be an increase? (Can i use a single 256K+ single texture for exemple?)
     
  35. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Amplify will be hard limited to 128K and Amplify Pro to 256K, relative to VT limitations on each version.
     
  36. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    256K sounds quite reasonable for a single texture :) however i'm wondering why limit it at all since amplify pro is limited to 512K why not make this 512K too? (Also is amplify pro limted to 512K for practical reasons? If not it would be nice to lift the limit alltogether)

    Thanks !
     
  37. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    It's a hard limitation for a virtual translation table that resides in-core and potentially also a precision limit for shader ALU involved in translation (for the current min spec). Simply put, the maximum single texture size is limited because I need edge information to sample the texture correctly down the mips, this will also require space in the VT. In the future, I might be able to make this a special case and enable 256K and 512K respectively.
     
    Last edited: Jan 29, 2013
  38. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    ronan, just a heads up: I finally tested a good workaround for the Very Large Image support and does a good job at circumventing Unity import. It'll take me some time to modify the VT builder to support these images though. I couldn't find many suitable formats to support 256K; what image file format are you using for your VLIs?
     
  39. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I actually don't know, i was planning to export in whatever supported it from world machine for those, i'll have a look at what works from there, gimme 20mins or so to generate some large stuff and i'll let you know asap
     
  40. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Actually going to take a while to generate so can't tell, but i can adapt to whatever you decide if you find a fitting format. World machine can only export to BMP tiff and png, do any of those work? If not i'll have to contact the author to see if he can add other formats (or roll my own output plugin).
     
  41. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    This might actually be a problem. Decoding any of those formats using the available implementations might be impossible as memory footprint will go through the roof. I'm considering implementing a custom open format that will enable distributed VLI loading by splitting the image in sections/tiles. I could also provide plugins for popular apps like World Machine.
     
  42. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    That would rock!
     
  43. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    I might just go ahead and just export it as a Amplify-compatible Virtual Texture and add support for multiple Amplify Runtimes in the same scene. That way we could go up to 256K and 512K respectively.

    --edit

    Only problem is that this kind of solution will take too long. It'll have to be done for Amplify 2. I'll have to revert to a simpler, more compatible solution for now. This affects the roadmap a bit.
     
    Last edited: Jan 30, 2013
  44. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Would be just fine if possible do export from wm to amplify format!
     
  45. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Any news on this? Can't wait to use my huge textures! :)
     
  46. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    I'm doing a bit of work on Easyflow until the end of next week. After that I'll be coming back to Amplify for the next few months to work on VLI and other improvements.
     
  47. Diogo-Teixeira

    Diogo-Teixeira

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

    Amplify and Amplify Pro 1.5.10 are fresh out on the Asset Store.

    *IMPORTANT* This update will require a virtual texture rebuild.

    Improvements
    • Fixed neighboring pixel border bleeding at lower mip resolutions
    • Fixed streaming issues with orthographic cameras
    • Fixed some tiles reloading bad textures
    • Fixed broken 8bit paletized textures
    • Added support for disabling alpha channel to speed up diffuse-only builds
    • Added support for tweaking editor runtime properties like cache size and prepass resolution
    • Added support for tool access via scripting for automation
    • Display generated pre-pass dimensions when AutoPrePassDimensions is enabled
    • Added property Build Thread Count to settings window
    • Added AmplifyTexture.OnFinishBuild event notification for headless or automated builds
    • Added border waste statistics for reference
    • Added scripting access information and build optimization tips to the readme file's technical section
    This is an intermediate release meant for stability, scripting and headless build support. Work on 1.6.0 is coming along nicely. It will support static batching for dramatic draw call savings, very large image support, displacement map virtualization, among others.

    Please let us know of any issues you encounter with this version and we'll fix them with the highest priority.
     
    Last edited: Mar 19, 2013
  48. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Any eta on 1.6 very large image support?
     
  49. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    I can't give you a solid estimate, unfortunately. Sorry for the inconvenience. I'll have VLI support ready a while before 1.6 is out. Would you be interested in testing intermediate versions before the release?
     
  50. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Very much so yes! Which solution did you end up using? You mentioned a potential world machine plugin to export to you large image format, this would rock