Shader to a gun -1 reply

Please wait...

Posezion

The forums staffers think I'm Cool

50 XP

10th March 2008

0 Uploads

178 Posts

0 Threads

#1 9 years ago

Hey... I've made a flame thrower and I can't seem to get any shaders to work for it, nor for a Jet that I modeled... How do I shader for models? At the moment this is what I have for an animap and to get rid of black surfaces for the flame thrower... Here's an image http://screenshot.xfire.com/screenshot/large/85a0a120c535145ea22baf36a88d770ef72c071a.jpg And here's the shader models/weapons2/bowcaster/flame { qer_editorimage models/weapons2/bowcaster/flame q3map_lightimage models/weapons2/bowcaster/flame surfaceparm trans surfaceparm nomarks surfaceparm nolightmap cull none q3map_surfacelight 500 { animMap 14 models/weapons2/bowcaster/flame models/weapons2/bowcaster/flame2 models/weapons2/bowcaster/flame3 models/weapons2/bowcaster/flame4 models/weapons2/bowcaster/flame5 models/weapons2/bowcaster/flame2 models/weapons2/bowcaster/flame4 models/weapons2/bowcaster/flame3 blendFunc GL_SRC_ALPHA GL_ONE rgbGen wave sin 1 0.5 0 40 } }

Help? Basically I have a flame (on the jet and flame thrower) where I want an animap (just for the flame thrower) and for the black on the flames to be see-through (on jet and flame thrower).




NeoMExelor

Im...Teh Neo?

50 XP

25th October 2005

0 Uploads

103 Posts

0 Threads

#2 9 years ago

Where'd you get that HUD from?




Posezion

The forums staffers think I'm Cool

50 XP

10th March 2008

0 Uploads

178 Posts

0 Threads

#3 9 years ago

Haha... It's a total conversion me and the team I'm in are working on... The mod is called "Manhunt Mod". It was released a year ago but immediately removed due to ported models due to lack of suppliers... A year later lil' ol' Zero came along and decided to bring back the mod team. Since then we've gotten MUCH more improvements (Coding and graphically).

So yeah -- You can download the mod if you want... It'll be in beta and you won't get all the current updates (Unless your interested and want our x-fires and want to help or something :D)




Posezion

The forums staffers think I'm Cool

50 XP

10th March 2008

0 Uploads

178 Posts

0 Threads

#4 9 years ago

Come on, Anyone?




AshuraDX

WTF ?! BOOOOOOOM !

50 XP

10th May 2009

0 Uploads

1,462 Posts

0 Threads

#5 9 years ago

well I dont have any experience with animated shaders i can easily create glow,environment,specularity and scrolling shaders but animated :uhm:

I might be able to do something if you send me the pk3 file If you do so i'll help you and delete it after mthat if you want me to delete it




Posezion

The forums staffers think I'm Cool

50 XP

10th March 2008

0 Uploads

178 Posts

0 Threads

#6 9 years ago

Well I don't care if you delete it or not mainly because we will release it to public in a month or 2 (The mod that is)...

Want me to send via e-mail?

Got x-fire?: 9099zero




AshuraDX

WTF ?! BOOOOOOOM !

50 XP

10th May 2009

0 Uploads

1,462 Posts

0 Threads

#7 9 years ago

Posezion;4929035Well I don't care if you delete it or not mainly because we will release it to public in a month or 2 (The mod that is)...

Want me to send via e-mail?

Got x-fire?: 9099zero

well add me to MSN if you have it : [email]ashuradx@live.de[/email] then I can send it faster and no i dont have xfire I might install when i install SWBF2 again




Pande

Sexeh like teh gizmo

50 XP

9th April 2008

0 Uploads

610 Posts

0 Threads

#8 9 years ago

First of all, you've used a jpeg image I presume? (for the flame) If so, your going to get infinately better results using

blendfunc GL_ONE GL_ONE

or in shorthand,

blendfunc add

That will eliminate the color black, but in a soft way unlike AlphaFunc GE128. Areas in the image that fade to black will fade to transparency ingame.

models/weapons2/bowcaster/flame { qer_editorimage models/weapons2/bowcaster/flame q3map_lightimage models/weapons2/bowcaster/flame surfaceparm trans surfaceparm nomarks surfaceparm nolightmap cull none q3map_surfacelight 500 { animMap 14 models/weapons2/bowcaster/flame models/weapons2/bowcaster/flame2 models/weapons2/bowcaster/flame3 models/weapons2/bowcaster/flame4 models/weapons2/bowcaster/flame5 models/weapons2/bowcaster/flame2 models/weapons2/bowcaster/flame4 models/weapons2/bowcaster/flame3 blendFunc GL_SRC_ALPHA GL_ONE rgbGen wave sin 1 0.5 0 40 } }

Your previous blendfunc was trying to grab alpha data (GL_SRC_ALPHA) and multiply it by zero (GL_ZERO). Since you had no alpha, it wasn't doing anything.

Blendfuncs are simpler than you think really. :)

Blendfunc (the function) GL_SRC_ALPHA (the 'source', notice the SRC) GL_ZERO (the 'destination')

GL_ZERO means 0 pretty much, and can be used as a destination for any source to make it clear.




Posezion

The forums staffers think I'm Cool

50 XP

10th March 2008

0 Uploads

178 Posts

0 Threads

#9 9 years ago

models/weapons2/bowcaster/flame { qer_editorimage models/weapons2/bowcaster/flame q3map_lightimage models/weapons2/bowcaster/flame surfaceparm trans surfaceparm nomarks surfaceparm nolightmap cull none q3map_surfacelight 500 { animMap 14 models/weapons2/bowcaster/flame models/weapons2/bowcaster/flame2 models/weapons2/bowcaster/flame3 models/weapons2/bowcaster/flame4 models/weapons2/bowcaster/flame5 models/weapons2/bowcaster/flame2 models/weapons2/bowcaster/flame4 models/weapons2/bowcaster/flame3 blendFunc GL_SRC_ALPHA GL_ONE rgbGen wave sin 1 0.5 0 40 } } did not work...

Ima just send toyou via MSN, Ash




AshuraDX

WTF ?! BOOOOOOOM !

50 XP

10th May 2009

0 Uploads

1,462 Posts

0 Threads

#10 9 years ago

kk did you use the text editor to write the shader ? i got the shader editing tool maybe I'll find the reason why it doenst work with the editor