Starting with 4.15, every time a Material or Material Instance is modified and resaved, it recomputes texture streaming data related to each texture that is used.
Per-texture data includes the UV Channel Index and Scale, where the UV Channel Index is used to sample the texture, and the Scale is the multiplication factor
applied to the channel prior to being sampled.
This, however, does not cover all cases, as the sampling could be based on world position, mesh vertex color, or any combination of UV channels. This would make the analysis
fail to find the related data, and the engine will assume a dependency on UV Channel 0 and a Scale of 1.
The analysis is run at different steps, depending on what is being edited:
Material: This runs when the user applies or saves a modification.
Material Instance: This runs when the Material Instance Editor is closed, or when the package holding the Material Instance is saved.
Level: This runs for every used Material when the user runs "Build Texture Streaming". This is to ensure that every Material is up-to-date. The reason for materials not being up-to-date are:
Materials prior to 4.15 not having any data.
Material Parent has changed and the instance data is outdated.
There have been improvements done after the Material was last saved.
There is a bug fix.
For a given primitive component, the data required to accurately compute the required resolution of each used texture comes from:
The bounds of the primitive
The texture coordinate sizes of the mesh
The material texture coordinate scale for sampling each texture
When this information is missing, conservative heuristics will be used.
To build Texture Streaming data:
Click on the dropdown arrow next to the Build button in the Toolbar.
Click on Build Texture Streaming
This will generate component and level data to be used at runtime.
Note that this generates the data to be used for all material quality levels and platform feature levels, using the highest quality level and supported feature level.
At runtime, if the component is using fewer textures than those that were used in the build process, the unused ones will be ignored.