Multiple Textures?

Blitz3D Forums/Blitz3D Programming/Multiple Textures?

Toom(Posted 2004) [#1]
Hi All,

I've got some models built in 3D-Studio (.3ds files) and in 3D-Studio I can assign different textures to the different elements of the mesh.

When I go into Blitz though, I can only texture the entire .3ds mesh with a single texture map it seems.

Is this true? Do I have to model the different parts of the same object seperately, so that Blitz can texture them properly?

For instance, I build a tree, and it's leaves, the tree has a seperate texture map that the leaves. Do I really need to save the two elements seperately (different .3ds files) so that I can use both textures?

TIA


jhocking(Posted 2004) [#2]
You only need seperate objects, or even just separate surfaces, not entirely separate 3ds files. That is, you could do the leaves and trunk as separate objects within a single 3ds file (make sure to load it with LoadAnimMesh to preserve separate objects) or just assign the separate parts different materials of a Sub-Object material in 3D Studio (or is that only possible in 3D Studio Max?)


jfk EO-11110(Posted 2004) [#3]
If you make a Model with multiple objects such as spheres and cubes or whatever, these Objects will be surfaces in Blitz, when you load it using LoadMesh (if you use LoadAnimMesh they will be Children with intact Mesh Hierarchy, but this is not required as long as they are not animated at all)

Then use LoadBrush to load in a number of textures
Use PaintSurface to assign a Brush to a Surface
Use Countsurface to check the number of surfaces.

you know, there is still a problem with the order the surfaces are located in memory - this will differ each time you load them, and therefore you need to identify the surfaces by their Texture Path. Sounds tricky, but infact it's easy. You can make a simple Function that will return the name of the texture a surface WOULD use. (you still can use an other texture, of course, but to be able to identify it you need to assign one in the modeler app)

Have a look at the SaveB3D Example to see how the Surface Identification works: http://www.blitzbasic.com/codearcs/codearcs.php?code=866