PDA

View Full Version : I really need help with my shaders



CRGzane
August 2nd, 2008, 09:22 PM
Ok, after watching tutorials I can never get my shaders to work. I made my own shaders watching a great tutorial, and whenever I go to compile it, it says they cant be found in the command line. In the marterial editor in 3dsmax i named it f_if BaseShader (thats the name of my shader, and the location) so then I find the TIF of my shader and I apply it to my map....then when I get the map all done and compile...it says they cant be found...I would really like to get this solved.:confused2:

beele
August 3rd, 2008, 01:49 AM
To use bitmaps in your map.
Put your tiff files in "Halo 2 Map Editor\data\scenarios\bitmaps". Under a new folder you will need to create. (for example create a new folder named "test").
Open the halo 2 map editor and go to the bitmap creation tab.
Select one of the files you want to convert (It will convert all the available files in the folder). Now click convert image.
Let the program convert the files (if any errors, make sure that your tiff files have the right dimensions).
The tool will place the converted files in "Halo 2 Map Editor\tags\scenarios\bitmaps\test\" (the files will be in the .bitmap file type).
Now you will need to create shaders for the bitmaps you just created: Open guerilla and click on "file" and select "new" and then pick shader. It will now create an empty shader file.
You will need to edit your shader now. First pick a shader template you find suitable for the thing you have in mind.
Further fill in the shader (once you select a shader template, it will give you more options).
Save your shader in a new folder (for example shader_test and name the shader testshader) in "Halo 2 Map Editor\tags\scenarios\shaders".
Now you will need to edit your shader collections file (located in Halo 2 Map Editor\tags\scenarios\shaders). You will need to open it with notepad (A small part of the file is under here); <- this character indicates a comment, blank lines are okay too

;
; each shader collection is a named directory that the environment importing process
; knows to look in for shaders - each line in this file has the format
;
; abbreviation tag directory
;
; do not remove this first entry, it specifies the default place to look
* scenarios\shaders
; ========== general-purpose shaders (invisible collision geometry, etc)
g scenarios\shaders\generic
n scenarios\shaders\nature
m scenarios\shaders\multi
shared scenarios\shaders\shared\shaders
ui scenarios\shaders\ui
mainmenu scenarios\shaders\ui\mainmenu
; ========== forerunner shaders
f scenarios\shaders\forerunner
f_if scenarios\shaders\forerunner\industrial\floors
f_ig scenarios\shaders\forerunner\industrial\glass
f_il scenarios\shaders\forerunner\industrial\lights
f_im scenarios\shaders\forerunner\industrial\metals
f_it scenarios\shaders\forerunner\industrial\tech

; ========== my shaders
t scenarios\shaders\shader_test

; ========== covenant shaders
c scenarios\shaders\covenant
c_mm scenarios\shaders\covenant\military\metals
c_mt scenarios\shaders\covenant\military\tech
; ========== human shaders
h scenarios\shaders\human
h_um scenarios\shaders\human\urban\metals
h_ug scenarios\shaders\human\urban\glass
h_ugrnd scenarios\shaders\human\urban\ground
h_up scenarios\shaders\human\urban\pavers




Something like the red you need to add to the file. After you made that change, save the file.
Now you will need to properly set up your materials in 3dsmax.
For every material you will need to use the appropriate linkage or the tools will not understand what shader you are using.
For example: a new material (with ID|Name|Submaterial). Click on the button which at the top states submaterial. Max will now open a new dialog in the material editor. At the top next to standard, you have a textbox, there you'll need to put your name. Like t testshader (the one I made in this example) or f_im flat_dark_scratchy (a default shader). The t you put in front is the code you added in the shader collections file which refers to "scenarios\shaders\shader_test" and behind the t you just put the filename of the shader in this case being "testshader".
I assume you know the rest (exporting and compiling)Hope this helps a little.

I posted this a while ago. Mabye your doing something wrong.

CRGzane
August 3rd, 2008, 04:09 PM
Thanks for the reply, I'm new around here, and I wasn't getting any replies on Halomaps so I came here. I'll try it out and if it dosent work then I have to be doing something wrong.