Multiple Surfaces on a mesh

Blitz3D Forums/Blitz3D Programming/Multiple Surfaces on a mesh

Rob Farley(Posted 2004) [#1]
I've got a single mesh with 2 materials (surfaces). I want to be able to entitytexture only one of the surfaces... how do I?


Beaker(Posted 2004) [#2]
It's a pain but PaintSurface().


TartanTangerine (was Indiepath)(Posted 2004) [#3]
You need to give each surface a unique ID in your modeling package. Then use the FindChild function in blitz to identify the surface.

Example.
Surface1 = "SURF1"
Surface2 = "SURF2"

tex = LoadTexture("mytex.bmp")
mymesh = LoadMesh("mymesh.b3d")
surf1 = FindChild(mymesh,"SURF1")
surf2 = FindChild(mymesh,"SURF2")
EntityTexture surf2,tex
EntityAlpha surf1,0.5 ; for example



big10p(Posted 2004) [#4]
Flynn, EntityTexture works on entire entities, not individual surfaces - well, the one I have does, anyway. :P

As MasterBeaker says, just create a brush with the required texture and then PaintSurface().


Rob Farley(Posted 2004) [#5]
Cheers guys.

Got one surface for a head and another for the body, want to animate the face texture.