applying multiple textures to an entity

Blitz3D Forums/Blitz3D Programming/applying multiple textures to an entity

ryan scott(Posted 2004) [#1]
i downloaded a mesh from http://www.3dtotal.com/
in case you need to know it is under 'free stuff' at the top, then meshes, then Low Poly.
Desert APC by Nick Cooper

i can't give a direct link because 3dtotal uses lots of javascript :/

the question is general, however... this object comes with 3tga files, which are the textures. how can i apply those textures?

i've tried this

b=LoadTexture("gfx\models\rendbmesh_3ds\images\body.tga" )
EntityTexture car,b,0,0
c=LoadTexture("gfx\models\rendbmesh_3ds\images\turret.tga" )
EntityTexture car,c,0,1
d=LoadTexture("gfx\models\rendbmesh_3ds\images\wheel.tga" )
EntityTexture car,d,0,2

but it doesn't work. i have never done this before. the whole object seems to be taking on the last texture i load into it (wheel.tga)


Gabriel(Posted 2004) [#2]
The mesh probably has different parts, each of which needs to be textured separately. You need to use either FindChild or GetChild with CountChildren to locate the different parts. Then you can texture them individually.


DJWoodgate(Posted 2004) [#3]
Just had a look at it. Move the textures from the images sub folder to the same folder as the model. They should then load with the model.


ryan scott(Posted 2004) [#4]
that worked!

thanks