fade out screen, sprites, models, .lmps
Moderator: InsideQC Admins
22 posts
• Page 1 of 2 • 1, 2
fade out screen, sprites, models, .lmps
ive been wondering about this for a while now. how can this be done?
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
Or implement Scale, alpha, and glow for models in a tutorial, and just make the entity think about fading itself out of the game(eventually removeing itself)
-

Mexicouger - Posts: 514
- Joined: Sat May 01, 2010 10:12 pm
i tried your idea ceriux, but when the sprite fades out, the pink transparent color mixes in the background mixes with the image color. the engine no longer recognises the color as pink and it doesn't look transparent anymore.
can you explain a little more mexicouger.
thanks to everyone!
can you explain a little more mexicouger.
thanks to everyone!
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
um nooooo. when my sprite is not fading, the pink shows as transparent. when it fades, the pink behind the picture of the fading model (i use photoshop) isn't recognised as pink and it appears.
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
1. What engine are you using?
2. Are you saving alpha channel properly?
The best solution by the way isn't to create new sprite frames, it's to use the .alpha QuakeC field, which works on both sprites and models, but doesn't exist in the vanilla Quake engines, only in modified engines like DarkPlaces.
2. Are you saving alpha channel properly?
The best solution by the way isn't to create new sprite frames, it's to use the .alpha QuakeC field, which works on both sprites and models, but doesn't exist in the vanilla Quake engines, only in modified engines like DarkPlaces.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
behind_you wrote:can u give me an example or alpha being used?
first you need to write in defs.qc
.float alpha;
and for example yo can put the value in
void() BecomeExplosion =
{
self.movetype = MOVETYPE_NONE;
self.velocity = '0 0 0';
self.touch = SUB_Null;
setmodel (self, "progs/s_explod.spr");
self.solid = SOLID_NOT;
self.alpha = 0.4;// 0 is invisible, 1 is totally visible
s_explode1 ();
};
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
behind_you wrote:wow, nd that's all? Thanks!
Does that fade out in timing or make it transparent only?
alpha channel !!!!!!!!!!!!
hahahahahaha
sorry
I don´t read anything,
You can use the gimp 2 for that, and use external textures for the sprite.
Gimp 2 is the best program you just have to remove the layer and then it gives you the transparency.
transparency can put on your sprite.
Then you must rename the image. (I use tga)
For example I use the bubble.
the original name s_bubble.spr
so that's Darkplaces'll recognize the name
s_bubble.spr_0.tga
Where 0 is the frame number.
let the new image where is the original sprite (in this case the folder progs)
and we have so

Last edited by Nahuel on Sun Feb 27, 2011 3:16 pm, edited 1 time in total.
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
ok nahuel. I mean making a model start not faded and then it slowly fades out until it becomes invisible. How can i do that?
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
behind_you wrote:ok nahuel. I mean making a model start not faded and then it slowly fades out until it becomes invisible. How can i do that?
oh very well, I made something similar but with a sprite
let's suppose that you want to do that, (for example)the demon whenever it jumps becomes more and more transparent.
void() demon1_jump1 =[ $leap1, demon1_jump2 ] {ai_face();
self.alpha = 1;
};
void() demon1_jump2 =[ $leap2, demon1_jump3 ] {ai_face();
self.alpha = 0.95;
};
void() demon1_jump3 =[ $leap3, demon1_jump4 ] {ai_face();
self.alpha = 0.9;
};
void() demon1_jump4 =[ $leap4, demon1_jump5 ]
{
ai_face();
self.touch = Demon_JumpTouch;
makevectors (self.angles);
self.origin_z = self.origin_z + 1;
self.velocity = v_forward * 600 + '0 0 250';
if (self.flags & FL_ONGROUND)
self.flags = self.flags - FL_ONGROUND;
self.alpha = 0.8;
};
void() demon1_jump5 =[ $leap5, demon1_jump6 ] {
self.alpha = 0.7;
};
void() demon1_jump6 =[ $leap6, demon1_jump7 ] {
self.alpha = 0.6;
};
void() demon1_jump7 =[ $leap7, demon1_jump8 ] {
self.alpha = 0.5;
};
void() demon1_jump8 =[ $leap8, demon1_jump9 ] {
self.alpha = 0.4;
};
void() demon1_jump9 =[ $leap9, demon1_jump10 ] {
self.alpha = 0.3;
};
void() demon1_jump10 =[ $leap10, demon1_jump1 ] {
self.nextthink = time + 3;
// if three seconds pass, assume demon is stuck and jump again
self.alpha = 0.2;
};
void() demon1_jump11 =[ $leap11, demon1_jump12 ] {
self.alpha = 0.1;
};
void() demon1_jump12 =[ $leap12, demon1_run1 ] {
self.alpha = 0.05;
};
if you specified already alpha in the defs.qc you can do that one.
Notice that in every frame alpha approaches more 0.
But remember to put alpha =1 in every others of the actions because the demon goes away to do transparently in every action that it comes after the jump.
Greetings
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
22 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest

