Quake3World.com Forums
     Programming Discussion
        Quake 3 Explosion Shader is Choppy


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Quake 3 Explosion Shader is Choppy

Grunt
Grunt
Joined: 27 Oct 2010
Posts: 71
PostPosted: 10-03-2012 12:59 PM           Profile Send private message  E-mail  Edit post Reply with quote


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:
Image


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 10-03-2012 01:17 PM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Grunt
Grunt
Joined: 27 Oct 2010
Posts: 71
PostPosted: 10-03-2012 02:27 PM           Profile Send private message  E-mail  Edit post Reply with quote


:tard: Yeah. Here is the shader:
Code:
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:
Image


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 10-03-2012 03:03 PM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Grunt
Grunt
Joined: 27 Oct 2010
Posts: 71
PostPosted: 10-03-2012 03:18 PM           Profile Send private message  E-mail  Edit post Reply with quote


I already tried adding 8 frames, the last 3 just being black. It didn't work. I'll try lowering the frequency.



_________________
My Website:
Image


Top
                 

Grunt
Grunt
Joined: 27 Oct 2010
Posts: 71
PostPosted: 10-03-2012 03:24 PM           Profile Send private message  E-mail  Edit post Reply with quote


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:
Image


Top
                 

Grunt
Grunt
Joined: 27 Oct 2010
Posts: 71
PostPosted: 10-03-2012 04:47 PM           Profile Send private message  E-mail  Edit post Reply with quote


Ok I fixed it. It was something with the shader. This is what I had:

Code:
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:
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:
Image


Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.