Author : polygoo


Reply
Reply
 
Thread Tools Display Modes
leilei's Avatar
Old (#1)
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. [img]/images/graemlins/frown.gif[/img]

fine examples: Fires in Zelda64 (though alpha blend there), Gargantua fire/rocket trail in Half-Life.
fine. If you don't want me to do art, then I won't.
Offline , dedicated polycounter, 1,343 Posts, Join Date Sep 2007,  
   Reply With Quote

MoP's Avatar
Old (#2)
why not just use an animated texture? :O
Offline , MoP, 11,603 Posts, Join Date Oct 2004, Location London, UK  
   Reply With Quote

Eric Chadwick's Avatar
Old (#3)
I'd guess because animated textures eat up memory, scrollers don't.
Offline , Polycount.com Editor, 6,684 Posts, Join Date Oct 2004, Location Boston USA  
   Reply With Quote

Showster's Avatar
Old (#4)
What I would do is use particle studio, setup a decent fire texture and then setup a basic flickering fire emitter / smoke trail for instance.

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..../ps/index.html

It is basically the same as the UT sprite engine but without the useful UI and workflow lol.

Good luck

Greg
Offline , triangle, 356 Posts, Join Date Oct 2004, Location United Kingdom Staffordshire Send a message via ICQ to Showster Send a message via AIM to Showster Send a message via MSN to Showster  
   Reply With Quote

HarlequiN's Avatar
Old (#5)
http://www.bpeers.com/software/q3ase/
Offline , spline, 246 Posts, Join Date Oct 2004, Location Champaign IL  
   Reply With Quote

leilei's Avatar
Old (#6)
[ QUOTE ]
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!
fine. If you don't want me to do art, then I won't.
Offline , dedicated polycounter, 1,343 Posts, Join Date Sep 2007,  
   Reply With Quote

Xenobond's Avatar
Old (#7)
I have NEVER had any problems with q3ase when it came to doing shader work for ANY quake3 engine based game.

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.
Kurtis Smith
Senior Artist - Petroglyph Games
Offline , dedicated polycounter, 1,886 Posts, Join Date Nov 2005, Location Las Vegas, NV  
   Reply With Quote

leilei's Avatar
Old (#8)
aHA! Depthwrite is what I was looking for. I have to put the alpha blob on the FIRST layer however.

Thanks Xeno!
fine. If you don't want me to do art, then I won't.
Offline , dedicated polycounter, 1,343 Posts, Join Date Sep 2007,  
   Reply With Quote

HarlequiN's Avatar
Old (#9)
Q3ASE was written from the ground up specifically for Q3. That's why it's called *Q3*ASE [img]/images/graemlins/smile.gif[/img]

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.
Offline , spline, 246 Posts, Join Date Oct 2004, Location Champaign IL  
   Reply With Quote

leilei's Avatar
Old (#10)
for reference
<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 />
fine. If you don't want me to do art, then I won't.
Offline , dedicated polycounter, 1,343 Posts, Join Date Sep 2007,  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch