Page 1 of 1

Quake 3 Explosion Shader is Choppy

Posted: Wed Oct 03, 2012 8:59 pm
by gooball :D
Hey, I've been working on a new explosion shader for a new weapon in my mod, but the explosion is choppy, not smooth like the RL and GL explosions. Any ideas?

Re: Quake 3 Explosion Shader is Choppy

Posted: Wed Oct 03, 2012 9:17 pm
by obsidian
Might be useful if you had posted the shader you are using. :dork:

Also, if you are creating an entirely new weapon (as opposed to modifying the existing RL/GL), I suppose the textures need to be cached into memory as explained in your other thread. Otherwise, the game might have to read and load each frame which can explain the choppiness.

Re: Quake 3 Explosion Shader is Choppy

Posted: Wed Oct 03, 2012 10:27 pm
by gooball :D
:tard: Yeah. Here is the shader:

Code: Select all

stingerExplosion
{
	cull disable
	{
		animmap 5 models/weaphits/stboom/stboom_1.tga  models/weaphits/stboom/stboom_2.tga models/weaphits/stboom/stboom_3.tga models/weaphits/stboom/stboom_4.tga models/weaphits/stboom/stboom_5.tga
		rgbGen wave inversesawtooth 0 1 0 5
		blendfunc add
	}
	{
		animmap 5 models/weaphits/stboom/stboom_1.tga models/weaphits/stboom/stboom_2.tga models/weaphits/stboom/stboom_3.tga models/weaphits/stboom/stboom_4.tga models/weaphits/stboom/stboom_5.tga gfx/colors/black.tga
		rgbGen wave sawtooth 0 1 0 5
		blendfunc add
	}
}
Also, here are the 5 explosion sprites:
Image

Image

Image

Image

Image

Re: Quake 3 Explosion Shader is Choppy

Posted: Wed Oct 03, 2012 11:03 pm
by obsidian
The original uses 8 frames while you have 5, probably why it's choppy. Either add more frames or try lowering the frequency value and see if that helps.

Re: Quake 3 Explosion Shader is Choppy

Posted: Wed Oct 03, 2012 11:18 pm
by gooball :D
I already tried adding 8 frames, the last 3 just being black. It didn't work. I'll try lowering the frequency.

Re: Quake 3 Explosion Shader is Choppy

Posted: Wed Oct 03, 2012 11:24 pm
by gooball :D
Well lowering the frequency didn't help. I noticed if I replace the default rlboom textures with mine, its smooth as the others.

Re: Quake 3 Explosion Shader is Choppy

Posted: Thu Oct 04, 2012 12:47 am
by gooball :D
Ok I fixed it. It was something with the shader. This is what I had:

Code: Select all

stingerExplosion
{
   cull disable
   {
      animmap 5 models/weaphits/stboom/stboom_1.tga  models/weaphits/stboom/stboom_2.tga models/weaphits/stboom/stboom_3.tga models/weaphits/stboom/stboom_4.tga models/weaphits/stboom/stboom_5.tga
      rgbGen wave inversesawtooth 0 1 0 5
      blendfunc add
   }
   {
      animmap 5 models/weaphits/stboom/stboom_1.tga models/weaphits/stboom/stboom_2.tga models/weaphits/stboom/stboom_3.tga models/weaphits/stboom/stboom_4.tga models/weaphits/stboom/stboom_5.tga gfx/colors/black.tga
      rgbGen wave sawtooth 0 1 0 5
      blendfunc add
   }
}
I changed it to:

Code: Select all

stingerExplosion
{
   cull disable
   {
      animmap 5 models/weaphits/stboom/stboom_1.tga  models/weaphits/stboom/stboom_2.tga models/weaphits/stboom/stboom_3.tga models/weaphits/stboom/stboom_4.tga models/weaphits/stboom/stboom_5.tga
      rgbGen wave inversesawtooth 0 1 0 5
      blendfunc add
   }
   {
      animmap 5 models/weaphits/stboom/stboom_2.tga models/weaphits/stboom/stboom_3.tga models/weaphits/stboom/stboom_5.tga models/weaphits/stboom/stboom_5.tga gfx/colors/black.tga
      rgbGen wave sawtooth 0 1 0 5
      blendfunc add
   }
}
Notice the second section.

Thanks for all the help :D (mainly Obsidian)!