Multiple textures on multiple surface entities
Blitz3D Forums/Blitz3D Programming/Multiple textures on multiple surface entities
| ||
Hi, I have an entity that I created myself, it's a cube but the top face is a surface, the bottom face is another surface and the 4 sides are a third surface. I can texturise the surfaces by using GetSurface and using a Brush. But I need to add another texture on top - how can I do this? |
| ||
EntityTexture and BrushTexture have an optional 'index' parameter that allows you to specify which texture layer to use. |
| ||
But I cannot use EntityTexture as I have to use the surface do I not? My entity have 3 surfaces, I want to paint 3 different textures, one on each surface. Then I want to paint a 4th texture on all 3 surfaces. |
| ||
You should be able to create a brush for each surface and then use PaintSurface on each surface. I haven't tried this but think this should work: 1 Create your 'blank' cube. 2 Apply the texture that's common to all surfaces using EntityTexture, specifying the layer you want this texture to use. 3 Create a brush and use BrushTexture to set the texture and layer for a specific surface. 4 Use PaintSurface on the required surface. 5 Goto 3 and repeat for all surfaces. |