Jump to content

Home

Shaders for Idiots


Jedi_Vogel

Recommended Posts

Ok, I've just come back from doing a Google Search and LF search and I've only managed to come up with various versions of the Shader Manual.

 

Now, it's great and detailled and stuff, but I just don't seem to get it :D

 

Are there any beginners tutorials to shaders?

 

Apart from the Shader Manual (which says it's not a tutorial and wasn't intended to be), I found this

 

http://home.planet.nl/~monstrous/tutshader.html

 

But really wanna know how others learned shaders, because when I look at one, it's like another language to me :D

 

So any ideas or whatever would be great :)

Link to comment
Share on other sites

Steal! Pinch! Copy! Plagarise!

 

Find a shader you like the look of, open it in notepad to se how it's done. Master that one, then move onto another one.

 

With shaders, there is no quick and easy way. I use ShaderED which is *highly* frowned upon for some reason, but that offers a graphical display of your shader, and if you click the "animate" button, will show the effects you've created with it.

 

For the new and advanced features that Q3map2 implements you are going to have to get your hands dirty with notepad, so you may as well try and learn it the hard way.

Link to comment
Share on other sites

 

SNAP! Check out the reply for CG_carl's question - exactly the same links! It's amazing how much information is in these pages, providing you can translate it into plain, understandable English.

Link to comment
Share on other sites

I think Vogel wants something much more simple than these LINKS or the shader manual.

 

But like Codja said...clone some shaders to see what they do. Rename them and throw in your own textures, even if they are simple ones. That's what I did to learn shaders. Then later on I started to understand some of the dynamics involved.

 

ShaderED is really cool BTW.

 

Also, you will notice that the designers who came up with these shaders used key words to help us understand them.

 

Words like: scroll, glow, Blendfunc, nomarks,cull....etc.

Link to comment
Share on other sites

What Wedge said.

 

Lately I have noticed, be it for good or evil, that it actually is very important you know what each of the commands in your cannibalized shaders do. Sure, to a certain degree you can use them without knowing - I did that for a long time. But my last project taught me a hard lesson of the drawbacks of ignorance. The shaderlab's manual is a very nice tool in trying to understand the shader code (in addition to Leslie Judge).

Link to comment
Share on other sites

lol, caniballism it is then :D

 

I'll also try to make sense of the splash damage forum. And I'll take a look at ShaderEd and see where I get with that and the Shader Manual. :)

 

Thanks again people :)

 

[edit] Woah...ShaderEd is slightly...um...overwhelming *heads to google for ShaderEd tutorial as it doesn't have help file*

Link to comment
Share on other sites

If I remember correctly, the SDK should come with a shader MS word DOC file written by id Software that'll go through the basics with you.

 

It doesn't have any of the advanced features that have been recently introduced, but as the phrase goes - don't run before you can walk.

 

Try searching for shader*.doc on your PC

Link to comment
Share on other sites

I'm in work at the moment, so I can't send anything your way.

 

However! I can do the next best thing:

 

http://www.qeradiant.com/manual/Q3AShader_Manual/index.htm

 

This is an online version of that same file. The chances are you've already looked through it, but it's well worth just reading it from the beginning and just using trial and error to learn how to use the various effects.

 

That is probably the phrase that applies to everybody editing this game: Trial and Error! :)

Link to comment
Share on other sites

Yeah I have the Shader Manual and have for a while, but it says "This was never meant to be a tutorial" or something along those lines.

 

For me, it would be like trying to learn to speak Italian with just an Italian dictionary to hand, no teacher and no grammar book. lol

 

I'd like to figure out how to use ShaderEd, but it's a complicated interface. If Wade sees this he'll tell me to use Notepad, which would be the ideal IF I understood all the rest. :/

Link to comment
Share on other sites

ShaderEd does look bewildering to start with, but it really isn't that difficult.

 

Lets try getting a shader up and running for you. I'll have to use my extremely patchy and unreliable memory for this though.

 

1st thing: What are you trying to acheive with this shader?

 

What we'll do is get the basic shader setup.

 

Open shadered, right click on the yellow folder thing and click "add file", give it a name and then double click on it.

 

Click on the "stages" tab (ignore any error messages about nolightmap etc).

 

On the top left you'll have some arrows - you can use these to swap between stages - more on that later.

 

In the middle on the left, you should have an "add map" or "add texture map" or something like this.

 

Click on that, find the tga or jpg you want through the browser and voila - a basic shader. Doesn't do anything but it's a base to start from. (please correct me with the proper names of the buttons).

 

Now, if for example you want some of this shader to be transparent, you should have created an alpha channel for it (i'm am NOT going to go into that). If this is the case, click on the blending options button (or blending browser or whatever it's called), click the background button. You'll be shown a load of different blending options. Click the desired one and there you go.

 

Your 1st shader!

 

I know this is crap tutorial, but it's the best I can come up with without looking at the program itself.

Link to comment
Share on other sites

Does yf_marble2.jpg exist in the textures/spares directory?

 

Are you doing this in the stages tab?

 

If not, then save it there. Also, there should be a button next to where you specify the texture map - press this and a normal windows "Open" box should appear. Browse to the file and it should appear okay.

Link to comment
Share on other sites

I didn't call this thread "Shaders for Idiots" for no reason :D

 

Yes that file exists in the location I specified

 

Where's the "stages tab"? lol

 

I have a "window" on the left with a folder called "Base"

I right click it and select "Add Files"

I double-click "yf_marble2.jpg" in the textures/spares directory

 

I get the error.

 

Though if the "stages" tab exists I might be better off... I'm not seeing any "tabs" :/

Link to comment
Share on other sites

Ahhhh, I see now.

 

Right, what you need to do is "add folder" 1st, call it textures/spares.

 

Then, right click on the textures/spares folder and click "add file"

 

Double click on the marble file, and you'll see the main shader options pages.

Link to comment
Share on other sites

Bugger.

 

Okay, try this.

 

In your shaders folder, create a new text file. Rename it yourmapname.shader, open that in shaderED and try the Add file thing. Once you've give then shader a name (it doesn't have to be the same as the name of the texture) double click on that and see what comes up.

Link to comment
Share on other sites

Something must seriously be wrong here, because NOTHING what you're saying is working :/

 

I created yavinfort.shader

I added yavinfort to shaderlist.txt

I then followed your previous instructions and I STILL get the same error :(

 

Sorry about this Codja :/

Link to comment
Share on other sites

No problem. As I said, my memory isn't what it used to be.

 

Okay, try this. Get an existing JA shader, rename it and open that in ShaderED. Remove all the shaders bar one, rename that shader to one of your preference and double click on that and see what happens.

Link to comment
Share on other sites

OK we finally appear to be able edit stuff :D I have something to play with.

 

Ok, dumb question (though not as dumb as if I hadn't asked), when I apply that texture, is the shader automatically used, i.e. in game will I see the difference, or do I need to do something special to it?

 

Corto, as it was just an image, there was no need and I've just done what codja says and it looks like I can do stuff...I think :o

 

[edit] Only the subfolder reads textures/yavin and I can't rename it... should I post a screenie?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...