Hi, guys!!!
I must create a multiTexture on quad and make an animation of my sprites in the same quad…But a multiTexture don
Dude! It's missing its head!
Your textures are not a power of two size, which many cards do not supports. jME will automatically rescale the textures in most cases, meaning your coordinates are usually wrong somewhat with a shape like this.
Don't know if that the problem (not sure what this HUD tutorial does exactly)… you can try TestMultitexture to verify multi texturing works on your card.
I'd suggest not to change texture coordinates of your mesh but use texture translation instead - that would be much faster. What is actually not working? Multiple texture per mesh or animation?
Hi Irrisor!
The multitexture dont works…my animation works fine IF I use only one(body, for example)…I create my animation with two quads…and works fine…but for one quad…its the problem…
My card works fine with TestMultitexture…
this is wrong?
textureWidthCor = ts.getTexture(0).getImage().getWidth();
textureHeightCor = ts.getTexture(0).getImage().getHeight();
textureWidthCab = ts.getTexture(1).getImage().getWidth();
textureHeightCab = ts.getTexture(1).getImage().getHeight();
//body
public void setTextureCorpo(String caminho){
Texture corpo = TextureManager.loadTexture(caminho,
Texture.MM_LINEAR,
Texture.FM_LINEAR);
ts.setTexture(corpo, 0);
}
//head
public void setTextureCabeca(String caminho){
Texture cabeca = TextureManager.loadTexture(caminho,
Texture.MM_LINEAR,
Texture.FM_LINEAR);
ts.setTexture(cabeca, 1);
}
Sorry for my spelling…
Thx a lot guy!!!
Looks ok on the first glance. As Llama said check if TestMultitexture is running. If yes figure out what's different in your app. Maybe try to alter TestMultitexture to do what you want incrementally and have a look where it goes wrong…
Look in my code…The images over my quad…
dirt and monkey.jpg
Body.png and monkey.jpg
Body and head.png
The problem can be in the .png images?
:’(
I never used multitexturing but it seems you used the wrong combine mode… no idea where to change that - anybody else?
It ignores the transparancy, and uses black instead (making the whole thing rather dark).
I think you can solve it by changing the texture apply value with the mytexture.setApply() method. These are javadoced pretty well (they all start with AM_). I think you need
Hi guys!!!
I guess that the multitexture don
As I said, multitexturing can do many different combine modes and it does support what you want to do with it. You'd just have to learn how to do it or talk to someone who knows (not me, I admit).
Of course if you're happy with this solution (it's only a bit slower I think) then you don't have to