[Solved] Pulsating texture?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

[Solved] Pulsating texture?

Post by Bjarne BZR »

I have tried to create a regular texture with the same pulsating behaviour as an un-set bomb, but I cant get it to work... anybody know what I'm doing wrong?

The shader:

Code: Select all

vemork/pulsating
{
	qer_editorimage textures/vemork/pulse_editor.tga
	{ // pulsating layer
		map textures/vemork/pulse.tga
		blendFunc GL_SRC_ALPHA GL_ONE // this is an additive blend that uses alpha
		rgbGen wave sin 0.25 0.25 0 0.75
		alphaGen distFade 1024 512 // this makes the pulsating fade when you go away from it
	}
}
A pk3 containing the texture here.
Last edited by Bjarne BZR on Sat Sep 06, 2003 10:35 pm, edited 1 time in total.
Admin .MAP Forums
Image
Head above heels.
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

I dont know that looks as if it was directly from the original shader.

Here is an example of a pulse i used for a custom skin i did:

Code: Select all

fett_helmet
{
	qer_editorimage textures/random/fett_helmet.tga
	{
		map textures/random/fett_helmet.tga
		rgbGen lightingSpherical
	}
	{ // pulsating layer
		map textures/random/fett_helmet_pulse.tga
		blendFunc GL_SRC_ALPHA GL_ONE 
		rgbGen wave sin 0.25 0.25 0 0.75
		alphaGen distFade 1024 512 
	}
}
In this skin the eyes and the temples pulse from light to dark.

Only slight difference but that is due to the fact that you didnt put a base texture underneath the pulse texture. But if you are going for the glowing red look all on its own i am not sure.

maybe try this:

Code: Select all

vemork/pulsating 
{ 
        qer_editorimage textures/vemork/pulse_editor.tga 
        { 
    	     map textures/vemork/pulse_editor.tga 
	     rgbGen lightingSpherical
         }
         { 
                     map textures/vemork/pulse.tga 
                     blendFunc GL_SRC_ALPHA GL_ONE
                     rgbGen wave sin 0.25 0.25 0 0.75 
                     alphaGen distFade 1024 512 
        } 
}
Also double check shaders, spelling, and folders.

I have made those errors many times while trying to create custom textures.

Hope this helps somehow.
Moderator
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Found it!

Code: Select all

textures/vemork/pulsating
{
	qer_editorimage textures/vemork/editor_pulsating.tga
	{ // pulsating layer
		map textures/vemork/pulsating.tga
		blendFunc GL_SRC_ALPHA GL_ONE // this is an additive blend that uses alpha
		rgbGen wave sin 0.25 0.25 0 0.75
		alphaGen distFade 1024 512 // this makes the pulsating fade when you go away from it
	}
}
...basically its the same shader, its just that I changed the name from "vemork/pulsating" to "textures/vemork/pulsating" :oops:
Admin .MAP Forums
Image
Head above heels.
Post Reply