I am creating a project primarily dependent on user generated content, and in an attempt to allow user to create complex structures using multiple static meshes and materials, I am experimenting with a runtime “editor” for a user to select static meshes, position them in a “scene” and set a “material” for each static mesh by inputting a scalar value for an index, and this index is used in the same material for each static mesh, to choose an index for 3 texture arrays (Albedo Array, Normal Array and Composite Array) to be able to set a material for each mesh, then save all these parameters into a SaveGame object.
When this SaveGame object is loaded, I want to use a blueprint to “build” the user created object out of instanced static meshes and assign the index value to the per instance custom primitive data for each instance when the savegame object is loaded, and build a packed level actor at runtime for the users created “object”.
I am using Texture2DArray in my material for choosing textures based on the index provided. I would also like to be able to scale the UV’s and rotate using again, custom primitive data, so that if the user scales a static mesh, the textures will tile appropriately instead of scaling the textures.
For Modders, I am thinking this will also allow modders to create complex static meshes, with multiple “materials” by using the red channel in vertex colors to achieve 256 different indexes and they will be able to assign different indexes to a single static mesh using vertex red channel.
Whereas with User Generated Content, each static mesh will only be able to be assigned a single index.
from what I have researched, it seems I want to use Texture2DArray and not a single texture with UDIM’s.
Am I correct that UDIM is different than Texture2DArray?
Am I correct, that UDIM cannot be UV tiled individually, but by using a Texture2DArray, each texture is handled seperately and I will be able to tile properly?
I have also heard, but have not been able to confirm, that Texture2DArrays double the memory needed? Once for the array, and once again for each texture? Whereas a UDIM texture will avoid this memory duplication?