TommyBear
(TommyBear)
June 21, 2019, 10:10pm
22
anonymous_user_2681644d:
Hi everyone, I’m the main owner of the core virtual texture system (not any of the runtime VT stuff). Thanks for all the feedback so far, I’m glad to hear people are excited about this. Everything posted look mostly accurate, I have a few additional notes.
Larger than 8k textures should import correctly, but UE4 texture import code currently keeps everything in working memory, so large textures will eat a ton of ram. I’m not sure if this will be addressed for the initial release, but we’ll see.
Basic UDIM support should already be there. If you import a texture named like this: “whatever_1001.tga”, the current directory will be scanned for additional UDIM pages, and they’ll all be imported together. UDIM textures used in material should automatically apply the proper UV scale, so UVs from source mesh should work as-is. This feature is still very early and hasn’t been tested very much…if someone tries it out, let me know how it works.
The cost of a VT sample in material is 2 texture samples plus a bit of ALU in the base case. There is an optimization, where if multiple VTs are sampled with the same UV expression, they will be combined into a “VT stack”. So really, each VT stack costs 1 texture sample, plus 1 additional texture sample for each VT in the stack. You can see the number of generated VT stacks in the material statistics window. So for example if a material samples 4 VT all with the same UVs, the total cost will be 5 texture samples (plus some ALU).
Hey… currently it is impossible to even import a 16k x 8k texture, it will hard crash with a failure to allocate memory. The amount of memory it is trying to allocate is huge (in the GBs), so there seems to another issue not related to just the size in memory for the textures. This is from the 4.23 branch on github. But generally marking texture as “Stream Virtual Texture” works.
Tommy.
EDIT: UDIM based import works, both in terms of single (initial file import) and as part of an import of a model… Cool!!!