Author Topic: Flame Animation  (Read 2547 times)

WarWulf

  • Guest
Flame Animation
« on: January 31, 2006, 10:30:12 AM »
jitspoe i dont remember if in the ub_texture folder i sent you, if u saw the flame textures i had. i was wondering if their was a shader\rscript to help me out with getting it animated? ;)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Flame Animation
« Reply #1 on: January 31, 2006, 12:13:26 PM »
Code: [Select]
scriptname
{
subdivide <size>
vertexwarp <speed> <distance> <smoothness>
safe
{
map <texturename>
scroll <xtype> <xspeed> <ytype> <yspeed>
scale <xtype> <xspeed> <ytype> <yspeed>
blendfunc <source> <dest>
alphashift <speed> <min> <max>
anim <delay> <tex1> <tex2> <tex3> ... end
envmap
alphamask
}
}

So in your case, something like...

Code: [Select]
textures/ub/flame1
{
{
map textures/ub/flame1.jpg
blendfunc GL_ONE GL_ONE
anim 0.03
textures/ub/flame1.jpg
textures/ub/flame2.jpg
textures/ub/flame3.jpg
textures/ub/flame4.jpg
end
}
}

I'm not sure what the actual texture names are offhand, and I haven't tested this, but it should work.

Be sure to add the script into the "requiredfiles" in your worldspawn, so it will download when people download the map.

WarWulf

  • Guest
Re: Flame Animation
« Reply #2 on: February 01, 2006, 06:24:58 PM »
sweet jitspoe thnx a bunch, now i just have to wait for my pc to get back from compaq i fried my mother board 2 times in the last 2 months if it frys again i get a new pc free   8)

Eiii

  • Autococker
  • Posts: 4595
Re: Flame Animation
« Reply #3 on: February 01, 2006, 07:33:34 PM »
That script doesn't work for me.
I'm just testing it by making the barrels in midnight switch baaaack and forth...
But the barrels always turn solid pink/blue, depending on what color they are.
I think it's taking the average of what texture I'm trying to get on it...

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Flame Animation
« Reply #4 on: February 01, 2006, 09:52:00 PM »
That's probably because it's doing additive blending, which you'd want for something like fire, but wouldn't make sense for solid objects.  It could also be switching so fast that you just see the average color.

Eiii

  • Autococker
  • Posts: 4595
Re: Flame Animation
« Reply #5 on: February 03, 2006, 05:32:49 PM »
I slowed it down so that I could see it switch, but it still didn't work.

Whoop, made it work. Apparantly, using 'map' messes up anim and stuff.

Hey, you know what would be fun? Wildcards in rsrcipts.
Make EVERYTHING envmap.