Changing weapon effects in Quake 3 Arena


#1

I am a big fan of Quake 3 Arena and recently discovered the test version. The plasma gun appearance and blast pattern are different in the test and retail versions so I have been working on making the necessary changes so the plasma gun in my game looks like the test version’s.

This is what the test plasma blast looks like

The gun appearance and plasma sprite are good on my game… that’s just replacing some files. For the plasma blast on the wall, I have to change some code in the shader files. I’m learning about writing shader files as I go along but I wanted to reach out for some help/advice.

Retail Quake 3 uses animmap to draw many of the blast effects while test Quake 3 does not. I think that I’m pretty close to matching the test version but it looks a little off. The test version’s is smoother as it changes through the tga files.

These are the files that make the blast effect in the test version:
ring01_1.tga
ring02.md3
ring02_1.tga
ring02_2.tga
ring02_3.tga
ring02_4.tga

This is what I have so far

I included code snippets below. I appreciate any changes you would make to the code I wrote for the effect or suggestions. Thank you!

Quake 3 Test Plasma Gun Blast:

ring1
{
	sort additive
	{
		map models/weaphits/ring02_1.tga
		rgbGen oneMinusEntity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/ring02_2.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
ring2
{
	sort additive
	{
		map models/weaphits/ring02_2.tga
		rgbGen oneMinusEntity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/ring02_3.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
ring3
{
	sort additive
	{
		map models/weaphits/ring02_3.tga
		rgbGen oneMinusEntity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/ring02_4.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable

}
ring4
{
	sort additive
	{
		map models/weaphits/ring02_4.tga
		rgbGen oneMinusEntity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}

This is the code I wrote:

plasmaExplosion
{
	sort additive

	{
	animmap 8 models/weaphits/ring02_1.tga models/weaphits/ring02_2.tga models/weaphits/ring02_3.tga models/weaphits/ring02_3.tga models/weaphits/ring02_4.tga models/weaphits/ring02_4.tga
	rgbGen wave inversesawtooth 0 1 0 2.3
	blendfunc GL_ONE GL_ONE
	}

	{
	animmap 8 models/weaphits/ring02_2.tga models/weaphits/ring02_3.tga models/weaphits/ring02_3.tga models/weaphits/ring02_4.tga models/weaphits/ring02_4.tga gfx/colors/black.tga
	rgbGen wave inversesawtooth 0 1 0 2.4
	blendfunc GL_ONE GL_ONE
	}

	{
	animmap 8 models/weaphits/ring02_1.tga models/weaphits/ring02_2.tga models/weaphits/ring02_3.tga models/weaphits/ring02_3.tga models/weaphits/ring02_4.tga models/weaphits/ring02_4.tga
	rgbGen wave sawtooth 0 1 0 2.3
	blendfunc GL_ONE GL_ONE
	}

	{
	animmap 8 models/weaphits/ring02_2.tga models/weaphits/ring02_3.tga models/weaphits/ring02_3.tga models/weaphits/ring02_4.tga models/weaphits/ring02_4.tga gfx/colors/black.tga
	rgbGen wave sawtooth 0 1 0 2.4
	blendfunc GL_ONE GL_ONE
	}
		
	cull disable
}

Just for reference, I will include the code for the rocket launcher blast from both games. The blast is very similar in the test and retail so that’s how I went about writing my effect.

Quake 3 Test Rocket Launcher Blast:

rlboom_1
{
	sort additive
	{
		map models/weaphits/rlboom/rlboom_1.tga
		rgbGen oneminusentity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/rlboom/rlboom_2.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
rlboom_2
{
	sort additive
	{
		map models/weaphits/rlboom/rlboom_2.tga
		rgbGen oneminusentity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/rlboom/rlboom_3.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
rlboom_3
{
	sort additive
	{
		map models/weaphits/rlboom/rlboom_3.tga
		rgbGen oneminusentity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/rlboom/rlboom_4.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
rlboom_4
{
	sort additive
	{
		map models/weaphits/rlboom/rlboom_4.tga
		rgbGen oneminusentity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/rlboom/rlboom_5.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
rlboom_5
{
	sort additive
	{
		map models/weaphits/rlboom/rlboom_5.tga
		rgbGen oneminusentity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/rlboom/rlboom_6.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
rlboom_6
{
	sort additive
	{
		map models/weaphits/rlboom/rlboom_6.tga
		rgbGen oneminusentity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/rlboom/rlboom_7.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
rlboom_7
{
	sort additive
	{
		map models/weaphits/rlboom/rlboom_7.tga
		rgbGen oneminusentity
		blendfunc GL_ONE GL_ONE
	}
	{
		map models/weaphits/rlboom/rlboom_8.tga
		rgbGen entity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}
rlboom_8
{
	sort additive
	{
		map models/weaphits/rlboom/rlboom_8.tga
		rgbGen oneminusentity
		blendfunc GL_ONE GL_ONE
	}
	cull disable
}

Quake 3 Retail Rocket Launcher Blast:

    rocketExplosion
    {
    	cull disable
    	{
    	animmap 8 models/weaphits/rlboom/rlboom_1.tga models/weaphits/rlboom/rlboom_2.tga models/weaphits/rlboom/rlboom_3.tga models/weaphits/rlboom/rlboom_4.tga models/weaphits/rlboom/rlboom_5.tga models/weaphits/rlboom/rlboom_6.tga models/weaphits/rlboom/rlboom_7.tga models/weaphits/rlboom/rlboom_8.tga
    	rgbGen wave inversesawtooth 0 1 0 8
    	blendfunc add
    	}
    	{
    	animmap 8 models/weaphits/rlboom/rlboom_2.tga models/weaphits/rlboom/rlboom_3.tga models/weaphits/rlboom/rlboom_4.tga models/weaphits/rlboom/rlboom_5.tga models/weaphits/rlboom/rlboom_6.tga models/weaphits/rlboom/rlboom_7.tga models/weaphits/rlboom/rlboom_8.tga gfx/colors/black.tga
    	rgbGen wave sawtooth 0 1 0 8
    	blendfunc add
    	}
    }