Help with a Texture Animation

Hello everybody…  :D  :smiley:

here w go again… xD



Im trying to make an simple box (that represents a computer monitor in my game) that I would like to make a transition from one texture (.jpg) to another texture (.jpg)… any ideia of how make this???

I have tried to use FadeInFadeOut, but the box just showed one texture, and did not make the transition to the other texture…

I would like that this textures make a loop in its transitions…



my game extends BaseGame…

You might be able to use 2 textures and some type of time updated multitexuring options to transition between two textures smoothly.

…or try use sprites



http://www.jmonkeyengine.com/wiki/doku.php?id=huds_for_the_total_noob

I'm assuming by transition you mean a visual one, like fading between two textures, or a sweep, etc?

fading between two textures??? isn't possible to use fadeinfadeout controller?? I don't understand how to use this… even seeingthe source example…

what renanse means is that it's not clear what you want to do. you say you want to fade between two jpegs but that doesn't mean anything. do you mean you want to combine two textures or to make a fading effect between two textures (as in one model/object changing the texture)?

i suppose you want to do the latter one, so take renanse's advice and take a look at multitexturing. and which code example do you mean?

i would like to make a fade between two textures…

the code example of effects.fadeinout…

afaik (and that's not very much so don't take it for granted) that Transient stuff is for nodes/geometry so it won't help you very much.

if you want to fade between 2 textures you should do something like creating a TextureState, adding 2 textures to it and playing with the combineScaleAlpha() of those textures - but this is just speculation and i don't know if it would work.

I believe the FadeInFadeOut classes are broken anyway.  I introduced a Fader class a while back that would be a good example of alpha fading, but could not be used directly for what you're wanting to do.  The Fader system is made primarily to fade an entire scene in and out.

Yeah… I saw that fader do the fading to the entiring scene…

I think i'll have to do some special method to do this fading…

Let's try…  :smiley:



if not works, I don't know what to do, hehehehehehe  lol



thanks a lot