# How to use multiple textures for an actor？

**URL:** https://discourse.vtk.org/t/how-to-use-multiple-textures-for-an-actor/2295
**Category:** Support
**Created:** [December 17, 2019, 9:44am UTC](https://discourse.vtk.org/t/how-to-use-multiple-textures-for-an-actor/2295 "2019-12-17T09:44:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Cheng1087](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cheng1087/32/1197_2.png) [@Cheng1087](https://discourse.vtk.org/u/Cheng1087)
#### Post date: [December 17, 2019, 9:44am UTC](https://discourse.vtk.org/t/how-to-use-multiple-textures-for-an-actor/2295/1 "2019-12-17T09:44:22Z")

</div>

I have a block with multiple materials, each material corresponds to a texture. How do i show it in an actor？  
In vtk8.1.2，I cannot get the number of texture unit that hardware support without class vtkOpenGLHardwareSupport.(there is no class vtkOpenGLHardwareSupport in vtk 8.1.2)  
How to implement multiple textures on an actor? how to define which patches use the specified texture?

---

<div class="post-metadata">

### Author: ![Michael](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michael/32/16_2.png) [@Michael](https://discourse.vtk.org/u/Michael)
#### Post date: [December 17, 2019, 2:01pm UTC](https://discourse.vtk.org/t/how-to-use-multiple-textures-for-an-actor/2295/2 "2019-12-17T14:01:10Z")

</div>

You can use `vtkProperty::SetTexture`

---

<div class="post-metadata">

### Author: ![Cheng1087](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cheng1087/32/1197_2.png) [@Cheng1087](https://discourse.vtk.org/u/Cheng1087)
#### Post date: [December 20, 2019, 9:43am UTC](https://discourse.vtk.org/t/how-to-use-multiple-textures-for-an-actor/2295/3 "2019-12-20T09:43:22Z")

</div>

but I do not know how to set a specific cell in vtkCellArray use a specific texture.  
Each cell only use one texture,but cell array will use several texture.  
Is there any example for me refer to?

---

<div class="post-metadata">

### Author: ![Michael](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michael/32/16_2.png) [@Michael](https://discourse.vtk.org/u/Michael)
#### Post date: [December 20, 2019, 3:35pm UTC](https://discourse.vtk.org/t/how-to-use-multiple-textures-for-an-actor/2295/4 "2019-12-20T15:35:39Z")

</div>

How many different texture do you have?  
Maybe you could split your polyData in order to have one actor per texture.

---

<div class="post-metadata">

### Author: ![Cheng1087](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cheng1087/32/1197_2.png) [@Cheng1087](https://discourse.vtk.org/u/Cheng1087)
#### Post date: [December 21, 2019, 1:52pm UTC](https://discourse.vtk.org/t/how-to-use-multiple-textures-for-an-actor/2295/5 "2019-12-21T13:52:29Z")

</div>

most time there are two textures.  
I could use vtkAppendPolydata to append all the polydata,but i do not know how to map polydata and texture.
