people playing: 75, servers online: 22, games played: 144,247,148 Top Player: Gentleman

  Toribash Community » Help » Tutorials
Register FAQ General Rules Community
Reply
 
Thread Tools Display Modes
Old May 7, 2008   #1
Blam
Now I know my abc's!
This user title is the property of SkulFuk.
 
4th Dan Black Belt
Join Date: Apr 2007
Posts: 5,510
Clan: bncy



A guide to making shaders :D
In this tutorial i will be explaining all of the currently editable shader values. ( as of 7th May 08 )
Before we get to see a shader code let me explain 2 key things:
  1. The colours used arnt all in R,G,B some are in BGR.
  2. The colours arnt in 255,255,255 format, they are in 1 1 1 format (to change from 255 to 1 you simply divide the numbers by 255 )
Here is a demo of a rather ugly looking shader, that is all blue, with mostly white text:
Code:
background_color 0.00 0.00 1.00 mirror_color 0.00 0.00 1.00 floor_color 0.00 0.00 1.00 sunshine_color 0.00 0.00 1.00 ambient_color 0.60 0.60 1.00 fog_distance 87.40 sharp_shadow 1 sky_on 1 ambient_light_dir 0.59 0.57 0.57 sun_light_dir 0.19 0.95 0.23 sunbeam_color 1.00 0.00 0.00 sun_color 1.00 0.00 0.00 sky_color 1.00 0.00 0.00 polar_light_color 1.00 0.00 0.00 polar_light_dir 0.42 0.43 0.80 sky_blend_power 0.98 text 1.00 1.00 1.00 text_bg 0.50 0.50 0.50 text_sel 0.70 0.70 1.00 text_disabled 0.50 0.50 0.50 menu_text 1.00 1.00 1.00 menu_text_bg 0.00 0.00 1.00 menu_text_sel 0.70 0.70 1.00 menu_text_disabled 0.50 0.50 0.50 msg_notype 0.83 0.61 0.31 msg_whisper 1.00 0.00 0.00 msg_server 0.69 0.40 0.99 msg_urlserver 1.00 1.00 1.00 msg_ingame 1.00 1.00 1.00 msg_gamurl 1.00 1.00 0.00 msg_user 1.00 1.00 1.00 msg_player 1.00 0.00 1.00 msg_url 1.00 0.00 1.00 msg_urlsel 1.00 0.00 1.00
Now you may be thinking OMGWTFBBQ?!?!
But let me break it down for you:

Code:
background_color R G B
This changes the fog colour of the shader or the sky colour of the shader (depending if sky_on is 1 or not).

Code:
mirror_color R G B
This changes the reflection colour, and also slightly changes the floor colour (seeing as the floor reflects the sky).

Code:
floor_color R G B
This will change the floor colour before reflection is added. This and mirror_color combine to edit the overall floor colour.

Code:
sunshine_color R G B
This changes the colour around the sun.

Code:
ambient_color R G B
This will change the general colour of the toris.

Code:
fog_distance A
The further away the fog, the less of the background_color you see. Changing A to a negative number can make snazzy effects.

Code:
sharp_shadow 0/1
0 = off, 1 = on.
if sharp shadow is on, the sunlight will have no effect, and there will be no big definitive shadow on the floor, only the soft shadow. This imo looks better, but sometimes you need to have the sunlight effecting the joints looks.

Code:
sky_on 0/1
again 0 = off, 1 = on.
Now if the sky is off, the background colour will be the sky colour, the sun will not be shown, and the sunlight will not effect the joints (as it doesnt exist :P)

Code:
ambient_light_dir A B C
this effects the direction of the ambient light, this has little effect, but sometimes can make a shader look that much better.

Code:
sun_light_dir A B C
This changes the position of the sun, therefore changing the place the sunlight hits the joint. This changes a shader GREATLY.

Code:
sunbeam_color B G R
Changes the colour of the joints where the sun hits.

Code:
sun_color B G R
This changes the colour of the actual sun and nothing else.

Code:
sky_color B G R
This changes the colour of sky. This and the background colour must be similar, else the shader will look horrible :P

Code:
polar_light_color B G R
The colour of the polar light. (no clue what polar light is in this case >.>. Someone needs to tell me )

Code:
polar_light_dir A B C
Changes the position of the polar light.

Code:
sky_blend_power A
Changes how well the fog and the sky blend in together.
put this to 0 for a crisp horizon, and 50 for a gradient-like horizon

Code:
text R G B text_bg R G B text_sel R G B text_disabled R G B
text = Changes the colour of the escape menu text, aswell as the text that shows on match ending and the "tip" text that shows at the bottom.
text_bg = the shadow on the menu text.
text_sel = the colour of the selected menu item.
text_disabled = any disabled menu items will be this colour (there is none at the moment, as all options are available to everyone).

Code:
menu_text R G B menu_text_bg R G B menu_text_sel R G B menu_text_disabled R G B
menu_text = The colour of the server menu's text.
menu_text_bg = The colour of the background of the server menu.
menu_text_sel = The colour of the selected server in the server menu.
menu_text_disabled = Any disabled servers will be this colour.

Code:
msg_notype R G B
Not too sure :P

Code:
msg_whisper R G B
No known effect.

Code:
msg_server R G B
Messages from the server will be this colour.
Example: Whispers/message of the day

Code:
msg_urlserver R G B
Url colour in server text. (like whispers n such :P)

Code:
msg_ingame R G B
echo colours. (an echo is like a notification from toribash itself, that shows in the text box. An example is when you go "/set" all of the text displayed there is echo text)

Code:
msg_user R G B
Chat text colour.

Code:
msg_player R G B
The chat colour of the person using the shader.

Code:
msg_url R G B
Chat URL colour.

Code:
msg_urlsel R G B
Colour of a URL that has been clicked.

----------------


Any questions/better descriptions/corrections post here
:D

Last edited by WorldEater; Nov 2, 2017 at 08:55 PM..
Blam is offline   Reply With Quote
Old May 7, 2008   #2
JDawg
:SOPD:GKLJSD:GHKj
 
5th Dan Black Belt
Join Date: Nov 2007
Posts: 2,383



Nice one, too long for me *cough* that's what she said *cough* but anyway, if I was interested at all in making shaders this would probably help a lot
Since when did I become Asian?
JDawg is offline   Reply With Quote
Old May 7, 2008   #3
Pirate_old
I LIKE DICKS
 
Modest Belt
Join Date: Aug 2007
Posts: 4,687



fyi, the only thing you had to figure out were the text colors, jam already made one like this for the different things :P
Pirate_old is offline   Reply With Quote
Old May 7, 2008   #4
Blam
Now I know my abc's!
This user title is the property of SkulFuk.
 
4th Dan Black Belt
Join Date: Apr 2007
Posts: 5,510
Clan: bncy



yeah but this is better and more descriptive :P
:D
Blam is offline   Reply With Quote
Old May 7, 2008   #5
D0R
Forumite
 
6th Dan Black Belt
Join Date: Dec 2007
Posts: 2,023



nice tut.


think i will try
My deviantART
so wut?
D0R is offline   Reply With Quote
Old May 10, 2008   #6
starrzz
Forumite
 
5th Dan Black Belt
Join Date: Aug 2007
Posts: 2,061



Nice tutorial, Blam strikes again!
starrzz is offline   Reply With Quote
Old May 10, 2008   #7
Notywq
ub3r
 
8th Dan Black Belt
Join Date: Nov 2007
Posts: 3,266



Very Nice Tut Blammy,You win nao :]
Some info :[clan] Look : IvoryStripe Click 8th Dan :p [I maek Art :D] -GATA-

Links to satisfy curiosity :
*UPDATED* GALLERY/ART/SKETCHES AND TAG REQUEST THREAD. :D <-- Check it out. :)
ToriART B&B GALLERY. <-- THE CLASSICS.
Notywq is offline   Reply With Quote
Old May 10, 2008   #8
SokuTofu
Member
 
3rd Dan Black Belt
Join Date: Mar 2008
Posts: 371



:o
this is great (b' ')b
<hanz0> Once upon a time... NUCLEAR WINTER!
<Iburnaga> I would suck to get anally raped. XD
SokuTofu is offline   Reply With Quote
Old Jul 10, 2008   #9
pntbller16
NON-EXISTING!
 
Black Belt
Join Date: May 2008
Posts: 5



Finally, something noobs like me can understand :-D now all i need to do is get good at the game...
pntbller16 is offline   Reply With Quote
Old Aug 2, 2008   #10
fudgestick
Junior Member
 
Blue Belt
Join Date: Jul 2008
Posts: 12



i might try sounds like a good result can be made from trying this nice and easy enuf to understand
fudgestick is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:40 PM.




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
ragdoll fighting game physics fighting game ragdoll fighting physics funmotion joints martial arts karate pc mac free game turn based game