|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 24-Jul-2002 6:19 PM |
|
Since I see many references to "how to add custom textures/shaders", I taught it would be a good idea to do a quick tutorial on it. 1) decide what exactly you want to do : do you want a image (texture) applied to your objects and have no special effects at all (plain wall for example) ? Special effects are achieved with creating a shader. 2) create a folder in BASEQ3/TEXTURES/folder_name 3) that folder_name should idealy be the same name as the map you are building. This is to ease on finding out where are those textures being used. 4) decide if you texture is a TGA or a JPEG file. -JPEG formats (standard format please or else your Quake-3 will fail !!!) is usualy used for non-shaders types of textures and for images that don't realy matter if you get a bit loss of quality (JPEG is a destructive format so if you use QUALITY=5, your JPEG will have 50% quality of the original one you were doing). -TGA files are are for high quality images and specialy for shader types of textures. You can use JPEG for shaders but I heard in the past, people having rare and weird problems doing this. Your TGA should be saved as a 24 bit image if you don't have any ALPHA channel in it (usual case and the default also) or if it has, then use 32 bits. ALPHA channel is for special Shader effects like transparency ( won't cover it here, do a search on internet). 5)your image should be with a size based on a multiple of 16 (easier this way) : 32 X 32, 64 X 96, 128 X 192, 256 X 256. Keep your image below size 256. You can use bigger but it takes more space and may not work in all cases. Some video cards may not support textures bigger then the 256 limit and many bigger textures may result in memory space problems once in the game.6) save your image in that new folder you created in 3) 7) make sure Tempest is aware of that folder by going in the CUSTOMIZE menu and choose the CUSTOMIZE PATH. Click the BITMAPS path and make sure your new texture folder is in there. 8) If you are just creating a texture without shaders, you can skip to 12) 9) After reading and understanding how a shader is done and what it does (remember link above ?), create it either with notepad or with Q3ASE Shader Editor. 10) save your shader in BASEQ3/SCRIPTS and give it a filename like what_ever_name.SHADER 11) edit your SHADERLIST.TXT and add that shader name in it (without the .SHADER extension) 12) start your Tempest and check if you can see your shader or texture. Then start using it. 13) if in your compile log you should see message like "couldn't find image for shader xxx", it means that your shader isn't pointing to the right texture or has a typo in that path. Try it out and if you have problems, please reply back. After all, I did this all by memory. Hint : best tool for doing textures is PhotoShop (especialy ALPHA channels). [ August 05, 2002, 10:20 AM: Message edited by: Browser [ICE] ] |
|
|
|
|
|
|
|
| Advanced Poster |
| 1466 Posts | | | |
|
Steps for adding new textures/shaders
|
|
Posted 24-Jul-2002 6:37 PM |
|
|
ok i seem to have got that so now all i need to do is redo my map for the cokemachine so i would basicaly create it as a brush sence im to use a shader on it? or can i still use my md3 object although the map was applied with uvw unwrap. and is one map. so im going to have to make all the sides and top and bottom as textures and create the front map texture and add then create a shader from this texture, i dont want light coming from the sides now do i?LOL i pick up the shader editor just wish i could get maps to comethrough in Q3 i guess that should be # 1 on the ajenda. a |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 24-Jul-2002 6:59 PM |
|
quote: Originally posted by D_FAST: ok i seem to have got that so now all i need to do is redo my map for the cokemachine so i would basicaly create it as a brush sence im to use a shader on it? or can i still use my md3 object although the map was applied with uvw unwrap. and is one map. so im going to have to make all the sides and top and bottom as textures and create the front map texture and add then create a shader from this texture, i dont want light coming from the sides now do i?LOL i pick up the shader editor just wish i could get maps to comethrough in Q3 i guess that should be # 1 on the ajenda. a
If you want, you could always create your coke machine as plain brushes and part of your map. This will be a faster process to see how your coke machine looks in the game. Doing that way also means that you will not be able to distribute your coke machine to every one to include it in theire own map. To do this you have to create it as a MD3 mapobject.
Once you are satisfied with that machine then you could create your MD3 by copying it out of your map and into a GMAX folder of it's own.
After applying your UVW Unwrap to any object (when you think it's all done), right click in the MODIFIER list of your object and choose COLLAPS ALL from the menu. This will permanently apply your UVW to your object.
P.S. : try to keep this post about creating textures/shaders. People might loose interest in it if other subjects are talked in it. |
|
|
|
|
|
|
|
| Advanced Poster |
| 1466 Posts | | | |
|
Steps for adding new textures/shaders
|
|
Posted 24-Jul-2002 7:09 PM |
|
|
so could i create a shader that flickers on and off or will i have to put the c++ to work on this? |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 24-Jul-2002 8:47 PM |
|
quote: Originally posted by D_FAST: so could i create a shader that flickers on and off or will i have to put the c++ to work on this?
You can have a shader that flickers on/off on some parts of your coke machine.
You can even have a shader to have some kind of reflection effect on the glass of your coke machine.
You can have a shader for the digital display on your coke shader to have it scroll left and right.
Thing is, a shader should only have about 4 special effects maximum average. Each special effects of a shader is another drawing pass on your computer screen added to the drawing pass of everything else. The more drawing pass done on your screen, the slower the game could become.
Off course there are ways of having multiple effects on one object. It's like have one MD3 file but with multiple MD3 objects in it with each theire own textures/shaders. That's how you can have multiple textures on one MD3 file. |
|
|
|
|
|
|
|
| Advanced Poster |
| 1466 Posts | | | |
|
Steps for adding new textures/shaders
|
|
Posted 27-Jul-2002 7:03 AM |
|
ok i went out and picked up q3ase and boy nice tool, now i have the shader i what looks all good in the q3ase preview. but i have this little problem now with the shader nav. it giveing me this dongk error ok its name is on the shader.txt add all nesacerary shader files are where they should be added the path to my textures the shader is useing, fallowed your guys as well as many other docs to create a folder inside well here my path -------------------------------------------------- C:\Quake III Arena\baseq3\textures\testmap\textures\coke_machine -------------------------------------------------- ok if i open tempest and create an generic enity then add my model then open the shader nav no problem there it is in all its glory. now if i load my testmap-- create the enity--load my model--- open the nav--- nope no go, get that error. any ideas? hope this was the right place to put this. |
|
|
|
|
|
|
|
| Advanced Poster |
| 1466 Posts | | | |
|
Steps for adding new textures/shaders
|
|
Posted 27-Jul-2002 5:28 PM |
|
|
ok nether mind my last post. im making big break throughs here i can now see my models in tempest textured and in the quake game. im no longer having problems with the nav, had some dup folders.was confussing things. now to the question at hand. ive made 2 new shaders so far and both are working in the Q3ASE preview window. i have added my paths too through the custimize paths dialog and added the shaders to my shaders list and to the scripts folder. and both show up in the shader nav. so here my guestion why arent they working in quake3. all the docs that im finding on the net arent much help. ive done everything to the T (i think) man the cokemachines shaders way cool in the preview window. i what to see it in quake darn it, where are u BROWSER [ICE]?LOL
BTW is there any way i can add damage to a shader i cant find anything in the shader doc on this from id. except for the nomark and so on. i want to have say a nice perfect object .and when it gets hit to have the texture change to a damaged one.with different shader properties, the animat wont to this will it.ill keep digging though im sure some out there knows |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 29-Jul-2002 9:13 AM |
|
quote: Originally posted by D_FAST: ok nether mind my last post. im making big break throughs here i can now see my models in tempest textured and in the quake game. im no longer having problems with the nav, had some dup folders.was confussing things. now to the question at hand. ive made 2 new shaders so far and both are working in the Q3ASE preview window. i have added my paths too through the custimize paths dialog and added the shaders to my shaders list and to the scripts folder. and both show up in the shader nav. so here my guestion why arent they working in quake3. all the docs that im finding on the net arent much help. ive done everything to the T (i think) man the cokemachines shaders way cool in the preview window. i what to see it in quake darn it, where are u BROWSER [ICE]?LOL
BTW is there any way i can add damage to a shader i cant find anything in the shader doc on this from id. except for the nomark and so on. i want to have say a nice perfect object .and when it gets hit to have the texture change to a damaged one.with different shader properties, the animat wont to this will it.ill keep digging though im sure some out there knows
First all new shaders you create and want to use in your Quake-3 model/map have to be added in the SHADERLIST.TXT and be present in the BASEQ3/SCRIPTS
Second, unfortunetly for models/mapobjects you cannot have impacts done on objects. That is a restriction of the game engine. You can only have it skin wrapped with COMMON/WEAPON_CLIPS so weapon ammos will actualy hit it but won't leave any marks. Only time when marks are done is on brushes being part of a map, not part of a model. Again this is engine restriction. Sorry ! |
|
|
|
|
|
|
|
| Advanced Poster |
| 1466 Posts | | | |
|
Steps for adding new textures/shaders
|
|
Posted 29-Jul-2002 9:29 AM |
|
|
im not sure im understanding. are u saying that i cant use shaders on mapcbjects? or that i cant have my mapobject detect impacts? if i can use shaders on my mapobjects im having a problem with a very simple one. its for a bush wanting to have the black arond it so that its not rendered. in the game but for some reason its not doing this , the bush is there but can see the whole thing heres the shader
like i said simple one. -------------------------------------------------- models/mapobjects/bush1 { cull disable nopicmip { map models/mapobjects/bush1/bush1.tga rgbGen identity tcMod turb 1 0.002 0 0.5 alphaFunc GE128 } { map $lightmap blendfunc filter rgbGen identity depthFunc equal } } --------------------------------------------------
i have it in the shader.txt and its showing in the nav. if i apply it to a thin brush its still rendering the black areas. and yes its a 32 bit .tga with an 8 bit alpha and 24 bit color so theres something im missing. thanks in advance |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 29-Jul-2002 10:22 PM |
|
|
hi (am i interrupting? )
just wanna know is there something like uv coordinate when apply texture in tempest? and I want to apply different jpg to different surface on one brush, how can I do?
thx |
|
|
|
|
|
|
|
| Advanced Poster |
| 1466 Posts | | | |
|
Steps for adding new textures/shaders
|
|
Posted 30-Jul-2002 5:48 AM |
|
|
yea sort of. convert to editable brush-- then click on it in the stack or use its drop down option. and selct face---- now yoll see a mapping rollout at the bottom of the command window. select your face add your shader or image then mess with the setting there basicaslly the same as gmax'x standard uv mapping scales just with out a w cord. tip check out hat copy paste option. works nice . this is for if u want to have to or more sides with the same scale just copy one then select another face then paste. wallaa. another thing to note, for adding different textures to different faces u use shader paint. |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 30-Jul-2002 7:11 AM |
|
|
and can I fit a map onto a face (like i do in max?)
thx |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 30-Jul-2002 9:33 AM |
|
quote: Originally posted by D_FAST: im not sure im understanding. are u saying that i cant use shaders on mapcbjects? or that i cant have my mapobject detect impacts? if i can use shaders on my mapobjects im having a problem with a very simple one. its for a bush wanting to have the black arond it so that its not rendered. in the game but for some reason its not doing this , the bush is there but can see the whole thing heres the shader
like i said simple one. -------------------------------------------------- models/mapobjects/bush1 { cull disable nopicmip { map models/mapobjects/bush1/bush1.tga rgbGen identity tcMod turb 1 0.002 0 0.5 alphaFunc GE128 } { map $lightmap blendfunc filter rgbGen identity depthFunc equal } } --------------------------------------------------
i have it in the shader.txt and its showing in the nav. if i apply it to a thin brush its still rendering the black areas. and yes its a 32 bit .tga with an 8 bit alpha and 24 bit color so theres something im missing. thanks in advance
I'm not an expert into shaders. I've only recently started learning about them because I'm creating some of my own for a map I've been working on for months. But your shader should look more like this :
models/mapobjects/bush1 { qer_editorimage models/mapobjects/bush1/bush1.tga surfaceparm alphashadow surfaceparm trans surfaceparm pointlight cull disable nopicmip { map $lightmap blendfunc filter rgbGen identity tcGen lightmap depthFunc equal } { map models/mapobjects/bush1/bush1.tga rgbGen identity tcMod turb 1 0.002 0 0.5 alphaFunc GE128 } }
If your object having the shader doesn't need to be influenced by surrounding light in your world, then drop the $lightmap stage.
And no, you misunderstood me. You can use shaders on models an mapobjects (I'm doing it !) and mapobjects on theire own cannot have impact detection. You must wrap them with clip shaders in your map (you create the mapobject and once you add it in your map then you wrap it with player, bots and weapon clips). Player models have impact detection because it is the game engine who takes care of this. |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 30-Jul-2002 9:46 AM |
|
quote: Originally posted by HiHI: hi (am i interrupting? )
just wanna know is there something like uv coordinate when apply texture in tempest? and I want to apply different jpg to different surface on one brush, how can I do?
thx
Yes, just select an object and go in the modifiers tab (just like in 3d max) and select either UVW WRAP or UVW UNWRAP. But the UNWRAP should be one you want.
Now if it's for a object you want to export as an MD3, to actualy have more then one JPEG on one single object, you have to divide your object into as many objects as you want different JPEG. Keep all of them stuck together as if they were all one single piece. Then when you want to export it, select everything and export as one single MD3 object. Then you have to do the little MD3 fix procedure using NpHerNo and Milkshape. Just do a search here in tempest on these 2 words. I won't go through that now.
If it's now for an MD3 object, but for a part of your map, then go with what DFAS said. [ July 30, 2002, 09:49 AM: Message edited by: Browser [ICE] ] |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 30-Jul-2002 9:51 AM |
|
quote: Originally posted by HiHI: and can I fit a map onto a face (like i do in max?)
thx
If you mean fiting a map material to fit exactly and show all on that face, then yes you can. There isn't a button to do it instantly. You have to play with the numbers that show up when you select that FACE item in your editable brush modifier. |
|
|
|
|
|
|
|
| Advanced Poster |
| 1466 Posts | | | |
|
Steps for adding new textures/shaders
|
|
Posted 01-Aug-2002 6:39 AM |
|
quote: I'm not an expert into shaders. I've only recently started learning about them because I'm creating some of my own for a map I've been working on for months. But your shader should look more like this :
well the shader looks good . but so did mine. lOL
but still having no luck seeing it in quake. its still rendering the black areas. i tried it on a edible boxbrush as well. and the texture comes through but with no shader attributes. anymore ideas what i could be missing? |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 02-Aug-2002 10:22 AM |
|
quote: Originally posted by D_FAST: quote: I'm not an expert into shaders. I've only recently started learning about them because I'm creating some of my own for a map I've been working on for months. But your shader should look more like this :
well the shader looks good . but so did mine. lOL
but still having no luck seeing it in quake. its still rendering the black areas. i tried it on a edible boxbrush as well. and the texture comes through but with no shader attributes. anymore ideas what i could be missing?
Send me your texture and shader. I'll check it out. This is the quicket way of investigating instead of posting many replys. |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 05-Aug-2002 9:27 AM |
|
|
thx for the replies. Actually I want to fit texture maps onto a map brushes. As I say earlier, my intention is to make a architectural model, so I'm really looking for accurary. (say at least the tiles gaps on the 4 sides of a wall aligned) As you said, I can play with the no. of the UV scale, but those buttons are not making me comfortable....
now I have just finished building my model brushes. My next step is apply materials. I've downloaded that q3ase. Is there a function that can stretch fit a texture on a brush? maybe I just missed this in the manual..
Or say my texture .jpg is 800 x 600 pixels. Does it corresponds to a certain brushes size in tempest? if so, I can just scale my texture and would just fit to my 5m x 3m wall.
thanks for helps in advance!! |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 05-Aug-2002 10:18 AM |
|
One thing I forgot to mentionned. The recommanded size of any textures for Quake-3 (any MODs) is 256 X 256. You can use 512 X 512 but some users may encounter problems on seeing the texture in the game as not all video cards support more then 256 sized textures. If you have a wall wich needs a texture bigger then 256 X 256, you will have to break down the wall into brushes having that size 256 X 256. It's like making a puzzle out of the wall with multiple textures all composing one big image. Besides, having many big textures will increase the size of the finished product and may cause problem if it's geting too big. If I remember, the maximum size of a PK3 file (zipped *.PK3 file with all maps, models, textures, scripts in it) musn't be bigger then 56Mb. quote: Originally posted by HiHI: thx for the replies. Actually I want to fit texture maps onto a map brushes. As I say earlier, my intention is to make a architectural model, so I'm really looking for accurary. (say at least the tiles gaps on the 4 sides of a wall aligned) As you said, I can play with the no. of the UV scale, but those buttons are not making me comfortable....
now I have just finished building my model brushes. My next step is apply materials. I've downloaded that q3ase. Is there a function that can stretch fit a texture on a brush? maybe I just missed this in the manual..
Or say my texture .jpg is 800 x 600 pixels. Does it corresponds to a certain brushes size in tempest? if so, I can just scale my texture and would just fit to my 5m x 3m wall.
thanks for helps in advance!!
|
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 05-Aug-2002 11:36 PM |
|
|
well, i found this in the shader manual: ------------------------------------------------- Game unit: A game unit is how that pixel is expressed in the editor. Typically, a game unit measure one pixel in the X, Y, and Z directions. If not scaled or otherwise manipulated, a 128x128 pixel texture will fill a 128x128 game unit surface.
Pixel: Is the absolute value of a single definable color coordinate in a piece of source art.
Texel: This is how a pixel is expressed in the game world. Without manipulation, it equals 1.0 game units.
Texture: This is the normalized (see above) dimensions of the original texture image (or a previously modified texture at a given stage in the shader pipeline). A full texture, regardless of its original size in pixels, has a normalized measurement of 1.0 x 1.0. -------------------------------------------------
Do I understand it correctly? 1 pixel = 1 unit?! then my 1000mm x 500mm tile would be like 200x100 pixels and scale x5 I'll try to testify it back home. |
|
|
|
|
|
|
|
| |
|
Steps for adding new textures/shaders
|
|
Posted 06-Aug-2002 8:05 PM |
|
|
I've done my homework 1 pixel = 1 unit exactly
another problem happens that I shift the texture position on the face, but after compile and look at it in quake, the texture's still in its default postion. what did I do wrong? |
|
|
|
|
|
|