Combining textures with alpha map

Hi.

I’m looking to lighten up my ground shader a bit by combining my textures outside of the shader so that it doesn’t have to store 2 diffuse textures + an alpha texture.

Is there a good way of doing this in jme3? (Without having to use awt graphics).

there is no easy way of doing this in JME3, you could combine your textures in photoshop or the gimp.

Anyway i don’t really recommend that, you’ll have to “bake” a complete texture for your ground, and it will end in a drastic loss of resolution when mapping to the terrain even if you bake a 4096x4096 texture.

If your textures are 1024, the shader will be lighter if you keep your 3 textures.

I’m not actually using a “terrain”, but a tile based world. A terrain would be cheaper, i know, but my playfields are rather small, so this is ok. I don’t use a single texturefor the whole playfield, but each tile has a combination of two textures (a heritage from the 2d client, which used “texture cakes”).

So what i’m aiming to do is combining 2 32x32 diffuse textures into one, but if there’s no easy way in jme3, i’ll have to use awt. I don’t want to use cakes since it’s much more static, and equals larger package size.