Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

Unity Feedback Wanted: Streaming Virtual Texturing

Discussion in 'Graphics Experimental Previews' started by AljoshaD, Mar 18, 2020.

  1. flyer19

    flyer19

    Joined:
    Aug 26, 2016
    Posts:
    48
    :),3q~,but this demo player setting had enable Virtual Texturing , not work.
     

    Attached Files:

  2. flyer19

    flyer19

    Joined:
    Aug 26, 2016
    Posts:
    48
    OK, need hdpr 9.0.0-preview.54
     
  3. flyer19

    flyer19

    Joined:
    Aug 26, 2016
    Posts:
    48
    vt2.png vt3.jpg VT1.png
    comfused with virtual texture momery still very big.and some time can not show the virtual texture profile.
     
  4. flyer19

    flyer19

    Joined:
    Aug 26, 2016
    Posts:
    48
    any help?It seems vt not work in 2020.2.0.a19
     
  5. AljoshaD

    AljoshaD

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    46
    Hi flyer19,
    in 2020.2 you should use HDRP 10 (and not 9-preview). We do have some small bugs with the profiler that should be fixed soon. Why do you think VT is not working? The screenshots show the VT debug lines so it looks like it is working. I'm not sure why you see 1GB of render textures, that might just be the editor. Do you see this in the standalone player? I don't think this has anything to do with the VT system.
     
  6. flyer19

    flyer19

    Joined:
    Aug 26, 2016
    Posts:
    48
    confused with the rendertexture got 1g memory in editor mode .when make the level ,the momery will be crazy big too.vt seems can work,but total texture memory > > vt's 384m .Thanks for your reply ~,and when will get HDRP 10 .
     
  7. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    128
    We are developing an RTS game where you will only view a small segment of terrain at a time. I would think that depending on camera angle VT would allow higher detail non-tiled terrain textures.
     
  8. AljoshaD

    AljoshaD

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    46
    It could make sense indeed. Mostly for the material mask which is unique everywhere. It could make sense for your tiling textures if you don't blend many, these are high resolution, and these aren't always completely visible.
     
  9. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    128
    We would not be tiling / blend textures. Ideally just one big custom ground texture.
     
  10. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    99
    Any update on the ability to use the Parallax Occlusion Mapping node in ShaderGraph with Virtual Textures?
     
  11. DrSeltsam

    DrSeltsam

    Joined:
    Jul 24, 2019
    Posts:
    32
    The documentation states that Virtual Textures do not support AssetBundles. Does that mean objects loaded from bundles cannot use virtual textures at the moment? Is there a rough ETA for asset bundle support?

    Another question: Linux does not show up in the "Supported Platforms" section, although Vulkan is supported. Is Linux really not supported, or is it just missing in the docs?
     
  12. AljoshaD

    AljoshaD

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    46
    Materials in an assetbundle cannot use VT at the moment. The VT system will evaluate all referenced materials during the player build and generate the streaming data. Materials that are in assetbundles are not referenced and will not be detected. Therefore, your build will not contain the streaming texture data. We cannot store VT streaming data in asset bundles at the moment. It's our top priority at the moment to add this support for assetbundles. Our goal is to add it by the end of next year. It's a major development task though so no guarantees yet.

    Linux is indeed supported in 2020.2.
     
    JoNax97 likes this.
  13. AljoshaD

    AljoshaD

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    46
    A question that has come up, you can now use Streaming Virtual Texturing to stream a heightmap for displacement mapping in Unity 2020.2 with HDRP 10.

    In the following Shader Graph, there is 1 VT property that stores the heightmap in the 4th layer. You need to add a second VT sample that has "Automatic Streaming" disabled and Lod Mode set to "Lod Level". This allows you to sample the VT property in the vertex shader to offset the vertex position.
    DisplacementMappingWithStreamingVirtualTexturing.jpg DisplacementMappingWithStreamingVirtualTexturing2.jpg
     
  14. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    30
    Lars-Steenhoff likes this.
  15. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    116
    Is there already a solution for objects behind transparent objects (windows etc.)? Something like a layer mask to ignore transparent objects maybe? Currently the system isn't able to handle the fetching of textures behind transparent objects, which really is a big problem for production use.
     
    rz_0lento likes this.
  16. AljoshaD

    AljoshaD

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    46
    There is no solution yet for transparent objects. It's on our short term roadmap though.
     
    m0nsky and Onat-H like this.
  17. AljoshaD

    AljoshaD

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    46
    We'll have presentation on Streaming Virtual Texturing during the virtual Unite conference next week. You can find more info here.
    StreamingVT-Unite-Session.png
     
    Lars-Steenhoff and Grimreaper358 like this.
  18. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    116
    Thanks for the quick answer Aljosha! Does that mean in the 2020 cycle? We would ideally like to stay on 2020 LTS.
     
  19. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    116
    And while we are at it: A simple (revised) example script that demonstrates the fetching api (for example fetching the lowest mip of everything at start) would be great too. The current example breaks when a mesh renderer has more than one material assigned.
    Even better: An option in the sample VT node (something like always fetch lowest mip). Usually it's not a problem having blurry textures during fast movements as long as there is something that resembles the actual texture instead of just a color. I think for most people on modern platforms the cost of having a 128x128 version for all textures being in memory would be negligible (especially compared to what "not streaming" would cost).
     
  20. AljoshaD

    AljoshaD

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    46
    VT support for transparency won't land before the 2021 cycle.

    Here you have an experimental script that makes sure the lowest mip is in memory for every VT texture. This is just an example. It should be customized for your specific use.
     

    Attached Files:

  21. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    116
    Great, thank you!

    Regarding transparency: Do you mean supporting transparent objects, or fetching the textures of objects behind transparent objects? The latter is the one that's very problematic for us.
     
  22. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    116
    I was just testing the VTManualRequesting script and I encountered a very strange behaviour: I get a null reference exception when I have reflection Probes in the scene (the problem is solved by disabling the reflection probes) What makes it strange is, that this doesn't occur if I create a new reflection Probe, only with ones that have been in the scene for I would guess more than a year or so.. Do you know if something changed with the reflection Probes? I remember that in one of the earlier HDRP versions, there was an actual mesh renderer part of the reflection Probe to display the chrome gizmo. I might have traces of these old (hidden) mesh renderers still in my reflection probes, but I have no idea how to access them.
     
  23. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    116
    Ok solved it, for anyone who encounters the same problem: You can access the old mesh renderer by using the inspectors debug mode. You can then simply remove the mesh renderer component.
     
unityunity