JeeMonkey Posted September 5, 2005 Share Posted September 5, 2005 hey yall, it may be my memory or age but i can not remember how to take 6 sky textures and make a sky shader out of them. right now i have the 6 sky shaders in --> mymap.pk3/textures/skies/mysky to make a sky shader i am supposed to use this code: ~~~~~~~~~~~~~~~~~~~~~~ textures/skies/mysky { qer_editorimage textures/skies/sky.tga surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_nolightmap skyParms textures/skies/mysky 512 - } ~~~~~~~~~~~~~~~~~~~~~~ so what i did was make a .txt file with that code in it and i saved it as "skies.shader" and put it in --> mymap.pk3/shaders/skies.shader but after all that it isnt making a sky shader. what am i doing wrong? my 6 sky textures are 1024x1024 so should the code have been...???? ~~~~~~~~~~~~~~~~~~~~~~ textures/yourmap/sky { qer_editorimage textures/skies/sky.tga surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_nolightmap skyParms textures/yourmap/yoursky 1024 - } ~~~~~~~~~~~~~~~~~~~~~~ help! Link to comment Share on other sites More sharing options...
lassev Posted September 5, 2005 Share Posted September 5, 2005 Check http://shaderlab.com/q3map2/shader_manual/ch2.html#skyparms for skyparms info. The number (512, 1024 etc...) is not the resolution of your textures. And I wouldn't recommend creating a shader called skies.shader, because there's already an original shader called that by Raven. Rename your shader file, and check you named your textures according to the specifications (xxx_rt, xxx_lf, xxx_ft, xxx_dn, xxx_bk, xxx_up). Link to comment Share on other sites More sharing options...
JeeMonkey Posted September 5, 2005 Author Share Posted September 5, 2005 do the 6 sky textures have to be saved as .tga? or can they be .jpg? Link to comment Share on other sites More sharing options...
lassev Posted September 5, 2005 Share Posted September 5, 2005 Use jpegs. Just keep the no texture compression line (notc) in your shader entry, and it will look fine enough. There's little reason for having lossless images in a skyshader. I have never had. Link to comment Share on other sites More sharing options...
JeeMonkey Posted September 5, 2005 Author Share Posted September 5, 2005 ok, i tried everything and i hate wasting other peoples time so does anyone know a map that i can download (not a raven map) that has 6 sky textures and a sky shader in it that i can look at and compare? Link to comment Share on other sites More sharing options...
lassev Posted September 5, 2005 Share Posted September 5, 2005 Most decent maps have. I couldn't imagine releasing a level without a custom skybox. But custom levels don't really have anything different than Raven ones. But nevertheless, pick any quality level and I'm surprised if it doesn't contain a custom skybox... Link to comment Share on other sites More sharing options...
riceplant Posted September 6, 2005 Share Posted September 6, 2005 I've noticed that I have trouble unless I do this: textures/<mapname>/sky I have problems unless mapname is the same as the filename of the shader file. For example "textures/deathstar/sky" in "deathstar.shader". Link to comment Share on other sites More sharing options...
MDN14 Posted September 8, 2005 Share Posted September 8, 2005 I know that the midgar map has a custom sky in it if you still need one to look at: Midgar 2.0:http://www.pcgamemods.com/11230 Midgar 1.0: http://www.pcgamemods.com/4833/ Or you can try just following my direction if you want: Here is a sky shader I like to use: textures/skies/<yourmapname> { q3map_lightimage textures/colors/white qer_editorimage textures/skies/sky.tga q3map_surfacelight 80 q3map_lightsubdivide 512 sun 0.75 0.79 1 80 130 60 surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_nolightmap skyParms textures/skies/cs1 512 - } That will use the cs1 (coruscant skybox) for the sky, but we will get to changing that to your custom sky in a bit. This shader will add in a little bit of lighting but not very much. Not even enough to see by in most maps. If you dont want any light from the sky at all you can take out these lines from the shader: q3map_surfacelight 80 q3map_lightsubdivide 512 sun 0.75 0.79 1 80 130 60 Next for getting your custom skybox in. Put all 6 of your skybox textures in a folder, you can put them in the skies folder if you want, might make them easier to keep track of. Next, rename all 6 of your images to <name>_up, <name>_dn, <name>_lf, <name>_rt, <name>_bk, <name>_fw. The <name> part should be whatever your sky is called, I usually like to have this the map name that they are used for. next in the shader, change this line: skyParms textures/skies/cs1 512 - to: skyParms textures/skies/<name> 512 - The <name> should be the same as whatever you named your sky. if you didnt put your custom sky textures in the skies folder, then you will need to rename the "skies" part of that line to the name of the folder you put your textures in. Next, save the shader as <name>.shader. Dont name it skies.shader because then you will cause lots of bad problems with other skies that came with the game. Just name it something like your namename_sky.shader or something like that. (I always do this because the shader wont work in radiant if I dont, other people dont have this problem though so it may not need to be done) Next open the shaderlist.txt file and at the bottom add a new line that is the same name as what you named your new shader (minus the .shader part of the filename). then save shaderlist.txt and load up radient. Open your map and then load the skies texture set. look around in the texures that it loads for one that is whatever you called it in the first line of the shader you made, usually your map name. Then use that sky texture in your map and when you compile it your custom sky should show up. Dont forget to put your custom sky textures and the shader in your pk3 file, especially if you have sv_pure set to 1. Otherwise they wont show up right. If you still see grey and white squares, you probably have a path set wrong or something like that. You could try setting the last line of the shader to a default sky and see if it works, and if it does then you know the problem is with your sky and/or the paths that it is looking for your sky at. Link to comment Share on other sites More sharing options...
JeeMonkey Posted September 8, 2005 Author Share Posted September 8, 2005 ok i am looking at the WOV map's sky shader and it is all good and stuff, but when i open GTK and load the sky textures, i get the raven sky textures, the raven sky shaders, and the wov sky textures....but no wov sky shader... but i know that it exsists! what does that mean? Link to comment Share on other sites More sharing options...
wedge2211 Posted September 8, 2005 Share Posted September 8, 2005 right now i have the 6 sky shaders in --> mymap.pk3/textures/skies/mysky Do you mean you have a subfolder called "mysky" in the directory "skies?" DON'T do this. Just have the files mysky_ft.jpg, mysky_rt.jpg, mysky_up.jpg, etc in a subfolder of the textures/ directory, for instance textures/skies/ or textures/yourmap/. so what i did was make a .txt file with that code in it and i saved it as "skies.shader" and put it in --> mymap.pk3/shaders/skies.shader As lassev said, don't overwrite skies.shader. Some quick things to check: have you saved as yourskies.shader, and not yourskies.shader.txt? And have you added the new shader file to shaderlist.txt? Link to comment Share on other sites More sharing options...
JeeMonkey Posted September 8, 2005 Author Share Posted September 8, 2005 ok here it goes, full frontal disclosure... here are my sky textures and the file paths for each of them: Tpalace.pk3/textures/atlantis/atlantis_bk.jpg Tpalace.pk3/textures/atlantis/atlantis_dn.jpg Tpalace.pk3/textures/atlantis/atlantis_ft.jpg Tpalace.pk3/textures/atlantis/atlantis_lf.jpg Tpalace.pk3/textures/atlantis/atlantis_rt.jpg Tpalace.pk3/textures/atlantis/atlantis_up.jpg Here is the file path for my sky shader: Tpalace.pk3/shaders/atlantis.shader Here is what my sky shader reads when i edit/open it in notebook: textures/skies/tpalace { qer_editorimage textures/skies/sky.tga surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_nolightmap skyParms textures/atlantis/atlantis 512 - } At this point i can only think of three things that i am doing wrong... 1) I shouldn't be editing a shader file in notebook. 2) my file paths are wrong 3) theres something that i am missing WHAT AM I DOING WRONG? WHY IS IT NOT WORKING? WHY IS MY SKY SHADER NOT LISTED IN GTK WHEN I LOAD THE SKY TEXTURES/SHADERS? Link to comment Share on other sites More sharing options...
MDN14 Posted September 8, 2005 Share Posted September 8, 2005 did you add atlantis to the bottom line of the shaderlist.txt file? are you looking for a shader named tpalace or sky? Because you specified that the shader should be called tpalace. Link to comment Share on other sites More sharing options...
JeeMonkey Posted September 8, 2005 Author Share Posted September 8, 2005 i added atlantis, and tpalace to the end of the shader list in hopes that at least one of them (once selected from the texture list in GTK...) would load my new sky shader that i had just made. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ also you asked if i was looking for a shader named tpalace or sky? my shader file is named atlantis.shader Here is the file path for my sky shader: Tpalace.pk3/shaders/atlantis.shader why would i be looking for a sky shader named "sky"? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ also, should i copy my sky shader and paste it in... tpalace.pk3/textures/atlantis/ folder, making the file path for my sky shader... tpalace.pk3/textures/atlantis/atlantis.shader ??? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ also, when i compile my map, all i do is the -meta compiling stage... do i need to do another compiling stage to get shaders to show? Link to comment Share on other sites More sharing options...
lassev Posted September 8, 2005 Share Posted September 8, 2005 The name of your shader file has no meaning other than it must be mentioned in shaderlist. You won't find the name of your shader file inside GTK anywhere, unless it happens to be the same as your custom textures folder (and maybe your map name). And obviously your custom shader file belongs right where the rest of the shader files are, not in some arbitrary place where Radiant or the game surely won't know to look for it. In Radiant, you will find your shader over here: textures/skies/tpalace Link to comment Share on other sites More sharing options...
JeeMonkey Posted September 8, 2005 Author Share Posted September 8, 2005 Thx yall, the problem is fixed now and I am very gratfull for y'alls help! To sum up the problem and the solution for anyone else who may experience this in the future or incase I forget how to do it, here is a summary (and it's not the exact same as what has been previously taught): Objective: To take (6) .jpg sky textures and make a 3-Dimensional sky shader out of them. Solution: STEP 1) Make sure that all of your (6) .jpg sky textures have the same name and that each of them have exactly one suffix from the list below. (note: each suffix from the following list can only be assigned to exactly one of the 6 sky textures) _ft _lf _rt _bk _up _dn You should end up with something like this: mysky_ft.jpg mysky_lf.jpg mysky_rt.jpg mysky_bk.jpg mysky_up.jpg mysky_dn.jpg STEP 2) Create a folder named "textures" STEP 3) Decide what folder (if any) you are going to put your (6) .jpg sky textures in. Then put that folder inside the "textures" folder. For educational purposes we are going to say that your folder is named "myskyfolder". You should end up with something like this: textures/myskyfolder/(all 6 of your sky textures) STEP 4) Make a .txt file and copy and paste the following code into it: textures/my_sky_shader_folder/my_sky_shader { qer_editorimage textures/skies/sky.tga surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_nolightmap skyParms textures/myskyfolder/mysky 512 - } STEP 5) Now decide what you are going to name your sky shader. For simplicity and ease of mind, most people decide to name their sky shader the same thing as they named their (6) sky textures (but you dont have to). Therefore, your sky shader would be named "mysky" and the .txt file would now look like this: textures/my_sky_shader_folder/mysky { qer_editorimage textures/skies/sky.tga surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_nolightmap skyParms textures/myskyfolder/mysky 512 - } STEP 6) Now decide what folder you would like your sky shader to appear in under the textures tab in GTK. Again, for simplicity and ease of mind, most people decide to name their sky_shader_folder the same thing as they named their sky_textures_folder (but you dont have to). This is done so that when you load that folder in gtk, you will load the 6 sky textures and the sky shader at the same time. Therefore, your sky_shader_folder would be named "myskyfolder" and the .txt file would now look like this: textures/myskyfolder/mysky { qer_editorimage textures/skies/sky.tga surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_nolightmap skyParms textures/myskyfolder/mysky 512 - } STEP 7) Now save your text document and name it whatever you want (it wont effect anything), but again for simplicity and ease of mind, it is best to name the text document after your sky textures. Therefore you would end up with a saved file named mysky.txt STEP 8) Now change the file extension of your text file to .shader and you should end up with something like this: mysky.shader STEP 9) Now create a folder and name it "shaders" and put mysky.shader in it. FINAL STEP) Now create a .zip folder and name it after your map. Then put both the "textures" and "shaders" folder inside it. Then edit the folders extension to .pk3 so you would end up with something like this: yourmap.pk3 SUCCESS! YOU NOW HAVE A WORKING BREATHING SKY SHADER! Link to comment Share on other sites More sharing options...
riceplant Posted September 8, 2005 Share Posted September 8, 2005 Don't treat it like it's a big deal. You're the one who asked for help, and when we help you to get it working, you repeat what we've told you and treat it like some form of revelation. If we needed help doing skies, and you knew to tell us, why did you ask not us? And why did you explain what we already know? Making a custom skybox is probably the simplest form of shader editing, we all have 'working breathing sky shaders', and for the record, your last step is completely superfluous. As I have stated in other threads (multiple times), there are only 2 reasons to make a pk3 file: You wish to override a resource included in the game You are releasing your level to other people, and want to give them one file, rather than many Link to comment Share on other sites More sharing options...
JeeMonkey Posted September 8, 2005 Author Share Posted September 8, 2005 ..... Thx yall, the problem is fixed now and I am very gratfull for y'alls help! To sum up the problem and the solution for anyone else who may experience this in the future or incase I forget how to do it, here is a summary (and it's not the exact same as what has been previously taught)Keeping in mind that I am still very very grateful for everyones help in explaing this to me, I'd like to add that my explanation is how I JUST learned to do it and it isn't the exact same as what you guys said to me, and even if it is, cleary you'r explanation was hard for me to understand, otherwise I wouldn't have kept replying saying that "I still don't get it, it still isn't working". And sky shaders arn't the easiest to make. Give me a break, it's been over a year since I mapped anything. And are you sure that you don't need to pk3 the files? Cause I tried putting the textures and shaders folder in the gamedata/base folder and it didn't work. Link to comment Share on other sites More sharing options...
lukeskywalker1 Posted September 9, 2005 Share Posted September 9, 2005 No, you have to put in a PK3... or if you are testing a MultiPlayer Map just type in SV_pure 0 (?) I think, and you don't need a PK3. But if you are distributing the file, like on PCGAMEMODS or JK3FILES, put it in a PK3. Link to comment Share on other sites More sharing options...
lassev Posted September 9, 2005 Share Posted September 9, 2005 Riceplant, if you want to come out as arrogant, you should at least do it with style. This place is about helping other mappers, not keeping record of who did and what. If somebody remembers you, be happy. If not, just curse the world and walk away, if you can't take it like a real man. Link to comment Share on other sites More sharing options...
riceplant Posted September 9, 2005 Share Posted September 9, 2005 Wow, I must have had one hell of a bad day when I posted that. That doesn't sound like me at all. Although the basic points seem to be more or less accurate, I honestly don't know why I presented them in such a fashion. Perhaps I can try to make amends by offering a little constructive criticism this time? I can but try. One suggestion would be not to name the shader file the same as the sky shader, but rather the same as the map name, similarly to Ravens naming them after the planet. Also, You forgot to mention editing shaderlist.txt, which is quite an important step. And if I am wrong about not having to make a pk3, someone please tell me. All in all, the only thing technically wrong with that tutorial is the omission of shaderlist.txt, and a few unneccessary steps (like saving your shader as .txt). Again, I'm sorry about that, I must have had a terrible day, but I shouldn't have taken it out on you. EDIT: I forgot to mention, but the extensions _ft, _bk, _dn, _lf, _rt and _up indicate directions, which is important to get right. By the way, what form of shader editing is easier than skyboxes, as I thought they were easiest (you only need to change 2 strings of shader code). Link to comment Share on other sites More sharing options...
JeeMonkey Posted September 9, 2005 Author Share Posted September 9, 2005 The easiest shader files to make are ones that just involve copy and paste such as when you want to add the Tall Grass phong (that moves as though the wind were blowing) onto another texture. Link to comment Share on other sites More sharing options...
lukeskywalker1 Posted September 10, 2005 Share Posted September 10, 2005 Well, you can copy and paste a sky shader... then just edit it to match your pics and stuff But I would suggest to at least try and understand what the code means Link to comment Share on other sites More sharing options...
wedge2211 Posted September 10, 2005 Share Posted September 10, 2005 And if I am wrong about not having to make a pk3, someone please tell me. In your base/ folder you should have a whole folder structure mimicking the interior of one of the assets pk3s; with folders for textures/, shaders/, effects/, maps/, etc, etc. When editing, custom elements just go in these folders. If you're running your map in JASP, you only need to load the map and every custom element should work (Lasse, correct me if I'm wrong). For final publishing, put everything in a pk3. If you're modding for JAMP, then you either have to enter "set sv_pure 0" in the console before loading the map or put all the custom elements in a pk3. For final publishing, pk3 it. The exception to both of these is if you want to override a default game asset. In that case, you must put your new custom assets in a pk3. Link to comment Share on other sites More sharing options...
lassev Posted September 10, 2005 Share Posted September 10, 2005 Yeah, that's right. The sv_pure command is not needed in SP. Makes sense, of course. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.