Using Arrays in Materials

anonymous_user_4b3639a6
Thu, 26 Jan 2017 16:20:19 +0000
Rendering

Hey guys,

I try to export a Material I wrote in Unity to Unreal.
Unfortunately I cannot find a way to loop through Arrays in Materials.

What I know so far:

I can create custom expressions to use a for-loop

Problem: There are no arrays which I can loop

There are Material Parameter Collection Assets, which store a Scalar and a Vector Array
- Problem: I cannot get the Collection Arrays in the custom expressions. Its weird, because the generated
HLSL code uses MaterialCollection0.Vectors[0]. But the Compiler doesnt recognize
MaterialCollection0, when I try to apply the changes

I can use Textures to store data and loop through it
- Problem: I tried to manipulate the data of a Texture2D and set a texture parameter value to it, but it didnt work.
Maybe I overlooked something with this attempt.

It would be awesome if someone could help me with my problem

Thanks in advance for you answers

Greetings

13 posts - 11 participants