Hi,
I'm having problems with applying a transparent texture over the top of another, the effect I want is as follows:

Base Texture +

Texture Overlay (with alpha) =

Desired result
I've tried what seems like every combination of TextureAttributes and various modes but no luck, surely this can be done? Here's the code I'm using
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| TextureUnitState tu0 = new TextureUnitState((Texture2D) TextureLoader.tf.getMinMapTexture("floor.jpg"), null, null); TextureUnitState tu1 = new TextureUnitState((Texture2D) TextureLoader.tf.getMinMapTexture("test.png"), null, null); TextureAttributes ta0 = new TextureAttributes(); ta0.setTextureMode(TextureAttributes.MODULATE); tu0.setTextureAttributes(ta0); TextureAttributes ta1 = new TextureAttributes(); ta1.setTextureMode(TextureAttributes.BLEND); tu1.setTextureAttributes(ta1);
appearance.setTextureUnitState(new TextureUnitState [] {tu0, tu1}); |
Can anybody help? or at least explain the setCombineAlphaMode and setCombineRgbMode methods
Thanks....