Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / ***Bootlicker's Complete Guide to Shaders***

Author
Message
Bootlicker
9
Years of Service
User Offline
Joined: 29th Mar 2009
Location: Germany
Posted: 11th Aug 2011 21:30 Edited at: 28th Aug 2011 01:59
***Bootlicker's Complete Guide to Shaders***


Hello all, hopefully this thread will help out a few people in getting shaders to work with any media that is not purchased shader ready.

Introduction


So basically a shader is an effect that is put on 3D meshes to create something a bit more pretty, it can add different effects to add more depth, shadows, illumination or make it react to light. All that good stuff that makes your games look more professional and increases the overall graphics quality.

Definition found on internet that non-nerds can understand: ‘An advanced 3D graphics feature used for ground-cast shadows, water ripples, bump mapping, and other pretty effects.’

Most shaders that are designed for FPS Creator use the following maps, although it is unlikely that a shader will use all of them, it will be covered later on how to tell which maps to create:

Diffuse (_D) : This is just the texture of the mesh which gives it colour and basically makes it look like the real object it represents.

Diffuse 2(_D2) : This is just a copy of the diffuse texture although it may be a darker or lighter version to create the illusion of different shades.

Normal (_N) : This is a map which tells the shader how to react to light in order to create an illusion of depth. This is useful for creating a more 3D looking mesh without adding unneeded polygons.

Illumination (_I) : This map tells the shader which parts of the texture to ‘light up’. This is good for creating effective light sources or computer screens etc.

Specular (_S) : This map adds a feel of realism, as it tells the shader how to alter the texture as it reacts to light. For example if you look at a shiny metal surface from several different angles different scratches may appear depending on the light angle. This is the illusion created with the specular map.

In order to create these maps you need an imagery editing software. The following methods to create maps are practiced in Adobe Photoshop CS4 although the same basic principles are used in all editing software. Here is a few which many forum users use in order to create the same effects:

http://www.gimp.org/

http://www.paint.net/






Finding Which Maps you Need


To find out which maps you need for a shader, navigate to the shader that you wish to use. They are located in:

C:\Program Files\The Game Creators\FPS Creator\Files\Effectbank


Once located, right click and select ‘open with’, then select ‘notepad’ from the list of programs provided. Somewhere near the top of the shader should be a description of what textures are needed. In Bond1’s shaders it will appear like this:

‘//Textures:
//"texture_D.dds" diffuse texture
//"texture_I.dd" specular texture
//"texture_N.dds" normal map texture’

From this I know that I need a diffuse, illumination and normal map in order to for the shader to function. If you are unable to locate this in the shader file, examine the textures for a mesh that already has the shader assigned in order to see which texture maps are there. If still facing difficulties post below and I will do my best to help.

The Cheat Way to Creating Maps


There are a few ways to create maps easily, although they may not produce as good results as hand made maps, they certainly have positives, especially if you have a large selection of meshes that need making shader ready. Here are a few alternatives that create the maps needed yet are generated by a computer:

http://shadermap.com/
http://www.crazybump.com/

Diffuse and Diffuse 2 Maps


A diffuse map is required for everything in FPSC, although it may not have the _D or _D2 at the end of the file name, all meshes need a diffuse texture does to make it render correctly. If a shader uses a _D map or _D2 map yet it does not specify that it uses the other, it is recommended that you create them both anyway. It may cause problems with certain shaders if only a _D or _D2 texture is there despite it not being mentioned. It is good practice to always have both. To create a _D2 just copy and paste the _D and add the ‘2’ at the end of the file name, or if you only have a _D2 just copy and paste then remove the ‘2’.




Creating Illumination/Specular Maps


This is the way that I create both illumination and specular maps, when needed I use the same map for both: unless it is a mesh that needs to be lit up as a light etc, which will be covered later.

1. Locate the diffuse texture that is assigned to the mesh. This can be located in the .fpe/.fps file that the mesh is assigned too. This will be located in either the ‘entitybank’ or ‘segments’ folders in your main FPSC directory.

2. Load the diffuse texture into your photo manipulation software.

3. Find the option to create your texture greyscale.

4. Now find the option to adjust the contrast and increase the contrast as much as possible (in photoshop, in other editing software adjust until you are happy with the result).

5. If needed adjust the brightness until you are pleased with the result.

6. Save your texture as the same name as your diffuse, but instead of having _D/_D2 at the end, it should be _I/_S depending of which map you want. E.g: if my original diffuse texture was called: ‘bootlickeristhecoolest_D’. If I wanted my new texture to be an illumination map I would save as: ‘bootlickeristhecoolest_I’ in the exact same folder or if specular: ‘bootlickeristhecoolest_D’.

If you wish for a more detailed and graphically enhancing map, check out Bond1’s tutorial on how to create these maps in photoshop: http://www.youtube.com/watch?v=5Gqp4bNJ52M.




Creating Normal Maps


To create a normal map you will need one of the following plugins:

Photoshop : http://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop
GIMP : http://code.google.com/p/gimp-normalmap/
Paint.net : http://paint.net.amihotornot.com.au/Features/Effects/Plugins/Color/Normal_Map/


1. Locate the diffuse texture that is assigned to the mesh. This can be located in the .fpe/.fps file that the mesh is assigned too. This will be located in either the ‘entitybank’ or ‘segments’ folders in your main FPSC directory.

2. Load the diffuse texture into your photo manipulation software.

3. Find the normal map tool (the links above). In photoshop:

Filter > NVIDIA Tools > NormalMapFilter


4. Apply this to your texture; depending on how deep you want your mesh to appear adjust the scale. A scale of about 5-12 works for most of my meshes.

5. Save your texture as the same name as your diffuse, but instead of having _D/_D2 at the end, it should be _N. E.g: if my original diffuse texture was called: ‘bootlickeristhecoolest_D’. I would save as: ‘bootlickeristhecoolest_N’ in the exact same folder as the other textures.




Applying Shaders to Segments


1. Locate the .fps of the segment you want to create shader ready, this will located in your ‘segments’ folder under the main FPSC directory. Also locate the shader you wish to determine which maps you need and create them using the instructions above. You will need to create maps for both the wall and floor textures.

2. Open up your .fps of the segment and locate the line ‘effect0 =’. Now copy and paste the location of your shader into this line. E.g:

‘effect0 = effectbank\ps_3_0\segments\norm_spec_tangentbasis.fx’

3. Repeat step 2 for every line that says ‘effect =’, this makes sure that the shader is applied to all sides of the segment, not just one part of it, if you were to only paste the directory of the shader on the first effect line, the effect would only be applied to the floor of your segment.

4. Your segment should be shader ready, if not, try making sure that all the lines with your texture in finishes with _D2.dds. If the shader appears on your walls but not your floor, make sure that you have the same maps for the floor in the same directory as the floor diffuse. Also make sure that the path to your shader is correct and ends in ‘.fx’. If this still does not work, post for help or attach your segment and the textures with it to this thread for more support.

Example .fps




Applying Shaders to Entities


1. Locate the .fpe of the entity you want to create shader ready, this will located in your ‘entitybank’ folder under the main FPSC directory. Also locate the shader you wish to determine which maps you need and create them using the instructions above.

2. Open up your .fps of the segment and locate the line ‘effect0 =’. Now copy and paste the location of your shader into this line. E.g:

‘effect0 = effectbank\ps_3_0\entities\static\ norm_alphaspec_tangentbasis.fx’

3. Your entity should be shader ready, if not, try making sure that all the lines with your texture in finishes with _D2.dds. Also make sure that the path to your shader is correct and ends in ‘.fx’. If this still does not work, post for help or attach your entity and the textures with it to this thread for more support.

Example .fpe





Shaders Available that I Frequently Use


http://forum.thegamecreators.com/?m=forum_view&t=178372&b=24 - Bond1

http://forum.thegamecreators.com/?m=forum_view&t=145214&b=21 - Creator of Zombies

http://forum.thegamecreators.com/?m=forum_view&t=155573&b=21 - Creator of Zombies

http://forum.thegamecreators.com/?m=forum_view&t=148587&b=21 - Creator of Zombies


Feel free to post any comments or suggestions. Hope I helped.

-Ben



Attachments

Login to view attachments
EGG HEAD OF DOOM
10
Years of Service
User Offline
Joined: 21st Sep 2008
Location: The Hacked Hospital Lobby
Posted: 11th Aug 2011 22:15
WOW! nice work, very good explanations

szempek555
7
Years of Service
User Offline
Joined: 9th Apr 2011
Location:
Posted: 11th Aug 2011 22:19
Very nice tutorial it's going to help me a lot in finishing my game. Thanks
Wolf
10
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 12th Aug 2011 01:13
This thread has been approved by wolf.

DOOOOOOOOM!

No seriously...nice effort, Bootlicker!



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
Design Runner
7
Years of Service
User Offline
Joined: 16th Oct 2010
Location: In my own little world.
Posted: 12th Aug 2011 21:40
This is very helpful bootlicker, thanks a ton!

2Beastmode4u
7
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Aug 2011 06:03 Edited at: 13th Aug 2011 06:24
Great job Bootlicker.

[Sorry to go off-topic]
Hey I was wondering, where did you get these models:




Cheers.

EDIT:
Thanks Vent.

God help me, Please.
Vent
FPSC Master
9
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Chilliwack, BC
Posted: 13th Aug 2011 06:15
Bootlicker
9
Years of Service
User Offline
Joined: 29th Mar 2009
Location: Germany
Posted: 13th Aug 2011 15:23
yeah, model pack 38. Them models come shader ready, i would strongly suggest purchasing model pack 38 as it has shaders, models and segments which are all top quality and work with one another extremely well.


Bootlicker
9
Years of Service
User Offline
Joined: 29th Mar 2009
Location: Germany
Posted: 16th Aug 2011 19:17
double post - bump.

anything that anyone would like to see my do a 'complete guide' on that i know pretty well?


spudnick
7
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 23rd Aug 2011 01:31
I have one question, does dark shader to all this, meaning can you use a model or image and create shaders for them and when all is done you end up with the D and D2 files.

As for tutorial it explains a very well indepth progress and even a noob like me understood what is going on

Nice one man A+

I'am not GOD but i can make you see again by taking my fingers out of your eyes and i can make you walk again by taking your beer away, but if you take my beer you will not walk again
bruce3371
8
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 23rd Aug 2011 02:03
Very usefull, thanks to this I've been able to get my first few models shader ready

TGPEG
11
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 23rd Aug 2011 02:15 Edited at: 23rd Aug 2011 02:18
A good tutorial - but - none of the CoZ shaders are available to download any more as he unfortunately left the forum (and has since come back I think). I thought you might have found them again for a minute.
Bootlicker
9
Years of Service
User Offline
Joined: 29th Mar 2009
Location: Germany
Posted: 23rd Aug 2011 02:47
really? them downloads work for me? i just doubled checked them they are attached to the posts. maybe not the first posts, but they are in the thread somewhere



TGPEG
11
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 23rd Aug 2011 20:32
So they do. My mistake.
Bootlicker
9
Years of Service
User Offline
Joined: 29th Mar 2009
Location: Germany
Posted: 30th Aug 2011 21:08
just thought id bump this up. it hasnt gotten quite enough posts for me to let it die



xplosys
Valued Member
12
Years of Service
User Offline
Joined: 5th Jan 2006
Location: Somewhere in Alabama
Posted: 30th Aug 2011 22:02
Nice! Thanks.

Brian.

Ross tra damus
12
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 15th Sep 2011 17:17
Bootlicker

Thanks very much for the guide, I've read it and followed it up with my first results in the Forum.
I'm afraid that my PC's do not have shader 2 or 3 support but I still got some results which I think are semi-OK.

Thanks again and all the best of luck.

Ross
Bootlicker
9
Years of Service
User Offline
Joined: 29th Mar 2009
Location: Germany
Posted: 15th Sep 2011 17:26
yeah, i just saw your crate! looks cool! glad to see some results that have used this. i felt like maybe this didnt really help anyone, was just another thing that everyone says thanks and doesnt use thanks again!!



Soviet176
9
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 15th Sep 2011 20:06
No it helped me greatly bootlicker


Bootlicker
9
Years of Service
User Offline
Joined: 29th Mar 2009
Location: Germany
Posted: 15th Sep 2011 20:13
oh thanks! sorry i havent sent you that emblem. been a bit busy.



Bootlicker
9
Years of Service
User Offline
Joined: 29th Mar 2009
Location: Germany
Posted: 31st Dec 2011 13:33
bumping this up as i keep seeing a few shader problem threads, and im not sure i wan =t it to die yet.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.

Login to post a reply

Server time is: 2018-09-22 13:00:22
Your offset time is: 2018-09-22 13:00:22