Adding effects to a texture via shader? -1 reply

Please wait...

Mikouen VIP Member

What?

145,652 XP

4th September 2005

4 Uploads

11,732 Posts

2 Threads

#1 12 years ago

Stupid question, but hey, I'm a newb, gimme a break. :p

Before I go any further, I should mention that I know next to nothing about shaders, and frankly, to me the shader manual in the Master Sticky looks like it was written on St. Patrick's Day. In colorfully-translated Romaji. :uhoh:

Anyway, my story is that I'd like an electrical effect to cover a wall in a map. At first I tried making brushes using the effect I wanted (the electrical texture, cfield from the doomgiver texture set), and placing these small brushes just in front of the wall.

It sorta :Censored: up the map, big time. The whole thing gave the weird glitch you get when you look out into the void.

So, Plan B - is it possible for me to add that electrical effect to the wall texture via shaders? And if so, any clue on how?


I don't know how, and I don't know why, but this is totally Sheep's fault.



Inyri Forge VIP Member

[Insert User Title Here]

55 XP

15th March 2005

0 Uploads

25,940 Posts

0 Threads

#2 12 years ago

The easiest way to do that would be to find the shader that creates the effect on cfield (if that's the one you want) and make a copy of it with your texture's pathways instead.




Mikouen VIP Member

What?

145,652 XP

4th September 2005

4 Uploads

11,732 Posts

2 Threads

#3 12 years ago

Not entirely sure that will work, because this...

textures/doomgiver/cfield { qer_editorimage textures/cairn/lightning3 surfaceparm nomarks surfaceparm forcefield q3map_nolightmap { map textures/cairn/lightning3 blendFunc GL_ONE GL_ONE glow rgbGen wave sin 0 0.5 0 1 tcMod stretch sin 0 0.1 0 1 tcMod scroll 0 5 tcMod scale 0.1 0.1 } { map textures/cairn/lightning3 blendFunc GL_ONE GL_ONE glow rgbGen wave sin 0 0.5 0.3 1 tcMod stretch sin 0 0.1 0.7 1 tcMod scroll 0 -5 tcMod scale 0.3 0.3 } { map textures/cairn/lightning3 blendFunc GL_ONE GL_ONE glow rgbGen wave sin 0 0.5 0.7 1 tcMod scroll 5 0 tcMod stretch sin 0 1 0 1 tcMod scale 0.3 0.3 } }

...is the shader in question, and I think it's projecting a texture and then scrolling it to give a movement effect. If that's right, then wouldn't it merely scroll the wall texture instead of add the electrical effect?

(This is the texture it points to, just in case you wondered...)

Spoiler: Show
lightning31io.jpg

Still, I may be wrong, so I'll test that out and if it's a no-go, I'll just edit this post.

EDIT: Well, it worked. Sort of. It didn't add the electrical effect, but it did make some pretty sparks.

No matter though, I found a base texture which is similar to what I wanted to use, and has a pulsating blue effect over it already.

Thanks for helping though. :)


I don't know how, and I don't know why, but this is totally Sheep's fault.



Inyri Forge VIP Member

[Insert User Title Here]

55 XP

15th March 2005

0 Uploads

25,940 Posts

0 Threads

#4 12 years ago

Hm, well that shader may not be quite what you're looking for. I know there's a pipe texture that has a similar effect, while still showing the normal texture underneath. Sounds like the one you're using has no base texture and just has the electrical effect.