Having a lot of problems with both kinds of multi-texturing. First, the ability to place different textures on differing faces of an object. Second, the ability to place more than one texture on a given face. Then of course there is doing both at the same time.
The only way I seem to be able to do this is to split up my geometry and build a separate shape3D for each part with an appearance which hold only those TextureUnitStates that are used in that sub-geometry. This leads to a lot of Shape3D objects.
I tried doing the first type by stacking the verts, normals and texcoords into one geometry array and using the initial vert index (in the texcoord adding method) to point to the starting vert effected. Then mapping the texcoord sets to TextureUnitStates in the Appearance object holding all the textures for the Shape3D. This resulted in the highest indexed TUS texture being shown on all faces of the shape.
Alternately, I tried doing a combination by creating one Appearance with all the textures and placing the sub-geometries in their own geometry arrays, which were added to the Shape3D. The texcoordset to TUS map for a one of these Geometry array would typically look like this:
Index Value
0 -1
1 -1
2 0
3 -1
4 -1
5 1
In this case too the highest indexed TUS texture seemed to predominate. The docs say that using -1 prevents that TUS from being used in that geometry array. The map above should be equivalent to using an Appearance with 2 TUS and a map of {0,1}. Of course this requires more Shape3Ds.
However, that does not seem to be the case. If an Appearance object includes TUS not used in a particular sub-geometry then there seems to be some bleed-over. The highest indexed TUS always predominate.
Is there a capability bit I’m missing, a Texture/Rendering/etc attribute I’m missing? I’m using DECAL for the base texture and COMBINE_ADD for the second which is a lightmap.