Download

Material Parameter Collections for Textures

What is the best way to utilize the Material Parameter Collections, but to effect the change of Textures in my BaseColor, instead of a Scalar or Vector Parameters? Perhaps have multiple textures on a single Material and a Scalar that changes the Alpha? Perhaps multiple Lerps or something?

Does anyone have any idea how this could be done?

Thanks.

Unless the developers point us in the right direction, my observations as a user are that texture parameters cannot be created; only scalar and vector ones.
It would have been cool to have a slider that can be present in the parameter collection that outputs integers which can be used to switch multiple textures in the material.
Kind of similar to how random seed values work.
For ex: 0 = grass, 1 = sand, 2 = stones, 3 = rock.

Is something like that possible to setup? Sort of a “Select” option like in blueprints, but for materials. Does anyone know if that is possible?

Yes, you can use an integer (or vector) parameter to drive some kind of blending of textures.
The draw-back is that you have to bind all those textures, and they all get read by the GPU shader, even if the blend value is “0” for it, so it has a performance cost.

Ok, thanks for the feedback. It’s unfortunate textures can not be a part of the Material Parameter Collection.

I think that’s because of how the GPU hardware works – the material parameter collection probably turns into a “global” state block, at least for certain hardware architectures, at which point putting samplers in there seems like it wouldn’t work right.

Are you sure, because this exists so you could hopefully make a function that loops through all materials in a scene and swaps their textures:

But with a material parameter collection texture, you wouldn’t have to do that…