How would one do a shader script that:
- stage one would scroll an additive fire texture upward, the 'fireball' stuff
- stage two would 'alpha' this out to a blob shape where we don't get seams and such ugliness, and make it look more like an actual fire.
I used to have this all printed out but it's all gone now, to a better place.
fine examples: Fires in Zelda64 (though alpha blend there), Gargantua fire/rocket trail in Half-Life.
Replies
Then you end up with a shader like this
textures/floorsos/smokepuff3_1
{
qer_editorimage textures/floorsos/smokepuff3.tga
surfaceparm noimpact
surfaceparm nolightmap
cull none
surfaceparm trans
surfaceparm nonsolid
surfaceparm nodlight
deformvertexes autosprite
deformvertexes move -7.347877 9.003964 544.157837 sawtooth 0 1 0.836573 0.038147
{
clampmap textures/floorsos/smokepuff3.tga
tcMod rotate 0.000000
AlphaGen wave sawtooth 1.000000 0.000000 0.836573 0.038147
rgbGen wave sawtooth 1.000000 0.000000 0.836573 0.038147
tcMod stretch sawtooth 1.000000 0.000000 0.836573 0.038147
blendfunc blend
}
Apart from you would have maybe 10-20 shaders for each animation / sprite and would need to model 10-20 brushes to apply the different stages of the shader to.
So in this case Smokepuff 3_1 is the first frame of the smoke animation, then it is up to you and particle studio in how many additional smoke puffs you want.
Here is a link.
http://freebrief.planetmedalofhonor.gamespy.com/q3a/ps/index.html
It is basically the same as the UT sprite engine but without the useful UI and workflow lol.
Good luck
Greg
why not just use an animated texture? :O
[/ QUOTE ]
because they're cheesy and don't look great with interpolation, anyway.
[ QUOTE ]
What I would do is use particle studio,
[/ QUOTE ]
good luck using that for stuff like models that aren't mapobjects!
[ QUOTE ]
http://www.bpeers.com/software/q3ase/
[/ QUOTE ]
that's just a program, and it's also a different shader engine than what q3 uses (different deformVertexes and envmap, no specular etc)
where's daemon when you need him!
It's the same principle, though. Use a second texture as the alpha map for the layer preceding. I think the term was depthWrite.
Might also try a multiplied cloudy layer on top of the firey stuff if it's being applied as an additive effect.
Thanks Xeno!
Yes, it's "just a program", but it's remarkably self explanatory, and just messing around with it can get you probably get you the result you want reasonably quickly.
I'd tell you how to do it if I could remember how, but I can't, so Q3ASE is all I got to offer.
Anyway, you got it working now.
<font class="small">Code:</font><hr /><pre>
yourshader
{
{
// THIS IS THE ALPHA BLOB, this makes the fire fade off. This texture MUST have an alpha channel!
map textures/fireblob.tga
blendfunc gl_zero gl_one_minus_src_color
depthWrite
}
{
// THIS IS THE ADDITIVE FIRE EFFECT that scrolls up
map textures/firescroll.tga
blendfunc gl_one_minus_dst_alpha gl_src_alpha
tcMod scroll 0 2
}
}
</pre><hr />