With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Old WQ3 forum - archived. Links may not work.

Custom shaders and paths?

Postby Breli » Sun Sep 11, 2005 8:22 pm

Hi fellas,

I have a problem with shaders of my custom textures. Some of them are supposed to have transparent areas. I created the tga with Photoshop and added an alpha channel. The texture is stored in baseq3/textures/wq_breli. The shader in baseq3/scripts/breli.shader and included in the shaderlist.txt. I can use the texture in Radiant and when viewing it with q3ase (BTW: excellent program, I recommend it!) everything seems to be fine.

This is the shader code:

Code: Select all
textures/wq_breli/tex {
   surfaceparm alphashadow
   surfaceparm nolightmap
   surfaceparm nomarks
   surfaceparm nonsolid
   surfaceparm trans
   cull disable
   nopicmip
   {
      map wq3_breli/tex.tga
      rgbGen identity
      depthWrite
      alphaFunc GT0
   }
   {
      map $lightmap
      blendfunc filter
      rgbGen identity
      tcGen lightmap
      depthFunc equal
   }
}


The texture is not displayed correctly in the game and I don't know why. The areas that are supposed to be transparent are just black. I basically copied the shader definition from other shaders. Additionally, the "simple" directives do not work either (like nomarks). So I think the shader is ok but, apparently, the engine can't find the shader. I tried to copy the shader into westernq3\scripts. That doesn't help either.

Any ideas? What do I do wrong?

cheers

Breli
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby ReD NeCKersoN » Mon Sep 12, 2005 12:35 am

This is a little over my head but I remember a thread over at the mapcenter forum discussing this very thing. Try searching over there for "transparent" and "black" or "dark".
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Re: Custom shaders and paths?

Postby El vAkonD » Mon Sep 12, 2005 4:31 pm

Breli, try to compile the map with the newest original q3map2. You can find it somewhere on the splashdamage.com. Maybe it's my version fault. Please tell me if it works.
El vAkonD
SG Team
 
Posts: 68
Joined: Mon Jul 11, 2005 2:25 pm
Location: Várpalota, Hungary



Postby Breli » Mon Sep 12, 2005 4:49 pm

Hi El,

I don't think that my problem has something to do with your changes but I'll try anyway. Thanks for pointing that out. I tried with the old version of q3map and got the same result.

cheers

breli

P.S.: Good to have you back in the fray ;)
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby L3th4l » Mon Sep 12, 2005 10:13 pm

Send me your texture and I will get it working.. Then I will tell you what I did.
I used your shader on my own texture and it works fine, so the problem isn't your shader...
User avatar
L3th4l
Smokin' Amigo!
 
Posts: 1948
Joined: Sat Jun 18, 2005 8:06 am
Location: Binghamton, NY. USA



Postby Breli » Thu Sep 22, 2005 8:38 am

Well, I figured it out. I didn't apply the SHADER to my brush. Instead I "painted" it with the "normal" texture in my folder. Thus, it is no wonder that q3map couldn't find my fancy shader ... quite embarrassing :D

*Slamming_my_head_on_the_desk*

*Brett_vorm_kopf_gehabt_hab*

At least, there I have a learning progress. Now I can make and use all the fancy textures I want to have.

8)

breli
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



opacity, transparent and alpha textures

Postby cw bebop » Thu Dec 14, 2006 10:05 pm

hi guys :)
Well i meet the problem to use a texture with transparent areas such as a simple grass. I made a 32 bits TGA file for texture contening alpha channel, when importing in Milkshade 3D, no problem to see throught what supposed to be transparent.
Importing my "model" in GTKRadiant, no transparency at all, so my question is, what is the thing i ignore, i know there is something about "shader", how to make the right one, is there any simple exemple for my simple problem ?
Can someone help me, i'am totaly stuck about that...

Thanx for any explanation ;)
cw bebop
Newcomer
 
Posts: 4
Joined: Mon Sep 18, 2006 1:26 pm



Postby ReD NeCKersoN » Fri Dec 15, 2006 2:28 am

You will need a "yourmapname.shader" file for your map with information for your texture in there. You can do this with a text editor like Notepad. You will also need to add "yourmapname" to the shaderlist.txt located in the scripts folder. You can open any of the wq3 maps with an unzipping utitlity and look at the contents for examples.

The Shader Manual can help you understand shaders but it gets technical at times.
Here's another link you can look at that might help.

I wish I could be more help but I like making geometry & hate messing with shaders. :? Maybe someone else here can explain it better. Oh, welcome to the WQ3 forums. :wink:
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



tranparency, alpha texture, shader

Postby cw bebop » Fri Dec 15, 2006 10:40 am

thanx ReD NeCKersoN this helps a lot ;)
I understand now what i have to deal with. I opened a "Script" file in a PK3 file from WQ3 directory and i think i will figure out what i need to do for my models.

I soon will launch a new version of my website where i made few pages dedicated toWQ3. I planed to fill those pages with free ready-to-use-models (md3 files), and tutorials, about all i had to deal, means :

1) Exporting .MAP from modeling software.
2) Converting in MD3, managing textures of models.
3) Importing and settings for models in GTKRadiant.

thank you very much again ;)
cw bebop
Newcomer
 
Posts: 4
Joined: Mon Sep 18, 2006 1:26 pm



Re: tranparency, alpha texture, shader

Postby ReD NeCKersoN » Fri Dec 15, 2006 3:45 pm

cw bebop wrote:I soon will launch a new version of my website where i made few pages dedicated to WQ3. I planed to fill those pages with free ready-to-use-models (md3 files), and tutorials

WOW! When do you think your website will be ready? Maybe with your tutorials I might try to learn how to make models. This is very cool news for WQ3 fans. 8) I can't wait to see it! :D
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



free models

Postby cw bebop » Sat Dec 16, 2006 10:42 am

I work hard for launching my website, it takes time cause i'am so tired when i get home :)
I planed to give for free any model i will make, but no tutorial about modeling, sorry about this, it is too big-time-consuming for now.

My tutorial will explain as clear as possible, what i figured out myself, so i think despite of my efforts, some questions wil remain ;)
But i will tell how to export your .md3 from your favorite 3D software, how to use texture and export your model for Quake 3 game, then how to manipulate this model in GTKRadiant to have a nice scene as final outcome :)

So i go back working, week-ends are short....;)

see ya !
cw bebop
Newcomer
 
Posts: 4
Joined: Mon Sep 18, 2006 1:26 pm




Return to Editor's Forum

Show Sidebar
Show Sidebar

User Control Panel

cron