Welcome to my tutorial on creating illuminating shaders. These can be used to get a more realistic feel for your objects.
Before we start, you will need:
- Adobe Photoshop CS4 with .DDS plugins (or any image editing software that supports .DDS files)
- This [shad] plugin
- Entity (any version)
Both of these cubes are illuminating white light (RGB: 255) from the shader.
Now, let's begin.
Tutorial
Open up your map in Entity and duplicate two bitmaps (both should be the same size, one preferably DXT 5, and the other preferably DXT 1).
Save both those textures and edit them to your liking. The DXT 5 bitmap will be the diffuse, while the DXT 1 will be the self-illumination. Here are the RGB and alpha channels of my DXT 5 texture (top, left to right), as well as the DXT 1 texture (bottom).
(I edited both sizes. The original tags were 128 x 64, the duplicated tags are 128 x 32.)
Now, illumination maps are black and white, so make the area that will be illuminating white, and the rest black.
Re-inject your new textures.
Now we need to find a shader that has illumination, or we could just make one. This is easier, however.
A nice illuminating shader is the plasma grenade decal: "objects\weapons\grenade\plasma_grenade\shaders\pg_decal".
So let's duplicate that.
Now find your new shader and "View" > "Idents".
Swap the highlighted dependencies.
Red: The illumination map.
Blue: The diffuse map.
Now open up the meta editor, and be sure your using the [shad] plugin posted at the top.
Scroll to the "Specularity Colour | Illumination Colour" reflexive and select chunk 3.
This is the overall color that your illumination map will give off. Edit it to your liking.
Now, go to chunk 1 and you'll notice the "Intensity" value. This is essentially an alpha of the illumination; 255: brightest, 0: none. Edit that to your liking as well.
----------------------------
Now, sign and test. If any problems occured, post them here.
I hope you all make the best of this tutorial.
Thanks for your time,
NotZac