Texture Fading Effect
|
|
MariaBeatriz Beck
Registered User
Join date: 2 Aug 2007
Posts: 10
|
01-16-2008 13:13
Please, Some template in how to fade one texture to another. Basic problem, I need to fade smoothly textureA to textureB. llSay(0,"Thanks, for all the help"  ;
|
|
Abba Thiebaud
PerPetUal NoOb
Join date: 20 Aug 2006
Posts: 563
|
01-16-2008 14:06
I'm not a scripting genius, but I don't think it's possible to have two textures on the same face of a prim at once. That said, you could always have two prims in the same spot, one fading to alpha while the other fades from alpha, but then the alpha glitch comes into play. The only way I've seen the alpha glitch overcome in that situation (and to use one prim) is to fade to black, change texture, fade to white, on the tinting.
Please don't ask me the LSL calls/functions for it, as I have no idea. I'm vaguely aware of how most scripts work, can edit and make it do what I want, but starting from scratch has always kicked my patookus.
A
_____________________
http://www.ponystars.com/abbathiebaud Pony Up.
|
|
MariaBeatriz Beck
Registered User
Join date: 2 Aug 2007
Posts: 10
|
 Yes, you can....
01-16-2008 14:17
Hy Abba, Thnaks. Yes you can have many textures you want on a face, just put all the textures on the prim contents, and change using llSetTexture. Yes, you are right, the fade can be done using the color, but I will test today, and let you know. Thanks. From: Abba Thiebaud I'm not a scripting genius, but I don't think it's possible to have two textures on the same face of a prim at once. That said, you could always have two prims in the same spot, one fading to alpha while the other fades from alpha, but then the alpha glitch comes into play. The only way I've seen the alpha glitch overcome in that situation (and to use one prim) is to fade to black, change texture, fade to white, on the tinting.
Please don't ask me the LSL calls/functions for it, as I have no idea. I'm vaguely aware of how most scripts work, can edit and make it do what I want, but starting from scratch has always kicked my patookus.
A
|
|
Abba Thiebaud
PerPetUal NoOb
Join date: 20 Aug 2006
Posts: 563
|
01-16-2008 14:44
From: MariaBeatriz Beck Hy Abba,
Thnaks. Yes you can have many textures you want on a face, just put all the textures on the prim contents, and change using llSetTexture. Yes, you are right, the fade can be done using the color, but I will test today, and let you know.
Thanks. Yes, I understand putting the textures in the contents (or even scripting it to use the UUID) but the textures don't show at the same time, which would be required to fade from one picture to another without fading to black, llSetTexture, fade to white using the tinting. That's what I was attempting to differentiate, the difference between using two textures simultaneously and using two textures one at a time, both on the same face. A
_____________________
http://www.ponystars.com/abbathiebaud Pony Up.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-16-2008 14:59
Many solutions do use two faces. You can even make a box hollow, squash it, and carefully setup transparencies and texture scale/offset to do this pretty well with one prim if you want. Also, if you fade the alpha of one in while fading the other out, the overlapping transparency issue doesn't seem to interfere as you'd expect, as the textures are both uniformly transparent and are SUPPOSED to blend together visually. The last one I made like this worked beautifully.
|
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
01-16-2008 15:07
as long as your textures are 24 bit, fading between them won't cause alpha sorting issues.
Just remember.
Top 0% Bottom 100%
Change top
Top 0->100% Bottom 100%
Change Bottom
Top 100->0% Bottom 100%
Change Top
repeat.
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-16-2008 15:13
Yep. Something like that. You can also immediately set both to the destination texture (and flip alpha values) once the fading is complete. That way each cycle will look the same.
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
01-17-2008 01:53
One possible approach:
hollow box.
Texture A on a face on the outside. fully visible Texture B on the inside. fully visible.
fade out the outter texture to full transparency. copy Texture B to Texture A and set full visibility. select a new Texture B.
repeat ad infinitum
|
|
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
|
01-17-2008 08:10
The trick with the hollow box seems to be quite nice... but when the textures are switched form A to B, one can see a little «hop»... that's because the inner texture is farther away from the viewer than the outer texture...
I really recommend using to prims to get a real smooth transition...
|
|
Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
|
01-18-2008 05:54
Another option you could use would be to make the texture fade yourself as a bunch of textures (like key framing animations) in an art package like photoshop and swap between them. You could even put all the textures into one with separate cells for each keyframe and use texture animation to cycle between them.
______________________ | Start | Fade 1 | Fade 2 | _______________________ | Fade 3 | Fade 4 | End | _______________________
Something like that (sorry my ascii art isn't great)
_____________________
Tread softly upon the Earth for you walk on my face.
|
|
MadamG Zagato
means business
Join date: 17 Sep 2005
Posts: 1,402
|
01-18-2008 06:00
From: MariaBeatriz Beck Please, Some template in how to fade one texture to another. Basic problem, I need to fade smoothly textureA to textureB. llSay(0,"Thanks, for all the help"  ; I have a product that I purchased that does this. It's an advertisement sign. So I know what you are asking and I can be a witness to say that it is possible and it's been done, but I couldn't tell you how they accomplished the effect...even if I knew Maybe if you saw it somewhere you could try asking the creator. Good luck with your project anyhow ~Maddy
|