Quake 3 Explosion Shader is Choppy

Locked
gooball :D
Posts: 71
Joined: Wed Oct 27, 2010 10:27 am

Quake 3 Explosion Shader is Choppy

Post 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?
My Website:
[url=http://goostudios.weebly.com/][img]http://img839.imageshack.us/img839/2671/bg3t.png[/img][/url]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Quake 3 Explosion Shader is Choppy

Post 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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
gooball :D
Posts: 71
Joined: Wed Oct 27, 2010 10:27 am

Re: Quake 3 Explosion Shader is Choppy

Post 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
My Website:
[url=http://goostudios.weebly.com/][img]http://img839.imageshack.us/img839/2671/bg3t.png[/img][/url]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Quake 3 Explosion Shader is Choppy

Post 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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
gooball :D
Posts: 71
Joined: Wed Oct 27, 2010 10:27 am

Re: Quake 3 Explosion Shader is Choppy

Post 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.
My Website:
[url=http://goostudios.weebly.com/][img]http://img839.imageshack.us/img839/2671/bg3t.png[/img][/url]
gooball :D
Posts: 71
Joined: Wed Oct 27, 2010 10:27 am

Re: Quake 3 Explosion Shader is Choppy

Post 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.
My Website:
[url=http://goostudios.weebly.com/][img]http://img839.imageshack.us/img839/2671/bg3t.png[/img][/url]
gooball :D
Posts: 71
Joined: Wed Oct 27, 2010 10:27 am

Re: Quake 3 Explosion Shader is Choppy

Post 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)!
My Website:
[url=http://goostudios.weebly.com/][img]http://img839.imageshack.us/img839/2671/bg3t.png[/img][/url]
Locked