This is probably far fetched… But I am using World Composition, and have hundreds of tiles in my game (generated by world machine), each tile also has RGB files, used to generate layer weights in the respective materials for each tile. Now, I can create hundreds of material instances, then apply the respective RGB files to the relevant parameter within those material instances, to generate the layers, and then apply the material instances to each landscape tile, individually. This is very easy to do, but will take a very very long time. Especially if I want to make changes later.
So, to anyone with knowledge of how to use C++ to perform actions within UE4, is it possible to perform an iteration to do this for me? My naïve attempt at a rough code format / flow diagram is written below:
for n = 0 to n = 24 ( I have 25 x 25 tiles)
for m = 0 to 24
New Material = copy.material_inst (create a new instance of the parent material instance)
Material_inst_xn_ym = New Material (assign new material name as per the tile co-ordinate i.e. x3_y5 for example)
Landscape_Actor_xn_ym.SetMaterial(Material_inst_xn_ym) (assign new material to the landscape actor)
Material_inst_xn_ym.Parameter1 = Bitmap_xn_ym (assign the RGB weightmap to the respective parameter within the material instance)
The above is obviously not even code, but hopefully it shows the general idea (not to mention how non existent my coding skills are). But appreciate if anyone knows if something like this is possible and could share where to begin.
Thanks.