Ls,
I made a load of cubes with an embedded Texturematerial, merged it, using tools.commands.Merge into a supermesh.
Translate the supermesh over the Z axis.
Looks fine.
Replaced the embedded Texturematerial with a Texture2Dbase texture atlas and used setupUV(cube, “texturename”) to apply only a subtexture(in effect the setupUV offsets the texture and scales it to the mesh);
Adding all the cubes individually (Non merged) works, the cubes use the texture.
Merging the cubes loses UV Offset and Scale.
Now all the cubes are using the entire textureatlas as texture instead of just the sub-region.
So….
I copied the tools.commands.Merge and changed it to also extract and apply the UVscale and Offsets.
That worked! jay!
..until i looked closer; now all the cubes/textures are no longer occluding each other but appear as a flat surface disregarding the z order, more like using the UVscale as render order(or something).
I dont understand how that can happen, doesnt the supermesh(containing the joined cubes) has its own z-order and arent the textures mapped to the polys?
If anybody can clarify/help me with this please do.
Highest regards,
Mac