How do i use Texture2DArrays in a material?

Hi!
I want to know if there are any tutorial to use texture2darray in a material.

I need to wrap 6 sperate textures all in one material.

I’ve seen UE4 document about Texture2DArray.
(https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/FTexture2DArrayResource/index.html)
However, I’m not sure if this has anything to do with what I’m looking for.

Please help me!
it would be greatly appreciated!

Hey Kluze,

Could you perhaps provide me with an explanation of what effect you are trying to achieve so I can give you some alternative methods of getting to your goal?

Thanks,

Hi, Andrew

Thank you for replying.

I’m making VR game for Adults in Oculus Rift and HTC VIVE.

As you know, when GPU read a lot of textures with UV, it makes poor performance. Great performance is key point of VR.

My female character has 30,000 polygons and 5 materials( eyes, head, torso, legs, arms). it should be problem in VR.

I heard Texture2DArrays solve this problem in Unity 5.
I don’t want to use Atlas to combine every textures.

That’s why I need Texture2DArrays in UE4. if you know alternative methods, Please help me.

Thanks,

Nick

Hi, Andrew
Would you please tell me alternative methods?

If you are shooting for performance, then you will want to create some LOD’s for your skeletal mesh to reduce the triangle count at any given time based on distance.

With that said, you can easily create an array of 2D Textures within Blueprints.

You will also want to establish some material instances so you are not calling too many materials at once, which can also help improve performance. We have a documentation page exactly for this type of question, which I believe will help you a lot.

Virtual Reality Best Practices

Let me know if you have further questions.

Cheers,

Thank you for answer, lastly, can i ask about performance more? I want to use Nvidia Hairworks on my female character hair, is it possible to use without performance problem in VR?

It is possible, but you will need to do some heavy optimization since it is an expensive rendering feature inherently.

How about TressFX? is it better than Hairworks?, i hope to use TressFX for dynamic hair. but i couldn’t find any plugins for UE4. do you have any alternative methods? please see this : EVR Studio VR project " Project M " - Teaser - YouTube, i guess it is tressFX.

That is something you will need to investigate on your own, as I don’t have information on that topic.